# Fractals And Fractal Geometry

Fractal Geometry: [ What Is It, A Simple Explanation | A More Complete Explanation -- Fractal Dimensions | Calculating Fractal Dimensions ]
Fractals: [ What Are Fractals | Graphical Representation | Specific Fractals | Real-Life Relevance ]

## A Simple Explanation Of Fractal Geometry

While the classical Euclidean geometry works with objects which exist in integer dimensions, fractal geometry deals with objects in non-integer dimensions. Euclidean geometry is a description lines, ellipses, circles, etc. Fractal geometry, however, is described in algorithims -- a set of instructions on how to create a fractal.

The world as we know it is made up of objects which exist in integer dimensions, single dimensional points, one dimensional lines and curves, two dimension plane figures like circles and squares, and three dimensional solid objects such as spheres and cubes. However, many things in nature are described better with dimension being part of the way between two whole numbers. While a straight line has a dimension of exactly one, a fractal curve will have a dimension between one and two, depending on how much space it takes up as it curves and twists. The more a fractal fills up a plane, the closer it approaches two dimensions. In the same manner of thinking, a wavy fractal scene will cover a dimension somewhere between two and three. Hence, a fractal landscape which consists of a hill covered with tiny bumps would be closer to two dimensions, while a landscape composed of a rough surface with many average sized hills would be much closer to the third dimension.

## A More Complete Explanation of Fractal Geometry and Fractal Dimensions

Fractal Dimensions can be demonstated by first defining a fractal set as Nn = C/rnD where Nn is the number of fragments with the linear dimension defined as rn, C is some constant, and D defines the fractal dimension. If this equation is rearranged with simple algebra, the outcome is D = [ ln(Nn + 1/Nn) ] / [ ln(rn/rn + 1) ]. Given a line of unit length, we can divide it in varying ways and do different things with each segment. For the first example (figure 1a), if the segment is divided into two parts, making r1 = 1/2. One of the parts is kept and the other is disposed of, so N1 = 1. If we divide the remaining segment into two parts and again only keep one of the fragments, then r2 = 1/4 and N2=1. If this process is repeated (iterated), D turns out to be zero, which give the equivalent to the Euclidean point. Regardless of the number of iterations, at order n, Nn=1. Hence, D will always be zero. This way of thinking makes sense because if you were to take a line segment and continually divide it into two, keeping only one of the pieces, the length of the line segment will approach zero as the order approaches infinity.

A Euclidean line which exists in the first dimension can be demonstrated just as easily. This example is modeled in figure 1b. The line segement is again divided into two parts; however, we keep all the fragments, so r1 = 1/2 and N1 = 2. Iterating again, we get r2 = 1/4 and N2 = 4. Hence, ln(2) / ln(2) = 1. This also makes sense because we never remove any part of line so it will always remain of unit length.

In the first two examples, the results were both Euclidean figures with dimensions of zero and one, respectively. It is, however, just as easy to create a line segment with a fractal dimension between zero and one. In figure 1c we divide the line segment into three different parts and keep only the two end pieces. After the first iteration, we get r1 = 1/3 and N1 = 2. When this process is repeated, we get r2 = 1/9 and N2 = 4. Therefore, D = ln(2) / ln(3) = 0.6309. To show how to generate line segements with a varying fractal dimension, we start with a line segment of unit length and divide it into five distinct parts (figure 1d). By keeping only the two end pieces and the center piece, we get r1 = 1/5 and N1 = 3. Iterating again, we get r2 = 1/25 and N2 = 9. In this example D = ln(3) / ln(5) = 0.6826. As this process is iterated, the infinite set of points is called dust. This term will be explained later.

Figure 1. Demonstration of fractal dimensions with Euclidean line segments.

Fractal dimensions are not limited to being between zero and one. We can also apply the same method to the Euclidean square to produce items with a fractal dimension between zero and two. For each of the following examples, each square will be divided into nine squares of equal size, making r1 = 1/9. The iterations continues n times. To demonstrate the Euclidean point (figure 2a), we keep only one square with each iterations, making N1=Nn=1. In the next example (figure 2b), we keep only the top three squares with each iteration, making N1 = 3 and N2 = 9. Through this process we discover a Euclidean line with a dimension of one. The last Euclidean figure which can be derived from this example is the plane (figure 2c). To accomplish this, we keep all the squares with each iteration.

To produce a figure with a fractal dimension, we will keep only the two pieces in the upper left and lower right corner with each iteration (figure 2d), making N1 = 2 and N2 = 4. Hence, at the second order D = ln(2) / ln(3) = 0.6309. On the other hand, if we remove only the center piece with each iteration, as in figure 2e, we N1 = 8 and N2 = 64. This example produces a fractal dimension of 1.8928.

