What is the Mandelbrot set?
The Mandelbrot set is the domain of convergence of the series built up by the
complex sequence defined by the recursion law:
It is also possible to assign a colour to the points outside the Mandelbrot set. Their colour depends on how many iterations have been required to determine that they are outside the Mandelbrot set, and it can be interpreted as their "distance" from the Mandelbrot set.
How can I build the Mandelbrot
set?
Pick a point on the complex plane (let's call it C). The corresponding
complex number has the form:
Let's take a look to the algorithm from a different point of view. Let's imagine that all the points on the plane are attracted both by infinity and by the Mandelbrot set. This makes easy to understand why
What is the trick?
As you can see, it is impossible to apply the process described above,
because we can't iterate the function an infinite number of times to
see whether or not the point goes to infinity. It's easy to prove that if
the distance of the point from the origin becomes greater than two, it will
grow without limit. As a result of this, if the distance of the point from
the origin reaches the value of two we can stop the iteration process, because
we know that the point will go to infinity, and we can assign a colour to it
according to the number of iterations performed (a small number
of iterations means that the point is rapidly going to infinity).
On the other hand, if the point belongs to the Mandelbrot set, its distance
from the origin will never become greater than two, no matter how
many iterations we do. Even if the point does not belong to the Mandelbrot
set, it could take a really huge number of iterations to reveal that it will
escape to infinity. In either case, we set a maximum number of iterations,
after which we assume it is part of the set (and we paint it black).
The more iterations we use, the more detailed our image will be, but the
longer it will take to generate.
Examples:
Let's see how to assign a colour to a particular point of the plane. Let's
start with a point outside the Mandelbrot set:
Iterating the function
|
![]() |
At the third iteration, the distance of the point from the origin becomes greater than two. This means that the initial point C does not belong to the Mandelbrot set. As it took 3 iterations to determine this, we paint C with the colour labelled #3 in our palette. All the points with the same colour require the same number of iterations to reveal that they are attracted by infinity.
Let's repeat the same process with a point inside the Mandelbrot set:
|
![]() |
You can give me feedback about this page by filling out the feedback form.
© 1996-2000 fabioc @ yahoo.com
This page hosted by
Get your own Free Home Page