The pattern itself

Counting the spirals

Almost every claim about phyllotaxis is a claim about how many spirals run through a pattern, and the count is almost never done. It can be done from the points alone, by a count that is never told what angle built them — and then a count of 34 is evidence rather than a restatement.
14 min read 8 figures Counted, not admiredThe round trip

Worth reading first: A head is a set of points.

Look at a sunflower and spirals appear. Follow one with a finger and it curves out to the rim; follow one going the other way and it does the same. Count them and the numbers are usually 34 and 55, or 55 and 89, or some other pair of consecutive Fibonacci numbers.

That is the observation the whole subject rests on, and it is worth asking what exactly is being counted.

The two spiral families a counter finds between 0.68 and 0.92 of the radius34 spirals one way and 55 the other, found from the point positions alone — the counter is never told the divergence angle.34 and 55 spiralscounted, not assumed
Fig. 1 The two families a counter finds in one head, drawn as the polylines joining every 34th and every 55th point in birth order. They are not curves fitted to the picture — each is a statement about which points are neighbours.

What a spiral is, in a pattern made of points

A spiral in a seed head is not a curve. It is a chain of near-neighbours.

Take the point born 34 places before any given point. In a golden-angle head it sits very close by — much closer than a point 20 or 45 places earlier. Join every point to the one 34 places before it and the result is a set of 34 chains, each winding out from the centre. Those are the spirals a person traces.

So a spiral family is labelled by an offset: the number of places back in birth order that lands one on a near neighbour. The parastichy numbers of a pattern are the offsets that do this, and everything about counting spirals is about finding them.

That reframing is what makes counting a computation rather than an impression. A curve fitted to a photograph is a matter of judgement; the question of which index offset gives the shortest hop is not.

The counter, and what it is not told

The arrangement matters more than the algorithm, so it is worth being explicit.

One function builds a head from a divergence angle. A different function is handed an array of coordinates and asked which offsets give short hops. It does not receive the angle. It does not receive the model. It does not know that Fibonacci numbers are the expected answer, and it would return 47 and 76 just as readily.

The method: for each candidate offset m, measure the distance from every point to the point m places before it, take the median, and divide by the local spacing so the answer does not depend on scale. Plot that against m and the parastichy numbers appear as local minima — offsets that give hops much shorter than their neighbours do.

Requiring a local minimum rather than simply a short hop is the part that does the work. Offset 1 always gives a shortish hop; so does offset 2. Without the local-minimum requirement the counter would report 1 and 2 for every pattern ever made, which is true and useless.

The two spiral families a counter finds between 0.43 and 0.67 of the radius. 21 spirals one way and 34 the other, found from the point positions alone — the counter is never told the divergence angle.
Fig. 2 The same counter run in a band nearer the middle of the same head. It is given coordinates and a radius window and nothing else, and the chains it follows are the ones the geometry there offers.

The bug that only a second route could find

The first version of this counter returned the two smallest offsets among the minima rather than the two shortest.

For a golden-angle head that means it reported 21 and 34, when the offsets that actually give the closest neighbours at that radius are 34 and 55. Both are genuine parastichy families — 21 is a real spiral family in that head — so the drawing looked entirely correct. Twenty-one spirals were drawn and there were twenty-one of them.

Nothing in the figure showed the error. What showed it was the angle recovery, which takes a pair of counts and asks which divergence angle makes those two offsets the closest. Fed 21 and 34 at that radius it refused: no angle does. The refusal was correct, and it was the only thing in the system that could tell the difference.

That is the argument for the second route in one paragraph. A count that is merely plausible cannot be distinguished from a count that is right by looking at the picture the count produced.

It is worth naming what made this bug findable at all, since most are not. The two offsets were both real families, so no drawing could contradict them; what contradicted them was a second instrument with its own refusal, asking a question the first one does not — not is this a family but can these two be the closest two at once. A checker that only ever agrees adds nothing; one that can decline is the only kind that catches a plausible answer.

A round trip on four heads of 900 primordia: the divergence angle recovered from each. The counter is shown the points and nothing else. The worst recovery across the four is 0.012°.
Fig. 3 The second route. Four heads built at stated angles, the counts taken from the points, and the angle recovered from the counts — worst error twelve thousandths of a degree.

Showing that the counter rejects

An assertion that has never failed on anything is not a test, and on this subject that matters more than usual: a counter that always returned Fibonacci numbers would confirm every claim ever made about sunflowers.

So it is run on a lattice built at 45°, which is a rational angle and produces eight radial rows and no spirals at all. The counter returns 8 and 16 — the row count and its double — and not a Fibonacci pair anywhere.

That single check is what makes every other count on this site worth reading. Without it, “the counter found 34 and 55” is a statement about the counter.

Why the answer depends on where one look

The counter takes a radius band as well as a point set, and it has to, because the answer genuinely depends on it.

