# Regular polygons with equal height

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

• What do you mean by the "height" of a polygon? – user Apr 22 at 19:43
• I guess I mean the radius/ diameter but on closer inspection perhaps that is folly. I will add an image for clarity – SacredGeometry Apr 22 at 20:00
• I assume you want all of them inscribed in a circle of a given radius. If this is the case, you simply divide circle into $n$ sectors and your vertices will be on the circle. – Vasya Apr 22 at 21:04
• I thought that that is what I was doing when I calculate the x and y pos like this Sorry for the notation format (software engineer not mathematician): x = sin(theta) * radius y = cos(theta) * radius – SacredGeometry Apr 22 at 21:12
• With $\theta =2\pi k/n$? – user Apr 22 at 21:24

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.