Last essential modification: March 24, 1999
Fractals became popular in the 1980s, when microcomputers started to become common. Everyone could produce the Mandelbrot set with their home computer. It is difficult to conceive how so simple mathematic formulae can create such beautiful images having such detailed and in some sense recursive structure.
The underlying mathematics makes use of complex numbers. For each point c=t+j x n the complex plane, one associates a colour by using an iterative process:
The colour of the point c is the smallest i for which |z(i)| > 2.
This is the process for the Mandelbrot set. The Julia set is similar, but it uses the formulae
Above, d is an additional parameter, which is used for all points in the fractal.
Programming languages usually do not directly support complex number arithmetics. Therefore, the iteration equations are usually split into real and imaginary components
and the iteration step is as follows:
x(i+1)=2 t(i) x(i)+cx
This can be generalized to 3 dimensions by adding another coordinate y, which is orthogonal to both the t and x axes:
x(i+1)=2 t(i) x(i)+cx
y(i+1)=2 t(i) y(i)+cy
These formulae were originally found out by my friend Topi Kärki, who wanted to see how the Mandelbrot fractal behaves when using quarternions instead of complex numbers. It turned out that the 4th dimension was redundant.
I wrote a Java applet that calculates 3-dimensional Mandelbrot and Julia fractals. As a bonus I added a Mandelbrot variant that makes use of the Julia parameters. Instead of initializing z(0)=0 it sets z(0)=d where d is the Julia parameter. This creates distorted Mandelbrot fractals.
Please do not expect the program to display any fancy rotating objects. It merely projects the 3-dimensional fractal on the tx plane, cutting 2-dimensional slices of it. You can view the y parameters as height coordinates.
There are two versions of the applet. The JDK 1.0 version should run on all Java implementations. Due to the limitations of JDK 1.0, resizing the window does not work as expected. The JDK 1.1 version reacts to resizing as expected, but it does not work in Netscape Navigator version 3.
The applet consists of 4 classes. You may use, modify and redistribute the software under the conditions of the GNU General Public License.