On Thu, 21 Jun 2007 21:46:56 -0700, sravan_reddy001
<sr*************@gmail.comwrote:
I am creating an analog clock. so i hav to draw the line from center
to a point in the circle. How can i get the co-ordinates of the points
on the circle i fmention the radius and the center of the circle.
Assuming the clock is a normal circle, the standard trigonometric formulae
apply:
x = r * cos(t);
y = r * sin(t);
where "t" is the angle of the line (keeping in mind that screen displays
usually have the Y axis reversed from the standard mathematical coordinate
systems).
You do, of course, need to map your time values (hours, minutes, seconds)
to degrees. But that should not be difficult for you to figure out.
If you want an elliptical clock, you might check this thread I was just
involved in:
http://groups.google.com/group/micro...b8ec877ef6e1b5
Pete