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.
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.
ahh yes that seems to be the way forward. Much appreciated
you also need to convert the degrees to radians
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. :)