# Math Problem

• 06-28-2007
kanuvas
Math Problem
Hi all,

I have a little problem.

Say I have a image at x=100 y=100.
When I press 't' the image moves around in a circle with radius 20 (the circle is invisible)

So this image moves around the circumference of the circle in a clockwise direction.
When I click T again it stops and move back in a anticlockwise direction.

Any help with the maths behind this would be much appreciated.

Thanks
• 06-28-2007
indigo0086
read about the sin and cos functions. They are able to plot points given their radius on a unit circle. With some simple multiplication you can plot it at any multiple of that unit circle.
• 06-28-2007
kanuvas
ahh yes that seems to be the way forward. Much appreciated
• 06-28-2007
indigo0086
you also need to convert the degrees to radians
• 06-28-2007
dwks
That's only if you actually want to use the sin() and cos() functions in the C standard math library. If you just want to understand the concept of how the images rotates in a circle, you don't need to.

And if you use sin() and cos(), you'd likely need to go the other way as well. :)