Pythagoras Tree
Visualization
AIFS program
@
$dim=2
s=$companion([1,0])
g=s+1
A=([0,1]*s*g^-1|g^-1*[-1,2])*A
Overview
The Pythagoras tree is a fractal named after the Pythagorean theorem. Starting from a unit square (representing the trunk), an isosceles right triangle is placed on the top edge, and two smaller squares are built on its two legs. The process is repeated on each new square indefinitely.
In the symmetric variant both child squares are the same size: each has side and is tilted by relative to its parent.
Definition
Like the Lévy C Curve, the Pythagoras Tree lives in
with $companion([1,0]) and .
| Map | AIFS | Effect |
|---|---|---|
[0,1]*s*g^-1 | rotate , scale , translate (left branch) | |
g^-1*[-1,2] | rotate , scale , translate (right branch) |
For : — exact, no floating-point approximation.
The only difference from the Lévy C Curve is the translations: Lévy has at the origin and translated by ; the Pythagoras Tree shifts both maps upward to build the tree above the base square.
Properties
- Fractal dimension: 2 — the attractor eventually fills a bounded planar region with positive area
- Tiling: The whole tree fits inside a bounding box for the symmetric case
- Self-similarity: Each subtree beyond a branching point is a scaled, rotated copy of the whole tree
- Number of transforms: 2, both contraction ratio
- Variants: Asymmetric versions (different branch angles) produce visually distinct trees while maintaining the IFS structure
Related
All four of the following IFS share the same algebraic skeleton — two maps contracting by over with expansion — differing only in the power of for the second map and the choice of translations:
| IFS | Second map rotation | Translation |
|---|---|---|
| Lévy C Curve | (g^-1) | and |
| Pythagoras Tree | (g^-1) | and |
| Heighway Dragon | (s^2*g^-1) | and |
| Twin Dragon | (s^3*g^-1) | and |
References
- Pythagoras tree — Wikipedia
- Mandelbrot, B. (1982). The Fractal Geometry of Nature. W. H. Freeman.
- Riddle, L. Classic IFS — Pythagorean Tree. Agnes Scott College.
- Hinsley, S. R. Self-Similar Tiles — Quadratic Pletals (Gaussian integer Z[i] family).