2
$\begingroup$

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.

$\endgroup$
2
  • 1
    $\begingroup$ 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$. $\endgroup$
    – sirous
    Apr 17, 2023 at 14:08
  • $\begingroup$ 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. $\endgroup$
    – David K
    Apr 17, 2023 at 19:10

2 Answers 2

2
$\begingroup$

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.

$\endgroup$
2
  • $\begingroup$ 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). $\endgroup$ Apr 17, 2023 at 21:43
  • 1
    $\begingroup$ @JakeIreland if you're using radians, replace 360 with 2pi since they both describe one full revolution :) $\endgroup$
    – Quinlan
    Apr 18, 2023 at 3:28
0
$\begingroup$

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].$

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .