Computer Science Canada simple trig functions in turing |
Author: | Mazer [ Mon Oct 07, 2002 9:53 am ] | ||
Post subject: | simple trig functions in turing | ||
just some simple use of trigonometry functions in turing for you lucky arses that got to take comp sci before grade ten when you're supposed to learn trig. show this to your classmates that can't do things like this and then call them n00bs as they watch in amazement. j00 r teh l337 now!
|
Author: | Tony [ Mon Oct 07, 2002 10:38 am ] |
Post subject: | |
Hey Mazer, cool effect! 8) Thx for sharing your code with us |
Author: | DonQuixote [ Thu May 27, 2004 4:56 pm ] | ||
Post subject: | |||
could anybody explain this code line for line ? Especially the
I was planning to do something similar... but had absolutely no idea... |
Author: | Mazer [ Thu May 27, 2004 5:02 pm ] | ||||||
Post subject: | |||||||
DonQuixote wrote: could anybody explain this code line for line ?
Especially the
I was planning to do something similar... but had absolutely no idea... That's alot more than one line but...
That just sets the angle for each ball (so they'll be evenly spaced).
That's the trig portion. The ball's x coordinate is the cosine of it's angle multiplied by hyp, it's hypotenuse (the distance from the middle). Same for y coordinate, just with sine. Man, old post. And your avatar is big, let's change that please. |
Author: | netninja [ Wed Sep 15, 2004 5:53 pm ] | ||
Post subject: | |||
completely useless:
|
Author: | AsianSensation [ Wed Sep 15, 2004 6:24 pm ] | ||
Post subject: | |||
what makes you say that? the original code is
So it means, when one rotation is completed, the initial angle is resetted to one of the five spots. |
Author: | Mazer [ Wed Sep 15, 2004 6:29 pm ] |
Post subject: | |
A long time ago in a galaxy far far away, I'm sure I meant to use that as protection from integer overflow. Though it should've been angle (i) >= 360. But thanks for bringing that up, I'm sorry if I scarred your learning of trigonometry. Please see signature. |