Digital Plant

Organic form itself is found, mathematically speaking, to be a function of time. We might call the form of an organism an event in space-time, and not merely a configuration in space.D’Arcy Thompson

Simplicity compounds.

When I was in high school, one of the pieces of writing which stuck with me the most (although I never finished it) was A New Kind of Science by Stephen Wolfram.

It argues a simple idea, that our world and the phenomena around it can be described by a set of simple rules, like the cellular automata of Conway’s Game of Life.

In short, complexity can emerge from simplicity. And a beautiful example of this is the Lindenmayer system.

While formally it is used to model the behavior of plant cells, you can use its simple basis to draw the plants and flowers themselves.

Waiting for my flight to Seoul, I used Claude to help create an interactive article on L-systems and how it can be used to generate the Vietnamese flora I grew up around.

Rewriting

Defining a complex object by replacing the parts of a simple one, over and over.

The central concept is that of rewriting, a technique for defining complex objects by successively replacing parts of a simple initial object, using a set of rewriting rules called productions. A production is written a → χ. The single letter a on the left is its predecessor; the word χ on the right is its successor. Any letter for which no production has been given is assumed to carry the identity production a → a, and so stands for itself.

A system needs three things, and no more: an alphabet V of the symbols allowed; a non-empty word ω over that alphabet, called the axiom, which is where rewriting begins; and a finite set of productions P. Where exactly one production exists for each letter, the system is deterministic, and the same axiom always yields the same plant. Give a letter two productions and a weight for each, and you have a stochastic system, which is how a species produces specimens rather than clones.

The smallest system worth writing down has two letters and two productions: a → ab and b → a. Start from b and the words go b, a, ab, aba, abaab, abaababa. Count the letters and you get 1, 1, 2, 3, 5, 8. The Fibonacci series falls out of two productions and a starting letter, and it is not a coincidence dressed up: every a in one word contributes an a and a b to the next, every b contributes an a, so the count of letters obeys a linear recurrence. Sunflower spirals and pine cone scales fall out of the same arithmetic for the same reason: they are counting a process that adds to itself.

Lindenmayer proposed all of this in 1968, and not in order to draw anything. He was describing the development of a filamentous blue-green bacterium, Anabaena catenula. Its cells come in two sizes, written a and b, and each carries a polarity, written as a subscript, which decides on which end a daughter cell will be put. Four productions reproduce the sequence of long and short cells seen down a microscope, and they reproduce it in the right order, which is the part that matters. A model that got the proportions right but the sequence wrong would not be describing the same organism.

ω : aᵣ aᵣ → aₗ bᵣ aₗ → bₗ aᵣ bᵣ → aᵣ bₗ → aₗ

The essential difference from an ordinary grammar lies in the method of applying productions. In Chomsky grammars productions are applied sequentially, one symbol at a time, the way a compiler parses a line. In L-systems they are applied in parallel, and simultaneously replace all the letters of the word. That is not a matter of efficiency. Productions are intended to capture cell divisions in multicellular organisms, where many divisions occur at the same moment. If the rewriting did not happen all at once it would not be describing growth at all.

F[+F]F
F[+F]F[+F[+F]F]F[+F]F

All six symbols are replaced in the same instant. Nothing waits its turn, which is exactly how a plant grows, every bud pushing at once.

Fig. 2One pass of rewriting, every symbol at once.

The same thing can be watched geometrically. Take a square, and a production that replaces every side with a run of eight shorter ones. Two passes is already a coastline, and nothing was drawn at any point: each figure is the one before it with every symbol replaced.

the axiom
1 pass
2 passes
Fig. 3F → F−F+F+FF−F−F+F, applied none, once and twice.

Applying the productions once yields a new word; applying them n times is a derivation of length n, and the whole sequence ω ⇒ μ₁ ⇒ μ₂ ⇒ … is called a developmental sequence. Each word in it is not a description of the organism. It is the organism, at one moment of its life.

