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

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.

• The length of each side is $b=2R \sin \frac{\alpha}2$, where for number of sides n we have $\alpha= \frac {360}n$. You have diametr $2R$, so n is a function of $2R$. Commented Apr 17, 2023 at 14:08
• The way I would draw such a polygon would be to divide $360$ degrees into $n$ equal angles, draw radial lines outward from a center at those angles, and put a vertex at the desired distance (half the circle diameter) along each radial line. This will naturally construct sides of the correct length, but you don't use the side length in the construction. Commented Apr 17, 2023 at 19:10

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.

• Thanks Quinlan! For anyone else who found this post, my application for this question required the angle to be in radians, not degrees, so I had to convert: w * math.sin(math.radians(360 / (2 * n))) (in Python), or using a sine function that expects degrees, w * sind(360 / 2n) (in Julia). Commented Apr 17, 2023 at 21:43
• @JakeIreland if you're using radians, replace 360 with 2pi since they both describe one full revolution :) Commented Apr 18, 2023 at 3:28

Alternative approach:

Given a regular polygon with $$~n~$$ sides, draw the line segment from each vertex to the center of the circle. You will then have $$~n~$$ triangles formed. Each triangle will be an isosceles triangle, with two of the sides equal to $$~r = \dfrac{d}{2},~$$ and the third side having the unknown length.

This unknown length may be computed as follows:

• The angle opposite this unknown side has measure $$\theta = ~\dfrac{360^\circ}{n}.~$$
The reason is that the sum of the interior angles is $$~360^\circ,~$$ and there are $$~n~$$ triangles formed.

• The Law of Cosines now kicks in.
Denoting the unknown length as $$~C,~$$ you have that
$$C^2 = r^2 + r^2 - 2(r \times r)\cos(\theta) \implies$$
$$\displaystyle C^2 = 2r^2 \times \left[ ~1 - \cos\left(~\frac{360^\circ}{n} \right) ~\right].$$