Each iteration replaces every solid cube with 20 smaller cubes at 1/3 scale (removing the 6 face-centers and the core), building a Menger sponge. Counting how the number of pieces N grows as the ruler size s shrinks gives the fractal (box-counting) dimension — a "dimension" that is not a whole number.
N(k) = 20^k (pieces after k iterations)
s(k) = (1/3)^k (size of each piece)
D = log(N) / log(1/s) = log(20) / log(3) ≈ 2.727
- Iteration depth — how many times the subdivision rule is applied; higher depth = finer, more detailed fractal (and slower to render).
- Explode factor — pushes sub-cubes apart radially so the recursive, self-similar structure is easier to see.
- Spin speed — rotation rate for inspecting the structure from all sides.
Real application: box-counting dimension is used to quantify roughness of coastlines, porous rock, lung airway branching, and fracture surfaces — anywhere a shape is "between" 2D and 3D.