Home▸Geometry▸Dimension Creation (2D): Sierpinski Carpet Box-Counting Lab

Dimension Creation (2D): Sierpinski Carpet Box-Counting Lab

Canvas2D fractal-dimension lab: build a Sierpinski carpet, tune iteration depth and explode factor, and watch the measured box-counting dimension converge on log(8)/log(3) ≈ 1.893.

Geometry2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-dimension-creation ↗ Open standalone

This 2D companion builds a Sierpinski carpet — the flat analogue of the 3D version's Menger sponge — by recursively removing the center third of every square. A live readout panel tracks the sub-square count N, the box size s, and the resulting box-counting dimension log(N)/log(1/s), which converges on the theoretical log(8)/log(3) ≈ 1.893 as iteration depth increases.

⚙ Under the hood

Canvas2D box-counting fractal dimension lab: build a Sierpinski carpet and watch the measured dimension converge on log(8)/log(3).

fractal dimensionsierpinski carpetbox-countingself-similarityrecursive geometry

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

What did you find?

Add reproduction steps (optional)