Learning objectives
- Describe fractals in terms of self-similarity, iteration and recursion.
- Iterate z → z² + c with complex numbers and decide whether a sequence escapes.
- Explain how the Mandelbrot set and Julia sets are defined and how they are related.
- Build the Sierpinski triangle and Koch snowflake and calculate how their areas and perimeters change.
- Distinguish deterministic constructions from randomised ones such as the chaos game.
- Calculate a similarity dimension and explain why different fractals have different dimensions.
What a fractal is
A fractal is a shape with detail at every scale. Many fractals are self-similar: parts of them look like smaller copies of the whole, exactly (the Sierpinski triangle) or approximately (the Mandelbrot set). They are usually made by iteration, repeating a rule on its own output, or by recursion, defining a shape in terms of smaller copies of itself. Their roughness is measured by a fractal dimensionthat need not be a whole number.
Complex numbers in brief
A complex number z = x + yi has a real part x and an imaginary part y, where i² = −1. We draw it as the point (x, y) in the complex plane. Its size (modulus) is |z| = √(x² + y²). Squaring follows ordinary algebra: (x + yi)² = x² − y² + 2xyi. So the rule z → z² + c, with c = a + bi, becomesx → x² − y² + a and y → 2xy + b.
The Mandelbrot set
For each complex number c, start at z₀ = 0 and repeat zₙ₊₁ = zₙ² + c. TheMandelbrot set is the set of all c for which this sequence stays bounded. A key fact makes it computable: if ever |zₙ| > 2, the sequence is certain to escape to infinity. So the computer iterates each point up to a limit; points that pass |z| = 2 are outside and are coloured by how quickly they escaped, and points that never pass it are drawn black.
Its edge contains spirals, seahorses, lightning bolts and endless miniature copies of the whole set, joined by thin filaments. The set itself is connected: it is all one piece.
Julia sets
A Julia set uses the same rule, but now c is fixed and the starting point z₀ varies over the plane. The filled Julia set is all z₀ whose sequences stay bounded; the Julia set is its boundary. Every c gives a different picture. The Mandelbrot set is a map of them: the Julia set for c is connected exactly when c belongs to the Mandelbrot set. For c outside the Mandelbrot set it breaks up into infinitely many separate points, a “Cantor dust”. Near the edge of the Mandelbrot set, Julia sets often look like the nearby part of the Mandelbrot set itself.
Recursive constructions
- Sierpinski triangle: start with a filled triangle; at each step, remove the middle triangle from every remaining triangle. After n steps there are 3ⁿ triangles and (3/4)ⁿ of the area is left, which tends to zero.
- Koch snowflake: start with an equilateral triangle; at each step, replace the middle third of every edge with two sides of a small outward triangle. The number of edges becomes 3·4ⁿ, each 1/3ⁿ long, so the perimeter is 3·(4/3)ⁿ and grows without limit, while the area approaches 8/5 of the starting triangle.
These constructions are deterministic: the same rule always produces exactly the same picture.
The chaos game and the Barnsley fern
An iterated function system is a set of contracting maps. Repeatedly applying them to any shape converges to one unique shape, the attractor. The chaos game draws it using randomness: start anywhere, pick one of the maps at random, apply it, plot the point, and repeat. For the Sierpinski triangle, each map is “jump halfway towards one of the three corners”.
Barnsley’s fern uses four affine maps (x, y) → (ax + by + e, cx + dy + f), chosen with probabilities 1%, 85%, 7% and 7%: one draws the stem, one shrinks and slightly rotates the whole fern to make its upper part, and two make the lowest left and right leaflets. The random choices only affect the order in which points appear; the maps alone determine the shape. This makes the method probabilistic, unlike the recursive constructions above, even though the final shape is the same every time.
Fractal dimension
Scale a line by 1/2 and you need 2 copies to rebuild it (dimension 1); a square needs 4 = 2² copies (dimension 2); a cube needs 8 = 2³ (dimension 3). In general, if a shape is made of N copies of itself each scaled by r, itssimilarity dimension is D = log N / log(1/r).
| Fractal | Dimension |
|---|---|
| Koch curve (4 copies, scale 1/3) | log 4 / log 3 ≈ 1.262 |
| Sierpinski triangle (3 copies, scale 1/2) | log 3 / log 2 ≈ 1.585 |
| Boundary of the Mandelbrot set | 2 (proved by Mitsuhiro Shishikura in 1998) |
| Julia sets | Between 1 and 2, depending on c |
| Barnsley fern | Not given by a simple formula; numerical estimates lie between 1 and 2 |
Shapes that are not exactly self-similar need other definitions, such as the box-counting or Hausdorff dimension, but the idea is the same: how detail grows as you look more closely.
Formula reference
| Formula | Meaning |
|---|---|
| zₙ₊₁ = zₙ² + c, z₀ = 0 | Mandelbrot iteration; c varies over the plane |
| zₙ₊₁ = zₙ² + c, c fixed | Julia iteration; the starting point z₀ varies |
| |z| = √(x² + y²) > 2 | Escape test: the sequence will go to infinity |
| (x + yi)² = x² − y² + 2xyi | Squaring a complex number |
| 3ⁿ triangles, area (3/4)ⁿ | Sierpinski triangle after n steps |
| 3·4ⁿ edges, perimeter 3·(4/3)ⁿ | Koch snowflake after n steps (side 1) |
| Area → (8/5) × original | Limit of the Koch snowflake’s area |
| D = log N / log(1/r) | Similarity dimension of N copies scaled by r |
What the computer can and cannot show
The lab iterates each point only up to the maximum you choose. Escaping points are certain to be outside, but a point that has not escaped yet might still escape later, so black means “probably in the set”. The pictures are therefore approximations that improve with more iterations. Numbers are stored with about 16 significant digits, so the lab stops zooming when the view is about 10⁻¹² wide; deeper zooms need special high-precision arithmetic. Recursive fractals are drawn to a finite depth, and the true fractal is the limit of infinitely many steps.
Real-world applications
- Nature: coastlines, river networks, ferns, broccoli, lungs and blood vessels have fractal-like branching that packs huge surface area into small spaces.
- Computer graphics: fractal noise generates realistic mountains, clouds and textures in films and games.
- Engineering: fractal antennas in phones receive many frequencies in a small space.
- Science: fractal dimension describes rough surfaces, porous rocks, turbulence and the structure of galaxies.
- Medicine: the fractal dimension of tissue images can help detect abnormal growth.
Interesting facts
- Benoit Mandelbrot coined the word “fractal” in 1975, from the Latin fractus, “broken”.
- Gaston Julia and Pierre Fatou studied Julia sets around 1918, decades before computers could draw them.
- The coastline paradox: the measured length of a coastline keeps growing as the ruler gets shorter.
- Whether the Mandelbrot set is “locally connected” (the MLC conjecture) is still an open problem.
Common misconceptions
- “All fractals have the same dimension.” The Koch curve has about 1.26, the Sierpinski triangle about 1.58.
- “Black points are definitely in the Mandelbrot set.” They have not escaped yet within the iteration limit.
- “The Mandelbrot set repeats exactly when you zoom in.” Mini copies appear, but they are distorted and surrounded by new detail.
- “Random methods give random shapes.” The chaos game always converges to the same attractor.
- “Infinite perimeter means infinite area.” The Koch snowflake has infinite perimeter but finite area.
Important terms
- Fractal
- A shape with detail at every scale, often self-similar, with a fractal dimension.
- Self-similarity
- Parts of a shape look like smaller copies of the whole.
- Iteration
- Repeatedly applying a rule to its own output.
- Recursion
- Defining something in terms of smaller versions of itself.
- Complex number
- A number x + yi with i² = −1, drawn as a point in the plane.
- Bounded sequence
- A sequence whose values never grow beyond some fixed size.
- Attractor
- The shape that an iterated function system converges to.
- Fractal dimension
- A measure of how detail grows with magnification; it need not be a whole number.
Key takeaways
- Simple rules, repeated, create complex patterns.
- The Mandelbrot set is the set of c for which z → z² + c, from 0, stays bounded; escaping |z| = 2 means divergence.
- Each c gives a Julia set, connected exactly when c is in the Mandelbrot set.
- Recursive fractals are deterministic; the chaos game uses randomness but reaches the same shape.
- Different fractals have different, often non-integer, dimensions.