hehe - no easy question you ask there

To learn how to calculate sines and cosines from just angles, you need to understand calculus and taylor series. In the absence of knowing these, just trust me that the following equations are true:

sine(x) = x - x^3/3! + x^5/5! - x^7/7! ...

cosine(x) = 1 - x^2/2! + x^4/4! - x^6/6! ...

These are in fact infinite sequences so the only way to be exact is to calculate forever. However, the equations as shown above should be a good enough aproximation in the first cycle for what you need. (

http://en.wikipedia.org/wiki/File:Taylorsine.svg)

There are some other subltaties:

x is the angle measured in radians. 360 degrees = 2PI radians

the functions are periodic outside the range +-PI therefore take x and modulo it with PI before attempting to caculate.

Furthermore, there is no way that this is even pretending to be an optimised approach. It will be slow but it will work. An example can be found

http://www.xbdev.net/c_and_cpp/sin_cos_functions/index.php but i suggest you dont just copy it without understanding what is supposed to be going on - it uses a different method.

Finally, arccos is somewhat harder but defined as follows:

arccos(z) = PI/2 - (z + (1/2)z^3/3 + (3/8)z^5/5 + (15/24)z^7/7 ..... )

In this case, z is a number in the range -1 to 1 and arccos gives you back the answer in radians.

Does this help?