The Mandelbrot set is an immensely complicated set of points in the complex
plane that is defined by a very simple computational procedure. To define
the Mandelbrot set, let *c* be a complex number, and consider the function
*f(z) = z ^{2} + c*. Now, iterate the
function from a starting value of

Now, it is known that if any term of the sequence has norm, |*z*|, greater than 2,
then the sequence will diverge, which means that the corresponding value of
*c* is **not** in the Mandelbrot set. Unfortunately, it is not so
easy to test whether a given *c* **is** in the set, since that would
involve computing all terms of the sequence. The best we can do is start
computing terms in the sequence. If we come across a term that has norm
greater than 2, we can immediately say that *c* is not in the Mandelbrot
set. Otherwise, we will stop after some pre-determined number of iterations
and say that *c* **might** be in the Mandelbrot set.

(Note that it is not essential to use complex numbers to define the Mandelbrot set; all the
computations that are involved in its definition can be done using real number coordinates.
Let *a* and *b* be real numbers, and consider
the point *(a,b)*, which takes the place of the complex number *c* above.
Define the function *f(x,y) = (x ^{2}-y^{2}+a, 2xy+b)*.
Iterate this function from a starting value of

The images of the Mandelbrot set in 3D-XplorMath-J are computed using the
technique discussed above. The image
represents a rectangle in the complex plane. For each pixel in the image,
the point *c* at the center of the pixel is used as the constant in
the function *f(z) = z ^{2} + c*. This function
is iterated until either a value is found that has norm greater than 2 or some
specified limit on the number of iterations has been reached. In the former case,
the pixel is assigned a color that indicates the number of iterations that were
computed; in the latter case, the pixel is black. Thus, colored pixels are definitely
not in the Mandelbrot set, while black pixels might be. If the limit on the
number of iterations is increased, it is possible that some of the black pixels
will be filled in with color, indicating that they are not in the Mandelbrot set
after all.

The limit on the number of iterations is controlled by the parameter named "Maximum Iterations." To change the value of this parameter -- or any exhibit parameter -- use the "Set Parameters" command in the "Settings" menu. If you see black areas in the image that you think might not actually be in the Mandelbrot set, try increasing "Maximum Iterations" and see what happens! The way in which pixel colors depend on number of iterations is controlled by the parameter named "Palette Length." Different palette lengths can give markedly different visualizations, and it is often necessary to try different palette lengths to get the best possible image.

The Mandelbrot set has an unlimited amount of detail, at all levels of magnification. (The interesting detail is along the boundary of the set.) The "Examples" sub-menu of the "Action" menu contains several sample images of different parts of the set. To zoom in by hand, click-and-drag with the right mouse button (or Command-click-and-drag on Mac's). This will draw a rectangle on the image. When you release the mouse button, the inside of the rectangle will be zoomed out to fill the entire image. After zooming, it is often necessary to adjust the "Maximum Iterations" and "Palette Length."

You can always return to the initial view of the entire Mandelbrot set by selecting the "Restore Defaults" command from the "Action" menu.

Note that it can take a while to compute an entire Mandelbrot image, especially when the maximum number of iterations is large. When the computation takes more than a second, the computer will fill in the image gradually, from top to bottom. You can still use the menus and the mouse while this is happening.

To test whether a complex number *c* is in the Mandelbrot set, one
considers the sequence *0*, *f(0)*, *f(f(0))*,
*f(f(f(0)))*, ..., where *f(z) = z ^{2} + c*.
In the Mandelbrot Set exhibit, this sequence is referred to as the

You can **drag the white crosshair** with the mouse to change the change the
starting point *(cx,cy)* of the orbit. The numbers *cx* and *cy*
are parameters of the exhibit, so that you can also enter specific numeric values for
them using the "Set Parameters" command in the "Settings" menu.

A complete orbit consists of an infinite number of points, but of course only finitely many of them are displayed. It can be useful to increase this value to get a more accurate view. The number of points displayed in an orbit is determined by the exhibit parameter named "Points on Zero-Orbit", which can be changed using the "Set Parameters" command.

The Mandelbrot set is closely associated with so-called *Julia sets*.
There is a Julia set for each complex number *c*. The definition of this
Julia set uses the function *f(z) = z ^{2} - c *
(the same function that is used to define whether

The Julia sets that are associated with the Mandelbrot set in this way turn
out to be "self-similar." That is, the Julia set is made up of smaller pieces,
where each piece is a copy -- scaled down and rotated and translated into position --
of the entire set. If the point *c* is outside the Mandelbrot set, then the
Julia set is a fractal with fractional dimension less than one. (Such fractals are
sometimes referred to as "fractal dust.") If *c* is in the Mandelbrot set,
then the Julia set has a non-empty interior and so has dimension 2. However,
the boundary of the Julia set is a fractal in this case. (For more information on
fractals see the Fractals Gallery documentation.)

The Mandelbrot exhibit can show a visualization of the Julia set associated with
a point *c = (cx,cy)*. To see the Julia set, select the
option "Show Julia Set Outline for (cx,cy)" from the "Action" menu. (This is the same
point *(cx,cy)* that is used for the orbit, discussed above.) You should use this
option while looking at the default view of the exhibit. When you select this option,
a large number of white dots appear. These dots are points on the boundary of the
Julia set associated with the point *(cx,cy)*. If *(cx,cy)* is in the
Mandelbrot set, the Julia set consists of the points inside the boundary marked
by the white dots. If *(cx,cy)* is outside the Mandelbrot set, the Julia
set has no interior and the "boundary" of the set is really the set itself; in this
case, the white dots form a picture of the set. Note that since only a finite number
of dots are shown, you see only an approximation of the true picture.

The point *(cx,cy)* is marked with a small white crosshair. You can use the
mouse to drag this crosshair and see how the Julia set changes in response.

Note: The Mandelbrot set and Julia sets are named after the mathematicians Benoit Mandelbrot and Gaston Julia.