Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 moving in a circular motion
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
kicknock




PostPosted: Sun Apr 01, 2007 9:02 pm   Post subject: 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?
Sponsor
Sponsor
Sponsor
sponsor
Drakain Zeil




PostPosted: Mon Apr 02, 2007 3:31 pm   Post subject: 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




PostPosted: Mon Apr 02, 2007 10:08 pm   Post subject: 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




PostPosted: Wed Apr 04, 2007 8:41 am   Post subject: Re: moving in a circular motion

ericfourfour wrote:

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




PostPosted: Wed Apr 04, 2007 3:19 pm   Post subject: RE:moving in a circular motion

i explained rotations in this thread: rotaions

enjoy Wink
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: