Fractals – Where Math and Art Collide

fractal animation

Fractals, you've all seen them before. They are the brightly colored, abstract images like the ones at the top of this page. What you may not know is that these fractal images are generated by mathematical equations!

Butterfly curveYour first reaction may be something along the lines of "how can an equation produce artwork?" You are all familiar with polynomial equations such as y= x 3 3x. They make nice curves, but they are a long way from being works of art. Polar graphs are more interesting. For example, the polar equation below produces the "Butterfly Curve" at the right.

r= e cosθ 2cos4θ+ sin 5 θ 12

The butterfly curve makes a rather nice picture, but it is not in the same league as fractal art. So, how are those fractal pictures made from equations? Let's begin by looking at the Mandelbrot set, one of the best-known fractals.

The Mandelbrot set (M) is a subset of the complex numbers defined as follows.

M={ c | lim n z n } where z n+1 = z n 2 +c for n=0, 1, 2, 3, 

In other words, by iterating the function z n+1 = z n 2 +c , we find the points belonging to the Mandelbrot set. The Mandelbrot set algorithm is relatively simple.

  1. Let z 0 =0.
  2. Let c be an arbitrary complex constant.
  3. Evaluate z n+1 = z n 2 +c.
  4. Repeat step 3 for n=1, 2, 3, .

The algorithm requires that we recursively calculate successive values of z infinitely many times. If the sequence of complex numbers z n approaches infinity, then c is not a member of the Mandelbrot set; otherwise c is a member of the set. The number z 0 is called the seed for the iteration. The sequence of numbers z 0 ,  z 1 ,  z 2 ,  generated by this iteration is called the orbit of z 0 under iteration of z n+1 = z n 2 +c.

With this terminology in mind, we can define the Mandelbrot set as follows. The Mandelbrot set is the set of all complex numbers c for which the corresponding orbit of z 0 under z n+1 = z n 2 +c does not approach infinity.

It seems that this algorithm presents us with a problem since it is not possible to evaluate the function infinitely many times. However, it can be proven that if at any point | z n | becomes greater than 2, then the sequence z n rapidly approaches infinity. When this happens, we can end the iteration process and conclude that c does not belong to the Mandelbrot set.

EXAMPLE - Evaluating the Mandelbrot set Equation

Let z 0 =0 and suppose c=1.75i. Evaluate the Mandelbrot set equation as follows.

Three Iterations of the Mandelbrot Set Equation
n z n+1 = z n 2 +c | z n |
0 z 1 = z 0 2 +c= 0 2 +(1.75i)=1.75i 1.25
1 z 2 = z 1 2 +c= ( 1.75i ) 2 +(1.75i)=.5625+.75i .9375
2 z 3 = z 2 2 +c= ( .5625+.75i ) 2 +(1.75i)=1.24611.5938i 2.0231

For n=2, | z n |>2. This tells us that the point c=1.75i does not belong to the Mandelbrot set. We end the iteration process here.

Now that we know how to find the points belonging to the Mandelbrot set, we still have to find a way to graph the set. For "graph paper", we will use a computer screen. Computer screens are divided into grids, much like a checkerboard. Each tiny box on the screen is called a pixel. Each pixel displays one color at a time. When you view an image on a computer screen, you are actually viewing a collection of colored pixels. When combined, the pixels create the image on the screen.

We treat every pixel on the computer screen as though it is a point in the complex plane. Thus, every pixel is given a complex number value. These values are then fed into the Mandelbrot set equation. If c belongs to the set, we color the pixel black. Otherwise, we color the pixel white. This gives us the (boring) black and white "bug like" image pictured below.

Mandelbrot set in black and white

Coloring the Mandelbrot Set

Because black and white images are rather boring, it is customary to color the pixels outside of the Mandelbrot set. The color choice is based on the number of iterations needed to find that c does not belong to the set. In the previous example, we found that for n=2, | z n |>2. This told us that point c does not belong to the set and we ended the iteration process. Now we color the point, i.e. the pixel, with the color of our choice. Use the same color for all other pixels for which n=2 makes | z n |>2. Choose different colors for n=3, n=4, etc.

We typically color all the pixels in the Mandelbrot set as black, and everything else with any of the 16,777,216 colors displayed by computer monitors. That gives us a nice little color palette to play with.

Colored Mandelbrot Set

The Mandelbrot set is just one of countless examples of how equations are used to create pictures. The marriage of mathematics and computer technology makes fractal art possible. However, you don't have to be a mathematician (or an artist) to make fractal art. That's where fractal generating software comes in.

Fractal generating software allows you to explore 1000's of fractal types. No worries for the mathematically challenged either. The math is built into the software. Fractal generating software enables you to create dazzling fractal art. Your only limitation is your creativity. Be sure to visit the Fractal Art Gallery for inspiration.

Web Design & Development by TKO Website Design