Number theory
The golden angle
What you're watching
A sunflower drawn from one number
Every seed above is placed by the GPU from its index alone: seed goes to angle and radius . Nothing is stored and nothing is simulated. The turn tours a set of fractions and famous numbers, and the arms rebuild themselves from the centre out each time it moves.
Pick your level on the explainer below. The pictures are the same at every level; only the words change.
The question
A sunflower builds its head one seed at a time. Each new seed is turned by the same angle from the last, then pushed outwards. Turn, drop a seed, repeat.
Try a quarter turn. A few hundred seeds later they sit on four straight spokes, with empty wedges between them. So the real question is: which turn never makes spokes?
Why the square root
First the easy half: how far out to push each seed. Push them out by equal steps and the outer rings thin out, because each ring is longer than the one inside it.
Push each seed out by the square root of its number instead, and every band of 50 seeds covers exactly the same area. The head is equally crowded from the centre to the rim.
Sweep the turn
Now turn the dial. Every simple fraction of a turn makes spokes: a quarter makes four, a third makes three, two fifths makes five.
Just off a simple fraction the spokes bend into spiral arms, because every lap the seeds creep a little further round. The closer the turn is to a simple fraction, the straighter the arms.
Count the arms
Here is a turn of 0.302. Count the arms: ten. And 0.302 is very close to 3/10.
That’s the pattern every time you try it: the number of arms is the bottom of a fraction sitting very close to the turn. It’s an observation, not something we prove here, but it tells you what to look for. A turn with a simple fraction close by makes visible arms.
The golden turn
So the best turn is one that no simple fraction gets close to. There is a champion: the golden ratio. A turn of 0.618 has no good fractions to hide behind. Turned the other way, that’s 0.382 of a turn, or 137.5°.
Zoom in on it on the number line. The fractions that come closest arrive slowly, and they’re all ratios of Fibonacci numbers: 2/5, 3/8, 5/13, 8/21. No spokes ever win, at any scale. This is the angle sunflowers use.
Three gaps
Now throw the distances away and keep only the angles: drop every seed onto a circle. Colour each gap between neighbours by its length. Then keep adding points.
However many points you add, there are never more than three gap sizes. And the longest is exactly the other two, laid end to end.
Why only three
Why? Find the two points that land closest to the starting point, one on each side. Every point’s next neighbour round the circle is reached by one of three moves: step like the first one, step back like the second, or do both.
Three moves, three gap sizes. Turning the whole picture never changes the moves.
Name it
This is the three-distance theorem. Hugo Steinhaus asked the question; Vera Sós, János Surányi and Stanisław Świerczkowski each proved it in the late 1950s.
It holds for any turn. What the golden angle adds is balance: in every case we checked, up to 100,000 points, its largest gap was never more than about 2.6 times its smallest. A turn of 1/π lets them differ by nearly 300 times. A sunflower turning 137.5° keeps its seeds evenly spread at every size.
Checked
The theorem
Three-distance theorem. Let be irrational and . The points , , cut the circle into arcs whose lengths take at most three distinct values. When there are three, the largest equals the sum of the other two.
Read the proof
Conventions. Write for the forward distance from to on the circle. The gap after is , where is the first point met going forward. Since is irrational, only if .
Small N. For there is one gap, of length 1. For the gaps are and . Assume .
Set-up. Let minimise and maximise over (both unique). Put and . Since , and , so and .
Basic bounds. For in and :
- if , , with equality iff ;
- if , , with equality iff .
Claim. The gap after is if ; if and ; and if and . These cases cover every , so every gap lies in , which proves the theorem.
Case 1: . Then . Suppose some lies strictly inside that arc. If , then , a contradiction. If , then , so , again a contradiction.
Case 2: and . Then . If some lies strictly inside: for , ; for , , so . Either way, a contradiction.
Case 3: and . Let . Then , and since . Its forward distance from is . Suppose lies strictly inside, so .
- If , let . Then , so . Then , with , contradicting the maximality of .
- If , let . Then , so , that is . Then , with , contradicting the minimality of .
So the successor of is , at distance . If we are in Case 1; otherwise either (Case 2) or (Case 3). ∎
Further reading
Sources
- H. Vogel, “A better way to construct the sunflower head”, Mathematical Biosciences 44 (1979), 179–189.
- V. T. Sós, “On the distribution mod 1 of the sequence nα”, Ann. Univ. Sci. Budapest. Eötvös Sect. Math. 1 (1958), 127–134.
- J. Surányi, “Über die Anordnung der Vielfachen einer reelen Zahl mod 1”, Ann. Univ. Sci. Budapest. Eötvös Sect. Math. 1 (1958), 107–111.
- S. Świerczkowski, “On successive settings of an arc on the circumference of a circle”, Fundamenta Mathematicae 46 (1959), 187–189.
- A. Hurwitz, “Ueber die angenäherte Darstellung der Irrationalzahlen durch rationale Brüche”, Mathematische Annalen 39 (1891), 279–284.
- The three-gap (Steinhaus) theorem, Wikipedia.
More demos
Fluid dynamics
A vortex that blows up
The swirling core from the September 2026 Navier–Stokes blow-up construction, run on the GPU in its own similarity coordinates.
Numerical methods
One character of code
Two clouds of particles stirred by the same field, two ways. One stays perfectly even forever; the other clumps.
Optimal transport
Particles that never collide
Thousands of particles fly in straight lines between shapes. A one-line inequality proves no two ever meet.