All at Once Everything Grows: An Introduction to L-Systems
L-Systems and Beauty Unfolding
Nature documentaries that show a time-lapse of natural growth are a window to a hidden world. They start from nothing, maybe only a microscopic crumb of life, and then, all of a sudden, there is an explosion, an unfolding of a plant, a mushroom, a seed. This process, all-natural, seems to follow an invisible internal rulebook we cannot see.
Table of Contents
Mysterious, but life. It saturates the world around us and includes the wonders found within us as well. We start from one cell and arrive at a full human, quickly, too, ex nihilo, without explanation. How does our world grow, the most complex of organizations arising from nothing? The explanation lies in the complex, yet surprisingly simple rules of growth that all life on Earth follows.
Yes, there is a chasm from the tiniest of seeds to the mighty oak, and they seem almost unrelated to each other in complexity, but growth occurs furiously in line to the predictable final form.
Aristid Lindenmayer
From the tiniest yeast and fungus, the same pattern holds. Aristid Lindenmayer, a botanist, was struck with the same question, how cells grow like an explosion to reach their final organism. He began his research studying yeast, fungus and blue-green bacteria in algae and developed a body of thought called an L-system to describe the relationship between cells in an organism.
Further research expanded this system to include more complex plants and other natural systems. The gist of his theory is that systems of growth follow a set of simple rules and can be applied to explain the most complex of organisms, that plants, living creatures, follow a set of rules, inborn, where each cell in the organism follows the same rule, at the same time, with the same order. There is no leader, it just is.
Interactive L-system fractal generator with controls for axiom, rules, angle, iterations, segment length, width decay, and color
F = draw forward · + = turn left · - = turn right · [ ] = push/pop branch · | = reverse · X Y = structural (no draw)
Drag or two-finger pan · scroll or pinch to zoom · double-click or double-tap to reset view
How L-Systems Behave
To understand, visualize a string of identical boxes, each one of them a single identical plant cell. They exist in isolation, none of them regarding their neighbor. Quiet, they wait in stasis, ready to grow. And then, boom, life, each little box begins to grow simultaneously, following that internal inborn rule.
This system, Lindenmayer postulated, could be defined as a grammar set, giving us the ability to visualize a system of rules to explain patterns. Like a language of its own, he wrote that there needed to be an axiom, a defined set of rules, and its own alphabet.
In math, this is called formal grammar, and its output is a string of actions. It follows Lindenmayer’s requirements, the axiom is the beginning state of the growth system, a seed, a spore, a state of waiting before action. There is an internal set of instructions, and there are the needed ingredients, the alphabet to set the instructions in play.
Grammar in Play
In practice, the grammar looks something like this: think of it as the recipe before the cooking begins. The alphabet is a set of symbols standing for a biological point; they are what is happening at a certain stage — for example, our cell might be called A=cell segments and divides, B=rest, C=turn left, D=turn right, E=branch right, F=branch left, and so on, a recipe of parts, so to speak. The axiom is the seed, the start, a simple symbol like A, B, or C, poised, ready to go at the first available moment. A set of instructions defines what comes next in a string, what is built with all the parts, and in what order.
One of the rules of an L-system is that as many rules as possible happen at the same time. Like life itself, rules are all squished into happening as fast and furiously as possible. In our plant example, growing a leaf and growing in height should occur simultaneously if resources allow the process to begin. This makes growth explosive and time-efficient; if it can happen, it does. This makes evolutionary sense. Plants and others survive by outcompeting their neighbors, growing fast and gathering resources before they are gone.
Plodding Turtles
For all its beauty and complexity, growth is defined by a system of choices, and those choices follow a set of rules. The mathematical term is a string, and strings can be very complex, but they still follow a linear path. Think of a plodding turtle, and that is indeed what it is called, that does nothing but follow along the string. Rules dictate direction, and our turtle unthinkingly follows the correct, grammar-defined path. It can branch and create new structures, but most of all it follows a simple set of rules. You don’t need many; you just need as many happening at the same time to create our explosive growth.
But multiple turtles, all at the same time, following the same set of rules, then what do we see? Something fractal-like, defined strings bound to grow in a preset identical pathway, self-similar to each other, they can be nothing other than that. Zoom in, zoom out, and you will see the same structure, all following the same rules.
The rules the turtle follows determine the shape of what the growth looks like, dense, and the fractal dimension is high; long twiggy growth and the fractal dimension is low. The growth that we see visually is determined by the grammar, and it is inborn.
Stochastic L-system fractal tree with controls for angle, iterations, length, width decay, rule weights, angle jitter, length jitter, seed, and color
Rule 3 weight = remainder (100 − R1 − R2). Each F independently rolls its rule on every expansion — same seed produces the same tree.
Messy Order, L-Stystems in Life
Of course, while fractals are beautifully and artfully arranged on our screen mathematically, nothing in nature is perfectly ordered. In life, things vary in how they appear. Even in very orderly systems, nothing in nature is a perfect line. So each little cell has in it the capacity for variance; what emerges, while it follows the inborn rules, does not follow the same footprint of lockstep output. Growth follows a more stochastic pattern. Even more mind-blowing, while the growth is influenced by chance, the output still follows a fractal-like pattern. Chaos is bounded. Our fern might not be perfect, but it is still an ordered fern, not an oak tree.
Lindenmayer’s further work established that cells, our boxes, are influenced by their neighbors, an if-then scenario of growth, but even that growth tends toward order. The same systems have the flexibility to respond to environmental changes over time and to competition through adaptation. A branch grows toward light; a root finds its way around a rock, the cell responds to what is next to it, not to some distant plan.
A rough sketch of life, non-perfection, yet order, growing as fast and furiously as possible. All at once, everything grows. For a visual explanation, see our simple music seed tool, more complex, and our MIDI L-System Generator.
Our Tools
On this page, we have two L-system tool visualizers. Both share the same grammar and follow the same rules. However, one is rigidly fixed, and the other is stochastic (a roll of the dice tweaks the output). Our deterministic tree tool includes 5 L-system grammars, each representing a different species, a slider to adjust the angle, and an iteration slider to show growth over time. The stochastic tool has a slider that lets you choose the most common growth pattern. You can also choose the seed to start with, vary it, and you’ll grow a different individual, but it will always be recognizably what it is supposed to be. The grammar is the species. The seed is the individual.