For a regular polygon: given the circumscribed circle radius $r$, and the count of edges $n$, and the coordinate of one of the vertices $(x_0, y_0)$, is there a relation to calculate the coordinates of the other $n-1$ vertices? (note that the polygon may have not any edge parallel to the coordinate axes)

  • $\begingroup$ Have you tried? $\endgroup$ – Parcly Taxel Oct 24 '16 at 12:41
  • $\begingroup$ i know no equations related to the polygon vertices, so i am asking if there is an equation related to this so i start trying from it to derive the coordinates of the other vertices $\endgroup$ – Mohamed EL Tair Oct 24 '16 at 13:42
  • $\begingroup$ Do you know some trigonometry? $\endgroup$ – Aretino Oct 24 '16 at 14:51
  • $\begingroup$ (i will split this comment into 2 parts because of the length), i know a way as following: i have the circumscribed circle equation, and from the its diameter and number of polygon edges i can get the polygon side length s, so now i have two equations: (x-x0)+(y-y0)=s^2, and the equation of circle, so from them i get the 2 vertices next to (x0,y0), and from the obtained vertices i get those next to them and so on $\endgroup$ – Mohamed EL Tair Oct 24 '16 at 15:26
  • $\begingroup$ but consider regular polygon with 50 edges, and for example i have the coordinates of the 2nd vertex and the 29th vertex, i would have to calculate the coordinates of all vertices to check that these 2 vertices lie on the same -50 edges- regular polygon, so is there a faster way ? $\endgroup$ – Mohamed EL Tair Oct 24 '16 at 15:26

I assume you are familiar with some basic trigonometry. If you have a circle of center $C=(x_C,y_C)$ and radius $r$, then every point of the circle can be written as $P=(x_C+r\cos\theta, y_C+r\sin\theta)$, where $\theta$ is the angle formed by line $CP$ with the $x$-axis.

Your first vertex $P_0=(x_0,y_0)$ can be written in that form too, thus it corresponds to some angle $\theta_0$. As the central angle between two consecutive vertices is $2\pi/n$, the other vertices will then correspond to angles $\theta_1=\theta_0+2\pi/n$, $\theta_2=\theta_0+4\pi/n$, $\theta_3=\theta_0+6\pi/n$, and so on. Once you know $\theta_0$ it is easy to write down the coordinates of the other vertices.

Finally, to get $\theta_0$ notice that $x_0=x_C+r\cos\theta_0$ and $y_0=y_C+r\sin\theta_0$, so that: $$ \tan\theta_0={y_0-y_C\over x_0-x_C}. $$


To check that two points $A$ and $B$ on the circle are the vertices of a $n$-polygon, one can compute $$ \cos(\theta_A-\theta_B)=\cos\theta_A\cos\theta_B+\sin\theta_A\sin\theta_B ={x_A-x_C\over r}{x_B-x_C\over r}+{y_A-y_C\over r}{y_B-y_C\over r} $$ and $$ \sin(\theta_A-\theta_B)=\sin\theta_A\cos\theta_B-\cos\theta_A\sin\theta_B ={y_A-y_C\over r}{x_B-x_C\over r}-{x_A-x_C\over r}{y_B-y_C\over r}. $$ From these you can get $\theta_A-\theta_B$ and check if it is a multiple of $2\pi/n$.


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.