More About Fractals

Contents

Here's how fractals are made using complex numbers


How Fractals are Made

One type fractal is made with equations that involve complex numbers (real and imaginary numbers). This involves laying the imaginary numbers on the Y-axis and the real numbers on the X-axis. A complex number a + bi can then represent a two-dimensional coordinate as a point (a, b). The modulus of a complex number is the distance of the number from the the origin, or its radius. It is equal to sqrt(a2 + b2). A set is simply a collection of points. In the context of fractals, it is every point whose every iterate has a modulus of two or less.

The equation for the Mandelbrot's Set fractal, of which I have pictures, is zi = zi-12 + c. The complex number c is the point to be tested on the complex plane. zi-1 is initially equal to c. The first time the equation is evaluated, the result is c2 + c. The second calculation yields (c2 + c)2 + c, and so on. Each of these calculations is called an iteration. If zi has a modulus greater than two after any iteration, which is called escaping, then c is not in the set. If, for every iteration, the modulus stays within two, then it is in the set. Points that escape are usually colored depending on the number of iterations made before it escaped.

For fractal generating computer programs, the maximum number of iterations is finite. Such programs assume that if c doesn't escape in any of the iterations, it will never escape. This assumption works well if the maximum number is chosen so that the generated fractal is not much different from the actual fractal and also so that the fractal won't take an infinite amount of time to draw. I don't like to wait an eternity for a fractal to be drawn, and I don't know many people who do either.

I generally choose a number like 50 for the maximum iterations for an image of the full Mandelbrot's set. If I were to view the set at an extreme close-up, then a higher number will do better, such as 200, to be able to draw the greater details in the fractal. Also, high-resolution graphics could use a slightly higher number of iterations for a higher level of detail (My fractals are only up to 640 x 480).

Back to Top

©2000 Chris Williams.
Last revision:
11 Dec 2000
Email me