The Mandelbrot Set, Java Applet


The Mandelbrot set is a set of complex numbers that is found by iterating a stunningly simple equation: z = z^2 + c. The initial value of z is (0, 0), and c is a point on the complex plane. If z, when iterated infinitely, converges with |z| less or equal to 2. Computers do not deal with infinity, so instead, we choose an iteration limit. This approach is usually referred to as the Escape time algorithm. If, at some time during the iterations, |z| grows larger than 2, we say that the point does not belong to the set.

Coloring the set

The Mandelbrot set can be seen upon as points (complex numbers) either belonging to the set or not. However, it is far more interesting to study the points which do not belong to the set more in detail. If we count the number of iterations completed before a complex diverges, we can use this number to color the point. By doing so, we discover many hidden features of the set.

The Julia set

The Mandelbrot set is closely related to the Julia set, which you will notice when exploring the different sets. The Julia set is found using the same equation (z = z^2 + c), but instead of choosing different values for c, z is chosen from the complex plane, and c is constant.


Left mouse button: Press and drag the mouse over the part of the fractal that you wish to examine closer.

Right mouse button: When in Mandelbrot mode, right click on a point on the fractal to show the Julia set rendered from the complex number corresponding to the coordinates of the chosen point. When in Julia mode, right click to go back to the Mandelbrot set.

Complex parameter: In Mandelbrot mode, the parameter changes the value of the initial z, which creates perturbation in the set (explained below). In Julia mode, the parameter sets the value of c.


By setting deviant values of the initial complex number (from which the iterations origin), an interesting effect called perturbation can be achieved. Try values ranging from -1 to 1 for best results. The animation to the right shows how the set transforms when going from (0, 0) to (1, 1) with increments of 0.1.