Calculate angle of the next point on a circle

155 Views Asked by At

Given a radius (r=100) and a distance (d=10) how can I calculate the angle of a point at a given straight-line distance (on a circle with that radius)?

The end result is to take a point on a circle and find the next point on the circumference of that circle in a straight line, so to most efficiently generate a set of points on the circle which are not so close or so far as to render a circle on screen with visible lines or excess points.

I am working in code with very little mathematical notation experience.

1

There are 1 best solutions below

8
On BEST ANSWER

If the $n$th point $P_n$ has polar angle $a_n$, the $n+1$st point $P_{n+1}$ has polar angle:

$$a_{n+1}=a_n+\alpha \ \ \ \text{where} \ \ \ \alpha=\sin^{-1}(\tfrac{d}{2r}) \iff \sin \alpha = \tfrac{d}{2r}$$

this last relationship coming from elementary trigonometry on isosceles triangle $OP_nP_{n+1}$ whose leg is $r$, and half base $d/2$ (remember : sine = opp/hyp).