A spirograph is a toy for enjoying the pattern a pen draws as it's rolled, fixed inside a small toothed circle, around the inside of a large circular frame. As the small circle rolls around inside the large one, it creates a beautiful pattern of overlapping petal shapes, and the whole appearance of this pattern is decided entirely by the ratio of the two circles' radii.

Let's call the large circle's radius R and the small circle's radius r. Reduce these two to the simplest whole-number ratio (say, R:r = 24:7), and the smaller of those two numbers (7) becomes the number of petals (loops) in the finished pattern. And how many times the small circle has to go around the large circle's edge before the pen returns exactly to its starting spot is also equal to that same smaller number in the simplified ratio.

Why does this happen? For the small circle to roll around inside the large one without slipping, the small circle's circumference has to mesh exactly along the large circle's circumference. The two numbers you get by dividing R and r by their greatest common divisor (say, 24 and 7) represent the "simplest possible relationship" that can't be reduced any further. Because these two numbers are coprime (share no common divisor besides 1), the small circle has to go around the large circle several times before it finally returns to the exact same spot, at the exact same angle, as where it started.

What happens if R and r share a large greatest common divisor? Take R=60, r=40, for example — their greatest common divisor is 20, so the simplest ratio is 3:2. In this case, the pattern completes after the small circle goes around the large one just 2 times, producing a simple shape with only 2 petals. On the other hand, pick two numbers whose greatest common divisor is close to 1 (like 47 and 19, which share almost no common divisor), and the small circle needs far more revolutions, which produces a much denser, more elaborate pattern.

R:r=3:2 — 2 petals R:r=24:7 — 7 petals
A larger greatest common divisor (3:2) gives a simple pattern; closer to coprime (24:7) gives a denser pattern

Changing where the pen is fixed (how far the pen sits from the small circle's center — let's call this distance d) affects the pattern too. When d equals the small circle's radius, the pen is essentially riding right at the small circle's edge, producing pointed shapes; when d is smaller than that, it produces smooth, rounded petal shapes. The number of petals is decided by the ratio of R to r, while the shape of each petal is decided by where the pen sits.

On our activity page, you can adjust R, r, and d each with a slider, watch the greatest common divisor and the ratio get calculated in real time, and see with your own eyes whether that number exactly matches the number of petals in the pattern actually drawn. Try changing the color too, and make a pattern all your own.