[Math] Calculate coordinates of a regular polygon

geometry

Given the regular polygon's side count $n$, the circumscribed radius $r$ and the center coordinates $(x,y)$ of the circumscribed circle,

How to calculate the coordinates of all polygon's vertices if one of the vertices coordinates are $(x,?)$?

Best Answer

One vertex is $(x, y+r)$ or $(x, y-r)$. I'll assume the former (the latter case is similar, just swap $r$ and $-r$). The vertices will have coordinates $(x+r\sin\theta,y+r\cos\theta)$, where $\theta$ is an integer multiple of $\frac{2\pi}{n}$. ($\frac{360}{n}$ if you prefer degrees to radians.)