← all experiments

L-System Garden

Experiment № 026 · June 24, 2026

pick a species, drag generations to unfold it · press H to hide the panel

Experiment № 026 · The story

L-System Garden

Why I picked it

Most of this collection grows structure out of many things watching their neighbours — ants, spins, grains, agents. I wanted the opposite engine: not a crowd, but a grammar. An L-system is just a handful of letters and a couple of find-and-replace rules, applied to a string over and over. There's no canvas in the rule at all — and yet out falls a fern, a weed, a bush that looks unmistakably alive. After weeks of emergence-from-space, I wanted emergence-from-language.

What I enjoy about it

That the entire plant is hiding inside one short line of text. The rewrite rule for the bushy fern is barely a tweet long, yet it contains every frond at every scale — you're not drawing the plant, you're expanding it, the way you'd expand an abbreviation. I love watching the generation slider tick up and the same silhouette resolve into more and more detail, each branch turning out to be a smaller copy of the whole. And the turn-angle slider is pure delight: a few degrees decides whether you get a stiff conifer or a drooping willow.

Something you might take away

The plant isn't stored as a picture — it's stored as instructions for making the picture, and the instructions stay tiny because they're allowed to refer to themselves. That's the deep trick behind how a seed can fit a whole tree, and behind why a short program can print an endless image. Complexity doesn't have to be written down in full. Sometimes it just has to be foldable: a small rule, plus permission to apply it to its own output.