Fractals and the Mandelbrot set
Even though mathematical structures that are now called fractals were first analysed in the 19th century, the study of self-similar structures got a significant boost when computers able to visualize them started to appear in the 1970s. In fact, the term fractal was coined in 1975 by the late Benoit Mandelbrot to describe structures whose parts are similar to the whole.
The Mandelbrot set is a particular fractal set defined as:
where describes the polynomial resulting of iterating times the parameterized quadratic polynomial :
More about the Mandelbrot set
It is said that the limit of a complex sequence is infinite if for any positive number there is an element of the sequence such that its module and the modules of all succeeding sequence elements are greater than . In formal notation:
All the points of the complex plane that have a modulus greater than 2 are outside the set. To show that, let’s take a point whose module is strictly greater than 2:
To avoid cluttering the inequalities, let’s make two definitions:
Then the statement that all points with modulus greater than two are outside the Mandelbrot set is equivalent to
It’s clear from the definition that is non-negative. Let’s analyse carefully the relationship between a term and the previous one:
We can now inductively explore the hypothesis , with .
Checking the base case:
Applying the strong inductive hypothesis to we get:
Using this result in the previous inequality:
This implies that will diverge at least geometrically, with ratio . Then any point whose modulus is greater than 2 will be outside the set.
It can be seen by a slight extension of this argument that, if there is some such that is greater than 2, will be outside the Mandelbrot set too.
Plotting the Mandelbrot set
The simplest way to plot a Mandelbrot set is to iterate the quadratic polynomial over the points that are associated with an image in the normal way (via some choice of origin and scale factor). If the iterated point reaches a modulus greater than 2 we know that its module will diverge and that it is outside the set. There isn’t any simple test to know if a point is inside the set, but we can choose a fixed number of iterations or to stop the process when no new point outside the set is detected.
Any point known to be outside the set (reached a modulus greater than 2 when iterated) can be colored white, using black to color the points of the set:
We can make prettier visualizations if we use some measure of the “difficulty of divergence” for each point. One natural measure for this quantity is the number of iterations required to reach a given modulus. Combining this number of iterations with a function translating the potentially unbounded number of iterations to a color in the range black – white, we get:
This visualization is nicer, and shows more clearly the existence of filament-like structures (in fact, the set is connected, but I don’t know how to prove that… 😀 ). But we can do better by interpolating the iteration number in a continuous way, giving us a less discrete measure of the “difficulty of divergence”. If we use the algorithm described by Linas Vepstas,
being the “continuous” iteration count, the we get this picture:
The source code of the visualization software can be seen in the SVN repository of this blog and it can be used to check the self similarity of the fractal (left click zooms in, right click zooms out):