Sierpinski Pyramid Prism
The 2D Sierpinski triangle β generated by three affine scaling transformations β stacked and tapered vertically into a stepped pyramidal lattice where each layer recursively scales by a factor of 1/2. Increase the recursion depth to reveal finer self-similar structure.
The Mathematics
The Sierpinski triangle is the classic example of self-similarity β the whole is composed of three smaller copies of itself, each scaled by 1/2. These copies are generated by three affine transformations (contraction mappings) wβ, wβ, wβ, each of which scales the plane by 1/2 and translates to a different corner.
wβ(x, y) = Β½(x, y) + (Β½, 0) β bottom-right copy
wβ(x, y) = Β½(x, y) + (ΒΌ, β3/4) β top copy
Sub-pyramid size scales by Β½ at each depth β N = 5^depth total copies.
Depth 1: 5 Β· Depth 2: 25 Β· Depth 3: 125 Β· Depth 4: 625
In this 3D extension, the Sierpinski gasket is extruded into pyramidal prisms. The interactive uses instanced rendering β instead of creating 625 separate mesh objects at depth 4, it renders 625 instances of a single cone geometry, each positioned and scaled by the recursive subdivision algorithm.
Interactive
Drag to rotate Β· Scroll to zoom Β· Right-click to pan Β· Adjust recursion depth (1β4) and switch themes.
Learning Objectives
- Define self-similarity and identify it in the Sierpinski triangle
- Describe how affine scaling transformations (wβ, wβ, wβ) generate the gasket
- Observe how increasing recursion depth reveals finer self-similar structure
- Count sub-pyramids at each depth and derive the exponential growth formula 5βΏ
Teacher Notes
- Start at depth 1 and increment β students count the pyramids at each level
- Three themes (Obsidian, Cyberpunk, Gold) change material properties, not geometry
- The wireframe overlay shows the underlying cone primitives β discuss instancing
- Connect to fractal dimension: the Sierpinski triangle has dimension log(3)/log(2) β 1.585