Classic Mandelbrot set fractal.
z(0) = c = pixel;
z(n+1) = z(n)^2 + c.
Two parameters: real & imaginary perturbations of z(0)
This set is the classic: the only one implemented in many plotting programs, and the source of most of the printed fractal images published in recent years. It is simply a graph: the x (horizontal) and y (vertical) coordinate axes represent ranges of two independent quantities, with various colors used to symbolize levels of a third quantity which depends on the first two. So far, so good: basic analytic geometry.
Now things get a bit hairier. The x axis is ordinary, vanilla real numbers. The y axis is an imaginary number, i.e. a real number times i, where i is the square root of -1. Every point on the plane -- in this case, your PC's display screen -- represents a complex number of the form: x-coordinate + i * y-coordinate
If your math training stopped before you got to imaginary and complex
numbers, this is not the place to catch up. Suffice it to say that they
are just as "real" as the numbers you count fingers with (they're used
every day by electrical engineers) and they can undergo the same kinds
of algebraic operations.
OK, now pick any complex number -- any point on the complex plane -- and call it C, a constant. Pick another, this time one which can vary, and call it Z. Starting with Z=0 (i.e., at the origin, where the real and imaginary axes cross), calculate the value of the expression Z^2 + C
Take the result, make it the new value of the variable Z, and calculate
again. Take that result, make it Z, and do it again, and so on: in
mathematical terms, iterate the function Z(n+1) = Z(n)^2 + C. For
certain values of C, the result "levels off" after a while. For all
others, it grows without limit. The Mandelbrot set you see at the start
-- the solid-colored lake (blue by default), the blue circles sprouting
from it, and indeed every point of that color -- is the set of all
points C for which the value of Z is less than 2 after 150 iterations.
All the surrounding "contours" of other colors represent points for
which Z exceeds 2 after 149 iterations (the contour closest to the M-set
itself), 148 iterations, (the next one out), and so on.
What is the difference between Julia sets and Mandelbrot
set?
Julia sets are strictly connected with Mandelbrot set. The iterative function used to produce
both Mandelbrot and Julia sets is:
What is different is the way this formula is used. Each point of the complex plane is associated
with a Julia set, so you can think to the Mandelbrot set as an "index" for Julia sets: each
point of the Mandelbrot set is associated with a particular Julia set.
The process to build a Julia set is the same used for the Mandelbrot set. The only difference is that for the Julia set C is fixed, while Z varies.
Pick a point on the complex plane (let's call it C). The corresponding complex number has the form:Example: the Julia set associated with C1 is connected; the Julia set associated with C2 is not connected (see image below).
The method used to produce images representing the Julia sets is the same used for the Mandelbrot set. If the distance of the point from the origin becomes bigger than two, we are sure that it will grow without limit. So, if this distance reaches the value of two, we can stop the iteration process because we know that the point will go to infinity, and we can colour the point according to the number of iterations already done (a great number of iterations means that the point is going to infinity slowly). If the point belongs to the Julia 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 Julia set, it could take a really huge number of iterations to reveal that it is attracted by infinity. In either case, we set a maximum number of iterations, after which we assume it is part of the Julia set (colouring it black). The more iterations we use, the more detailed our image will be, but the longer it will take to generate.