chaotic n-space network fractals | cge | software | philosophy | math | books |home|

Fractals Home | Introduction | Fractal Gallery | Software | Links

What is a fractal?
How are fractals created?
Why create fractals?

What is a fractal?

Before diving right in to a technical definition of a fractal I am going to start off with some common, non-mathematical ideas of a fractal. The most famous analogy used to help understand fractals is the length of a given coastline, say Florida's. At first thought this seems to be an easy question, at least it should be easy enough to look up. In front of me I have a small map of Florida and it looks as if I measure with a ruler, the length of Florida's coast comes out to about 1097 miles. But looking the encyclopedia I see that the length of the coastline is 1350 miles. How did I get almost 250 miles off? First off, I was using a two inch square map of Florida and a small ruler. My error was around one eighth of an inch. I wasn't worried about getting into all of the little coves and bays that line the coast of Florida. The mapmaker that figured out the length of the coast must have been more accurate (I bet he didn't use a ruler). It is important to notice that as the accuracy goes up, the length of the coast goes up. It would be difficult for me to underestimate the length of the coastline. The mapmaker probably used satellite images and computers to find the length of the coastline, and also would use lasers to measure smaller sections. But isn't using a satellite image just the same thing I was doing? The mapmaker is using the computer to measure the distance of the coastline just as I was using a ruler to measure off my little map. The smallest distance I could measure was about 100 miles. With a satellite map, the computer could probably get the accuracy down to 100 yards or so. So by increasing the accuracy from 100 miles to just 100 yards, we added 250 miles to the coast line. What if I increased the accuracy to 10 feet? 10 inches? 10 microns? The length of the coast will keep getting longer and longer. In fact, you can say that the length of the coastline is approaching infinity as the accuracy increases. This is called a fractal coastline. Any natural coastline, anywhere, has a length of infinity. A second consideration is the shape of the coast line. Obviously if we look at one side of Florida's coastline, it looks very different from the other side. But lets zoom in until we can only see about 10 feet of coastline. Now how different do they look? Very similar, but not exactly the same. You could zoom in until your field of vision is only 10 inches and the coastline would still look very similar but not exactly the same. This is called self-similarity and is a feature of most fractals. Most of the images you will see on our site are not photographs of coastlines though (there are other sites for that), in fact all of the images we have come from mathematical equations that exhibit some of the same characteristics of the coastline discussed above. With the knowledge of self-similarity and a fractal coastline we can now begin to understand how a benign looking equation for a fractal is different than an equally benign equation for a circle. About seventy percent of the fractals on our webpage are of a variety called mandelbrot. The equation for these fractals is as follows: (For those who hate math, just close your eyes)

 

