
-----------------------------------
kicknock
Sun Apr 01, 2007 9:02 pm

moving in a circular motion
-----------------------------------
suppose i have this circle:
drawoval (100,100,10,10,16)

and this dot:
drawdot(100,110,16)

how do i make the dot move around on the circumference of the circle?

-----------------------------------
Drakain Zeil
Mon Apr 02, 2007 3:31 pm

RE:moving in a circular motion
-----------------------------------
you could abuse a recursive flood fill's code...

or you could just use the equation of a circle and solve for X and Y, write some code to keep track of negative and positive's as both are resulted.

-----------------------------------
ericfourfour
Mon Apr 02, 2007 10:08 pm

RE:moving in a circular motion
-----------------------------------
If you have the hypotenuse and angle, which trigonometry function(s) would you use? I'll give you a hint, it is not tan.

-----------------------------------
Carey
Wed Apr 04, 2007 8:41 am

Re: moving in a circular motion
-----------------------------------

If you have the hypotenuse and angle, which trigonometry function(s) would you use? I'll give you a hint, it is not tan.


in case you didnt get ericfourfours hint and know nothing about trig, the function to use would be cos(angle / hypotenuse)

-----------------------------------
zylum
Wed Apr 04, 2007 3:19 pm

RE:moving in a circular motion
-----------------------------------
i explained rotations in this thread: [url=http://www.compsci.ca/v3/viewtopic.php?t=13866&highlight=rotation]rotaions

enjoy ;)
