There are several ways to achieve this as a quick internet search will show. However I want to follow the approach illustrated in Hardy and Wright. Gauss proved that, for a prime, \( p \), a regular polygon of \( p \) sides can be constructed using only ruler and compass, if and only if \( p \) is a Fermat prime, i.e. of the form \(2^{2^n} + 1\). Substituting \(n = 0, 1, 2\) gives the triangle, pentagon and 17 sided polygon. Hardy and Wright explain Gauss’s approach by solving for the 17 sided polygon. Applying the same approach to a pentagon is obviously much simpler and still instructive.
For the pentagon we can consider \(5\) isosceles triangles with a common vertex at the centre of the circle, see diagram above. The angle at the vertex, labelled \( \theta \), is clearly \(72^o\) or \(2 \pi / 5\). So constructing a regular pentagon is equivalent to constructing an angle of \(2 \pi / 5\). This angle is equal to \(\arccos(\frac{\sqrt5 – 1}{4})\) as shown below. Because the cosine of the angle only involves integers and square roots it can obviously be generated using only ruler and compass, this is shown in the animation.
The animation below shows a construction to generate an angle of \( \arccos( \frac{\sqrt5 – 1}{4} ) \) and draw a regular pentagon. Click the “Start” button to start the animation. It can be paused at any point and manually stepped through forwards or backwards. This is probably the best way to follow the simulation.