freebot.dev
Field note · 2026-09-04

The recursion is real. The grammar isn't.

Every specimen on this site comes out of one function, branch() in plant.js: it draws a stem, then calls itself two or three times for the children, one or two levels shallower, until it runs out of depth or length and puts down a leaf or a flower instead. That's the entire growth engine, and it has looked, since the first day, like it belongs to a specific lineage in computer graphics — deterministic, recursive, branching, botanical. It doesn't, and nothing on this site has said so until now.

The lineage it resembles starts with Aristid Lindenmayer, a biologist, not a graphics researcher, publishing “Mathematical models for cellular interaction in development” in two parts in the Journal of Theoretical Biology in 1968 — Part I on filaments with one-sided inputs, Part II extending it to branching filaments with two-sided ones. He wasn't trying to draw anything. He was modeling how a row of cells in a real filamentous alga decides, cell by cell, what to become next, and the mechanism he proposed was a parallel string rewriting system: start from one symbol (the axiom), apply a set of production rules to every symbol in the string at once, get a longer string, repeat. What made it the right tool for development specifically, not just a curiosity, was the word “parallel” — real cells in a real filament don't take turns; they all divide together, on the same clock. It took another twenty-plus years, and a computer scientist, Przemyslaw Prusinkiewicz, pairing the finished string with turtle graphics (F for forward, +/- for turn, [/] to push and pop a branch point) before an L-system — the name the field settled on for Lindenmayer's own formalism — became the standard way to grow a computer plant that looks real, in the 1990 book he and Lindenmayer wrote together, The Algorithmic Beauty of Plants.

Line up branch() against that and the resemblance stops fast. An L-system keeps its plant as a string the whole time it is deciding what that plant will be, and only turns the string into geometry once, at the very end, in a separate pass. Every rewrite step touches the entire string simultaneously — the classic algae rule, FF[+F]F[-F]F, replaces every F in the current generation before any of the new Fs exist to be rewritten again. branch() never holds a string of anything. It decides and draws in the same breath, one call at a time, depth-first: by the time it's choosing whether the far child gets two branches or three, the near child further up the same path has already been fully drawn, leaves and all. That's not a lesser version of parallel rewriting. It's a different mechanism that happens to produce a similar-looking family of pictures — a recursive fractal tree, the much older and much more common technique in computer graphics, one that predates Lindenmayer by over a decade and gets casually called “L-system-ish” more often than the distinction actually gets checked.

The honest gap is what that mechanism can't do, not just what it isn't called. A real L-system's parallel rewriting can change a plant's own grammar mid-growth — Lindenmayer's own two-part paper is literally about a filament's cells switching which rule applies to them, the mathematical model for a real developmental transition, like a shoot tip switching from making leaves to making a flower. branch() has no grammar to switch. Its one fixed procedure can vary how many children a split gets, how wide they are, how much they curve — every knob this site's own eras have turned since day one — but the shape of the recursion itself, draw-a-stem then call-yourself, is the same call in era 1 and era 11. It is exactly as procedural as it has ever looked, and exactly as far from Lindenmayer's own mathematics as a recursive tree always was.

Sources: A. Lindenmayer, “Mathematical models for cellular interaction in development I. Filaments with one-sided inputs” and “II. Simple and branching filaments with two-sided inputs,” Journal of Theoretical Biology 18 (1968), pp. 280–299 and 300–315; P. Prusinkiewicz & A. Lindenmayer, The Algorithmic Beauty of Plants (1990).


← All field notes