Convert a circle to a polygon If I have a circle with a given radius, how calculate I find a regular polygon's vertices, if I know they are all on the circles edge (like in the images below)?


For a polygon with $n$ vertices (an $n$-gon), each vertex will have an angle of $\frac{2\pi}{n}$ between it and the next one. All we need to do is place a first vertex, then translate it around the origin by this amount $n$ times to get all the vertices.
Place the first vertex at $p_0=(\rho, 0)^T$, where $\rho$ is the circle's radius. To rotate a point by $\theta$ around the origin we need the rotation matrix in 2 dimensions, $R(\theta)$ given by:
$$
R(\theta)= \left( \begin{matrix}
\cos\theta & -\sin\theta\\
\sin\theta & \cos\theta
\end{matrix} \right)
$$
Just apply this multiple times to get each vertex:
$$
p_m=R^m \left( \frac{2\pi}{n} \right) p_0
$$
So the set of vertices for a certain $n$-gon is given by:
$$
\{R^m\left(\frac{2\pi}{n}\right)p_0 | p_0=(\rho, 0)^T, 0\le m \lt n\}
$$