Figure 2. Demonstration of fractal dimensions with Euclidean planes.

## Calculating Fractal Dimensions

Now you understand what fractal dimensions are and where they come from, but how are they calculated? For certain objects which with you have delt all of your life, such as squares, lines, and cubes, it is easy to assign a dimension. You intuitively feel that a square has two dimensions, a line has one dimension, and a cube has three dimensions. You might feel this way because there are two directions in which you can move on a square, one direction on a lines, and three directions in a cube, but what about fractals? Sometimes you can move in a certain number of directions and sometimes you can move in a different number of directions. This is what causes fractal dimensions to be non-integers.

To derive a formula which will work with all figures, lets first look at how to calculate the dimensions for the figures which we already know. A line can be divided into n = n1 seperate pieces. Each of those pieces is 1/n the size of the whole line and each piece, if magnified n times, would look exactly the same as the original. Repeating the process for a square, we find that is can be divided into n2 pieces. The same concept holds true for a cube, we need n3 pieces to reassemble a cube. Each of the pieces would be 1/n the size of the whole figure. The exponent in each of these examples is the dimension. For fractals, we need a generalized formula, which can be derived from what we already know. The steps bellow assume you have a working knowledge of logarithims and basic algebra.

Note: ln denotes loge and may be refered to as the natural logarithim. Because of the way in which this formula ends up, it is independant of the base used for the logarithims.

for a line: ln(number of divisions) = ln(n1)
for a square: ln(number of divisions) = ln(n2)
for a cube: ln(number of divisions) = ln(n3)

If you look back, the figure was divided into pieces that when zoomed in on n times, revealed to starting figure. Because of this, we divide the ln(number of divisions) by the natural logarithim of the magnification facator. The resulting formula gives the dimension, represented by D.

D=ln(number of divisions)/ln(magnification factor)

for a line: D = ln(n1)/ln(n) = 1
for a square: D = ln(n2)/ln(n) = 2
for a cube: D = ln(n3)/ln(n) = 3

Each of these examples was easy because the magnification factor was always n. But for fractals, magnification factor will be a constant, which varies for each fractal. Because you are unfamiliar with specific fractals, we can not examine specific cases now. Under the section Individual Fractals the dimension of the individual fractals will be examined in more detail.

## What Are Fractals?

For the most part, when the word fractal is mentioned, you immediately think of the stunning pictures you have seen that were called fractals. But just what exactly is a fractal? Basically, it is a rough geometric figure that has two properties: First, most magnified images of fractals are essentially indistinguishable from the unmagnified version. This property of invariance under a change of scale if called self-similiarity. Second, fractals have fractal dimensions, as were described above. The word fractal was invented by Benoit Mandelbrot, "I coined fractal from the Latin adjective fractus. The corresponding Latin verb frangere means to break to create irregular fragments. It is therefore sensible and how appropriate for our needs! - that, in addition to fragmented, fractus should also mean irregular, both meanings being preserved in fragment."

## Graphical Representation Of Fractals

Graphically, fractals are images created out of the process of a mathematical exploration of the space in which they are plotted. For this page, a computer screen will represent the space which is being explored. Each point in the area is tested in some way, usually an equation iterating for a given period of time. The equations used to test each point in the testing region are often extremely simple. Each particular point in the testing region is used as a starting point to test a given equation in a finite period of time. If the equation escapes, or becomes very large, within the period of time, it is colored white. If if doesn't escape, or stays within a given range through out the time period, it is colored black. Hence, a fractal image is a graphical representation of the points which diverge, or go out of control, and the points which converge, or stay inside the set. To make fractal images more elablorate and interesting, color is added to them. Rather than simply plotting a white point if it escapes, the point is assigned a color relative to how quickly it escaped. The images produced are very elaborate and possess non-Euclidean geometry. Fractals can also be produced by following a set of instructions such as remove the center third of a line segment. A more complete explanation of how to generate fractal images, specific to individual fractals, follows.

## Specific Fractals

[ The Cantor Set | The Koch Curve | The Koch Snowflake | The Sierpinski Triangle | The Lorenz Model | The Mandelbrot Set | The Julia Set | The Logistic Equation ]

