An elementary primer on fractal theory for FRACTLAB v 1.2 BETA (c) Valter Alnis Bezerra, 2000 _____________________________________ Table of Contents ----------------- 1. Fractals 2. The Mandelbrot Set 3. The Julia Set 4. Further reading _____________________________________ 1. Fractals ----------- Fractlab works as a microscope, but instead of looking at cells and tissues, it enables you to look in depth at two amazing (and I mean AMAZING) mathematical objects: the Mandelbrot Set (named after French mathematician Benoit B. Mandelbrot) and the Julia Set (named after French mathematician Gaston Julia). Both objects are *fractals*, which means, basically, that they are sets of points that: (a) have *fractional dimension* (unlike the lines, planes, and solids of ordinary geometry, which have integer dimension - respectively 1, 2 and 3); (b) have *infinite depth*, that is, each small region of the structure contains an infinitude of small detailed structures embedded within it; (c) are sometimes *self-similar*, meaning that among those substructures there are some almost exact copies of the larger structure. Fractals are strictly speaking inexhaustible: given enough numerical precision and processing time, you can in principle dive endlessly into ever smaller and more intricate details. The visual appeal of fractals lies in the fact that, if one can associate a certain mathematical property of the points constitutive of a fractal with a suitable color scheme, one can generate images of truly breathtaking beauty. That's precisely what Fractlab does. 2. The Mandelbrot Set --------------------- Everything about the Mandelbrot Set centers on the following function: f(z) = z^2 + c, where z is a complex number and c is a complex constant. Just a word or two about complex numbers. [If you are already familiar with complex numbers, you can go directly to the next paragraph.] A complex number is composed of a real part and an imaginary part, that is, z = x + yi, where i = sqr(-1). The operations with complex numbers aren't so different from those of ordinary algebra at all. For example, the product of two complex numbers, z1 = x + yi and z2 = v + wi, is simply the sum of all the cross-products: z3 = xv - yw + i(xw + yv). Representing a complex number z = x + yi is easy; it is just a point of coordinates (x, y) in the x-y plane. The modulus of a complex number is simply the distance of that point from the origin of the coordinates, that is, |z| = sqr(x^2 + y^2). How is the above function f(z) used in fractal calculations? The function is *iterated*, that is, you start with some initial value for z, calculate f(z), insert f(z) as a new value for z, calculate the new value of f(z), insert *this* new value of f(z) as a new value for z, etc... step 0: z[0] is given f[1](z) = z[0]^2 + c step 1: z[1] := f[1](z) f[2](z) = z[1]^2 + c step 2: z[2] := f[2](z) f[3](z) = z[2]^2 + c step 3: z[3] := f[3](z) ... We can write the above process in abbreviated form as z[n+1] <- z[n]^2 + c, where n = 0, 1, 2, 3, ... The Mandelbrot Set (named after French mathematician Benoit B. Mandelbrot) is the set of points c (with coordinates a and b) in the complex plane for which the modulus of z[n+1] never exceeds 2, for any n. The maximum value for the modulus is usually called the "bailout value". Of course, the iteration could in principle be carried out a great number of times before the bailout value is exceeded. Strictly speaking, the only way to be 100% certain about whether a given point does indeed belong to the Mandelbrot Set would be to carry the iteration out an infinite number of times. In practice, since we have only a finite amount of time at our disposal, we must set a limit for the number of iteration steps (the "iteration depth"). If within the iteration depth the point does not "misbehave", then we assume it belongs to the Mandelbrot Set. The standard way to represent the Mandelbrot Set graphically is to paint the |z|<2 points (those points in the complex plane for which the modulus of the iterated function does not exceed 2 after the specified maximum number of iterations) in black, and to paint the other points with a different color according to the step at which the iterated value exceeds the bailout value. It seems a straightforward procedure, and indeed it is: just (complex) arithmetic and iteration. But the images generated by this process are nothing short of amazing. The Mandelbrot Set proper appears as a black "lake", with the now-famous shape of a kind of bug. The miracle lies in the "shore" of the Mandelbrot "lake" and its neighbourhoods. The "shore" is infinitely indented and convoluted. The neighbourhood is filled with infinitely intricated and intertwined patterns of colors. If you enlarge any part of these regions, you will discover a myriad of new details and structures: some look like spiral galaxies, others look like sunflowers, winding rivers, and arborescences from an alien planet. Still others are tiny but perfectly detailed copies of the original Mandelbrot shape. Once one looks at closeups of the Mandelbrot Set, one can hardly believe that such complexity, such detail and beauty can be generated on basis of an equation that can be written down with a handful of elementary arithmetic symbols. In practice, since a very large number of calculations is necessary to draw any fractal image, Fractlab takes advantage of some simple optimization techniques to speed up the calculation process. (Nothing too sophisticated, though.) 3. The Julia Set ---------------- The Julia Set (named after French mathematician Gaston Julia) is also a self-similar fractal of infinite complexity. It is based on the same equation as the Mandelbrot Set, but used in a different way. While in the Mandelbrot Set the constant c is held constant during the iteration for each point in the plane, while the iteration of z always starts with 0 + 0i, in the Julia Set c is always constant throughout the entire plane, while the iteration of z starts with the coordinates of each point in the plane. The Julia Set is the set of points z in the complex plane for which the modulus of z[n+1] never exceeds 2, for any n. The Julia Set is drawn in basically the same way as the Mandelbrot Set, that is, the |z|<2 points are painted black, while the other points are painted with a different color according to the step at which the iterated value exceeds the bailout value. If c is changed, the result is a different Julia Set. For that reason we can say that there is a Julia Set associated with each point of the Mandelbrot Set, or to put it in a more colorful manner, the Mandelbrot Set is a one-page "index" of an infinitude of Julia Sets. There are certain relations between the position of a given point in the Mandelbrot Set and the properties of the associated Julia Set. Informally speaking, for points inside the Mandelbrot Set itself (the "lake"), the associated Julia Sets also have their own "lakes". When the point becomes nearer and nearer the fractal "shore" of the Mandelbrot lake, the Julia Set lakes becomes more and more intricate, until they explode in a myriad of fragments as the point reaches the shore of the Mandelbrot lake. Thus, as if the fractal complexity inherent to the Mandelbrot Set wasn't enough, there is a whole infinitude of *other* fractal complexities associated with it. The full richness of the Mandelbrot Set is beyond aprehension -- but you can start exploring an appreciable part of that richness with Fractlab right now! 4. Further reading ------------------ If you want to learn more about the Mandelbrot Set, the Julia Set and about fractals generally, I heartily recommend the following books: Benoit B. Mandelbrot - _The Fractal Geometry of Nature_, W. H. Freeman and Company. Heinz-Otto Peitgen / Dietmar Saupe (eds) - _The Science of Fractal Images_, Springer-Verlag. Tim Wegner, Bert Tyler, Mark Peterson, Pieter Branderhorst - _Fractals for Windows_. James Gleick - _Chaos: The making of a new science_. [end of theory.txt]