I figured out how to create a circle using Sin( and Cos( but i can't seem to figure out how to make a pixel move about that circle at a certain speed relative to actual seconds, not exactly like a clock but the same basic principle.
I know how to get an accurate timer using startTmr and ChecTmr( but i don't know how to divide the circumference of the circle into specific portions so that i can move a pixel around it in a certain amount of time.
you know that 2*pi is one whole circle, so you multiply that with how many seconds fraction you have that to put it in your sine/cosine.
So for x-pos/y-pos you'll have something like that: (S being the seconds)

x: sin((S/60)*2*pi)
y: cos((S/60)*2*pi)
Thanks, i figured it out for the most part before i read your post but i was using 6.3 (just some number i pulled out of nowhere) instead of 2*Pi and was relooping the program to the beginning every minute. That was causing a lot of complications so I really appreciate the help.
This wasn't explicitly stated in the topic, and I'm sure you figured it out, but for the sake of future visitors to this thread, I want to clarify what sine and cosine are actually for in this case. Given some particular angle theta, the point x=cos(theta), y=sin(theta) is at an angle theta from the origin (0, 0) at a radius (distance) of 1. If you want a point a different radius R away from the origin, you'd use x=R*cos(theta), y=R*sin(theta). Finally, if theta is in degrees and you want radians, you multiply by the conversion factor: pi radians = 180 degrees (ie, radians = (pi/180)*degrees). If theta is in radians and you want degrees, you multiply by the conversion factor: 180 degrees = pi radians (ie, degrees = (180/pi)*radians).
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement