Building Fractals using Dynamical Systems:  The Mandelbrot Set

Comp110 Course Module

Note: The fractal modules in part 8 are fairly short.  Therefore, each module will be worth 50 points.

The Mandelbrot Set

In module 8a, we iterated a complex function f[λ] of the form

f[λ][z]=λ z (1-z)

using complex numbers z.  This dynamical system defines a class of fractals known as Julia sets.  In the definition of f, each value for λ gives rise to a different Julia set.  In this module, we will consider a slightly different dynamical system that will give rise to a single fractal, the Mandelbrot Set. Mandelbrot sets are based on the complex self-squaring functions of the form

Clear[f];

f[z0_][z_]:=(z^2)+z0

Given an initial complex number z0, the function f defines a sequence of complex numbers via the recurrence

(Subscript[z, i+1])=f[(Subscript[z, 0])][(Subscript[z, i])].

Note that the initial value z0 is repeated in each application of the recurrence.

As with Julia sets, some initial values for z0 cause this recurrence to diverge to infinity.  For example, if we choose z0==2+0i, we get the divergent sequence 2, 6, 38, … .  (More generally, it is easy to show that the sequence diverges to infinity if Abs[(Subscript[z, i])]≥2 for any i.)  On the other hand, if we choose z0=0+0i, we get the convergent sequence 0, 0, 0, … .   The Mandelbrot set is the set of complex numbers (Subscript[z, 0]) for which the resulting sequence (Subscript[z, 0]), (Subscript[z, 1]), (Subscript[z, 2]), … defined by applying f does not diverge to infinity.

Our task in this module is to visualize the Mandelbrot set.  Instead of trying to find an inverse for the function f, our approach in this module will be to test for each initial value z0, whether the corresponding sequence diverges by applying f repeatedly until the sequence either clearly diverges (i.e. Abs[(Subscript[z, i])]≥2 for some value of i) or a maximum number of iterations is exceeded.