This Demonstration shows a hinged mechanism for constructing regular

-gons,

. The mechanism is constructed as follows. The fixed hinges are at

,

,

,

,

,

, and

, while the hinges at

and

slide along

and

respectively, and

is the midpoint of

. The mechanism contains congruent parallelograms

and

and two isosceles trapezoids

and

. This ensures that the sides

,

,

, and

have the same length and that angles

,

, and

are equal.
A square is constructed by moving the mechanism to make

coincide with

. To draw the red perpendicular to

at

, which is needed in the construction of the pentagon, hexagon, heptagon, and octagon, keep the mechanism rigid and slide it along

until a vertical line is at

. The nonagon and decagon need the red line to be inclined at 60° and 36°; these angles come from the hexagon and the pentagon.
To construct a heptagon (or 7-gon), keep

in place and turn the mechanism until

is on the vertical red line. Four sides of the heptagon are determined. Freeze the hinges and rotate the rigid mechanism so that the rod

coincides with the previous location of

. That determines the remaining three sides. That the pentagon

forms one half of the regular heptagon follows from the fact that the polygonal line

is symmetric with respect to

.