HomeArticlesMathematics

Hypocycloids & Epicycloids: The Geometry of Rolling Circles

Roll a circle inside or outside a fixed one and the traced point sweeps out astroids, deltoids, cardioids and nephroids - with cusp count fixed by R/gcd(R,r).

mysimulator teamUpdated June 2026≈ 7 min read▶ Open the simulation

Rolling one circle inside another

Take a fixed circle of radius R and roll a smaller circle of radius r around its inside without slipping. Mark a point on the rolling circle's rim and trace its path as the small circle goes around - that curve is a hypocycloid. Roll the small circle around the outside of the fixed circle instead and you get an epicycloid. Both belong to the broader family of roulettes, curves traced by a point attached to one curve as it rolls on another.

live demo - a rolling-circle roulette tracing its curve● LIVE

The parametric equations

With the fixed circle centred at the origin, radius R, and the rolling circle radius r, the no-slip rolling constraint fixes the rotation of the small circle relative to its revolution angle θ. Working through the geometry gives the hypocycloid parametrisation:

x(θ) = (R - r)·cos(θ) + r·cos((R-r)/r · θ)
y(θ) = (R - r)·sin(θ) - r·sin((R-r)/r · θ)

The epicycloid is the same construction with the sign of r flipped in the rolling term, since the small circle now rotates the opposite way relative to its own centre's path:

x(θ) = (R + r)·cos(θ) - r·cos((R+r)/r · θ)
y(θ) = (R + r)·sin(θ) - r·sin((R+r)/r · θ)

Why the cusp count is R/gcd(R,r)

Every time the rolling circle completes one full rotation relative to the fixed circle, the traced point touches the fixed circle's rim and the curve has a cusp - a sharp point where the velocity of the tracing point momentarily drops to zero. The curve closes after the rolling circle has gone around the centre a whole number of times and rotated a whole number of times about its own axis simultaneously, which happens when θ sweeps through a multiple of 2π·r/gcd(R,r). The number of cusps in one full closed curve works out to exactly R / gcd(R, r) - if R and r are coprime, you get R cusps; if r divides R, you get R/r cusps.

Set R = 4r and you get the astroid, a four-cusped star with the elegant implicit form x⅔ + y⅔ = R⅔. Set R = 3r and you get the deltoid, three cusps. Set R = 2r and something remarkable happens: the two cusps degenerate and the entire curve collapses onto a straight line segment - a diameter of the fixed circle. This is the Tusi couple, described by the 13th-century astronomer Nasir al-Din al-Tusi centuries before Copernicus, and it shows that straight-line motion can be produced from two pure rotations, a fact later used in mechanical linkages.

The epicycloid family: cardioid and nephroid

On the outside, R = r gives the cardioid - the single-cusped heart shape, so named because r = R means the rolling circle is the same size as the fixed one. R = 2r gives the nephroid, a two-cusped kidney-shaped curve that also appears as the caustic (the bright curve of concentrated light) formed inside a coffee cup or ring illuminated from one side, since light reflecting off a circular rim envelopes exactly this shape.

Rational vs irrational ratios

When R/r is a rational number p/q in lowest terms, the curve closes after q revolutions of the rolling circle's centre and has p cusps - a clean, closed roulette. When R/r is irrational, the point never returns to a previous position and the curve winds around the annulus between radius R-2r and R forever, densely filling it without ever closing. The live demo computes gcd(R,r) from the two slider values on every change and reports the exact cusp count before drawing, then stops the trace at the closing angle so the curve does not overdraw itself.

Frequently asked questions

What is the difference between a hypocycloid and an epicycloid?

Both are roulettes traced by a point on a circle rolling on a fixed circle without slipping. A hypocycloid rolls on the inside of the fixed circle; an epicycloid rolls on the outside. The parametric equations are identical except for a sign flip on the rolling-circle radius.

Why does the astroid have exactly 4 cusps?

Because the astroid is the hypocycloid with R = 4r, and the cusp count of a closed hypocycloid is R divided by gcd(R,r). Here gcd(4r, r) = r, so the count is 4r/r = 4.

What is special about R = 2r (the Tusi couple)?

When the rolling circle's radius is exactly half the fixed circle's radius, every point on the rolling circle's rim traces a straight line - a diameter of the fixed circle, not a curve with cusps. It is the classical proof that two rotations can synthesise pure linear motion.

Try it live

Everything above runs in your browser — open Hypocycloid and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Hypocycloid simulation

What did you find?

Add reproduction steps (optional)