## Fractals
As the magnification increases, the edge of the circle flattens out and eventually becomes indistinguishable from a straight line. This is characteristic of any smooth shape — if you zoom in enough, the edge will look like a straight line. Fractals are different in that no matter how much you zoom in, the shape never flattens out. Here we see this with a fractal called the Mandelbrot set: With fractals, no matter how much you zoom in, you never run out of detail. There is literally an infinite amount of detail in every fractal. The detail is usually made up of small copies of the overall shape. For example, if we zoom in to the right spots on the Mandelbrot set, we see small copies of the set buried inside: The differences between smooth shapes and fractals arise from how the shapes are generated mathematically. Smooth shapes can often be described by relatively simple equations, such as x In the generation of escape-time fractals, each pixel in the image represents a complex number (a number with two parts), like a pair of map coordinates. Every fractal has its own characteristic formula, and the number z
At each iteration, the previous result is fed back into the formula as the new input. Depending on the formula and the numbers chosen, different things will happen to the sequence. With the Mandelbrot set, some numbers (pixels) will lead to a sequence that gets bigger and bigger, never turning back. These pixels are termed "Outside" points and are shown in white and gray above. Other numbers begin sequences that settle down into repeating patterns, or meander about without ever getting too big. These pixels are termed "Inside" points and are shown in black above. The boundary between the "Inside" and "Outside" points is the actual fractal, and is where most of the interesting detail lies. Mathematically, the outside points are those pixels such that the numbers in their sequence becomes infinitely large, and the inside points are everything else. To keep the formula from iterating endlessly, a "bailout" condition is set. Once the sequence crosses that threshold, it will never come back and we know that point is an outside point. If the sequence never grows larger than the bailout value, in a specified number of iterations, we can consider the point an inside point. In general, the more iterations calculated, the more detailed the image. The calculation formula determines the basic shape of the fractal, but its final appearance is also affected by the coloring formulas and the gradient. The coloring formulas communicate with the calculation formulas to transform the sequence of numbers into a value that is then used by the gradient to assign the numbers to areas of the palette, much like a "paint by number" set. |