Regular polygons with equal height

101 Views Asked by At

Sorry for my naivety I am trying to plot the points of n sided regular polygons but maintaining the height between odd and even sided polygons.

Is there a sensible algorithm for doing so before I venture forward with a naive one?

Hopefully something visual will help elucidate the problem: https://youtu.be/OXVZjDUAA4c

enter image description here

1

There are 1 best solutions below

1
On BEST ANSWER

The height of an $n$-gon (with $n$ odd) is $$ \left(1+\cos\left(\frac{\pi}{n}\right)\right)\cdot r. $$ The height of an $n$-gon (with $n$-even) is $$ 2r. $$ So you can get the same height by scaling the size appropriatly.