Wondering what the formula is for finding integer coordinates for an arbitrary "regular" polygon. By regular I mean symmetrical polygons like pentagon, hexagon, etc.
In particular, I would like to know what integer coordinates are for a:
For instance, the Wikipedia pentagon SVG has these coordinates:
<polygon points="294,3 585.246118,214.602691 474,556.983037 114,556.983037 2.753882,214.602691" fill="white" stroke="black" stroke-width="4"/>
They are complex and unintuitive floating point values. I would instead like to figure out how to find purely integer coordinates, so for a pentagon it would be something like:
<polygon points="10,10 20,20 30,20 20,30 20,10" fill="white" stroke="black" stroke-width="4"/>
That doesn't make a pentagon, but it has all integer coordinates.
In order to accomplish this, it probably requires specifying a viewport or aspect ratio. So maybe it is wxh as 1000x1200, or 901x817 or something. I don't know how to figure this out.
To summarize, wondering what the equation is for figuring out integer coordinates for a symmetrical polygon, specifically those 5 above.