I derived some equations awhile back for creating regular polygons, so I thought I'd put them into a scratch project. Adjust the sliders to change the number of sides, length of the sides, rotation, and center of the polygon. Feel free to steal the script :) (just give credit) (There are two versions of the script, both do the same thing but take up different amounts of space)
I wrote up some documentation on how this works and how the equations were derived here: (UGH scratch marks the link as a "bad word", just put the dot back in) https://www (dot) dropbox.com/s/lbn2od8uihxyham/ShapeRender.docx?dl=0