Fractal Dimension — Box Counting Algorithm

5
20

Box-Counting Fractal Dimension

The fractal (Hausdorff-Besicovitch) dimension D_f is measured by covering the fractal with boxes of size ε and counting N(ε) occupied boxes: D_f = lim(ε→0) log N(ε) / log(1/ε). The slope of the log-log plot gives D_f. Theoretical values: Sierpinski triangle D_f = log(3)/log(2) ≈ 1.585, Koch curve D_f = log(4)/log(3) ≈ 1.262, Cantor set D_f = log(2)/log(3) ≈ 0.631. The box count animation shows which boxes are occupied at the current ε.