So, what is a fractal? [Image] A fractal is a mathematical object that is self-similar and chaotic. Fractals are infinitely complex, the closer you look the more detail you see. Most fractals are generated by a relatively simple equation where the results are fed back into the equation until it grows larger than a certain boundary. Most fractals are just a graph of an equation using complex numbers. The real line is the X-axis. The imaginary number line is the Y-axis. The point is fed into the equation such as the one for the Mandelbrot set: Zn = (Zn-1)^2 + C When the equation starts, Zn is the next value that is being calculated. Zn-1 is the current value. C is the value of the current pixel. For example I will calculate the Mandelbrot set at the point 1+1i (in case you forgot i=(-1)^1/2 ) (NOTE: I kind of skipped a step here, the first real iteration will result in the value of C, because Zn-1 is 0 + 0i ) 1 + 1i X 1 + 1i -------- ( square the value ) 1i + -1 1 + 1i ----------- 1 + 2i + -1 = 0 + 2i 0 + 2i + 1 + 1i -------- ( don't forget to add the point ) 1 + 3i ( ONE ITERATION COMPLETE ) Now it is time to see whether this point is going to keep getting bigger and bigger. All you have to do is see if the value has reached infinity yet... easy right? Okay, so that won't really work, there is a shortcut that has been proven to work. If the (real part)^2 + (imaginary part)^2 is >= 4.0 then the point will become infinitely large, and there is no need to continue. ( Think pythagorean theorem ) Well, we can see that our point bailed out after just the first iteration. This is quite lucky for us because that calculating can get quite boring after a while. Some points will NEVER bail out, so we have to have a maximum number of iterations to calculate. My program calculates from 300 - 1000 iterations depending on how many times you have zoomed into the set. Any points that never fail our bailout test are determined to be part of the Mandelbrot set, these points are colored black. Because these points take the maximum number of iterations they hog much of the CPU time needed to calculate each image. I cheated a little and used Periodicity Detecting Logic to speed this up, but that is another story. The points that do eventually fail the bailout test are assigned a color. The number of iterations is used as an index into a 256 color palette that I created. The colors are completely arbitrary, I just think they look nice. When you click on a point to zoom in, a new set of co-ordinates are chosen closer to the center of the mouse click. The space between points in the set that are calculated become smaller. The end effect is that the image is enhanced and you get a better view of the region. This can continue for about 16-17 zooms when the precision of 64-bit floating point math begins to degrade. You can still zoom, but the image will begin to look very pixelated and blocky. So who discovered fractals? Well, it sure wasn't me : ). Fractals were not discovered in a single instant, but knowledge of them grew quickly in the computer age. The first real fractals (IMHO) were discovered by a French mathemetition named Gaston Julia. In his time there were no computers, so serious study of fractal objects was impractial to say the least. His studies were later re-discovered by Benoit Mandelbrot who discovered the Mandelbrot Set (suprise). The Mandelbrot set was found to be a map of all the Julia sets. Not only that, but it is one of the most complicated and beautiful mathematical objects. Even Mandelbrot couldn't believe such complex images could result from a one line formula! He thought the first images were the results of a bug in the code, until he calculated many points out by hand. Are there many other types of fractals? Yes, the Mandelbrot set is just the most famous of the fractals, and is much easier to understand than some of the other types. There are thousands of different kinds of fractals ( I have even discovered a few myself ). If you have access to a PC, I strongly reccomend finding a copy of Fractint. It is the fastest program I know of, and it has at least 100 differnet fractal types built in! If you are near a medium sized library you should be able to find some books on fractals there too. Background: I wrote my first fractal program about three years ago for the PC, it was some of my first C programming experience. It was quite fast considering it used no assembly. I think when I finally gave up it was half as fast as Fractint which uses assembly for all the math. Since then I have forgotten much of what I used to know about fractals, it's strange how these things cycle back to you. Fractal Explorer: The fractal explorer is written in C and runs on a SGI Indigo running at 100Mhz. On average about 2,000 fractals are generated by my programs every week. The GIF's it creates hang around for a day and are automatically deleted at 4:00 every morning. I am interested in adding more fractal types, but haven't decided on which one to do next. If you have any questions about my program just Email me. --------------------------------------------------------------------------- Neal Kettler Email - kettler@cs.colostate.edu