Math Calculators
Spirograph & Lissajous Curve Generator - Geometric Art Visualizer
Generate beautiful spirograph (hypotrochoid) and Lissajous curves in your browser. Adjust inner/outer circle radii, pen distance, and frequency ratios to create endless geometric patterns.
What is a spirograph?
A spirograph traces the path of a point on a small circle rolling inside (or outside) a larger fixed circle. Curves traced by a point inside a rolling circle are called hypotrochoids; curves traced by a point outside a rolling circle are epitrochoids. The physical toy Spirograph® (introduced in 1965) uses toothed rings and wheels to draw these curves on paper.
The formula
For a hypotrochoid, the parametric equations are:
x(t) = (R − r) cos(t) + d · cos((R − r)t / r)
y(t) = (R − r) sin(t) − d · sin((R − r)t / r)
where R is the outer circle radius, r is the rolling circle radius, and d is the distance from the center of the rolling circle to the pen point.
Parameter guide
- Outer radius (R): the size of the fixed ring. Larger values scale the overall pattern.
- Inner radius (r): the size of the rolling wheel. The ratio R/r determines how many lobes or petals the curve has.
- Pen offset (d): the distance from the wheel’s center to the pen. When d equals r, the pen is on the edge of the wheel and traces a specific classic curve. Moving d inside the wheel produces rounded petals; outside produces overlapping loops.
- Speed ratio: when R/r is rational (a fraction), the curve eventually closes. When it’s irrational, the curve never closes and the pen will fill the ring given enough time.
Famous examples
- Rose curves (rhodonea): R/r = whole number; produces petal shapes.
- Epicycloids: d = r (pen on wheel edge) produces classic looped outer curves like cardioids and nephoids.
- Hypocycloids: d = r rolling inside; 3-petal = deltoid, 4-petal = astroid.
- Lissajous-like patterns: certain ratios produce interlocking grid patterns resembling Lissajous figures.
Why the curve closes
A spirograph curve closes into a finite pattern only when the ratio R/r is a rational number (expressible as a fraction p/q in lowest terms). In that case, the small circle makes exactly r / gcd(R, r) rotations before returning to its starting position. If R/r is irrational (such as π or √2), the pen traces a path that never exactly repeats and would eventually fill the ring densely given infinite time.
Roulette curve gallery
Special values of d and r relative to R produce named classic curves:
- Astroid (hypocycloid): rolling circle inside, r = R/4, d = r. Produces a 4-pointed star with concave curved sides.
- Straight line: rolling circle inside, r = R/2, d = r. The pen traces a perfect straight line (diameter of the outer circle). This is Tusi's couple.
- Cardioid (epicycloid): rolling circle outside, r = R, d = r. Produces a heart-shaped curve with one cusp.
- Deltoid (hypotrochoid): r = R/3, d = r. Produces a 3-pointed curved triangle used in rotary engine design (Wankel engine).