Recovering the angle from the counts
A generator that only ever runs forwards proves nothing about itself. Feed it an angle, get a pattern; the pattern looks like a sunflower; there is no way to tell from it whether the machinery did what it claimed.
So the machinery runs backwards as well. A head is built at a stated angle, the angle is set aside, and a second piece of code — which has never been shown it — is handed the spiral counts and asked which divergence angle produces them.
It gets the angle back to about a hundredth of a degree.
The relation it uses
The recovery rests on one piece of lattice geometry.
In a Vogel head the point i sits at radius √i, so stepping j places back moves a point by two things at once. Around the disc it moves by the fractional part of j·δ turns, which is an arc of 2πr times that fraction. Outward it moves by roughly j/2r in model units, because the radius is a square root.
The hop for offset j is the hypotenuse of those two, and the parastichy numbers are the offsets with the shortest hops. So given observed counts m and n at a known radius, the recovery asks: for which divergence angles are m and n among the shortest? That has a genuine interval of solutions, and the centre of the interval is the answer.
Both quantities the relation needs are read off the point set rather than taken from the model. The radius is the middle of the band that was counted. The scale comes from the density, since Vogel’s model puts an equal area around every point.
The cost function that had no geometry in it
The first version scored candidate angles by how nearly m·δ and n·δ landed on whole turns, without the radial term.
It was minimised at δ ≈ 0. At zero every multiple is a whole number of turns, so the score is perfect — and the “lattice” is a single radial line with every point on top of every other. The recovery confidently returned 0.0018° for a golden-angle head.
The mistake is worth naming because it is a common shape. The angular condition is necessary for an offset to be a parastichy number and it is not sufficient: the offset also has to be small enough that the radial hop does not dominate. Leaving out the term that grows with j left a cost function whose minimum was a degenerate configuration, and degenerate configurations are exactly where an incomplete cost function goes.
Adding the radial term fixes it, and it fixes it for a reason rather than by tuning: the term is not a penalty introduced to avoid a bad answer, it is the second component of a distance that was always there.
When the recovery refuses
Two cases, and both are informative rather than annoying.
Non-coprime counts. If the two counts share a factor, no single divergence angle is recoverable. That is not a failure — it means the pattern is whorled rather than spiral. A divergence angle near a simple fraction of a turn produces radial rows, and a head at 137.0° counts as 21 and 42, because 137.0 is within a whisker of 960/7. Twenty-one and forty-two share a factor of 21, and what the pattern really is is seven rows of something. The recovery says so and stops.
No consistent angle. If the counts cannot both be among the shortest offsets at that radius for any angle, the recovery refuses. That is what caught the counter returning the two smallest offsets rather than the two shortest — fed 21 and 34 at a radius where the true neighbours are 34 and 55, no angle works, and the refusal was the only signal that anything was wrong.
The interval, and why it is reported
The recovery returns a width as well as a centre, and the width matters.
Two small counts constrain the angle loosely; two large ones constrain it tightly. A pair like 8 and 13 pins the angle to within a degree or so; a pair like 55 and 89 pins it to a few hundredths. That is a real property of the problem — a coarse pattern carries less information about its generating angle than a fine one — and reporting a single number without it would overstate what a count can say.
It also sets a limit on what any measurement of a real plant can establish. A pine cone with 8 and 13 parastichies is consistent with a range of divergence angles a degree wide, and no amount of care in counting narrows it. Distinguishing 137.5° from 137.9° needs a head with high counts, which means a large one.
What the round trip proves
The agreement is to about a hundredth of a degree across four quite different angles, and it is worth being precise about what that establishes.
It proves the forward generator and the backward recovery are consistent, which is a real thing to have proved. A sign error in the lattice geometry, a confusion between turns and degrees, or an off-by-one in the birth order would all break it, and every one of those leaves a pattern that looks exactly like a pattern.
It does not prove that Vogel’s model describes any plant. Two consistent implementations of the same wrong idea agree perfectly. That is why the site carries checks that come at the geometry from other directions — the counter shown to find rows in a rational lattice, the packing measured against several criteria that disagree, the angle produced by a dynamical model that was never told it.
And it does not prove anything about a photograph. Recovering an angle from a real head would need the counts, the radius they were taken at, and the model’s scale, and real heads are noisy in all three.
The same shape, three times over
This is the third instance of a pattern that has now appeared across the fleet often enough to be worth naming.
Generate something from a stated parameter. Forget the parameter. Recover it by a computation shaped differently from the one that made it, with the original hidden behind an interface narrow enough to inspect. Compare.
A crystallography site generates a pattern, forgets which symmetry group produced it, and rediscovers the group. A perspective site draws a box from a camera and recovers the camera’s focal length from the drawn edges. Here a head is built from an angle and the angle comes back out of the spiral counts.
In each case the value is not in the forward computation, which is easy. It is in the fact that a second computation with a different shape had to arrive at the same answer with the first one’s workings hidden — and in each case the round trip found a bug that nothing else did.
What it costs
Very little, which is worth saying because the case for round trips is usually made on principle rather than on price.
The forward generator is two lines of trigonometry. The recovery is a scan over candidate angles with a hypotenuse at each, and it runs in a few milliseconds. Both run at build time on every figure that uses them, so a change to the lattice geometry that breaks the correspondence stops the site building rather than producing a figure that is wrong in a way nobody can see.
That is the argument in one sentence. The failure being guarded against is not a crash; it is a pattern that looks entirely convincing and was generated by a rule with a bug in it, which is the ordinary condition of illustrations in this subject.