IFS Encyclopedia

Pythagoras Tree

Fractal dimension: 2

Visualization

Open in IFStile ↗
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 12\frac{1}{\sqrt{2}} and is tilted by ±45°\pm 45° relative to its parent.

Definition

Like the Lévy C Curve, the Pythagoras Tree lives in Z[i]\mathbb{Z}[i] with $companion([1,0]) and g=s+11+ig = s+1 \leftrightarrow 1+i.

MapAIFSEffect
f1f_1[0,1]*s*g^-1rotate +45°+45°, scale 12\tfrac{1}{\sqrt{2}}, translate (0,1)(0,1) (left branch)
f2f_2g^-1*[-1,2]rotate 45°-45°, scale 12\tfrac{1}{\sqrt{2}}, translate (12,32)(\tfrac{1}{2},\tfrac{3}{2}) (right branch)

For f2f_2: g1[1,2]=12(1+2,1+2)=(12,32)g^{-1}\cdot[-1,2] = \tfrac{1}{2}(-1+2,\,1+2) = (\tfrac{1}{2},\tfrac{3}{2}) — exact, no floating-point approximation.

The only difference from the Lévy C Curve is the translations: Lévy has f1f_1 at the origin and f2f_2 translated by g1[0,1]=(12,12)g^{-1}[0,1]=(\tfrac{1}{2},\tfrac{1}{2}); the Pythagoras Tree shifts both maps upward to build the tree above the base square.

Properties

All four of the following IFS share the same algebraic skeleton — two maps contracting by 12\frac{1}{\sqrt{2}} over Z[i]\mathbb{Z}[i] with expansion g=1+ig = 1+i — differing only in the power of ss for the second map and the choice of translations:

IFSSecond map rotationTranslation
Lévy C Curve45°-45° (g^-1)(0,0)(0,0) and (12,12)(\tfrac{1}{2},\tfrac{1}{2})
Pythagoras Tree45°-45° (g^-1)(0,1)(0,1) and (12,32)(\tfrac{1}{2},\tfrac{3}{2})
Heighway Dragon+135°+135° (s^2*g^-1)(0,0)(0,0) and (1,0)(1,0)
Twin Dragon135°-135° (s^3*g^-1)(0,0)(0,0) and (1,0)(1,0)

References

Similar

Gosper Island
planeself-similartilingalgebraic
Jerusalem Cross
planetilingalgebraicself-similar
Lévy C Curve
planecurveself-similartilingalgebraic
Edit this page on GitHub ↗