I understand how Sine is measured in math.
It is
But what I want to know is how scratch determines what the hypotenuse is , ect.
I can do it on paper but I am unable to figure out how it works in Scratch.
Offline
yeah. i know what you mean. Uh... consider this comment a bump. The guy above me has no idea what he is talking about. Sure, it is like a calculator, but no one cares, as calculators are not human. Smh. That doesn't help anything at all.
OH wait. Just got something.
Don't consider sine as opp/hyp. Consider it as, sine= y/r , where r is the radius of a circle. A lot of cool scratchers manipulate the sine function y/r so that only the r remains, and then can create many lines. The number you punch in is a ratio of the y and r. Typically, x and y don't exceed one. To get any greater value, you would multiply the sine by another number.
I'm kinda rusty on this, learning trig now.
Last edited by woofwoof301 (2011-09-23 19:16:55)
Offline
recycle49 wrote:
I understand how Sine is measured in math.
It is http://upload.wikimedia.org/math/4/e/5/ … 04d922.png
But what I want to know is how scratch determines what the hypotenuse is , ect.
I can do it on paper but I am unable to figure out how it works in Scratch.
Imagine that your sprite is traveling across the screen at some velocity (amount it moves in every time step) and some angle; Sine and Cosine relate the (short) sides of a right triangle to the long side. In the case of motion, the hypotenuse is known (the sprite's velocity); Sin and Cos let you calculate how much each movement is in the "x" and "y" directions.
Imagine a spaceship moving thru space - the direction that it moves doesn't depend on which way it's pointed. Changes to how much it moves in each time step would depend on the ship's "thrust". The thrust has some strength and some direction, how much it changes the ship's velocity in X and Y would be found by using Sine and Cosine to find out the X and Y "components" of the Thrust. Happily, this isn't as complicated as it sounds...
Offline
Sin(x) = x - ((x^3)/3!) + ((x^5)/5!) - ((x^7)/7!) ... etc.
That should get you there.
Continue the sequence and you'll get more and more accurate.
Last edited by MoreGamesNow (2011-09-23 20:42:26)
Offline
woofwoof301 wrote:
yeah. i know what you mean. Uh... consider this comment a bump. The guy above me has no idea what he is talking about. Sure, it is like a calculator, but no one cares, as calculators are not human. Smh. That doesn't help anything at all.
OH wait. Just got something.
Don't consider sine as opp/hyp. Consider it as, sine= y/r , where r is the radius of a circle. A lot of cool scratchers manipulate the sine function y/r so that only the r remains, and then can create many lines. The number you punch in is a ratio of the y and r. Typically, x and y don't exceed one. To get any greater value, you would multiply the sine by another number.
I'm kinda rusty on this, learning trig now.
Hey woofwoof, please remember to be respectful. Putting down other members of the community is not okay.
Offline
woofwoof301 wrote:
yeah. i know what you mean. Uh... consider this comment a bump. The guy above me has no idea what he is talking about. Sure, it is like a calculator, but no one cares, as calculators are not human. Smh. That doesn't help anything at all.
OH wait. Just got something.
Don't consider sine as opp/hyp. Consider it as, sine= y/r , where r is the radius of a circle. A lot of cool scratchers manipulate the sine function y/r so that only the r remains, and then can create many lines. The number you punch in is a ratio of the y and r. Typically, x and y don't exceed one. To get any greater value, you would multiply the sine by another number.
I'm kinda rusty on this, learning trig now.
I know what I'm talking about.
Now stop insulting others.
Offline
recycle49 wrote:
I understand how Sine is measured in math.
It is http://upload.wikimedia.org/math/4/e/5/ … 04d922.png
But what I want to know is how scratch determines what the hypotenuse is , ect.
I can do it on paper but I am unable to figure out how it works in Scratch.
The sine function you're referring to is the relationship between the sides of a right triangle and an angle. However, the sine function can stand on its own without a right triangle--there's a specific value of sin x for each value of x.
For example:
sin 30 = 1/2
sin 45 = (radical 2)/2
sin 60 = (radical 3)/2
I know those because I had to memorize them last year
The 30, 45, and 60 are referring to an angle measure--the sine of any 30-degree angle will ALWAYS be 1/2. No exceptions.
Correct me if I'm wrong, but Scratch probably uses the expanded factorial formula from MoreGamesNow's post to calculate the sine of an angle, right?
TL;DR: you don't need a triangle to find the sine of an angle.
Offline
kayybee wrote:
woofwoof301 wrote:
yeah. i know what you mean. Uh... consider this comment a bump. The guy above me has no idea what he is talking about. Sure, it is like a calculator, but no one cares, as calculators are not human. Smh. That doesn't help anything at all.
OH wait. Just got something.
Don't consider sine as opp/hyp. Consider it as, sine= y/r , where r is the radius of a circle. A lot of cool scratchers manipulate the sine function y/r so that only the r remains, and then can create many lines. The number you punch in is a ratio of the y and r. Typically, x and y don't exceed one. To get any greater value, you would multiply the sine by another number.
I'm kinda rusty on this, learning trig now.I know what I'm talking about.
Now stop insulting others.
+20
Sorry recycle, I do not know anything about trig.
Last edited by Thescratch3 (2011-09-24 10:50:52)
Offline
Thescratch3 wrote:
kayybee wrote:
woofwoof301 wrote:
yeah. i know what you mean. Uh... consider this comment a bump. The guy above me has no idea what he is talking about. Sure, it is like a calculator, but no one cares, as calculators are not human. Smh. That doesn't help anything at all.
OH wait. Just got something.
Don't consider sine as opp/hyp. Consider it as, sine= y/r , where r is the radius of a circle. A lot of cool scratchers manipulate the sine function y/r so that only the r remains, and then can create many lines. The number you punch in is a ratio of the y and r. Typically, x and y don't exceed one. To get any greater value, you would multiply the sine by another number.
I'm kinda rusty on this, learning trig now.I know what I'm talking about.
Now stop insulting others.+20
Sorry recycle, I do not know anything about trig.
+infinity
Offline
ImagineIt wrote:
Thescratch3 wrote:
kayybee wrote:
I know what I'm talking about.
Now stop insulting others.+20
Sorry recycle, I do not know anything about trig.+infinity
+
Offline
I see. I was a bit confused on how they were measured. These examples are great. I understand that now you have to consider a value as a measurement and calculate from there.
Offline