Home▸Mathematics▸Fractal Tree Generator (2D)

Fractal Tree Generator (2D)

Interactive 2D fractal tree generator: an L-system grows a branching tree from a single trunk. Adjust branch angle, length ratio and recursion depth and watch the crown rebuild instantly.

Mathematics2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-3d-fractal-tree ↗ Open standalone

This 2D canvas reimplements the same L-system branching rule as the 3D fractal tree: a single trunk recursively splits into 2–3 shorter, thinner branches at a set angle, and the rule repeats down to the chosen recursion depth. Drag the branch-angle, length-ratio and depth sliders to reshape the crown instantly, switch between a summer (green) and autumn (russet) leaf palette, and hit Regrow to reseed the small random jitter that keeps every tree looking organic rather than mechanically symmetric.

⚙ Under the hood

A 2D canvas L-system fractal tree: adjust branch angle, length ratio and recursion depth to reshape a recursively branching crown in real time.

Fractal TreeL-SystemRecursionSelf-Similarity

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)