Formula to calculate the coordinates of some points on a circle

4.4k Views Asked by At

Given the following variables

  • $a$ : the number of points proportionally spread on a circle

  • $(O_x, O_y)$ : the origin of the circle

  • $\theta$ : the angle separating the points i.e. $360/a$

  • $r$ : the radius of the circle

how to get the coordinates of each point?

Here is an illustration with three points, i.e. $a = 3$ and $\theta = 120$
NOTE: The $(x, y)$ axis is clockwise.


Illustration of equally spread points on a circle in a clockwise axis


3

There are 3 best solutions below

1
On BEST ANSWER

The angle separating point has to be $\frac{2\pi}{a}$ (using radians). Using the definition of $\sin$ and $\cos$ (and assuming that the first point has $\theta=0$), translating the points from the origin to the centre of the circle and applying a simmetry on the x-axis, we get the following:

Given the number $a$, you have: $p_i=\left(O_x+r\cos\left(\frac{2i\pi}{a}\right),O_y-r\sin\left(\frac{2i\pi}{a}\right)\right)$, where $p_i$ is the i-th point, and $0\leq i<a$.

I assumed that the passages should be easily understandable without the explicit calculation, if it is not the case I will insert them

2
On

Hint:

center the circe at the origin and use the parametric equation of the circle:

$$ (x,y)=(r\cos t, r\sin t) $$

($t$ is the angle at the origin)


If the center of the circle is at $(x_0,y_0)$ the parametric equation becomes $$ (x,y)=(x_0+r\cos t,y_0+ r\sin t) $$ and the searched points are given by the values $t=n \theta$ for $n=1,2,\cdots, a$, (and your $\theta$)

0
On

If your first point on the circle (lying on the line parallel to the $x$-axis) is $P_0=(O_x+r,O_y)$ then the next point (moving counter-clockwise) is $P_1=(O_x+r\cos(\frac{360}{a}),O_y-\sin(\frac{360}{a}))$.

Each time the angle increases by $\frac{360}{a}$ degrees, so more generally:

$$P_n=(O_x+r\cos\left (\frac{360n}{a}\right), O_y-r\sin\left (\frac{360n}{a}\right))$$ for $0\leq n\leq a-1$