Because every letter is replaced at once, the number of each kind of letter in one word is a fixed linear combination of the counts in the word before it. That single fact settles how fast anything here can grow: the length of the word, and so the size of the plant, is always some combination of polynomials and exponentials in the number of passes. It is why four passes of a modest-looking rule can put several thousand segments on the page, and why no arrangement of these rules will ever produce something that grows and then quietly levels off. A real plant does level off. Getting that back is possible, but it costs more machinery than any system on these pages uses.

The turtle

How a word of a few thousand letters becomes a line on paper.

Rewriting only ever produces more text. A word of four thousand symbols is not yet a picture of anything, and the original theory had no geometry in it at all; the emphasis was on topology, on which cell adjoined which. Interpretations were added later. The one used here is turtle geometry, borrowed from Abelson and diSessa: the finished word is handed to a turtle, which reads it from left to right and leaves a trail behind it.

A state of the turtle is a triplet (x, y, α), where the Cartesian coordinates (x, y) represent its position and the angle α, called the heading, is the direction in which it faces. Fix a step size d and an angle increment δ, and each letter becomes a command.

Notice what the turtle does not have. It holds no map, no list of coordinates, no idea where it is on the page or how it got there. It knows one position and one heading, and every instruction it takes is relative to those: not go to that point but turn a little and carry on. That restriction is why the method suits plants so well. A bud has no notion of where it sits on the plant either. It knows which way it is pointing with respect to the shoot that produced it, and it grows from there.

Table I. The turtle’s alphabet
SymbolInterpretation
FMove forward a step of length d, drawing a line.
fMove forward a step of length d, drawing nothing.
+Turn left by the angle increment δ.
Turn right by δ.
δ = 60°
δ = 90°
δ = 144°
Fig. 4One word, F+F+F+F+F+F+F+F+F+F, read at three angles.

The turtle knows nothing about plants, and nothing about rewriting. It is a separate machine, and that separation is the whole trick: the biology lives in the productions, the geometry lives here, and neither half needs to know anything about the other. One consequence is worth pausing on. The same word, read with δ at twenty degrees and at ninety, gives a shrub and a lattice. The rules fix what is connected to what; the turtle fixes what it looks like.

One entry earns its place for a less obvious reason. f moves without drawing, which sounds like a small convenience and is actually what lets a figure have holes in it: an island with a lake inside needs the pen lifted between them, and no arrangement of drawn lines will do instead. Four symbols is the whole alphabet for now. The rest of this book adds three more, one at a time, and only where the drawing cannot be made without them.

One practical matter. The step d does not shrink by itself, so a word twice as long draws a figure twice as big. Every plate here is scaled to fit its box after the fact, which is why a plant at five passes and the same plant at two look the same size on the page. Nothing about the plant changed. Only how far away you are standing.

Branches

Two symbols, and a stack, are the whole of it.

Everything so far draws a single line. It may be convoluted, it may cross itself, some of it may be invisible, but it remains one unbroken path, and the plant kingdom is dominated by branching structures. What is wanted is an axial tree: the graph-theoretic notion of a rooted tree, together with the botanically motivated notion of a branch axis. Its edges are called segments. A segment with more segments after it is an internode; one with nothing after it is an apex. The axis beginning at the root has order zero, and an axis branching off an axis of order n has order n+1.

Two symbols are enough to write such a tree as a flat string. [ pushes the current state of the turtle onto a pushdown stack: its position, its heading, and anything else it is carrying, such as the width of the line. ] pops a state off that stack and makes it the current state. No line is drawn, although in general the position of the turtle changes. Whatever lies between the two brackets is a branch, and the stem continues afterwards exactly as though the branch had never happened.

Table II. Two more symbols
SymbolInterpretation
[Push the current state of the turtle onto a stack.
]Pop a state, and make it the current state.
FF+FF−FF
FF[+FF][−FF]FF
Fig. 5The same eight letters, without and with brackets.