Near the centre of a head the points are sparse and the short offsets win: 13 and 21, or 21 and 34. Further out, the same head gives 34 and 55, then 55 and 89. The transitions happen at radii that can be computed, and they are the subject of the next essay.

The two spiral families a counter finds between 0.18 and 0.42 of the radius. 13 spirals one way and 21 the other, found from the point positions alone — the counter is never told the divergence angle.
Fig. 4 Nearer the centre still. The points are crowded and the offsets that give short hops are smaller ones, which is why the answer depends on where the band is put.

This is not a defect of the method. It is the pattern being honest about itself: a spiral lattice does not have a parastichy pair, it has a parastichy pair at a radius. Every published count of a sunflower is a count in whichever annulus the counter happened to work in, and the practice of quoting one pair per flower obscures a real and computable structure.

Ambiguity at the transitions

Between one regime and the next there is a band where three offsets have almost the same hop length, and there the count is genuinely ambiguous.

At one radius in the head measured here, offset 55 gives a hop of 1.68 in units of the mean spacing, offset 34 gives 2.01, and offset 89 gives 2.10. Which pair the eye picks out — or the counter — depends on details that carry no information.

The two spiral families a counter finds between 0.68 and 0.92 of the radius. 55 spirals one way and 89 the other, found from the point positions alone — the counter is never told the divergence angle.
Fig. 5 The outer band of a larger head. More points at the same fraction of the radius means a finer arrangement there, and the counts rise accordingly.

That ambiguity forced a change in the machinery. The angle recovery originally required the observed pair to be the two shortest offsets; near a transition it refused patterns it had counted correctly. It now asks for both to be among the shortest three, and reports a wider interval when the constraint is looser. The tolerance is not a fudge — it is the ambiguity of the pattern, made explicit.

What the counting does not settle

Two things, and both are usually assumed.

It does not say the counts are Fibonacci. It says what they are. That they usually come out Fibonacci in a golden-angle head is a consequence of the angle, and heads built at other angles give other sequences — Lucas numbers, or nothing named at all.

It does not say anything about real flowers. Everything here is measured on generated patterns, where the truth is available. That is deliberate: the site’s job is to establish what a count means and what it can be trusted to reveal, and a photograph would add authority the argument has not earned. What the counting establishes is that the operation is well defined and testable, which is the precondition for anyone doing it on real material and being believed.

The general shape of it

The pattern this essay repeats is the one this whole collection is built on, and it is worth naming.

An observation that is usually made by eye — there are 34 spirals — is restated as a computable quantity: offset 34 gives a local minimum of the median hop length in this annulus. The restatement is more work, it is less evocative, and it is the difference between a claim that can be checked and one that can only be repeated.

Then the computation is shown to reject, on input where the right answer is known to be different. Then it is checked against a second, independently-shaped computation that could disagree. Only after all three does a number get quoted in a caption.

What counting is worth

The operation is unglamorous and it is what everything else on this site is built on.

The angle can be recovered because the counts carry it. The transitions across a head are visible because the count can be repeated at different radii. The Fibonacci claim can be tested because other angles can be counted too, and their counts are not Fibonacci.

None of that is available to a reader who takes the count from a caption.

Why a median and not a mean

A small implementation choice with a real consequence.

For each candidate offset the counter takes the median hop length over all points, not the mean. The reason is the head’s boundary: points near the rim have no predecessor at some offsets, and points near the centre have hops distorted by the √i radius law compressing everything.

A mean is dragged around by those tails. A median is not, and the local minima that identify the parastichy numbers stay sharp. Switching to a mean does not break the counter outright — it broadens the minima until adjacent offsets become hard to separate, which is the sort of degradation that looks like the data being noisy rather than the statistic being wrong.

The hop lengths are also divided by the local spacing, so the result is dimensionless. Without that the answer would depend on the model’s scale and on the number of points, and comparing two heads would mean comparing two arbitrary units.

What the minima look like

The profile of median hop length against offset is the counter’s actual output, and reading it is more informative than reading the two numbers it reduces to.

Most offsets give a hop of roughly the mean spacing times √m — a random pair of points m places apart is nowhere in particular. Against that background the parastichy offsets appear as deep, narrow minima, often at half the surrounding level or less.

The minima come in a sequence: 1, 2, 3, 5, 8, 13, 21, 34, 55 for a golden-angle head, getting shallower as m grows. Only the two deepest at a given radius are the parastichy numbers people count; the rest are the offsets that used to be, at smaller radii, or that will be further out.

The two spiral families a counter finds between 0.43 and 0.67 of the radius. 34 spirals one way and 55 the other, found from the point positions alone — the counter is never told the divergence angle.
Fig. 6 The middle band of that larger head. Reading the two figures above against this one is the whole of the radius story: one head, one counter, different answers at different radii.

