Pattern Formation

L-Systems

A handful of characters, rewritten over and over by a tiny grammar, then read as drawing instructions — and a fern, a snowflake, or a dragon curve unfolds.

Drag the angle slider and watch the fern bend and morph continuously. Raise iterations to add detail; switch the system to a Koch snowflake, a Sierpiński arrowhead, or a dragon curve. Each change re-grows the figure from the root. Plants are colored brown at the trunk, brightening to teal-green at the tips.

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:

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:

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

References

  1. 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.
  2. Prusinkiewicz, P. & Lindenmayer, A. (1990). The Algorithmic Beauty of Plants. Springer-Verlag. Freely available at algorithmicbotany.org/papers.
  3. Prusinkiewicz, P. (1986). "Graphical applications of L-systems." Proceedings of Graphics Interface '86, 247–253. (Turtle interpretation of L-systems.)
  4. Smith, A. R. (1984). "Plants, fractals, and formal languages." Computer Graphics (SIGGRAPH '84) 18(3), 1–10.