OK, done with the math. This equation tests to see if the coordinate is either in the set or outside the set. Much like testing to see if a given latitude and longitude is on the coast or in the water. In all of the generated pictures the computer has tested thousands of points to see which side they are on. From the simplicity of the equation and the complexity of the pictures one conclusion would be that the equation is very sensitive to the points that are tested. One way to understand how such a simple looking equation could lead to such complex and diverse pictures is to think of a pool table. If I place one ball one the table and strike it with another, it is fairly easy (with a little physics) to figure out where the balls are going to go. The set of equations for two poolballs colliding is fairly intuitive (other wise we'd all have a difficult time at pool). Now add a few more balls and the system gets a little complicated. Where as it didn't really mater where I placed the single pool ball of the table, the placement of several pool balls becomes very important. If one ball is placed maybe half an inch to the side of its original placement, the outcome of the shot can change drastically. The equations stay the same, although the number of times the equations must be used increases drastically. The formula for the mandelbrot fractal above behaves in a very similar manner. Its sensitivity to the points put into it (tested), give us the beautiful pictures known as fractals. Note: Coloring is a bit more complicated and will be covered here.

How are fractals created?

About eighty percent of the fractals on this page were created using a program called Fractint. Fractint is one of the most popular fractal programs not only for its speed but for its versatility. Some of the other programs Ben and I have used include Tirea-Zon and Flarium (reviews and binaries of each can be found here). But to understand how the program actually calculates the fractal requires that we revisit the above equation and talk a little more in depth about the mathematics involved. One thing that computers are very good at is doing the same operation over and over again. For instance adding up one though a given number (n). [i.e. 1+2+3+4+...+n] In this case, the computer keeps adding one to whatever number it's on and then adds it to a running total. For this case, it is easy to see that to total runs off to infinity, meaning that it never slows down. This process is called iteration, simply repeating the operation over, and over again. The equation for the mandelbrot is calculated in a similar manner. Remember the equation for the mandelbrot:

Ignore the part about c being a complex number for now. To draw a portion of the mandelbrot fractal, the screen is divided up into pixels, each with their own specific coordinates. Now let's look at the first line of the equation: z(n) = c. Let c equal the coordinates of the pixel we want to check (that is, check to see if it is on the outside of the set or the inside) and let n equal the step that we are on (in this case, we are on one). So we have z(1) = {.25, .25} (I just chose {.25, .25} out of thin air). Now here is where the iterative process comes in. For step 2, z(2), we take z(1), square it and then add the original coordinates. So the second step would look like this: z(n+1) = z(2) = ({.25, .25})^2 + {.25, .25}. The third step would take z(2), square it, and then add the original coordinates again. As you can see, this can be a long and tedious process to do by hand. Now to check and see if the pixel is inside the set or not, you have to watch the two numbers that you get after each iteration. If they blow up (i.e. look like they are heading to infinity) then they are not in the set. Unfortunately some coordinates take a long time to get to infinity, to fix that a bailout value is used. This means that if the numbers get over the bailout value, they will also be thrown out. A typical bailout value for a mandelbrot is about four. To draw the entire fractal in the window, the computer simply tests each pixel to see if it is in the set. An iteration number is used to limit the number of time the computer goes through the process to see if it is in the set. There is one problem that I have not mention yet. That is with the third line of the equation: "Where c is a complex pair." The math up until now has been fairly easy (but tedious) to understand. Just adding and squaring. To understand what a complex pair is, it is important to understand one thing. A normal square root is easy to understand. i.e. the square root of nine is three. But the square root of negative nine is considerably trickier. What number, when multiplied with itself gives a negative answer? None of the real numbers (because a positive time positive is positive and a negative times a negative is also positive). It is then necessary to leave the real numbers and make a new set up. These will be called the imaginary set of numbers. Defined by: square root of negative one is {i}. Thus the square root of negative nine would be {3i}. Let's look at why. By separation laws, we know that the square root on negative nine is the same thing as the square root of nine times the square root of negative one. {sqr[-9] = sqr[9] x sqr[-1]}. Since we know what the square root of {-1} is, it becomes easy to see how it works. A complex pair is simply one real number and one imaginary number. i.e. {2, 3i} Here are some more examples of complex numbers in action:

 
5 + 3i + 2i = 5+5i
= 5(1+i)
(1+2i)*(2-4i) = (1)*(2) + (2i)*(2) - (4i)*(1) - (2i)*(4i)
= 2 + 4i - 4i - 8i^2
= 10 (notice that i^2 = -1)

OK, now that we know a little about complex pairs, we can proceed with the last step of creating fractals. Each pair that we test is a complex pair. So if we tested {.25, .25} it is the same as testing {.25 + .25i}. So instead of {.25, .25}^2 = {.0625, .0625} we have {.25 + .25i}^2 = {.0625 + .125i +(-.0625)} = {0,.125}. This is what we check to see how high it goes. So, it's a little more tricky than just dealing with the real numbers, but in the end, it is just a few more additions and subtractions.

maintained by jcamp@cnspace.net

Copyright 1999 chaotic n-space network
webmaster: jcamp@cnspace.net
fractals: jcamp@cnspace.net & benjamin.martin@valpo.edu
random solutions: randomsolutions@hotmail.com
cge: benjamin.martin@valpo.edu