A fractal tree is one rule applied again and again: draw a branch, then two smaller branches at its tip. L-systems write that rule as text — F → F[+F]F[-F]F — and grow plants that look real. The chaos game builds the Sierpinski triangle and the Barnsley fern by jumping randomly between points, and the Mandelbrot set reveals infinite detail by iterating z² + c.

Every simulation below runs right here in your browser, for free, with live controls. Open one, change the sliders, and use the mouse — most of them respond to it.

Fractals simulations

Recursive Tree

Recursive Tree — interactive simulation

A fractal is a shape built from smaller copies of itself. The tree is drawn by recursion: draw a branch, then at its tip call the same function twice, rotated left and right and scaled by a ratio, until the depth limit is reached.

Adding randomness to the angles and lengths turns a perfectly self-similar tree into an organic one, and Perlin noise adds a gentle sway in the wind.

Try this: Enable "Angle follows mouse" and sweep the cursor left and right.

Open Recursive Tree →

L-Systems

L-Systems — interactive simulation

Aristid Lindenmayer invented L-systems to model how plants grow. You start from an axiom string and rewrite every character in parallel using production rules, once per generation. A "turtle" then reads the result: F/G = draw forward, +/− = turn, [ = save position, ] = restore it.

A handful of characters can describe ferns, snowflakes and space-filling curves. The current rules appear in the top-left panel.

Try this: Choose "Fractal plant" and move the angle slider slowly.

Open L-Systems →

Space Colonization Trees

Space Colonization Trees — interactive simulation
Generation 2: an evolution of Recursive Tree

The recursive tree was drawn top-down from a rule. Real trees grow toward light and space. Adam Runions' space colonization algorithm scatters "attractor" points where leaves could be, and each round:

Branch thickness follows the pipe model: a branch's cross-section is the sum of its children's.

Try this: Once it's grown, click the canvas to scatter new attractors and watch branches reach for them.

Open Space Colonization Trees →

Mandelbrot & Julia Explorer

Mandelbrot & Julia Explorer — interactive simulation
Generation 2: an evolution of L-Systems

The most famous fractal comes from one line: z → z² + c. Start at z = 0 and repeat. If |z| stays bounded, the complex number c is in the Mandelbrot set (drawn in the background colour). Points outside are coloured by how fast they escape, with smooth colouring to remove the bands.

In Julia mode c is fixed by your mouse and the starting z varies. Every point of the Mandelbrot set gives a connected Julia set, and every point outside gives scattered dust.

Try this: Left-click to zoom in, right-click to zoom out. Raise the iterations as you zoom deeper.

Open Mandelbrot & Julia Explorer →

Chaos Game & IFS Fractals

Chaos Game & IFS Fractals — interactive simulation
Generation 2: an evolution of L-Systems

Randomness can also draw perfect order. In the chaos game you pick a random corner of a polygon and jump a fixed fraction of the way toward it, again and again. For a triangle and ratio ½, the points land exactly on the Sierpinski triangle.

That is one example of an Iterated Function System: a few affine maps (scale, rotate, shift) applied at random. Barnsley's fern uses just four maps, chosen with different probabilities. The image is a density plot of millions of points on a log scale.

Try this: On "Pentagon flake", slide the jump ratio slowly away from 0.618 and watch the structure dissolve.

Open Chaos Game & IFS Fractals →

Pythagoras Tree

Pythagoras Tree — interactive simulation
Generation 2: an evolution of Recursive Tree

Another recursive tree, this time built from squares. On top of each square sits a right triangle, and on each of the triangle's two short sides grows a smaller square, and so on. By Pythagoras, the two child squares' areas always add up to the parent's area.

At 45° the tree is perfectly symmetric. Other angles make it lean and curl into fern- and broccoli-like shapes. A little Perlin noise on the angle makes it sway.

Try this: Sweep the angle from 20° to 70° slowly.

Open Pythagoras Tree →

Stochastic L-System Garden

Stochastic L-System Garden — interactive simulation
Generation 2: an evolution of L-Systems

A deterministic L-system grows the same plant every time. Make the rules stochastic and every plant becomes an individual. Here F is rewritten to one of three options at random each time: F[+F]F[−F]F, F[+F]F or F[−F]F.

The plants also grow (the drawing extends over time) and sway: noise bends each branch by an amount proportional to its depth in the bracket stack, so tips move more than trunks.

Try this: Press "Replant" a few times. No two gardens are alike.

Open Stochastic L-System Garden →

Diffusion-Limited Aggregation

Diffusion-Limited Aggregation — interactive simulation
Generation 3: an evolution of Space Colonization Trees

Space colonization grew branches toward targets. DLA grows them by pure chance. Particles wander randomly (Brownian motion) until they touch the cluster, and then they stick forever.

Tips that stick out catch wanderers before they can reach the inner fjords, so the tips grow faster still. The result is a branching fractal (dimension ≈ 1.71) that looks like frost, lightning, mineral dendrites or coral. Colour shows the order in which particles arrived.

Try this: Lower the stickiness: particles bounce off a few times first, and the crystal becomes denser and furrier.

Open Diffusion-Limited Aggregation →

Burning Ship, Tricorn & Newton

Burning Ship, Tricorn & Newton — interactive simulation
Generation 3: an evolution of Mandelbrot & Julia Explorer

Tweak the Mandelbrot formula and whole new worlds appear. The Burning Ship takes absolute values before squaring, the Tricorn squares the complex conjugate, and Multibrots use higher powers z^d + c, which gives d−1-fold symmetry.

The Newton fractal comes from a different idea: use Newton's root-finding method on z³ − 1, and colour each start point by which of the three roots it ends up at. The boundaries between the basins are infinitely intricate.

Try this: On the Burning Ship, zoom (left-click) into the small "ships" along the antenna at the left.

Open Burning Ship, Tricorn & Newton →

Fractal Flames

Fractal Flames — interactive simulation
Generation 3: an evolution of Chaos Game & IFS Fractals

Scott Draves' fractal flame algorithm (1992) extends the chaos game in three ways. Each affine map is followed by a nonlinear variation (a sine, a swirl, a spherical inversion…). Every map carries a colour that is blended into the point's colour as it travels. And the result is drawn as a log-density image with gamma correction, which gives the glowing, silky look.

Every "Randomize" produces a brand-new flame. Most are beautiful; some are duds. That is part of the fun.

Try this: Keep pressing "Randomize" with the "Swirl" variation until you find one you like, then let it render for a while.

Open Fractal Flames →

Evolve them into something new

Several of these are already evolutions: Space Colonization Trees grew out of Recursive Tree; Mandelbrot & Julia Explorer grew out of L-Systems; Chaos Game & IFS Fractals grew out of L-Systems; Pythagoras Tree grew out of Recursive Tree. In Labs you can take any of them a generation further: press Evolve this, get suggestions for what the next version could add, and build the one you like — or combine two or three simulations into one system.

Make your own simulation →
Pick fractals as a concept, choose an art piece, game, explainer or experiment, and Labs suggests ideas and builds the one you choose.

Open Labs →

More from Labs