Samsonite 528 Report post Posted June 23, 2005 Hello! can anybody explain how sinus and cosinus (SIN and COS) work? I can't wait to learn it :) [Edited by - Samsonite on June 26, 2005 5:09:04 PM] 0 Share this post Link to post Share on other sites
Sneftel 1788 Report post Posted June 23, 2005 Do you mean, what do they do as mathematical functions... or how are sines and cosines computed on computer hardware? 0 Share this post Link to post Share on other sites
c0dedrag0n 128 Report post Posted June 23, 2005 Mathematically its related to the exponential function in complex (you know "i = sqrt(-1)") space.Look up eulers "e" function.where e^(i*theta) generates the unit circle when turned 2pi degrees.e^(i*theta) - e^(-i*theta) -------------------------- 2i I believe is the function for sin. Just take the derivitive with respect to theta to get cos.(http://en.wikipedia.org/wiki/Cosine)[Edited by - c0dedrag0n on June 24, 2005 1:46:57 PM] 0 Share this post Link to post Share on other sites
Samsonite 528 Report post Posted June 23, 2005 O_O thats to complicated, but i'll ask my dad :)Both mathematical and computed on computer hardware :) 0 Share this post Link to post Share on other sites
Agony 3452 Report post Posted June 23, 2005 Mathematically, their infinite series definition is often used as the primary definition for determining various properties about them. The computation is often done using Taylor series or look-up tables. I don't know all the specifics, especially regarding which methods are most typically used, but I'm sure those Wikipedia articles will reveal a lot. 0 Share this post Link to post Share on other sites
DaBono 1496 Report post Posted June 23, 2005 Mmm, since your website states you're 14, maybe a more basic explanation is in order. (I don't know how good education is in Norway, though :-) )Sine and cosine (and tangent too) basically are the ratios of the sides of a triangle: + /| H / | O / | /a | +----+ AThe angle a is (almost completely) defined by the lengths of the sides. (Imagine moving the upmost point around). The sine of the angle a in this triangle is the length O divided by H. The cosine is A divided by H. The tangent of a is O divided by A.So, what's the use? Say we know the left-bottom point of the triangle is (0,0) and the upmost point is (3,4). Now we now that A=3 and O=4, giving tan a=4/3. On most calculators you have a button called tan-1 or atan. Using this we can now found the angle that corresponds to our tan a of 4/3. My calculator says the angle is 53 degrees.Et voila, now you can convert coordinates on screen or in your game world into angles: something you will do quite often.Of course, as stated above, sine and cosine are used in tons of other calculations. But that's something for another day, I guess. 0 Share this post Link to post Share on other sites
Anon Mike 1098 Report post Posted June 23, 2005 Draw a circle, make the radius equal to 1. Go ahead, get a piece of paper and actually draw it.Draw a horizontal line through the center of the circle.Draw another line from the center of the circle to any point on the circle.Look at the angle between the two lines. We'll call it "theta".Now look at the point where the second line touches the circle.The horizontal distance from the center of the circle to this point is called "cosine theta".The vertical distance is called "sine theta".That's the basics. It gets more complicated from there. It turns out that cosine and sine have some really useful practical properties. 0 Share this post Link to post Share on other sites
Samsonite 528 Report post Posted June 23, 2005 Thank you :) 0 Share this post Link to post Share on other sites
igni ferroque 415 Report post Posted June 23, 2005 Sine @ Wikipedia 0 Share this post Link to post Share on other sites