Bellow are several sections, each dealing with an individual fractal. Of course not all of the fractals in the world are listed bellow, but only ones which are well known or show and important point which everyone should know. With each fractal, there is a picture, followed by some information about it. For many of the fractals, there is also a link to a C/C++ or BASIC program which will generate a picture of the fractal. For more working soure code, visit the Appendix Of Source Code. Even if you are not interested in these specific fractals, it is strongly enouraged that you read through each one because many topics other than the specific fractal are reviewed. For example, strange attractors and several applications of fractals to real-life situations are discussed.

### The Cantor set

Figure 3. The Cantor set

The Cantor set is a good example of an elementary fractal. The object first used to demostrate fractal dimensions, figure 1c, is actually the Cantor set. The process of generating this fractal is very simple. The set is generated by the iteration of a single operation on a line of unit lenght. With each iteration, the middle third from each lines segment of the previous set is simply removed. As the number of iterations increases, the number of seperate line segments tends to infinity while the length of each segment approaches zero. Under magnification, its structure is essentially indiguishable from the whole, making it self-similiar.

To calculate the dimension of the Cantor set, we first realize that its magnification factor is three, or the fractal is self-similiar if magnified three times. Then we notice that the line segments decompose into two smaller units. Using the formula given in the section entitled Calculating Fractal Dimensions, we get:

D = ln(2) / ln(3)
D = 0.6931 / 1.0986
D = 0.6309
The Cantor set has a dimension of 0.6309.

### The Koch Curve

Figure 4. The Koch Curve

So far, all of the examples in this document have delt with removing pieces from various geometric figures. Fractals, and fractal dimensions can also be defined by adding onto geometric figures. The Koch curve was named after Helge von Koch in 1904. The generation of this fractal is simple. We begin with a straight line of unit length and divide it into three equally sized parts. The middle section is replaced with and equilateral triangle and its base is removed. After one iterations, the length is increased by four-thirds. As this process is repeated, the length of the figure tends to infinity as the length of the side of each new triangle goes to zero. Assuming this could be iterated an infinite number of times, the result would be a figure which is infinitely wiggly, having no straight lines whatsoever.

To calculate the dimension of the Koch Curve, we look at the image of the fractal and realize that it has a magnification factor of three and with each iteration, it is divided into four smaller pieces. Knowing this, we get

D = ln(4) / ln(3)
D = 1.3863 / 1.0986
D = 1.2619
The Koch Curve has a dimension of 1.2619.

Figure 5. The Koch Snowflake

As would be expected, the Koch Snowflake is generated in very much the same way as the Koch Curve. The only variation is that, rather than using a line of unit length as the intial figure, an equilater triangle is used. It is iterated in the same way as the Koch Curve. The length of the resulting figure tends to infinity as the length of the side of each new triangle goes to zero. Iterated an infinite number of times, the Koch Snowflake, like the Koch Curve, has absolutely no straight lines in it. This fractal, if magnified three times in any area, also displays the property of self-similiarity.

As mentioned above, the magnification factor of this fractal is three, and as with the Koch Curve, the number of divisions in each magnification is four. With this we get:

D = ln(4) / ln(3)
D = 1.3863 / 1.0986
D = 1.2619
The Koch Snowflake has a dimension of 1.2619.

### The Sierpinski Triangle

Figure 6. The Sierpinski Triangle

Unlinke the Koch Snowflake, which is generated with infinite additions, the Sierpinski triangle is created by infinite removals. Each triangle is divided into four smaller, upside down triangles. The center of the four triangles is removed. As this process is iterated an infinite number of times, the total area of the set tends to infinity as the size of each new triangle goes to zero.

After closer examinition of the process used to generate the Sierpinski Triangle and the image produced by this process, we realize that the magnification factor is two. With each magnification, there are three divisions of the triangle. With this data, we get:

D = ln(3) / ln(2)
D = 1.0986 / 0.6931
D = 1.5850
The Sierpinski Triangle has a dimension of 1.5850.

The Sierpinski Triangle is one of the easiest fractals to generate yourself. This particular program is written in C/C++ and uses the Borland graphics routines, making it easy to port to other languages on different platforms. The source code to this program is available here.

### The Lorenz Model

Figure 7. The Lorenz Model

The Lorenz Model is not a particularly difficult fractal to generate graphically. The source code for a program, written in C/C++, which will generate an image of the Lorenz Model is available here.

### The Mandelbrot set

Figure 8. The Mandelbrot set

Named after Benoit Mandelbrot, The Mandelbrot set is one of the most famous fractals in existance. It was born when Mandelbrot was playing with the simple quadratic equation z=z2+c. In this equation, both z and c are complex numbers. In other words, the Mandelbrot set is the set of all complex c such that iterating z=z2+c does not diverge.

