Spiralyst Lab logo Spiralyst Lab ← All fractals 2D · branch angle 0.35↔1.20

2D fractal

Pythagoras tree

Live turntable captured from Spiralyst Lab.

The Pythagoras tree is a fractal grown entirely from squares, each balancing two smaller squares on top so that the gap between them frames a right triangle. The branch angle decides everything, bending the canopy from a symmetric crown to a wind-swept lean.

A Forest Grown from Squares

The Pythagoras tree is a fractal grown entirely from squares, invented by the Dutch mathematics teacher Albert Bosman in 1942. Start with one square. On its top edge, perch two smaller squares tilted toward each other so their inner corners meet — the gap they frame is a right triangle, which is where the name comes from: the two smaller squares and the original obey the Pythagorean theorem. Now repeat the construction on every new square, forever, and a leafy, branching canopy unfurls.

The branch angle is the soul of the tree. At 45° the two children are equal and the tree is perfectly symmetric; tilt the angle and the children become unequal, the canopy sweeps to one side, and the whole tree leans like it is bending in wind. The Pythagorean identity guarantees the two children's squared sizes always sum to the parent's — which is exactly the statement that the framed triangle is right-angled.

Grown to infinity at 45°, the canopy famously fills a neat rectangle six squares wide and four tall; the leaves overlap but never escape that box. It is one of the most satisfying fractals to watch assemble — pure geometry blossoming into something that looks unmistakably alive.

child sizes = parent · cos α and parent · sin α

At each step the two child squares scale by the cosine and sine of the branch angle α and stand on the parent's top edge.

cos²α + sin²α = 1

The Pythagorean identity — the children's squared sizes always sum to the parent's, which is why the triangle they frame is exactly right-angled.

classic tree: α = 45°

At 45° the children are equal and the tree is symmetric; off 45° it leans, and the canopy sweeps to one side.

In Spiralyst Lab

Spiralyst Lab scales the left child by cos α and the right by sin α (the textbook construction), rotating the left branch by +α and the right by α − 90°, with an optional per-level twist and trunk tilt. A 'size spread' below 1 shrinks each generation a touch extra for a more open, artistic canopy. In the gallery the branch angle is animated (0.35 ↔ 1.20 rad) so the whole canopy bends and breathes — map it to the beat for a tree that sways to the music.

Every parameter below is a live control — set it by hand, map it to a frequency band, or let it ride a smooth animation. These ranges are the actual in-app slider limits.

ParameterRange (in-app)
Branch angle0.15 – 1.4
Per-level twist-0.6 – 0.6
Trunk tilt-1.2 – 1.2
Size spread0.5 – 1.0

Audio-reactive by default: angle 0.2→1.3 (branch), twist -0.6→0.6. Any control can be mapped to audio or animation.

Plus the universal 2D controls every spiral type shares: density & stroke, rotation, squash, jitter, zoom & pan, glow, trails, vignette, and multi-layer stacking (count, hue offset, opacity).

Pythagoras tree still 1 Pythagoras tree still 2 Pythagoras tree still 3

Watch it in action

Full-length showcase video — coming soon
assets/video/fractals/10-pythagoras-tree.mp4

Did you know: Let the classic 45° tree grow forever and its canopy fits exactly inside a 6×4 rectangle — infinite detail, finite frame.

Get Spiralyst Lab — $24.99/yr ← Back to the gallery