In the GeoGebra applet below,
1) Select the REGULAR POLYGON

tool. Then plot 2 points
A and
B.
In the pop-up box that appears, enter "3" (without the " ").
This creates an "regular triangle" (equilateral & equiangular triangle).
2) Now use this same tool to construct a regular quadrilateral (square) and regular octagon.
3) Select the MOVE

tool. Move any one (or more) of the
blue points around.
Note these polygons always remain regular.
When you're done (or if you're unsure of something), feel free to check by watching the quick silent screencast below the applet.