MAT 301 · Dynamical systems

Escape times and the boundary of the Mandelbrot set

How many iterations does it take to leave the unit disc, and what does the answer tell us about the shape of the set?
AuthorJonas Berg
Student no. 2031847
SupervisorProf. Aiko Tanaka
Submitted14 November 2026
Abstract

We compute smoothed escape times for the quadratic map zn+1=zn2+c on a grid of 1500 × 900 points and use them to colour the plane. The cost grows linearly with the iteration limit, while the visible detail along the boundary saturates once the limit exceeds a few hundred. We describe the algorithm, report timings, and discuss why the boundary resists every attempt at a simple description.

Contents

  1. 1   Introduction
  2. 2   Method
  3. 3   Results
  4. 4   Discussion
  5. References

1  Introduction

For each complex number c we iterate the map above from z0=0. The Mandelbrot set M consists of those c for which the orbit stays bounded. A classical argument shows that once |zn|>2 the orbit escapes to infinity, so the number of steps needed to cross this radius is a natural measure of how close c is to the set. Plotting this number produces the familiar bands that accumulate around the boundary, shown in Figure 1.

The Mandelbrot set: a black region surrounded by bands of colour
Figure 1. Smoothed escape times on the window −2.2 ≤ Re c ≤ 0.9. Points inside the set are drawn in dark blue; the colours run from indigo through teal to gold as the escape time falls.

2  Method

The program evaluates the map for every pixel in lock-step. To avoid the visible banding of integer escape times, the last iteration count is corrected by the logarithm of the final modulus (the “smooth” colouring). The algorithm is short enough to list in full:

for each pixel c in the grid:
    z, n = 0, 0
    while |z| <= 20 and n < limit:
        z = z*z + c
        n = n + 1
    if n == limit:  
        colour = inside
    else:           
        t = n + 1 - log2(log|z|);  
        colour = palette(t)
  1. Choose the window and the resolution; here 1500 × 900 pixels.
  2. Run the loop above with the iteration limit set to 300.
  3. Map t through a piecewise-linear palette of five colours.
  4. Repeat with limits from 50 to 1600 to measure the running time.

3  Results

Table 1 lists the running times on a single core. Doubling the limit doubles the time almost exactly, as Figure 2 shows, because the points inside the set always use every allowed iteration and dominate the total.

Iteration limitTime (ms)Pixels at limitShare
5012214 88015.9 %
10019204 31015.1 %
20035199 70214.8 %
40068197 24514.6 %
800131196 12014.5 %
1600262195 53014.5 %

Table 1. Time and number of points that never escape, for each iteration limit.

12
19
35
68
131
262
501002004008001600

Figure 2. Running time in milliseconds against the iteration limit.

4  Discussion

The last column of Table 1 decreases only slowly: about one point in seven of the window never escapes, no matter how long we wait. Points that are merely slow to escape are the ones that give the boundary its detail, and the colour bands in Figure 1 show where they accumulate. Raising the limit beyond a few hundred changes few pixels at this resolution; it would matter only under deep magnification, where the structure of the boundary reappears at every scale.

This self-similarity is what makes the set both attractive and hard: its boundary has Hausdorff dimension two, yet it has zero area, so no finite picture can be exact. We have therefore treated the figures as visualisations of escape times, not as claims about the set itself.

References

  1. B. Mandelbrot, “Fractal aspects of the iteration of z ↦ λz(1−z) for complex λ and z”, Annals of the New York Academy of Sciences 357 (1980), 249–259.
  2. A. Douady and J. H. Hubbard, “Étude dynamique des polynômes complexes”, Publications Mathématiques d’Orsay (1984–85).
  3. H.-O. Peitgen and P. H. Richter, The Beauty of Fractals, Springer, 1986.