A stack is not an arbitrary choice of machinery. A branch is a subtree, and to carry on the axis it grew from you must return to exactly the state you left, down to the heading and the width of the line. Last in, first out is precisely that promise. It is also what the plant does: a side shoot has no effect whatever on the shoot that bore it, which goes on extending from its own tip as though nothing had been added. Nest the brackets and you nest the promise, which is how a branch on a branch on a branch stays attached to the right thing.

There is a second constraint hidden in these rules, and it is biological rather than notational. In every production here the symbol that keeps growing sits at the end of the successor, so new segments are only ever added at the tip. Botanists call that subapical growth, and every herbaceous plant does it. An internode that has been laid down does not lengthen again from the middle; the growing happens at the apex, and everything below is already finished. Writing the recursive letter anywhere but the end would describe a plant that inserts new stem into its own middle, which is not a plant.

Because a production may place brackets inside brackets, branches carry branches, and the one short rule that made the first fork makes every fork at every scale. The resemblance to a real plant stops being a coincidence at this point: an apex that goes on producing segments below its own tip is doing what botanists call subapical growth, which is how every herbaceous plant in the world actually grows.

This is also where the striking economy of the method shows itself. Alvy Ray Smith named it database amplification: the generation of complex-looking objects from very concise descriptions. Two productions and an angle will fill a page. The plant is not stored anywhere. It is recomputed, from almost nothing, every time you look.

Derivation

A word is generated in a derivation of length n. Each pass below is one more.

Here is the whole apparatus running, from the axiom to the fifth rewrite. The system could hardly be smaller: the axiom is a single F, the only production is F → F[+F]F[−F]F, and the turtle turns 25.7° at every + and . Nothing else is specified, and nothing else is needed.

Read the words as much as the plants. The plant on any line is nothing but the line of letters above it, handed to the turtle. Hover a letter to find the stroke it made, or a stroke to find its letter.

The axiom1 symbol, 1 stroke

F

After 1 pass11 symbols, 5 strokes

F[+F]F[-F]F

After 2 passes61 symbols, 25 strokes

F[+F]F[-F]F[+F[+F]F[-F]F]F[+F]F[-F]F[-F[+F]F[-F]F]F[+F]F[-F]F

After 3 passes311 symbols, 125 strokes

