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) = z2 + c. Now, iterate the function from a starting value of z = 0. That is, consider the infinite sequence of values 0, f(0), f(f(0)), f(f(f(0))), ... There are two possibilities: Either this sequence diverges to infinity, or it is bounded, that is, is trapped forever in some finite region of the complex plane. Which of these cases holds depends on the value of c. The Mandelbrot set is defined to be the set of values of c for which the above sequence is bounded.
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) = (x2-y2+a, 2xy+b). Iterate this function from a starting value of (0,0), producing the infinite sequence of values (0,0), f(0,0), f(f(0,0)), and so on. The question then is whether this infinite sequence escapes to infinity or is bounded in a finite region of the plane. The point (0,0) is in the Mandelbrot set if the sequence is bounded.)
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) = z2 + 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) = z2 + c. In the Mandelbrot Set exhibit, this sequence is referred to as the orbit for c. The program provides a visualization of such orbits. To see them, select the option "Show orbit of (0,0) for (cx,cy)" from the "Action" menu. (You should do this while looking at the default view of the Mandelbrot set; otherwise, you might not even see the orbit.) This command adds a small white crosshair to the image showing the location of the point (cx,cy), where cx and cy are the real and imaginary parts of c. The orbit is shown as a sequence of small colored disks. Note that the initial point 0 is not shown and that the second point on the orbit, f(0), is actually equal to c, so that the displayed orbit begins at c = (cx,cy).
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) = z2 - c (the same function that is used to define whether c is in the Mandelbrot set). The Julia set associated with c is defined by iterating this function for an arbitrary starting point. That is, to determine whether a given complex number w is in that Julia set, consider the sequence w, f(w), f(f(w)), .... The point w is in the Julia set if and only if the sequence is bounded. (This is the same test as for the Mandelbrot set, but for the Julia set, the same function is used for testing all points for membership, while the staring point of the sequence is varied. For the Mandelbrot set, the function changes for each point, while the starting point of the sequence is always zero.)
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.