Labs · Fractals
Recursive Tree
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
- Branch angle (°)
- Recursion depth
- Length ratio
- Randomness
- Wind sway
- Angle follows mouse X
- Blossoms
Evolved into Space Colonization Trees, Pythagoras Tree.