The Mandelbrot Set: Executable or Text Version

The Mandelbrot Set is described by the term coined by the mathematician Benoit Mandelbrot in 1975 - FRACTAL.

The Julia Set: Executable or Text Version

Assembly Language enhanced: Executable or Text Version

The Julia Set is closely related to the Mandelbrot set. Although there is a precise mathematical meaning to the term Fractal, in essence it means that no matter how close you "zoom in" to the picture, the picture looks the same; it has the same overall format.

There is a Julia set for every point of the Mandelbrot set - so there's only ONE Mandelbrot set, but infinitely many Julia sets. The JULIA Set is formed as described below:

To get the JULIA Set:

Firstly, pick a large number. 1 million will do.

Choose some Complex Number C, then, starting with Z=(-1,-1) calculate Znew= Z x Z -C

Work out Mod(Znew). Is it larger than 1 million? If not, work out the following.............

Znew2 = Znew x Znew - C . Is Mod(Znew2) larger than 1 million? If not, repeat the procedure to get Znew3 and so on..

Set a screen up with Z=(-1,-1) at the bottom left corner, and Z=(1,1) at the top right corner, and repeat the above procedure moving from RED -1 to 1 and GREEN -1 to 1 in let's say 1000 steps for each. Colour each of these points according to how many repetitions of the above calculation it took for the Modulus to exceed 1 million. If after a reasonable number of repetitions, say 64 for the number of colour gradations available on a computer, you find that Mod(Znew64) is STILL not bigger than 1 million, colour that pixel BLACK.

You will then get the Julia set associated with the Complex Number C, which is what my program does. You should opt to start off with the Mandelbrot set, and choose the Julia set by clicking on the picture of the Mandelbrot set, then zoom into any particular rectangular area of the Julia Set using the mouse. The Mouse Pointer is turned OFF except once the picture is complete. Then either press -s- to quit the program altogether, or press -m- to turn ON the Mouse Pointer. Once turned ON, choose a rectangular area to zoom into by clicking firstly the LEFT mouse button at one corner, then the RIGHT mouse button for the OPPOSITE corner. One second later, the program resumes with the Mouse Pointer once again turned OFF.

Julia Set: Cosine Variant: Executable or Text Version

The basic Julia Set is formed from the iteration: Znew = Z x Z - C , but you get some great pictures from variations on this theme. The picture below is from the formula: Znew = COS(Z/C)

Putting Z = x + i.y , to do calculations with COS(Z) is far from obvious. You have to use the following formula:

COS(x + i.y) = COS(x).COSH(y) - i.SIN(x).SINH(y)

Although I haven't included a picture of it, the relevant "Mandelbrot" set asociated with COS(Z/C) looks nothing like the usual Mandelbrot set; it is shaped more like a strange "X"

For the new Assembly Language version above, I found I needed to write my own Floating Point algorithm for EXP(x). Basically, you cannot work out EXP(x) directly in FP Assembler. You have to use EXP(x) = 2^k .EXP(f) where k is an integer. Not only that, but you have to use the formula EXP(f) = 2^(f.lg(e)), where lg(e) is the logarithm of the number e (=2.718281828...) to base 2, and where f.lg(e) must lie between -1 and +1.

Return to Top Page

Next Page