1
$\begingroup$

I am trying to draw lines from the center of a circle to points (x, y) in the circumference.

To calculate this the angle is used. I need to render points in between two angles. E.g. Angle 0 to angle 1 I would like to render lines from the center of the circle to 5 different points along the circumference between angle 0 and 1. There might be any number of points in between these two angles.

How can I calculate these 5 points? I would need to calculate the (x, y) using angle i and the (x, y) using angle i+1. and then get the arc between these two points.

How is this done and how would I then get the individual points within this arc so that I can incrementally draw lines from the center to these individual points?

$\endgroup$
2
$\begingroup$

For circles around $(0,0)$ with radius $r$, the point $(x,y)$ on the circumference at angle $\varphi$ is $$ (x,y) = (r\cos\varphi, r\sin\varphi) \text{.} $$

$\endgroup$
  • $\begingroup$ Thanks. For some reason I thought the angle could only be of Integer type. $\endgroup$ – jarryd Apr 29 '13 at 12:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.