0
$\begingroup$

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

$\endgroup$
  • 2
    $\begingroup$ What do you mean by the "height" of a polygon? $\endgroup$ – user Apr 22 at 19:43
  • $\begingroup$ I guess I mean the radius/ diameter but on closer inspection perhaps that is folly. I will add an image for clarity $\endgroup$ – SacredGeometry Apr 22 at 20:00
  • 1
    $\begingroup$ 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. $\endgroup$ – Vasya Apr 22 at 21:04
  • $\begingroup$ 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 $\endgroup$ – SacredGeometry Apr 22 at 21:12
  • 1
    $\begingroup$ With $\theta =2\pi k/n $? $\endgroup$ – user Apr 22 at 21:24
1
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ Thats the one. Thank you so much for your help. $\endgroup$ – SacredGeometry Apr 22 at 22:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.