project · WebGPU · 2026

Fractals

Simple rules, infinite detail. The geometry of coastlines, lungs, and the Mandelbrot set, with a live GPU fractal explorer you can dive into.

Simple rules, infinite detail.

A fractal is a shape that never simplifies. Zoom into a smooth curve and it eventually flattens into a straight line. Zoom into a fractal and you keep meeting the same intricate structure, level after level, forever. The surprising part is how little it takes to make one: a short rule, repeated.

self-similarity

The defining trait is self-similarity: the whole is built from smaller copies of itself. Start with a triangle and, on every edge, add a smaller bump. Do it again on every new edge. Again. The boundary becomes the Koch snowflake, crinkled at every scale.

3
D=log4log31.262D = \dfrac{\log 4}{\log 3} \approx 1.262
Each step replaces every edge with four smaller edges, forever. The outline becomes endlessly crinkled: its length is infinite, yet it encloses a finite area. Its dimension D sits between a line (1) and a filled plane (2).

Two strange things happen. The outline grows without bound (each step multiplies its length by four thirds), yet it stays trapped inside a finite area. And its dimension is not a whole number. Count how many copies of a shape fit when you shrink it: if N copies appear at scale r, the dimension is

D=logNlog(1/r)D = \frac{\log N}{\log (1/r)}

A line gives one copy at half scale, so D = 1. A square gives four, so D = 2. The snowflake makes four copies at one third scale, which lands at about 1.26. That fractional dimension, sitting between a line and a plane, is what the word “fractal” actually means.

a small zoo

Fractals come in a few families. Escape-time fractals, like the Mandelbrot and Julia sets, come from iterating a formula and asking which points stay bounded. Iterated function systems and L-systems, like the snowflake above or Barnsley’s fern, glue together shrunken copies of a picture. Strange attractors, like Lorenz’s, are the fractal traces left behind by chaotic motion. And statistical fractals, like coastlines and clouds, are self-similar only on average. Different machinery, one signature: detail that survives every zoom.

nature’s favourite trick

Nature is full of them, because branching and crinkling are cheap ways to reach into a lot of space or pack in a lot of surface.

9
Drag left or right to change the branching angle. Every branch is a smaller copy of the whole tree, the same rule nature reuses for blood vessels, river deltas, and lightning, because branching is a cheap way to fill space.

Your lungs branch about twenty-three times to fold the area of a tennis court into your chest. Trees, river deltas, lightning, blood vessels, and the spiraling florets of a romanesco all reuse the same self-similar branching. Coastlines are the classic case: Benoit Mandelbrot’s famous question, “how long is the coast of Britain?”, has no single answer, because the closer you measure, the more wrinkles you find, and the longer it gets.

why they matter

Fractals are not only beautiful. Because their dimension is a number you can measure, they become a tool. Fractal antennas fold many resonant lengths into a small area, so they fit inside a phone. Procedural generation grows convincing mountains, clouds, and coastlines for films and games from tiny rules. In medicine, the fractal dimension of blood vessels or a tumour’s boundary can flag disease. Modelling the rough, branching, turbulent parts of the world (the parts ordinary geometry gives up on) is where fractals earn their keep.

the mandelbrot set

The most famous fractal of all comes from one line of arithmetic. Pick a point c in the plane, start at z = 0, and repeat:

zn+1=zn2+cz_{n+1} = z_n^{2} + c

For some values of c the result stays small forever; for others it races off to infinity. Color each point by how long it holds out, and the boundary between staying and escaping becomes endlessly intricate: the same budding, spiraling detail no matter how far you fall in.

The escape-time set of z → z² + c, computed per pixel on your GPU. In Mandelbrot mode, drag to pan and scroll (or use the slider) to zoom toward the cursor, into detail that never ends. Switch to Julia and drag to morph the constant c. This is the same per-pixel iteration my Fractal Studio uses, minus the deep-zoom machinery.

Drag to pan into the boundary, zoom to find structure that never repeats and never ends, then switch to a Julia set and drag to morph the constant by hand. Every pixel you see is your graphics card running that one rule a few hundred times, all at once.

fractal studio

That is the idea behind Fractal Studio, the project this article grew out of: turn the mathematics of fractals into a polished, GPU-native art tool that runs entirely in your browser, with nothing to install and nothing sent to a server. It renders the Mandelbrot and its cousins, a raymarched 3D Mandelbulb, glowing strange attractors, and painterly fractal flames. Its real trick is depth. A perturbation method keeps one high-precision reference orbit and iterates a tiny per-pixel delta, so it can zoom past ten-to-the-twenty-eight times, far beyond where ordinary GPU precision shatters into blocks, while the image stays razor sharp. The explorer above is the shallow, friendly cousin of that same engine.

A fractal is the rare place where a rule you could write on a napkin unfolds into something you can fall into forever. Open Fractal Studio and go as deep as you like.