What you're seeing
Start with a few characters — the axiom, here just X. A set of
rewrite rules replaces every character at once with a short string of new characters.
Do that five or six times and a 1-character seed becomes tens of thousands of characters. Then hand the
result to a turtle: a pen that crawls across the canvas obeying each symbol in turn —
move forward and draw, turn left, turn right, remember this spot, come back to it. Out of that
bookkeeping a fern appears, leaf by leaf, with no fern ever having been described anywhere. The whole
plant is implied by the grammar.
The rule
An L-system is a parallel string-rewriting system (a Lindenmayer system). It has an
axiom and production rules like X → F+[[X]-X]-F[-FX]+X and F → FF.
The key word is parallel: on each pass, every character is replaced simultaneously, the way every
cell of a growing tissue divides at once. Then the string is read as turtle graphics:
F— move forward one unit, drawing a line segment (other letters can draw too).f— move forward without drawing.+/-— turn left / right by a fixed angle.[/]— push / pop the turtle's position and heading on a stack.- letters like
X— draw nothing; they exist only to drive the rewriting.
The [ ] stack is what creates branches: the turtle saves where it is, wanders
off to draw a sub-branch, then teleports back to the fork to draw the next one. And the
self-similarity comes from a symbol expanding into a scaled copy of the whole: X
rewrites into a pattern that itself contains X, so every twig is a small version of the entire
bush. Drag the angle slider and you are changing only the turtle's turn — the same string, drawn differently,
morphs smoothly from an upright frond to a wind-bent sweep.
Why it matters
A tiny rule set encodes an elaborate, self-similar form. That is the headline: the emergence of complex morphology from a compact developmental program. A few production rules — a few dozen characters — unfold into a structure with thousands of parts and visible hierarchy.
It is worth being honest that this is a different flavor of emergence from most of the Atlas. Boids, the Ising model, or reaction–diffusion are dynamical and interaction-based: many agents push on each other in real time and order crystallizes out of the feedback. An L-system is generative and developmental: there is no interaction between parts and no equilibrium being sought — a grammar simply unfolds a form by rewriting. Both are emergence in the sense that the whole is far richer than any rule, but the mechanism is rewriting, not interaction, and it is fair to say so. L-systems are the foundation of procedural plant generation in computer graphics and a genuine tool in developmental biology.
In the wild
Aristid Lindenmayer was a botanist, and L-systems began as biology, not graphics. In 1968 he introduced them to model the growth of filamentous organisms — chains of cells in algae like Anabaena, where each cell divides on a schedule set by its state and its neighbors. The parallel rewriting is the simultaneous division of every cell. From there the formalism scales up to capture:
- Plant branching and phyllotaxis — the regular angles at which stems fork and leaves spiral around a shoot are exactly the kind of pattern a fixed turn-angle rule produces.
- Procedural vegetation in games and film — forests, ferns, and trees are routinely grown from L-systems (and their stochastic, context-sensitive descendants) rather than modeled by hand.
Real plants are richer than any of this. Their development is stochastic, responds to light, gravity, and crowding, and is regulated by hormones and gene networks — a deterministic grammar is a clarifying caricature, not the biology. Lindenmayer and Prusinkiewicz themselves extended the basic model with stochastic and context-sensitive rules precisely to close some of that gap.
Try this
- Grab the angle slider on the Fractal plant and sweep it slowly: the fern bends, fans out, and collapses. Small angle changes reshape the whole organism because the same turn is applied at every fork.
- Raise iterations one step at a time to watch detail accrete — each step rewrites every twig into a smaller copy of the whole.
- Switch to the Dragon curve or the Koch snowflake: same machinery, no
[ ]branching, yet an intricate space-filling boundary emerges from one rule.
References
- Lindenmayer, A. (1968). "Mathematical models for cellular interactions in development. I. Filaments with one-sided inputs; II. Simple and branching filaments with two-sided inputs." Journal of Theoretical Biology 18(3), 280–315.
- Prusinkiewicz, P. & Lindenmayer, A. (1990). The Algorithmic Beauty of Plants. Springer-Verlag. Freely available at algorithmicbotany.org/papers.
- Prusinkiewicz, P. (1986). "Graphical applications of L-systems." Proceedings of Graphics Interface '86, 247–253. (Turtle interpretation of L-systems.)
- Smith, A. R. (1984). "Plants, fractals, and formal languages." Computer Graphics (SIGGRAPH '84) 18(3), 1–10.