Fractal Generator
Animate the step-by-step construction of classic fractals. Explore self-similarity, fractal dimension, and the recursive geometry that appears throughout nature and mathematics.
D = log(N) / log(S) — Hausdorff dimension
Self-Similarity and Fractal Dimension
What Is a Fractal?
A fractal is a geometric shape that exhibits self-similarity at every scale: zoom into any part, and you find a smaller copy of the whole. This property arises from simple recursive rules applied infinitely. The fractals in this generator are all constructed by taking a shape, dividing it into smaller copies, removing some pieces, and repeating. Despite this simplicity, the resulting forms have infinite detail and non-integer dimension.
Hausdorff Dimension
A line is 1-dimensional, a square is 2-dimensional — but a fractal can be
1.465-dimensional. The Hausdorff dimension D = log(N)/log(S) measures
how a fractal fills space, where N is the number of self-similar copies and S is
the scaling factor. The Vicsek cross has D = log(5)/log(3) ≈ 1.465: it has 5
copies at scale 1/3. The Sierpinski carpet has D = log(8)/log(3) ≈ 1.893,
nearly filling the plane but with infinitely many holes.
The Five Fractals
The Vicsek cross keeps the center and four edge-midpoints of a 3×3 grid. The Sierpinski carpet removes only the center. The Koch island replaces each side of a triangle with a Koch curve, creating a snowflake with infinite perimeter enclosing finite area. The T-square grows by placing quarter-size copies at each corner. Cantor dust is the 2D analog of the Cantor set: keep corner squares, remove the rest, yielding a totally disconnected set with dimension log(4)/log(3) ≈ 1.262.
Fractals in Nature
Fractal geometry appears everywhere: coastlines, mountain ranges, blood vessel networks, lightning bolts, broccoli florets, and galaxy distributions all exhibit approximate self-similarity. Benoit Mandelbrot coined the term “fractal” in 1975 to describe these rough, fragmented shapes that Euclidean geometry cannot capture. Understanding fractal dimension helps scientists measure coastline lengths, model turbulence, compress images, and analyze financial markets.