To generated the Mandlebrot set graphically, the computer screen becomes the complex plane. Each point on the plain is tested into the equation z=z2+c. If the iterated z stayed withen a given boundry forever, convergence, the point is inside the set and the point is plotted black. If the iteration went of control, divergence, the point was plotted in a color with respect to how quickly it escaped.

When testing a point in a plane to see if it is part of the set, the initial value of z is always zero. This is so because zero is the critical point of the equation used to generate the set. Critical points are explained in depth here.

For a program, again written in C/C++, which will generate the Mandlebrot set graphically and allow you to explore the set, go here. For a program writting in BASIC which will generate the Mandelbrot set, go here.

### The Julia set

Figure 9. The Julia set

The Julia set is another very famous fractal, which happens to be very closely related to the Mandelbrot set. It was named after Gaston Julia, who studied the iteration of polynomials and rational functions during the early twentieth century, making the Julia set much older than the Mandelbrot set.

The main difference between the Julia set and the Mandelbrot set is the way in which the function is iterated. The Mandelbrot set iterates z=z2+c with z always starting at 0 and varying the c value. The Julia set iterates z=z2+c for a fixed c value and varying z values. In other words, the Mandelbrot set is in the parameter space, or the c-plane, while the Julia set is in the dynamical space, or the z-plane.

A program writtin in C/C++ which will graphically generate the Mandelbrot set can be found here. Its BASIC counterpart is located here.

### Logistic Equation

Figure 10. Diagram plotted for the logistic equation

This particular fractal has much more of a relevance to real-life than many other fractals. The logisitc equation is a model for animal populations. The actual equation used is t=c(1-t), where t is the population, between 0 and 1, and c is a constant representing the growth rate. Iteration of this equations results in the doubling route to chaos. For c equaling a value between one and three, the population will settle to a fixed value. In other words, one year the population is high, causing the population the next year to be low, causing a high population the year after. With this equation, the population cycle is spread out over four years. The period doubles faster and faster, resulting in the numbers 3.54, 3.564, 3.569, etc. When this value reaches 3.57, chaos occurs and the population never settles to a fixed point. For most values of c between 3.57 and 4, the population is chaotic.

In a period doubling situation, such as the logistic equation, the ratio of distances between the consecutive doubling parameter values as the equation is iterated to infinity is call Feigenbaun's constant. Based on computations by Jay Hill and Keith Briggs, the constant has a value of 4.669201609102990671853... The interpretation of this equation is that as you approach chaos, each periodic region is smaller then the previous by a factor which approaches Feigenbaum's constant. This constant is the same for any quadratic function of system that follows the periodic doubling route which results in chaos. The constant varies for funtions of a higher order.

## Real-Life Relevance And Importance of Fractals and Fractal Geometry

Fractals have and are being used in many different ways. Both artist and scientist are intrigued by the many values of fractals. Fractals are being used in applications ranging form image compression to finance. We are still only beginning to realize the full importance and usefullness of fractal geometry.

One of the largest relationships with real-life is the similarity between fractals and objects in nature. The resemblance many fractals and their natural counter-parts is so large that it cannot be overlooked. Mathematical formulas are used to model self similiar natural forms. The pattern is repeated at a large scale and patterns evolve to mimic large scale real world objects.

One of the most useful applications of fractals and fractal geometry in in image compression. It is also one of the more controversial ideas. The basic concept behind fractal image compression is to take an image and express it as an iterated system of funtions. The image can be quickly displayed, and at any magnification with infinite levels of fractal detail. The largest problem behind this idea is deriving the system of functions which describe an image.

One of the more trivial applications of fractals is their visual effect. Not only do fractals have a stunning aesthic value, that is, they are remarkably pleasing to the eye, but they also have a way to trick the mind. Fractals have been used commercially in the film industry, in films such as Star Wars and Star Trek. Fractal images are used as an alternative to costly elaborate sets to produce fantasy landscapes.

Another seemingly unrelated application of fractals and chaos is in music. Some music, including that of Back and Mozart, can be stripped down so that is contains as little as 1/64th of its notes and still retain the essence of the composer. Many new software applications are and have been developed which contain chaotic filters, similiar to those which change the speed, or the pitch of music.

Fractal geometry also has an application to biological analysis. Fractal and chaos phenomena specific to non-linear systems are widely observed in biological systems. A study has established an analytical method based on fractals and chaos theory for two patterns: the dendrite pattern of cells during development in the cerebellum and the firing pattern of intercelluar potential. Variation in the development of the dendrite stage was evaluated with a fractal dimention. The order in many ion channels generating the firing pattern was also evaluated with a fractal dimension, enabling the high order seen there to be quantized.