← Gallery

L-System

A short string, rewritten into a long one by a couple of rules, then read out loud by a turtle with a pen.

Output

A set shares every setting — paper, border, the sketch’s own knobs — and differs only in the seed. Regenerate any one of them without touching the others.

PNG: 3508 × 4961 px at 300 dpi. PDF: vector, RGB, 297 × 420 mm page, no bleed. Printed area 297 × 420 mm.

0 mm

Millimetres of unprinted paper on every side. The piece is composed to fit what is left, not shrunk to fit it.

System

0

Rewrites of the whole string. Zero uses the number the grammar was designed for; anything else overrides it, and each extra pass multiplies the work.

Turtle

0.0

Degrees per + or -. Zero uses the grammar’s own angle. A degree or two either side of it changes the plant completely.

0.0

Degrees of randomness added to every turn. The difference between a diagram and a drawing.

1.00

How much shorter each step gets per level of bracket. Under one, the twigs are finer than the trunk.

Drawing

60

The whole path is measured and then fitted to the sheet, so the drawing is the same size whatever the grammar does.

1.50
0.70

How much thinner a deeply nested branch is drawn than the trunk.

0.0

A dot wherever a branch ends — where the turtle pops back rather than carrying on.

Colour

How it works

There is a string, and there are rules that say what each character becomes. Apply the rules to every character at once, then do it again. The plant here starts as the single character X and, after six passes of two rules a line each, is some tens of thousands of characters long. All of the structure in it came from those two lines; nothing was designed.

Then a turtle reads the string. F walks forward drawing a line, + and − turn by the grammar’s angle, and [ and ] push and pop the turtle’s position and heading on a stack. Branching is entirely the doing of those two brackets — the turtle goes off down a limb, and then it is put back exactly where it left. Nothing in the grammar knows about a tree, and the same machinery with different rules gives the dragon curve, a Koch island and a Hilbert curve, which are not trees at all.

Two liberties are taken with the classical form, and both are controls. The turn angle can be jittered, because an exact Lindenmayer system draws a diagram rather than a plant. And the step can shrink with bracket depth, so the twigs come out finer than the trunk. One thing is not a liberty: the finished path is measured and then fitted to the sheet, so a grammar that triples in size per pass still lands on the paper at every setting.

R regenerate · S PNG · P PDF