Fractals Main Page

Much can be said about fractals in general and the Mandelbrot Set in particular; there are numerous sites on the Internet, but if you found your way here, you will probably find them as well, so I will not provide you any links right now. Instead, I invite you to join me as I do my best to explain from scratch what these pictures represent, and how they are generated.
 

Iterations, Convergence and Divergence
What we see in the fractal images is simply the so called complex numberplane (explication follows soon). Each number is iterated and depending on how it converges or diverges, the corresponding pixel is coloured differently. What do I mean? Well ...

To start, imagine that you take a number, any number bigger than 1. 2, for example. Square it: 2*2 =4. Now square the result: 4*4 = 16. Continue in the same way: 16*16 = 256, 256 *256 = 65536, and so on. We get larger and larger numbers, this series diverges.

Now try to begin with 0.5: 0.5*0.5 = 0.25. 0.25*0.25 = 0.0625. Now we get smaller and smaller numbers as we continue, we have convergence.

To summarize in a more mathematical language, the iteration Xn+1 = Xn * Xn converges (to zero) as n approaches infinity for X0<1, it diverges (approaches infinity) for X0 >1.

By now, you are already acquainted with the concepts of iterations, convergence and divergence. Let us continue.
 

Real and Imaginary Numbers
What if we were to plot grafically which numbers converge or diverge? Nice idea, but since we only have a straight line the result would not be very exciting really.

The line I refer to is the line of numbers:

We go from the negative infinity, through zero and then on towards the positive infinity. This line contains all real numbers, including 34.56745 and 7.

Are there any numbers out there that cannot be found on this line? Supposing that there are, how can we tell?

Try the following experiment: Take a number on the right side of the line above, any number bigger than zero. Find the square root of that number, the number that, multiplied by itself yields the first number: the square root of 4 is 2, since 2*2 = 4. SQRT(2) = 1.414... since that number times itself is 2. Any positive number has a square root that can be found on the same line.

Now try to do the same with the negative numbers. Can the square root of -4 be -2? No; -2 * -2 = 4. Any negative number times itself is a positive number.Where then are the square roots of the negative numbers? A mystery, don't you think?
 
 
But like Alexander cut through the knot in Gordion, so did the genius (-es?) who simply proclaimed the square root of -1 to be the imaginary unit i:
i*i = -1

To complete the picture, they imagined another line of numbers, orthogonal to the real line, going from the imaginary negative infinity to the imaginary positive infinity. Crossing eachother in the point zero, the origin, the total set of numbers that can be formed by a combination of imaginary and real numbers is known as the plane of complex numbers.

The complex numbers are not numbers in a line, but numbers in a plane. If you wish, you might even say that there are infinitely many "ones" or "twos", since there is 1+i, 1+2i, 1+3i and so on. The Mandelbrot set is a set of complex numbers, and the colourful images we see in the galleries are nothing more than illustrations of the behaviour of the complex numbers as they are iterated.

Squaring for a Circle ...
Complex numbers can be added, divided, multiplied and so on. What if we were to apply the simple formula above to the complex numbers?
If you remember, we took a number, squared it, squared the result, and continued to square the result of the previous iteration. A number smaller than 1 converged, a number bigger than 1 diverged. Let us do the same, but now for all complex number in a rectangle between -3 and 3 in the plane. A computer program does the calculations, and all converging numbers will be coloured black. All diverging numbers, those that keep growing bigger and bigger will be given a colour that shows how fast it diverges, how many iterations that are needed before it becomes bigger than, say, 100. When comparing complex numbers, we look (in this case) at their distance from the origin.
  

The picture on the right shows the complex number plane, where each pixel represents a number. All numbers/pixels are coloured depending on whether they cause the iterations to converge or diverge.

The result is a perfect circle, with its center in the origo (zero), and a radius of 1. This is not a fractal. This is, in fact, a very simple construct, and we could even have guessed that it would turn out like this. All numbers within a distance of 1 from the origin converge, forming the black circle. The rest diverge.The closer we get to the black circle, the lighter the colour. This means that those points, those complex numbers that have an absolute value (their distance from the origin) just slightly bigger than 1, need a lot of iterations before they break off towards the positive infinity.


