Hypotrochoid Curves: Mathematical Beauty in Design

Mathematical Curves for Design

Exploring parametric curves for favicon and logo design

spirograph_7_4_3.png

What is a Hypotrochoid?

A curve traced by a point attached to a circle rolling inside another circle

The Spirograph toy popularized these curves in the 1960s

The Parametric Equations

\[x = (R-r)\cos(t) + d\cos\frac{(R-r)t}{r}\]

\[y = (R-r)\sin(t) - d\sin\frac{(R-r)t}{r}\]

Where:

  • \(R\) = outer circle radius
  • \(r\) = inner circle radius
  • \(d\) = distance from center of inner circle
  • \(t\) = parameter (angle)

Spirograph Examples

R:r:d Lobes Image
5:3:2 5 spirograph_5_3_2.png
7:4:3 7 spirograph_7_4_3.png
8:5:3 8 spirograph_8_5_3.png
10:7:4 10 spirograph_10_7_4.png

Related Curves: Lissajous

\(x = \sin(at)\), \(y = \sin(bt + \delta)\)

Ratio Image
3:2 lissajous_3_2.png
3:4 lissajous_3_4.png
5:4 lissajous_5_4.png

Related Curves: Superellipse (Lame)

\(|x/a|^n + |y/b|^n = 1\)

n Shape Image
0.5 Astroid superellipse_astroid.png
2.0 Circle superellipse_circle.png
2.5 Squircle superellipse_squircle.png

Related Curves: Rose

\(r = \cos(k\theta)\)

k Petals Image
3 3 rose_3.png
5 5 rose_5.png
7 7 rose_7.png

Lemniscate of Bernoulli

The infinity symbol: \((x^2 + y^2)^2 = a^2(x^2 - y^2)\)

Variant Image
Infinity lemniscate_infinity.png
Vertical lemniscate_vertical.png

Why These Curves?

  • Mathematically precise - reproducible at any scale
  • Hand-drawn aesthetic - organic feel from parametric equations
  • Distinctive at small sizes - works for favicons (16x16, 32x32)
  • Literate programming vibe - code generates art

Implementation

Python + PIL for generation:

t = np.linspace(0, 2*np.pi, 500)
x = (R-r)*np.cos(t) + d*np.cos((R-r)*t/r)
y = (R-r)*np.sin(t) - d*np.sin((R-r)*t/r)

Full implementation: generate.py

Further Reading

Thank You

Jason Walsh | j@wal.sh | wal.sh

spirograph_10_7_4.png

Author: Jason Walsh

j@wal.sh

Last Updated: 2026-02-05 18:00:21

build: 2026-04-17 18:35 | sha: 792b203