Given the circumscribed circle diameter and the number of points of a regular polygon, what is its side length

geometrypolygonstrigonometry

Is it possible to determine the side length of a regular polygon if you know only the number of points it has, and the "width" (or possibly more geometrically accurately, the circumscribed circle diameter) of the shape?

The application is that I want to draw different shapes (i.e., with differing numbers of vertices) but I want each of them to have the same width, so I set constant the width of the shape, but new need to calculate the side length.

Best Answer

Yes. Imagine a spoke connecting each vertex to the center, dividing the polygon into triangles. Each triangle can be split into two right triangles, like in this picture I ripped from wikihow. Image

Now the radius of the circle is your hypotenuse, the central angle is 360รท2n so you can use sin of the angle to calculate the opposite leg length.