Getting tired? Please don't! We will now enter the twilight zone, where myth becomes reality, and fractals our friends.
 
 

Here's a little something to cheer you up:

The Mandelbrot Formula
Remember our formula? Zn+1 = Zn * Zn . Z is the complex number, like 1.23 + 0.736i or whatever. The program that drew the circle image calculated the number of iterations needed to get a Z with an absolute value (distance from the origin) bigger than 100. It did so for each complex number in the rectangle, or rather for each pixel in the image, which corresponded to a number. That way, each number was assigned a colour, and when we saw the result, we recognised the circle.

The program works well, so let us do an experiment. Instead of just squaring the numbers, we will add something after each squaring.
The process will work like this:
1. Take one complex number, call it C.
2. Square it, and add C.
3. Square the result and add C.
4. Square the result and add C again.
4. Continue this process until the result is a number at a distance more than 5 from the origin.
    We know then that this particular number will move towards infinity when iterated, it diverges.
5. If the series converges (breaks down to zero) for the number C, then the interation will stop when
    we reach a previously defined maximum number of iterations. We do not have time to go on iterating
    forever.
6. Check how many times we had to iterate: was it the maximum number of times?
    In that case we assume convergence, and colour the corresponding point black.
    If the iterations stopped at a lower value, it was because of divergence.
    We then choose a colour based on the number of iterations, and then we are finished with C.
7. Paint the pixel corresponding to C, and take another complex number, go back to stage 1.
8. Repeat this for all pixels in the image.

(Comment: It actually suffices to check if the absolute value is bigger than 2, but taking 5 gives more smooth graphics.)
 

The iterations yielding the Mandelbrot Set looks like this: 
 
Z0 = C; 
Zn+1 = Zn * Zn + C

Using the same program as before, but substituting only the formula, 
from simple squaring to this new one, we get another picture.

The black heart-shaped region in the center is called the Mandelbrot Set
after Benoît Mandelbrot who first discovered it in 1980 something. 
It is the set of all complex numbers for which the iterations converge.


 

And Now - the Conclusion
OK, so we get a heart-shaped blackness instead of a circle - what's the fuss about? Well, it is now the magic begins ...

For the M-set is not a smooth shape or line like the circle, it is a FRACTAL. The word indicates something that is broken, and quite correctly. In fact, no matter how deep you would zoom into the M-set, the sharp contrast of the black against the coloured rim is never ever a smooth line, curved or straight. It is infinitely "broken", similar to the coast of Norway, revealing more and more detail as we probe deeper and deeper into the infinitely small.

But if the converging zone is interesting, it is nothing compared to the beuty of the coloured rim. Strange, bizarre and inexplicably beautiful patterns are revealed when we zoom. You can compare the picture above to a view of the world seen from space. We perceive only the continents, the seas, but as we descend we spot new structures, new landscapes, too small to be seen from the heights, but huge as we approach them. It is the same with the M-set.

The java applet featured on these pages  enables the user to zoom deep into the image. All images in the galleries were created using that program (sometimes with other colour coding, and of course with a JPEG converter not yet included in the applet). The only limit to the zooming is the one posed by the computing accuracy of double precicion floating point arithmetics.

The pictures posted in the galleries are nothing but a few samples of the curious shapes and patterns that can be found in the Mandelbrot Set. Try to see if you can find the ones posted! Or even more beautiful ones.

The most wonderful thing about these fractals is of course not just that they are beautiful images; it is rather the fact that no person has designed them; the program featured just computes the set and colours each pixel accordningly. Fractals are real. Very real and very imaginary; they just exist, as mathematical creatures, like the number Pi and other constants. Not invented or made, but rather discovered. Try and think of it for a while, and your own explorations into the set will be filled with wonder.

My best regards to everyone and anyone who managed to read this far without getting bored.

            /Björn

Fractals Main Page



© Björn Liljeqvist, 2001