Two numbers out of the points
The round trip is this site’s favourite arrangement: build a pattern from a stated number, forget the number, recover it from the pattern alone, and compare. It appears twice in the foundation essays — a divergence angle recovered from spiral counts, and a growth factor recovered from a drawn spiral — and the agreement is the measurement in both cases.
The disc’s version has a limitation that was reported honestly and never resolved. It returns an interval, not a number.
The reason is structural rather than numerical. A pair of parastichy counts at a radius says that two particular index offsets give the shortest hops there, and a whole range of divergence angles satisfies that. The recovery reports the middle of the range and its width, and near a transition the width is several degrees.
On a cylinder the same question has a different answer, and the difference is worth understanding because it is about what a measurement contains rather than about how carefully it is done.
Counts are not the only thing a count produces
The disc recovery uses two integers. That is all it has: two parastichy numbers and the radius they were counted at.
The cylinder recovery uses four numbers, and the two extra ones are free. When the counter measures which offsets give the shortest hops, it necessarily measures how short they are. Those two lengths were always there; the disc recovery could not use them because on a disc the hop length varies across the counting band and there is no single value to quote.
On a cylinder there is. The lattice is genuinely periodic, so the hop for offset is the same everywhere on the stem, and its median over a band is that number rather than an average over a changing quantity.
So the problem becomes two equations in two unknowns:
where is the distance to the nearest whole turn. Given and and the two integers, solve for and .
How it is solved
Not by fitting. The first equation gives explicitly for any candidate :
which is real only where the angular part of the hop is shorter than the whole hop — a condition that is itself informative, since it rules out great swathes of the divergence axis before anything is evaluated.
Substituting into the second equation leaves a residual in one unknown. Its sign changes are bracketed by a sweep and then bisected, which converges to machine precision because the function is smooth between the wrap points and the wrap points are known exactly.
Every root is then checked against the lattice it implies: the pair and must actually be the two shortest offsets there. Roots that fail this are discarded, and they exist — the equations have solutions describing lattices where the given offsets are short but not shortest, and those are not the lattice the points came from.
What comes out
Six cases, spanning the range the essays use: the golden divergence at three rises from 0.09 down to 0.012, the Lucas angle at two, and 151.14° — a number with no significance at all, included precisely because it has none.
Every one comes back. The worst error in the recovered divergence is about of a degree, and the worst error in the recovered rise is of the same relative size. These are not tolerances that were met; they are the floating-point floor, which is what “solved” looks like as opposed to “fitted”.
The contrast with the disc is not a criticism of the disc recovery, which does the best that can be done with what it has. It is a statement about identifiability: two integers do not determine a lattice, and two integers with two lengths do.
Why the disc cannot do this
It is tempting to read the difference as a matter of effort — the disc recovery being an older, rougher piece of work that could be brought up to the same standard. It cannot, and the reason is worth setting out because it is a statement about the geometry rather than about the code.
On a disc, the hop for offset is not one number. Between primordium and primordium the pattern advances radially, and that quantity depends on : the same offset gives a shorter hop at the rim than near the middle. Take the median across a counting band and the result is a number, but it is the median of a changing quantity, and its value depends on the width and placement of the band.
So the disc’s two lengths are not measurements of the lattice. They are measurements of the lattice averaged over a region where the lattice is changing, and feeding them into an exact solver would produce an exact answer to a question nobody asked.
The disc recovery therefore uses what it can trust — the integers, which are stable across the band — and reports the interval those integers allow. That is the correct trade, and it is why the disc essay states the interval width alongside the centre rather than quoting the centre alone.
There is a narrower band that would make the disc’s lengths meaningful, and the reason it is not used is instructive: narrowing the band far enough to freeze the lattice leaves too few points to count in. The two requirements pull in opposite directions, and on a disc they cannot both be satisfied. On a cylinder there is nothing to freeze.
The ambiguity that does not go away
One thing is genuinely not recoverable, and reporting it is the difference between a solved problem and a problem declared solved.
A lattice at divergence and a lattice at are mirror images. Every hop length is identical, every count is identical, and no measurement made on the coordinates can distinguish them. So the recovery returns both when both survive, and the essays quote whichever matches the input.
This is not a defect of the method; it is a fact about the object. A photograph of a stem does not record which way the plant was facing, and in real populations both handednesses occur, usually at close to equal frequency. Any recovery that returned a single answer here would be concealing something.
The disc recovery has the same ambiguity and reports it the same way. It is one of the few places where the two geometries behave identically.
The refusal, and what it caught
The solver is required to fail on input that describes no lattice, and this is where it earned its place.
The cylinder counter was first written as a copy of the disc counter, complete with the rule that a parastichy number must be a local minimum of the hop curve. As the counting essay describes, that rule is right on a disc and wrong on a cylinder, and at a rise of 0.09 it made the counter report 2 and 5 for a lattice whose real pair is 2 and 3.
The recovery was handed those counts with the hop lengths that went with them, and it refused: no divergence and rise produce two families of 2 and 5 at those two lengths. The refusal was correct and it was the only thing in the system that could have noticed, because five spirals really were drawn and there really were five of them.
The pattern is now familiar enough on this site to be worth naming. A pipeline whose stages can only agree has not been tested. The disc counter’s first bug was found the same way, by an angle recovery that had no consistent answer for the pair it was given.
Two refusals that are not failures
Two other inputs are rejected, and both are rejections of the question rather than of the arithmetic.
A non-coprime pair. Counts of 4 and 6 share a factor of 2, which means the lattice is two rows of something — a whorled stem rather than a spiral one. No single divergence angle describes it, and the honest answer is to say so. This mirrors the disc’s treatment of the same case, where a divergence near a simple fraction produces visible radial rows and counts that share a factor.
A pair with no lattice. If the two lengths are inconsistent — too long for the counts, or in the wrong ratio — there is no root and the solver says so. This is the case that caught the counting bug.
Neither refusal is a tolerance. Both are statements that the input describes no member of the family the solver searches, and a solver that returned the nearest member anyway would be reporting a fitted number as a measured one.
What the residual curve looks like
The solver’s behaviour is easier to trust once one has looked at the function it is finding roots of, and it has three features worth naming.
It is defined only in patches. Where the angular part of the -hop exceeds the whole measured hop, there is no real rise and the residual is undefined. Those gaps are not numerical trouble; they are regions of the divergence axis that the measurement has already excluded, and there are many of them because oscillates times across the axis.
It is smooth inside each patch and kinked at the boundaries. The kinks are at the wrap points, where the nearest whole turn changes, and they are at exactly known places — multiples of and . A root-finder that wandered across one would misbehave; bracketing within patches avoids the question entirely.
It has several roots, and most of them are wrong. Solutions where the given offsets are short but not shortest are real solutions of the equations and describe lattices the points did not come from. Discarding them requires evaluating the forward map at each candidate, which is cheap, and is the step that makes the recovery an inverse of the counting rather than an inverse of two equations that happen to resemble it.
That last check is the one that turns the refusals into refusals. Without it the solver would always return something.
Two routes to a rise
There is a second, cruder way to get the rise, and comparing the two is a useful check on both.
The nodes of a stem, taken in index order, advance a fixed distance up the axis each time. Fit a straight line to height against index and the slope is the rise, directly, with no counting involved at all.
That route uses information the parastichy recovery does not — it needs the nodes’ order, which a photograph of a mature stem may not supply, whereas the counting route needs only the positions. So it is not a replacement. But where the order is known, the two answers can be compared, and on every lattice tested here they agree to the same floating-point floor.
Two routes to one number, arrived at by arithmetic with nothing in common: one is a least-squares slope, the other is the intersection of two hop-length constraints. This site prefers that arrangement wherever it is available, and it is available here.
Why this matters for what follows
Two consequences run through the rest of this field.
The first is that a cylindrical lattice is fully determined by things measurable on a photograph — with the mirror caveat. Count the two families, measure two spacings, and the divergence and rise follow. There is no fitting step, no free parameter, and no need to assume the answer is near 137.5°.
That last point is not rhetorical. A great deal of published work on real phyllotaxis measures the divergence angle by assuming the pattern is a Fibonacci one and reading off the implied angle, which cannot discover that a plant is anything else. A recovery that starts from the counts and the lengths can return 99.5°, or 151.14°, or a number that corresponds to nothing, and that is the only kind of measurement that can support a claim about how often plants are Fibonacci — a question taken up later in these essays.
The second consequence is that the map between and the parastichy pair is now known in both directions. Forwards: given the parameters, which pair is shortest. Backwards: given the pair and the lengths, the parameters. Both directions are needed to draw the plane of possible stems and to say what happens when a growing plant moves through it.
What would break it on a real plant
The recovery is exact on a lattice. Real stems are not lattices, and it is worth being explicit about which departures matter, because the answer is not the obvious one.
Noise in the node positions is the benign case. The two hop lengths are medians over many pairs, so independent scatter averages down, and a lattice perturbed by a few per cent of the spacing returns parameters good to a comparable few per cent. Nothing about the method is delicate here.
A drifting rise is the case that matters, and it is not noise. A real shoot’s internodes shorten as it grows, so the rise at the bottom of a measured stretch differs from the rise at the top, and the two hop lengths are then medians over a changing quantity — which is precisely the situation that makes the disc’s lengths unusable. The fix is to measure over a short enough stretch that the drift is small, which trades against needing enough nodes to count in, exactly as on the disc.
A changed divergence would be visible rather than damaging: the pair changes, the counts disagree between bands, and the constancy check fails. That is a detection, not an error.
So the honest statement is that the method is exact on the object it is defined for and degrades gracefully in one direction and awkwardly in another — and that the awkward direction is the one a growing plant actually moves in.
The measurement in one line
A stem is two numbers. The two numbers can be recovered from the positions of its nodes exactly, by machinery that is shown the positions and nothing else, and the machinery refuses when the positions describe no stem.
That is a stronger closure than this site has managed anywhere else, including on the shells, where the growth factor comes back to fifteen digits but only one parameter is being recovered. It is stronger than the disc’s, which returns an interval. And it is available on the geometry that most real phyllotaxis actually has, which makes the fact that the popular account is built on the other geometry look less like a choice of illustration and more like the reason the subject is in the state it is.
It is also worth recording what this does not license. An exact recovery of a lattice’s parameters is not a measurement of a plant’s divergence angle unless the plant is a lattice, and the previous section is a list of ways it is not. What the exactness buys is that every remaining error is attributable: it comes from the object departing from the model, and not from the model being solved loosely. That is a smaller claim than it sounds and a much more useful one, because it makes disagreement between two measurements informative rather than ambiguous.