Use the Up/Down Arrows to change the number of sides the polygon that will be drawn will have. Press space to draw the polygon and its diagonals.
The math used to draw the polygons is fairly inefficient and I'm sure there are better versions of this out there. This isn't a professional project or anything, just testing out some fun stuff I did in math. If the math were to be 100% efficient, it wouldn't draw lines between two vertices that are right next to each other as that is simply the line of the original shape. This project is very rushed, if you'd like to improve it and make it more efficient or look better, feel free!