What is the difference between Julia sets and the Mandelbrot set?

Julia sets are strictly connected with the Mandelbrot set. The iterative function that is used to produce them is: Zn+1 = Z2n + C. What is different is the way this formula is used.
In order to draw a picture of the Mandelbrot set, we iterate the formula for each point C of the complex plane and we always start with Z0 = 0.
When making a picture of a Julia set, C remains fixed during the whole generation process, while the value of Z0 varies. The value of C determines the shape of the Julia set: in other words, each point of the complex plane is associated with a particular Julia set.


How can I build a Julia set?

Pick a point on the complex plane (let's call it C). The corresponding complex number has the form: x_coordinate + i*y_coordinate. The following algorithm produces the Julia set associated with C: given a generic point Z on the complex plane, this algorithm determines whether or not it belongs to the Julia set associated with C, and thus determines the color that should be assigned to it.
In order to see if Z belongs to the set, we must iterate the function Zn+1 = Z2n + C using Z0 = Z. What happens to the initial point Z when the formula is iterated? Will it remain near to the origin or will it go away from it, increasing its distance from the origin without limit? In the first case, it belongs to the Julia set; otherwise it goes to infinity (infinity is an attractor for the point) and we assign a colour to Z depending on the speed the point "escapes" from the origin. In order to produce an image of the whole Julia set associated with C, we must repeat this process for all the points Z whose coordinates are included in this range: -2 < x_coordinate < 2 ; -1.5 < y_coordinate < 1.5

Note that while the Mandelbrot set is connected (i.e. it is a single piece), a Julia set is connected only if it is associated with a point inside the Mandelbrot set. This is just one example of the relationships between the Mandelbrot set and Julia sets.
Example: the Julia set associated with C1 is connected; the Julia set associated with C2 is not connected (see image below).

Example of connected and not connected Julia sets


What is the trick this time?

The method used to produce Julia sets is the same used for the Mandelbrot set. If the distance of the point from the origin becomes greater than two, we are sure that it will grow without limit. Therefore, 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 paint it according to the number of iterations performed (a large number of iterations means that the point is slowly going to infinity). 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 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.

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