The Mandelbrot set is what is called a divergent fractal in that points are
determined to be part of the set based upon whether a corresponding series
diverges or not. For the Mandelbrot set, a function is iterated on every point
of the complex plane, and if the function does not diverge, it is part of the
set. More specifically, the iterated function is

Where
is the complex number input of the function, and
is the
current point that is being tested. Since it is hard to generally determine
which points do not diverge with this iterative function with certainty,
especially near the boundaries of the set, a common approach for computation is
to stop iterating after a fixed number of iterations, and if the output of the
function did not exceed a bailout value (i.e.
for all
iterations of
) then the point is considered to be part of the set.
This method will never deny a point from being part of the set, but it does
include extra points near the boundary because of chaotic patterns.
A common way to color the set, which gives more information about the behaviour near the boundaries since minute details may be lost, is to assign colors for non-set points based upon the number of iterations it took before it escaped and diverged. This is how the snippet of the set above was rendered.
Drawing the Mandelbrot is what is called an embarassingly parallel problem. This means that it is so easy to split the work of drawing the set that it is truly embarassing. I'm working on a system that splits the portions of the complex plane up to test into small squares and sends them off to a small farm of computers which then calculate which points are part of the set and return the data to the server which combines it into a larger image. In preliminary testing, the system has been faster than having a single computer work on drawing a rather large 4096x4096 image (as linked to through the image above).
My plan is to store the results of the grid of images drawn into a quadtree with different levels of zooming to make something like Google Maps for the Mandelbrot set. The next stages are to implement a quadtree data structure for the images that isn't totally memory intensive, and then making the user interface for sending out jobs to the computer grid.