TypologySienna Chen
LookLightweight

L-systems

Plants and fractals grown from a few rules.

A few rewrite rules that grow plants, branches and fractals. Start with one line, apply the rules a handful of times, and a fern appears. Every extra round doubles the size, so five or six rounds is the limit.

Breaks when
exponential growth past ~6 iterations
Also called
Lindenmayer, turtle graphics, generative plants

Prompts

Plant that grows on load
Canvas 2D L-system: axiom X, rules X → F+[[X]−X]−F[−FX]+X, F → FF, angle 25°, 5 iterations, but reveal the drawing over 4 s in string order so the plant grows from the root. Line width tapers by bracket depth (2.0 → 0.4). Add ±3° noise to every turn, re-seeded per branch, and a slow sway from a global sine on the base angle. Ink on paper; the tips in mint.
3D branches with instancing
Interpret an L-system in 3D with a turtle that has pitch, yaw and roll (+ − & ^ \ /), producing segment transforms; render the segments as an InstancedMesh of tapered cylinders and leaves as instanced planes at the tips. Rules for a tree with 4 iterations, at most 20,000 segments. Wind: rotate each instance around its parent joint by depth-weighted noise in the vertex shader.
Rule editor
A small page with a textarea for axiom, rules and angle, an iteration slider capped at 6, and a live Canvas 2D preview. Warn when the string will exceed 500,000 characters before generating it. Include three presets: Koch curve, dragon curve, and a bush.

Related

Resources · 1