F[+F]F[-F]F[+F[+F]F[-F]F]F[+F]F[-F]F[-F[+F]F[-F]F]F[+F]F[-F]F[+F[+F]F[-F]F[+F[+F]F[-F]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F[+F]F[-F]F]F[+F]F[-F]F[-F[+F]F[-F]F]F[+F]F[-F]F]F[+F]F[-F]F[+F[+F]F[-F]F]F[+F]F[-F]F[-F[+F]F[-F]F]F[+F]F[-F]F[-F[+F]F[-F]F[+F[+F]F[-F]F+ 5,411 more

Five passes take one symbol to fifteen thousand, and one line to a plant that fills the page. The production never changed and never grew. This is the whole economy of the method, and it is why so little text can stand for something that looks so complicated.

Four trees

One question, asked four ways: what does a shoot do after it forks?

A tree is a branching structure with a limited amount of growth to spend, and every set of rules below is a different answer to the same two questions. Does the leading shoot carry on after it forks, or hand everything to its children? And how much shorter is a side branch than the branch it came from?

Add a pull toward the light and a little unsteadiness at every joint, and the species falls out of the arithmetic. A tree that always hands over builds a wide, shallow crown, because each generation of limbs is shorter than the last and there are twice as many of them. A tree that never hands over builds a spire, because one shoot keeps the whole budget and the rest are trimmed to spurs. Everything between those is a matter of how the odds are set.

Field standard

The leader gives up early and hands its growth to two equals, so the crown spreads as wide as it is tall. A tree with no neighbours and no reason to hurry upward.

FFA
A -> 0.40 : F[+FA][-FA]
A -> 0.32 : F[+FA]FA
A -> 0.28 : F[-FA]FA
Field standard

Churchyard column

The opposite bargain. The leader never surrenders, side branches are cut to a fraction of its length, and a strong pull upward keeps everything pressed to the vertical.

FFFA
A -> F[+B]F[-B]FA
B -> F[+F]F[-F]F
Churchyard column

Weather side

The same growth as the field standard, but the light it leans into is off to one side. Every segment bends a little east, and eight years of that is a shape you can read the wind from.

FFA
A -> 0.45 : F[+FA][-FA]
A -> 0.30 : F[-FA]FA
A -> 0.25 : F[+FA]F
Weather side

Old orchard

Pruned for fruit, not for height: wide crotch angles, few forks, and a heavy wobble in every joint. Left long enough, a tree cut back this hard grows into its own knuckles.

FA
A -> 0.50 : F[++FA][--FA]F
A -> 0.28 : F[++FA]FF
A -> 0.22 : F[--FA]FF
Old orchard

Modifying

The ease of changing an L-system is most of its usefulness.

The ease of modifying L-systems makes them suitable for developing new forms: start from one that works, and observe the results of inserting, deleting or replacing some symbols. What follows is one production put through exactly that, a symbol at a time.

As given

The system from the last page, unaltered: one production, a turn of 25.7°, four passes. Everything below is this and one small change.

F -> F[+F]F[-F]F
F -> F[+F]F[-F]F at 25.7°

One symbol deleted

Remove the F between the two brackets, leaving F[+F][−F]F. The branches now leave from the same point rather than one above the other, and a plant that climbed becomes a plant that spreads.

F -> F[+F][-F]F
F -> F[+F][-F]F at 25.7°

One bracket moved

Put the right-hand branch inside the left one: F[+F[−F]F]F. Nothing was added or taken away, only renested, and the plant loses its symmetry entirely.

F -> F[+F[-F]F]F
F -> F[+F[-F]F]F at 25.7°

The same rule at 12°

Now leave the production alone and change only the turtle. A narrow turn gathers the whole plant into a spire, and no rule was touched to do it.

F -> F[+F]F[-F]F
F -> F[+F]F[-F]F at 12°

The same rule at 60°

A wide one throws it open until the branches begin to cross. The topology is identical in all three of these. Only the geometry differs, which is the whole point of keeping the two apart.

F -> F[+F]F[-F]F
F -> F[+F]F[-F]F at 60°

Your turn

The three fields below are the whole of an L-system. Change any of them and the plate redraws. Most edits produce a tangle, which is worth seeing too, because it shows how narrow the band of plant-shaped rules really is.

A few of the systems below use one more symbol, X. It has no interpretation at all: the turtle passes straight over it and draws nothing. It exists only to be rewritten, which lets a production carry structure forward without putting a line on the page. It is the written equivalent of a dormant bud, a place where nothing has happened yet that still decides what happens next.

Begin from one of these, or write your own.

4,607 symbols, 1,330 strokes

Growth

Four habits that separate a drawing of a plant from a diagram of one.

Everything so far makes shapes. It does not yet make anything that looks grown. The distance between the two is smaller than it seems, and comes down to four habits, each of which is a single change to rules you already have.

One of them needs something the alphabet has not had until now. A turtle carrying a pen can draw a stem, and with brackets it can draw every stem on a plant, but it has no way of saying that a leaf hangs at this point, or that this shoot has finished and opened. Those are not lines. Rather than build a leaf out of line segments and hope it reads as one, two symbols are added that place an organ where the turtle stands, facing the way it faces, and draw it in whatever way suits it.

Table III. Two symbols for organs
SymbolInterpretation
LPlace a leaf, facing the way the turtle faces.
KPlace a flower.

They cost nothing structurally. Neither moves the turtle or changes its heading, so a production can put one anywhere without disturbing what the rest of the word draws. Everything that follows uses them, and nothing before this page needed them.

Branch, and come back

A stem that puts out a leaf does not lose its place. Wrap the side shoot in brackets, F[+L], and the turtle returns to the stem to keep climbing. Alternate the sign of the turn and the leaves alternate with it, which is both commoner in nature than opposite pairs and far less mechanical to look at.

A → F[+L]F[−L]A

Stop growing, to bloom

A flower is what a stem does when it stops making stem. Give the growing tip two productions, one that carries on and one that finishes, and it will run for a while and then open. That is not a trick to get variety: it is a real botanical switch, and it only goes one way. A bud is either vegetative or floral, and once it has chosen it cannot go back.

P → F[+L][−L]P, or P → FK

Grass is one long, patient turn

A blade of grass has no branches at all. It is S → F−S: draw a little, turn a little, repeat. Thirty passes of that make a single arc. The whole character of it is in the size of the angle, and the two figures below differ in nothing else.

at 2.4° a blade
at 9° a shepherd's crook

Nothing grows straight

Two last touches, and they matter more than any production. The first is a wobble: add a degree or two at random to every turn the turtle makes. In a branching plant that error compounds, because a twig inherits the error of the limb it came from and adds its own, which is exactly how a real branch accumulates its crookedness. The second is tropism: after every step, bend the heading a fraction back toward the light. One is noise and the other is a force, and the two together are the whole difference between the pair below, which otherwise run the same production for the same number of passes.

exact turns, no light
±12° at each turn, and a sun

A Vietnamese flora

Eight plants, each from a different structural idea rather than a different set of numbers.

What separates one species from the next is not colour and not size but what its production is willing to do. Whether a shoot may divide or only extend. Whether the two arms of a fork get equal shares of what is left. Whether anything at all pulls the result back toward the light. Those three questions decide almost everything about a plant’s shape, and each of the eight below answers them differently. The two Tết trees answer them too, and get a section of their own at the end.

Hoa senNelumbo nucifera, the lotus

Out of mud, one stalk, one round leaf held clear of the water, one bloom above them both.

There is no branching production at all. A → FA simply extends, and the only other rule ends it in a flower. Everything the plant has goes into height and a single terminal bloom, which is exactly what a rhizome sending up one scape does. The pad is not on the flower stalk at all: the axiom sends up a second, shorter stalk of its own beside it, because in a lotus both come separately off the rhizome under the mud.

Hoa senω : [++FFFFL]FFFFFFFFA A -> 0.88 : FA A -> 0.12 : FFK δ = 21°, n = 12

Hoa cúcChrysanthemum indicum, the chrysanthemum

A low bush carrying so many heads that you see the flowers before the plant.

The leading production forks in two and terminates in neither branch, so growth divides again and again and stays short: a bush is a tree that never picked a leader. Both other productions end a shoot in a head, so nearly every tip flowers at once. The heads take nine touches of the brush and no distinct eye, because a chrysanthemum's disc is buried under its own ray florets.

Hoa cúcω : FFA A -> 0.48 : F[++A]F[--A]F A -> 0.28 : F[+L]FK A -> 0.24 : F[-L]FK δ = 24°, n = 6

Hoa phượngDelonix regia, the flamboyant

The flower of the end of the school year, and the reddest thing in a Vietnamese summer.

The axiom forks four ways at once, T → [+++A][-A][+A][---A], and every limb after that both forks and flowers. Because nothing pulls the limbs upward, the crown spreads wider than the tree is tall, which is the flat umbrella shape a flamboyant makes over a street.

Hoa phượngω : FFFT T -> [+++A][-A][+A][---A] A -> 0.5 : F[++A][--A]FK A -> 0.28 : F[++A]FK A -> 0.22 : F[--A]FK δ = 26°, n = 6

Hoa giấyBougainvillea glabra, the paper flower

A vine that will cover a wall, a gate and then the neighbour's gate. What look like petals are bracts, which is why the colour is so flat.

There is no leader and no tropism: the productions put a branch on one side and a flower on the other, alternating at random, and nothing pulls the result upright. A plant with no sense of up sprawls, and a heavy hand-wobble at every joint keeps it from ever looking planned.

Hoa giấyω : A A -> 0.42 : F[+A]F[-K]A A -> 0.32 : F[-A]F[+K]A A -> 0.26 : F[+L]FK δ = 33°, n = 8

Hoa sứPlumeria rubra, the frangipani

Frangipani. Thick blunt branches, bare for most of their length, then a heavy cluster of cream flowers at the end of each one.

The tree is forced through two forks before it is allowed to finish, so it always has a candelabrum of limbs. A limb carries nothing along its length and terminates in FF[+K][-K]K, three flowers together at the tip, which is why the tree reads as bare branches with a bunch stuck on the end of each.

Hoa sứω : FFT T -> F[++A][-A] A -> 0.44 : F[++A][--A] A -> 0.30 : F[+A][---A] A -> 0.26 : FF[+K][-K]K δ = 27°, n = 7

Hoa hướng dươngHelianthus annuus, the sunflower

One stem, leaves the whole way up it, and a head so heavy the stalk bends under it by the end of the season.

There is no branching production at all, only extension, so every unit of growth goes into height and one terminal head. The head takes eighteen touches of the brush against most flowers' five, because a sunflower is not one flower but a disc of several hundred florets packed on the golden angle.

Hoa hướng dươngω : [++L]F[--L]FFA A -> 0.86 : F[++L]F[--L]A A -> 0.14 : FFK δ = 26°, n = 12

Hoa lanDendrobium nobile, the orchid

An arching spray with the flowers hung along the underside of the curve, all facing the same way.

The stem is a grass production, F−A, so it arches; what makes it an orchid is that the flower bracket is only ever on one side of it. A rule that never chooses the other side gives a spray that faces you rather than a stem with flowers scattered round it.

Hoa lanω : A A -> 0.82 : F-[+K]A A -> 0.18 : F-K δ = 7.5°, n = 14

Hoa dâm bụtHibiscus rosa-sinensis, the hibiscus

The hedge flower of every schoolyard and half the front gates in the country. Big single blooms, one to a shoot, and never many open at once.

A shrub production that forks in two, with the two flowering rules weighted low so most shoots are still growing at any moment. That is why a hibiscus in a hedge carries a few enormous flowers rather than a mass of small ones: the plant is spending on size, not on number.

Hoa dâm bụtω : FFA A -> 0.54 : F[++A][--A]F A -> 0.24 : F[+L]FK A -> 0.22 : F[-L]FK δ = 28°, n = 6

Hoa nhàiJasminum sambac, the jasmine

A wiry little shrub carrying more flowers than it seems able to hold, and the reason a pot of tea smells the way it does.

The opposite bargain to the hibiscus above it: the same fork, but both flowering rules fire often and the flower itself is a third the size. Small and many, rather than large and few, out of one change of weighting.

Hoa nhàiω : FA A -> 0.44 : F[+A]F[-A]A A -> 0.30 : F[+L]K A -> 0.26 : F[-L]K δ = 31°, n = 6

Hoa gạoBombax ceiba, the red silk-cotton

It flowers in March on bare grey branches, and the blooms are heavy enough to hear when they land.

A tree grammar that forks and then stops, with no spur productions at all: every flower sits directly on the end of a limb, which is why the tree reads as a bare frame with lamps hung on it rather than a crown of blossom.

Hoa gạoω : FFFT T -> F[++A]F[--A]FA A -> 0.52 : F[++A]F[--A] A -> 0.48 : FFK δ = 27°, n = 7

Cỏ lauSaccharum spontaneum, the reed

Reed. A blade until it stops, and then a plume that catches the light.

The blade is the same production as any grass, A → F−A: draw a little, turn a little. The angle is small enough that thirty of them read as a curve rather than a corner. The head is a short chain of four more productions, each shedding a pair of catkins, so the fluff at the top is nothing but the last four passes of the same derivation.

Cỏ lauω : A A -> 0.86 : F-A A -> 0.14 : FP P -> F[++K][--K]Q Q -> F[++K][--K]R R -> F[+K][-K]S S -> F[+K][-K]K δ = 2.9°, n = 16

Cỏ dạiDigitaria ciliaris, the wild grass

The grass in the gaps of everything else.

A tuft rather than a plant: the axiom places five blades at once and each runs the reed's production, stopped early. Nothing here needs a rewriting rule to make a clump, only an axiom with five brackets in it.

Cỏ dạiω : [+++A][+A][A][-A][---A] A -> 0.8 : F-A A -> 0.2 : F δ = 5.5°, n = 7

LúaOryza sativa, the rice

Rice. A field ready to cut leans all one way, because every stem is carrying the same weight.

The culm is one production, A → F−A, repeated: a step and a small turn, which over eighteen of them bends a straight stalk into an arch. The head opens in a single pass, because a production that needed a second one could be rolled on the last pass and leave the grain unwritten. Its arms leave the culm at successive nodes rather than all at one, which matters more than it sounds: five arms off a single point lay five first strokes on top of each other and read as a knot of ink. Each arm sheds grain along its whole length and bends further over as it goes. There are two chains of them, P and X, identical but for the direction of the turn, because an arm has to curve the way it set out; turn them all the same way and the fan folds shut into a sheaf.

Lúaω : A A -> 0.8 : F-A A -> 0.2 : F[+++++++X]F[+++++X]F[+++X]F[+X]F[-P]F[---P]F[-----P]F[-------P]FP P -> F--KF--KF--KQ Q -> F---KF---KR R -> F---KF--K X -> F++KF++KF++KY Y -> F+++KF+++KZ Z -> F+++KF++K δ = 4.4°, n = 18

Tết

Two trees, and the one week of the year they are grown for.

Tết Nguyên Đán is the Vietnamese lunar new year, the turn from the old year into the first morning of spring, and the week when a country of ninety million people goes home. Houses are swept and debts are settled before it, because whatever the first day finds is what the year will hold. A tree is brought inside for it, in bloom, and it is not decoration: a branch that flowers on the first morning is the household’s luck for the year, and one that opens late or not at all is remarked on.

Which tree depends on where you are. In the south it is hoa mai, the yellow apricot, whose five flat petals are the colour of the season there. In the north, where it is cold enough for the wood to need a winter, it is hoa đào, peach blossom, and the pink is deeper the harder the cold was. Both are cut and forced so that they open on time.

Both drop their leaves before they flower, and that is why they end this book. A blossoming branch is almost pure structure. There is nothing on it to look at except the branching itself, and so nearly everything you see below is the production, running.

Hoa maiOchna integerrima, the yellow apricot

The Tết tree of the south. It sheds its leaves in the weeks before the new year and then flowers on bare wood, so the whole crown turns yellow at once instead of a little at a time.

Hoa mai, grown from these rules.ω : FFA A -> 0.34 : F[+FA][-FA] A -> 0.24 : F[+FA]FA A -> 0.22 : F[-FA]FA A -> 0.12 : F[+FB][-FA] A -> 0.08 : F[-FB][+FB] B -> 0.44 : F[+K][-K]FB B -> 0.32 : F[+KB][-K] B -> 0.24 : F[+K][-K]K δ = 27°, n = 10

Hoa đàoPrunus persica, the peach blossom

The Tết tree of the north, where the wood needs a real winter before it will set flower. The pink is deeper the colder the season was.

Hoa đào, grown from these rules.ω : FA A -> 0.36 : F[++FA][--FA]F A -> 0.20 : F[++FA]FF A -> 0.16 : F[--FA]FF A -> 0.16 : F[++FB][--FA] A -> 0.12 : F[--FB][++FB] B -> 0.42 : F[+K][-K]FB B -> 0.34 : F[+KB][-K] B -> 0.24 : F[+K][-K]K δ = 19°, n = 10

Colophon

The formalism, and the phrasing of most of the exposition, is taken from The Algorithmic Beauty of Plants by Przemysław Prusinkiewicz and Aristid Lindenmayer, published by Springer in 1990 and given away freely ever since. The four trees are not from the book; those rules are my own.

Nothing on these pages is a photograph or an illustration. Every plant is derived from its rules and drawn, stroke by stroke, in your browser at the moment you turn to it. Turn away and back and the hand moves differently.