Mandelbrot Set Animation

This page displays an animation of the Mandelbrot set being drawn by your computer. This is a simulation of a 32 by 32 pixel picture of the Mandelbrot set, with the scale originally set to -2.25...75 in the horizontal direction and -1.5 to 1.5 vertically.

Here is what the actual picture looks like:

What is going on?

The animation that is happening below is a slow-motion view of the process the computer went through to produce the little image above. In about the time it took you to read the word "word", the computer was already done with all of the calculations necessary to produce this image--we had to make it slow itself way down so that you could see what was going on.

We also increased the size of the pixels (see The Mandelbrot Set Explained for an introduction to what pixels are) so that you could see them more easily. Remember, the actual size of the picture is just 32 by 32 pixels wide--on most computers, that's about the size of your thumbnail.

What are all those colors for?

Coloring pixels is the way that the computer helps us understand what the Mandelbrot set looks like. Remember how we said that the computer did a bunch of calculations before it even started the animation? Well, each time the computer has to decide how to color a pixel, it does a bunch of calculations. Some points only need a few calculations done, while others require more. The colors of the squares correspond to the number of times a calculation had to be done for that pixel.

The black pixels represent points which are (at least approximately) "inside" the Mandelbrot set. The colored pixels represent points that are not inside the Mandelbrot set.

Outside? Inside?

When the computer plots the Mandelbrot set, it is trying to find out which points are in the Mandelbrot set and which are not. The points that are not in the set get colored according to how long it took the computer to figure out that they weren't in the set.

Basically, the computer does a bunch of calculations, and checks each time to see how big the result is. If the result ever gets bigger than two, the computer knows that the point is not in the Mandelbrot set. It then stops doing calculations for that point and assigns that point a color.

The number plotted in each colored square is the number of calculations the computer had to do to learn that the point was outside the Mandelbrot set. The number in the black squares shows the number of calculations that the computer did before deciding to give up and color the pixel black. (It is important that the computer gives up after a while, since some of the points would otherwise keep the computer calculating forever).

What this all means is that although we are pretty sure that the colored points are not in the Mandelbrot set, we don't know for sure whether the black points are in the set or not. All we know from this computer plotting is that the calculations for those points stayed small for 75 steps. We don't know, for example, if some of them might have gotten big if we had just done one more iteration.

Think of it this way--pretend that you had told the computer to quit calculating after four steps. Then everything in the picture with a number larger than four would be black. That doesn't mean that those points are in the Mandelbrot set--it means that either:

the point is in the Mandelbrot set

or

the point is not in the Mandelbrot set, but we haven't done enough calculations to find out yet

(If you are reading this, the browser you are using does not support Java applets. Here is a static picture similar to what is produced by the animation: )


If you would like to get the source code for Aandy, contact Mike South at the Shodor Education Foundation.