So the profile contains the whole radius story in one plot, and the pair of numbers everyone quotes is a reading of it at one radius. That is a good argument for showing the profile rather than the pair.

What the counter would say about a bad pattern

Running the counter on inputs it should fail on is how one learns whether it measures anything, and there are three such inputs in the checks.

A rational angle. At exactly 120°, points fall on three radial rays. The counter finds the offsets that traverse a ray — 3, 6, 9 — rather than a Fibonacci pair, which is correct and is the answer nobody expects. If it returned 34 and 55 there it would be returning them from somewhere other than the data.

Random points. No offset gives a systematically short hop, so the profile is flat and the counter has no deep minima to report. That is the null case, and a counter that finds spirals in noise finds them everywhere.

A jittered head. Add noise to a golden-angle head and the minima broaden and then vanish, at a noise level that can be measured. That number — how much positional error the counting survives — is the honest answer to “how reliable is a count from a photograph”, and it is not small.

The spiral counts, band by band, in one head. The same flower gives 13/21, 21/34, 34/55, 55/89 at different radii. A caption saying "34 and 55 spirals" is a statement about one annulus.
Fig. 7 Where the ambiguity lives. Each band of the same head gives its own pair, and the transitions between them are where three offsets compete.

What is not being claimed

The counter finds which index offsets give short hops. It does not find spirals in any perceptual sense, and the distinction has a consequence.

A person tracing a curve on a photograph is following a visual continuity, and what they follow depends on seed size, contrast and how the head was cut. The counter is answering a question about birth order, which a photograph does not show at all: the index of a seed is not visible, and the correspondence between “the point 34 places earlier” and “the next seed along that curve” is an inference from the model.

For a generated head that inference is exact, because the model supplies the order. For a real head it is very good and not exact, since primordia are not laid down in a perfectly regular sequence and later growth displaces them.

The two spiral families a counter finds between 0.78 and 1.00 of the radius. 55 spirals one way and 89 the other, found from the point positions alone — the counter is never told the divergence angle.
Fig. 8 The outermost band of a head of sixteen hundred points, which is as far out as the counter is asked to work here. What it measures is which index offsets give short hops; the drawn curves are that measurement, not its premise.

So the honest chain is: the counter measures offsets, offsets correspond to visible spiral families under the model, and the model is independently supported. Each link is checkable and the middle one is the one usually left implicit.

What the count is for

Counting is the first step of everything else on this site, so it is worth saying what the number feeds into.

It feeds the angle recovery, which turns a pair of counts and a radius into a divergence angle — the quantity the models are actually about.

It feeds the comparison across branches, since the sequence a head produces is how one tells which branch it is on without measuring an angle directly.

And it feeds the radius story, which is only statable because the counting can be done independently in separate bands.

A count on its own — quoted in a caption with no radius and no head size — feeds none of them, which is the practical case for treating counting as a measurement rather than an observation.

The arrangement, once more

The separation between generating and counting is worth restating at the end, because everything downstream depends on it and it is the kind of thing that erodes.

place() takes an angle and returns coordinates. parastichy() takes coordinates and returns offsets. They share no state, no constants and no expectations, and the second has never been shown the first’s input.

That is why a count of 34 on this site is evidence rather than a restatement, and it is why the angle recovered from the counts agreeing with the angle the head was built at means something.

The erosion to watch for is a convenience: passing the angle into the counter to speed it up, or seeding the offset search with the Fibonacci numbers because they are the expected answer. Either would make every figure faster and every result circular, and neither would change a single drawn picture — which is exactly why the arrangement is written down here rather than left as a property of the code.

The same counter on a stem, and the rule that had to go

Expansion pointed this machinery at a cylinder, and one line of it turned out to be wrong there — which is a useful demonstration that the local-minimum requirement is a decision about the geometry rather than a general truth about counting.

On a disc the requirement is essential. Offset 1 always gives a shortish hop, so a counter taking the two shortest without qualification would answer “1 and 2” for every pattern ever built.

On a cylinder, offset 1 disqualifies itself: a hop of one node is at least one rise tall, whatever the divergence. So the two shortest hops are the parastichy numbers, and imposing a local minimum actively broke the count — at a rise of 0.09 the offsets 2 and 3 are shortest by a clear margin, but 3 is not a local minimum, so the counter skipped to 5 and reported a pattern with no lattice consistent with it.

The lesson is the one this essay already carries in another form. The counter’s rules encode assumptions about the geometry it is counting on, and moving it to a new geometry moves those assumptions with it — silently, because a wrong count still draws a correct-looking picture.

Once again the error was caught downstream, by a recovery that refused.

What links here

Computed from the collection, not written here: the essays that point at this one.

Reads more easily once this is understood

Essays that name this one as worth reading first.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

A flat tag is an object no other essay names yet.

BranchDiscriminationDivergence angleFibonacciLattice offsetLocal minimumNearest neighbourNoiseParastichyRiseTransitions