The angle that doesn't repeat

Mar 6, 2026 · Microblog #11
math biology generative

1,400 dots placed at 137.5° increments, radius scaling as √index. Click to pulse. Move mouse to slow the rotation.

A sunflower head packs hundreds of seeds in tight spiral rows. Count the spirals going clockwise: usually 34. Counterclockwise: usually 55. Both Fibonacci numbers. The ratio of consecutive Fibonacci numbers converges to φ ≈ 1.618. The spirals are a direct consequence of a plant following one simple rule for a specific reason.

The rule is Hofmeister's, from 1868: each new leaf primordium appears at the position around the growing tip furthest from the nearest existing primordium. One local measurement, repeated at every step. The angle that satisfies this rule in the limit is 137.5°, the golden angle, equal to 360° × (2 − φ). At this angle, sequential dots never align into a row. Each rotation drops the new dot into the largest available gap, and no gap exactly repeats, because 137.5° is maximally irrational: its continued fraction is [1; 1, 1, 1, 1, ...], the slowest possible convergence toward any rational number. The denominators of its best rational approximations are Fibonacci numbers. That's why sunflowers count in Fibonacci.

The code that places 1,400 dots on a canvas reduces to two lines:

const PHI          = (1 + Math.sqrt(5)) / 2;
const GOLDEN_ANGLE = Math.PI * 2 * (2 - PHI); // ≈ 137.508°

// inside the draw loop, for each dot i:
const theta = i * GOLDEN_ANGLE + t * 0.08;
const r     = maxR * Math.sqrt(frac);        // frac = i / N

The sqrt(frac) term handles the second constraint. Uniform packing requires uniform area density, and uniform area density requires r ∝ √index. Dropping the square root (using r ∝ index) packs dots at the center and thins them at the edge. The square root corrects for circle geometry.

Every visible spiral arm emerges from these two constants with no explicit spiral geometry anywhere in the code. The plant runs the same computation. It places each new primordium where there is the most room. The spirals appear afterward, in the counting.

← Back to showcase