Lesson
The theory — Fractal Explorer
A fractal dimension is what happens when you insist that "dimension" mean how detail multiplies as you zoom in, and then apply that to a shape built by repetition. The panel reports one for whichever shape is on screen, and the numbers are not whole: the Koch snowflake is 1.262, the Sierpiński triangle 1.585, the Cantor set 0.631. A shape can be more than a line and less than a plane, and the menu here contains eight of them.
A horizontal axis of fractal dimension from 0 to 2, with the eight shapes in the menu marked at their dimensions between a line and a plane.
- The Cantor set at 0.631 is the surprise: below dimension 1, more than a scatter of points and less than a line. Its total length is zero and it still has uncountably many points.
- Koch at 1.262 and Sierpiński at 1.585 occupy the space the word "fractal" was invented for — genuinely between a line and a plane, and neither an approximation nor a rounding.
- The Barnsley fern at ≈ 1.893 is close to filling the plane without ever doing it, and its value is approximate because its four maps overlap.
- Three constructions land on exactly 2 — the dragon, the Lévy C curve and Hilbert’s. They are not curves that wander close to filling a region; in the limit they fill it.
What each symbol means
N- how many copies of itself the rule makes at each step. Koch replaces one segment with 4; Sierpiński replaces one triangle with 3.
r- how much smaller each copy is. Koch scales by ⅓, Sierpiński by ½, the Lévy C curve by 1/√2.
D- the Hausdorff dimension the panel prints,
log N / log(1/r)— the exponent that makes the copies and the scaling agree. depth- how many times the rule has actually been applied on screen. It stops at 7, and every D above is the limit as it goes to infinity.
Where the formula comes from
- Start with shapes you already trust. Halve a line and it takes 2 copies to rebuild; halve a square and it takes 4; halve a cube and it takes 8. The pattern is
N = (1/r)^D, where D is 1, 2 and 3 — dimension is the exponent relating copies to scaling, and nothing about that definition requires the answer to be a whole number. - Solve it for D. Taking logs of
N = (1/r)^DgivesD = log N / log(1/r). That is the formula the panel prints, and every part of it is visible in the construction rule above it. - Read a rule off the page and put it in. Koch replaces one segment with 4 of length ⅓, so N = 4 and 1/r = 3, giving
log 4 / log 3 ≈ 1.262. Sierpiński giveslog 3 / log 2 ≈ 1.585. Neither is an integer, and that is not an approximation — it is what the shape is. - Now run the arithmetic somewhere it surprises you. The Lévy C curve replaces one segment with 2 at 1/√2, so
log 2 / log √2 = 2exactly; Hilbert replaces one with 4 at ½, givinglog 4 / log 2 = 2. A dimension of exactly 2 means these are not curves that wander — in the limit they fill an area, which is why the panel calls them space-filling instead of quoting a decimal.
How to read what you see
Change the shape and watch the count row change its name: Triangles for Sierpiński, Segments for Koch, Branches for the tree, Intervals for Cantor, Points for Hilbert and the fern. That is not decoration — "how many pieces" genuinely means something different in each construction, and the panel refuses to flatten them into one word. Every count matches the formula printed beside it: at depth 4 Sierpiński shows 81 = 3⁴, Koch 768 = 3·4⁴, Cantor 16 = 2⁴, Hilbert 256 = 4⁴, and the tree 31 = 2⁵ − 1. Set the depth to 0 and then walk it up one step at a time; the count column is the rule, arithmetic made visible.
- Assumes
- That the copies are exact and do not overlap.
D = log N / log(1/r)is a statement about strict self-similarity, which is why the panel is willing to print an exact ratio of logarithms for Koch and Sierpiński — and why it prints≈ 1.893for the Barnsley fern and≈ 1for the tree instead. The fern is built by four affine maps with different ratios that overlap, and the tree changes dimension when you change its branch angle. The tilde is doing real work. - Breaks when
- Nothing on the screen is a fractal. The depth slider stops at 7, and at depth 7 the Koch curve is 3·4⁷ = 49,152 straight segments with a perfectly finite total length — an ordinary polygon whose dimension is exactly 1. Every value in the panel is a limit the drawing is heading towards and never reaches, and the same goes the other way: the space-filling curves enclose zero area at every depth you can select. The honest reading of this page is that you are watching a sequence, and the fractal is what the sequence is for.
Problem solved in full
-
The Sierpiński triangle at depth 5 with 243 pieces 5 steps
At depth 5 the Sierpiński triangle has 243 pieces. Derive that, then find the depth at which less than 1% of the original area survives — and what the perimeter is doing while the area vanishes.
-
The construction is a single recurrence: every triangle becomes three. Solving it needs no more than noticing it is geometric.
-
Each child has half the side, so a quarter of the area, and there are three of them. Multiply the two factors and the area rule appears.
-
Evaluate both at depth 5. Just under a quarter of the area is left — 23.7% — and the boundary is already 7.59 times its original length.
-
Dimension is defined by the exponent that keeps count × sizeD constant under the rule. Three copies at half scale forces 3 = 2D, and nothing about the drawing enters.
-
Now solve the area rule for the depth at which 1% remains. Logarithms give 16.01, so depth 17 — and by then the triangle count has passed 129 million, which is why the tool stops well short of it.
Answer
Depth 17, by which point there are 129,140,163 triangles. The two quantities move in opposite directions and both do so geometrically: area falls as (3/4)ⁿ toward zero while total perimeter climbs as (3/2)ⁿ without limit. A shape whose area tends to zero and whose boundary tends to infinity is not badly behaved, it is simply not one-dimensional and not two-dimensional either — and the exponent that reconciles the two, log 3 / log 2 = 1.585, is what "dimension" has to mean once you allow shapes like this. Note it is not something measured about the picture; it falls out of the counting rule alone.
-
References (3)
- Where fractional dimension entered general use — the paper behind the dimensions quoted here: B. Mandelbrot, "How Long Is the Coast of Britain? Statistical Self-Similarity and Fractional Dimension." Science 156, 636–638, 1967.
- The chaos game and the fern, from the book that introduced both: Michael F. Barnsley, Fractals Everywhere. Academic Press, 1988. ISBN 978-0-12-079062-3.
- The dragon curve as a storytelling device, section by section: Michael Crichton, Jurassic Park. Alfred A. Knopf, 1990. ISBN 978-0-394-58816-2.