Get angle in degrees of coordinate on circle.

50 Views Asked by At

So assume I have coordinates of two points on a circle, and the coordinate of the center of the circle. How would I go about finding the angle of the points in degrees?

1

There are 1 best solutions below

0
On

Probably the quickest way would be to use vectors. If the centre of the circle has position vector $\vec r_0$, and the two points have position vectors $\vec a$ and $\vec b$, then the angle $\theta$ between them can be obtained using the dot product of the vectors $\vec A =\vec a-\vec r_0$ and $\vec B = \vec b-\vec r_0$:

$$\cos\theta = {\vec A \cdot \vec B \over |\vec A||\vec B|}$$