this should be a java applet.

The Mandelbrot set

This applet represents the mandlebrot set. Each point is coloured based on the following formula:

zn+1 = zn2 + z0

z = x + iy (a complex number)

Starting with the initial conditions (z0), we iterate through the equation until the size of zn reaches some value, or we decide to stop iterating. So for example, in this applet, we run through the equation for a maximum of 128 times or until zn is greater than 21/2 (root 2). Then take the number of iterations we ran through (between 1 and 128) and use this to colour the point on screen.


Click and drag a rectangle to zoom. To return to the initial position just click (and release) without dragging a rectangle.

This applet should work fine in any java1.1 compatible browser and should at least draw the initial picture in a java1.0 browser (with the zoom disabled). However it does not seem to work at all using Netscape 4.7 on the Apple Mac, but it does work using Internet Explorer, because it uses Apples MRJ.

Source code

You can look at the source code if you want, but I warn you it is quite hacked and completely uncommented.

What is a Fractal?

Well first of all the name (and general idea, pretty much) of fractal is attributed to Benoit B. Mandelbrot.

Generally speaking Fractals are objects with self-similarity (though I believe they can also be objects with infinite perimeter, but finite volume). By that I mean if you take a smaller part of the object it will often resemble the whole object. Just explore the applet on the left and you will soon realise what I mean.

Objects with self-similarity occur frequently in nature. For example, a branch (or for that matter a root) on a tree will look similar to the whole tree, rocks on a mountain may look like mountains and so on.

Mandlebrot basically formalised this idea of self-similarity and provided a number of casebook studies in The Fractal Geometry of Nature.

What are fractals good for?

Well one immediate thing that springs immediately to mind is for making pretty pictures. Because fractals can be expressed in some mathematical fashion they can be reproduced to whatever scale we wish (depending on computer number accuracy). They therefore (in principal) have infinite resolution. In the applet you can zoom in pretty much as far as you want, until the numbers involved are too small to be easily represented by the computer. fractal generated landscape

Along similar lines fractals are also often used to generate natural structures, such as landscapes and plants for use in computer games/simulations. In this way trees can be modelled without the need to specify by hand where every leaf and branch are. Merely a few parameters need specifying (such as branching rate) and you can create a forest. This is part of the reason why fractals are very useful.

The image on the right is from Mandlebrots book and was generated using fractals that incorporate some randomness.


Paul Bourkes introduction to fractals
Pretty good explanation of fractals, plus more examples.

Hugo Elias's Introduction to Fractal Nature
Quick intro to fractals on a site that contains a lot of good stuff.
Home Page