Labs · Fractals

Recursive Tree

Recursive Tree 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.

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

Controls

Evolved into Space Colonization Trees, Pythagoras Tree.