I have not Scratch 2.0, but it seems like it would be easy to impliment trigonometric functions into the operators tab. Sine, Cosine and Tangent may seem like unnecesary, obscure mathematical functions, but they have a key use that would open many new animation and game posibilities - they let you put one sprite in a location relative to another sprite. For example:
when gf clicked forever set x to <(sprite1 x v) + < <cos (sprite1 direction v)> * [10]> > set y to <(sprite1 y v) + < <sin (sprite1 direction v)> * [10]> > endA sprite with this script will always be 10 units in front of sprite1, and will maintain that position as sprite1 moves or rotates. Relative position would let you make joints, chains, and all sorts of other connections.
Last edited by jag97 (2012-12-30 21:12:41)
Offline
^^That's right.
Look for the "sqrt of" block in Operators and change the option to any of the trig functions.
Offline
they also have the inverses of those
although they should also have the more obscure ones and their inverses (secant, cosecant, and cotangent)
Offline
Those blocks already exist. Check the operators tab.
Offline
zubblewu wrote:
they also have the inverses of those
although they should also have the more obscure ones and their inverses (secant, cosecant, and cotangent)
sec = 1/cos
csc = 1/sin
cot = 1/tan
Offline