Qbasicnews.com

Full Version: sin, cos, and rotating stuff
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
umm. i need help understading these 3 things. :oops:
Quote:umm. i need help understading these 3 things. :oops:

whitetiger,

You basically are asking for knowledge og trigonometry. trig is pretty simple...but requires an understanding of pythag theorm and the concept of the "unit circle".

Pythagorium (sp) says that for any right triangle, a^2 + b^2 = c^2, where c is the hypotenuse (long side) of the triangle, and a and b are the short sides.

the unit circle is described as follows:

imagine you have a circle radius 1. Stick the circle with center at 0,0 (x,y) on a grid. This is known as the "unit circle". Now...draw a line from any point on the circle to 0,0 (the origin). If you take 0 degrees as a line from (0,0) to (1,0), then...for any angle, the x,y coordinates of a point on the circle can be represented by sin & cos. In every case, the hypotinuse (radius) will be 1. sin (angle) will be the (y value / 1). cos (angle) will be (x value / 1). tan(angle) is (y/x) of the point on the circle.

This info is the basis of trig and can be used to rotate objects. Trig is basically a way to deal with angles and circles using algebra.

convince yourself that the py's theorom is correct, and make sense of the unit circle, and lots of people will be glad to help you with implementing rotation code.

cheers.
that is simple. thanks [Image: KkatBigGrin.txt]