From the Simple to the Complex

In this chapter, you will learn the algebraic equation that generates the Mandelbrot Set. In order to understand how the equation creates the beautiful images, we will need to understand the process of iteration, and learn a little bit about Complex Numbers.

Iteration

One of the truly incredible lessons to learn in the study of fractals is that infinitely complex patterns can be created by repeating a simple process. This occurs in natural fractals over a small range of scales, for example in the repeated branching of a tree. To generate the Mandelbrot Set, we use a computer program to calculate a simple equation over and over. Because we can iterate the equation as many times as we want, the fractals we create this way can be arbitrarily detailed, meaning we can zoom in as deep as we like.

Take the equation below. When we iterate this equation (calculate it over and over again), we generate the amazing Mandelbrot Set. To calculate the original image at the resolution of your screen, we only need to iterate the equation a few dozen times before it comes into focus. But to explore some of the super-deep images, we may need to compute the equation millions or even billions of times.


The way we interpret this iterated equation is that the new value of a variable Z equals the old value of Z, squared, plus a constant, C. The arrows tell us that we take the answer and plug it back into the equation again, get a new answer, plug it in again and repeat this process many times.
Formally, we write the equation like this:

In this system, the letter 'n' is a counter that keeps track of which iteration we are computing. In practice, n starts at 0 and increments to 2,3,4,5,6 etc and goes as high as we need in order to produce the image. Zn+1 equals the next value in the cycle of iteration, based on the previous value of Z.

In general, we start with the variable Z = 0, and we are looking to discover what happens to this equation when we plug in different values of the constant 'C'.

Outcome 1

Let's see what happens if we plug in a value of C = 1.
Z1 = Z02 + C   =   0 + 1   =   1
Z2 = Z12 + C   =   1 + 1   =   2
Z3 = Z22 + C   =   4 + 1   =   5
Z4 = Z32 + C   =   25 + 1   =   26
Z5 = Z42 + C   =   676 + 1   =   677
etc...

Outcome 2

Generally, when you square a number (multiply it by itself), it tends to get bigger. And as the equation keeps iterating, the numbers often get very big quickly. Most starting values of C will eventually go to infinity. But not all of them! Some starting values of C will cause the value of the equation to get smaller and smaller. For example, let's see what happens with C = -.5

Z1 = Z02 + C   =   0 + -0.5   =   -0.5
Z2 = Z12 + C   =   0.25 + -0.5   =   -0.25
Z3 = Z22 + C   =   0.0625 + -0.5   = -0.4375
Z4 = Z32 + C   =   0.1914 + -0.5   = -0.3086
Z5 = Z42 + C   =   0.0952 + -0.5   = -0.4048
Z5 = Z42 + C   =   0.1638 + -0.5   = -0.3362
Z5 = Z42 + C   =   0.1130 + -0.5   = -0.3870
Z5 = Z42 + C   =   0.1498 + -0.5   = -0.3502
etc...

Eventually this progession ends up converging on a number somewhere between -0.35 and -0.38. In the words of Dynamical Systems we call the path taken by the value of Zn its orbit. We call the fixed point -0.366 an attractor, because it attracts the orbit of the equation.

Outcome 1

There is one other possible outcome for cerain starting values of C: the value of Z may alternate between two or more fixed points. For example, let's try C = -1.

Z1 = Z02 + C   =   0 + -1   =   -1
Z2 = Z12 + C   =   1 + -1   =   0
Z3 = Z22 + C   =   0 + -1   =   -1
Z4 = Z32 + C   =   1 + -1   =   0
Z5 = Z42 + C   =   0 + -1   =   -1
etc...


We are interested in the fate of Z for different starting values of C. The first case illustrated above has the value of Z go to infinity. The last two cases have the value of Z stay finite.

DEFINITION: The Mandelbrot Set is the collection of all starting values C that stay finite when iterated through the equation Zn+1 = Zn2 + C



To really understand how the equation turns into the images of the Mandelbrot Set, we'll need to learn about Complex Numbers, which exist as points in a 2-Dimensional plane...