Benoit Mandelbrot investigated the repeated calculation Z 2 + C (starting with C, a complex number).
The results behave chaotically (non-periodic and extremely sensitive to the starting condition, C). If the size of Z remains less than about 2 then the point C is defined as being in the Mandelbrot set. Usually this is coloured black in displays of the set. Otherwise the point C is usually coloured (according to taste). As a complex number C is expanded as C = a + i b, where the numbers a and b are the coordinates of the coloured "map" shown in diagrams of the Mandelbrot set.
Images of the set from Wikipedia
It has been stated with reference to the Mandelbrot set that "the mathematicians have stumbled upon 'works of God'". The structure of the edges of the set point to infinity.
A Java app to draw Mandelbrot set is available here.
Features include:
- Plots a green line showing the behaviour of Z for a given starting point, C;
- Provides a file saving option indicating where in the set your image is plotted;
How the Mandelbrot set is calculated
The repeated calculation Z 2 + C can be calculated in a spreadsheet like this:
The starting number, C, is called a complex number and has the value 0.3 + 0.15 i shown in row 1 of the spreadsheet example (i being the square root of -1).
Rows 2 and 3 show the calculation repeated twice. In spreadsheet software rows 2 and 3 can be dragged down for as many rows as required and can be used to plot a line for the given starting point in row 1.
Columns A and B can plotted as a line in a scatter plot and cell values A1 and B1 be changed to see if a point C = A1 + i B1 is in the Mandelbrot set.
If the length of the scatter plot line 'explodes' the point in row 1 is not in the Mandelbrot set and a coloured pixel could be plotted at the point in row 1.
If the lines jumps around a loop or draws a spiral (as is the case for 0.3 + 0.15 i) the point is in the Mandelbrot set and a black pixel could be plotted at the point in row 1.