Fractals
by Dale Winter
In several of the lessons we have described objects as fractals, for example, the Julia set known as the ‘Rabbit.’

The important property that we were trying to capture by the label ‘fractal’ was the property of self-similarity. When you zoom in on a part of the Julia set, you may notice a strong resemblance between the part of the Julia set that you have zoomed in on, and the original view of the Julia set before zooming.
For example, if you look at the colored picture of The Rabbit, there is a large, black region in the center of the picture that you might think of as the body of the rabbit. Attached to the body of the rabbit are some small black areas about half-way along each side of the body, some larger areas that you might think of as the legs and the ears, and some larger areas that you could think of as the head and the tail of the rabbit.

If you look carefully at the head of the rabbit, there are two small lobes about halfway along its length, just like the body of the rabbit. If you pretend that the head of the rabbit is going to be the body of a smaller rabbit, then there are lobes that could be the head and tail of the smaller rabbit.

Although these sets are clearly very intricate, complicated and detailed, they also have structure and regularity. In this lesson we will formally defines what it means for a mathematical object (such as a set) to be a fractal, and discuss some of the mathematics involved in constructing and studying fractals.
Fractals can be understood as the result of iterating geometric constructions. For example, if we use a geometric construction:
1. Start with a circle,
2. Draw circles of half the previous diameter at 12 o’clock, 3 o’clock, 6 o’clock and 9 o’clock on the circle that you have just finished,
3. Repeat step 2,
then patterns resembling the sequence of pictures shown below would be drawn.


· Drawing fractals is something that computers excel at. A particularly useful feature of some high level programming languages (such as C and Pascal) is recursion. Recursion is where a function or procedure can call itself while executing. Can you see how recursion could be applied to drawing pictures of fractals?
· The text given immediately below is a code fragment written in ‘C.’ It is an example of using recursion to draw a picture of a fractal. Can you explain how it works?
void draw_square( int x, int y, int len);
/* This function draws a square with its center at (x, y) and with sides of length ‘len.’ */
void draw_squares( int x, int y, int length, int when_end);
main()
{
int x_center; /* x coordinate of center of square */
int y_center; /* y coordinate of center of square */
int length; /* side length of square */
int bottom_out; /* side length when recursion stops */
bottom_out = 2;
x_center = 256;
y_center = 256;
length = 256;
draw_ squares(x_center, y_center, length, bottom_out);
}
void draw_square( int x, int y, int len);
/* This function draws a square with its center at (x, y) and with sides of length ‘len.’ */
{
/* Graphics instructions for draw_square go in here */
}
void draw_ squares( int x, int y, int length, int when_end)
{
if (length >= when_end)
{
draw_square(x, y, length);
draw_ squares( x + length/4 , y + 3*length/4 , length/2, when_end);
draw_ squares( x + 3*length/4 , y - length/4 , length/2, when_end);
draw_ squares( x - length/4 , y - 3*length/4 , length/2, when_end);
draw_ squares( x - 3*length/4 , y - length/4 , length/2, when_end);
}
else
{
return();
}
}
· Can you devise a way to use recursion to write a program that will draw pictures of fractals? (Hint: one condition that you will have to supply is a ‘bottom out’ condition. Eventually the size of the objects that the computer is trying to draw will be smaller than it can actually draw on the screen. At this stage, there is no point to continuing the recursion - it has bottomed out - so you tell the computer program to stop.)
As we have seen in the previous thinking and programming opportunity, pictures of fractals may be created by iterating a geometric construction. The fractal image created in the previous thinking and programming opportunity will probably look something like the following picture.

The fractal picture used to illustrate the notion of iterating a geometric construction looked like the following picture.

Both of these pictures are very artificial in a sense - neither of them looks very much like anything that could possibly occur in nature. This might suggest that fractals are very esoteric and abstract - purely mathematical abstractions. This is not the case, however. Many objects that occur in nature exhibit the same kinds of patterns and regularity that are evident in the fractal pictures that we have looked at. Well-known examples are ferns.

· A sketch of a fern frond is shown below. In what ways is it similar to the patterns that we have considered so far?

· Can you think of other phenomena or organisms in nature that have some connection to fractals?
· The movie "Star Trek II: The Wrath of Khan" uses fractals to create natural-looking space and planet-scapes. If you ever watch this movie, see if you can spot places where fractals have been used.
We have given a few examples of fractals, and defined them as iterations of geometrical constructions. A slightly more mathematical definition of a fractal follows.
Definition
A fractal is a geometrical figure that has the following two properties.1. The geometrical figure has self-similarity.
2. The geometrical figure has a dimension that is not an integer.
We have had some experience of what self-similarity means through our examination of Julia sets. The second part of the definition is a lot more cryptic, however. How could a geometrical figure have a non-integer dimension? Familiar geometrical objects always have a dimension that is an integer, as illustrated below. (The geometrical figures are drawn in black, and the dimensions that the figure has are indicated in red.)

Although it is fairly easy to see how you could have a one or two dimensional geometrical figure, it isn’t so easy to imagine how you could have a figure that has a dimension that isn’t an integer.
In the next few sections, we will investigate some examples of fractals to develop ideas that we can use to develop a deeper understanding of the notion of dimension, and then conclude the lesson with a mathematical discussion of what it means for a geometrical figure to have a dimension that is not an integer.

· One way to imagine how a geometrical figure with a dimension that is not an integer is to consider the following method of constructing the Sierpinski triangle. We start with a two dimensional figure (a filled-in triangle), and steadily remove sections from it. See the diagram below.

· At each stage of the iteration, the remaining geometrical figure consists of a collection of two-dimensional figure. If the geometric process outlined above was iterated indefinitely, would there be any two-dimensional regions remaining? How could you prove your conclusion rigorously?
· If the geometric construction described above is iterated indefinitely, can the resulting figure be described using a one dimensional figure? Why or why not? If you think that the resulting figure can be described using a one dimensional figure, explain how you would do this? (You might like to look into the subject of space-filling curves here.) If you don’t believe that the resulting figure can be described using a one-dimensional object, then try to construct a rigorous proof that explains why not.
The Cantor Set
The Cantor set is a famous construction in mathematics, which is much older than the relatively recent interest in fractals and fractal geometry. The Cantor set is a very simple set to describe (although it is not quite so easy to study!), and it is perhaps the simplest example of a fractal.
The Cantor set can be constructed by starting with a line segment, and then removing the middle third of the segment. This leaves two sub-segments. The geometric construction is iterated by removing the middle thirds of these, and so on. See the illustration below.

The object that remains when this geometrical construction has been iterated an infinite number of times is the Cantor set.

· How do you know that there are any points in the Cantor set at all? (After all, if all of the points in the line segment had been removed, then we would just be left with and empty set.)
· How does the concept of self-similarity apply to the Cantor set? (Hint: if the line segment that you start with is the portion of the real number line between 0 an 1, then what effect would multiplying the points in the left hand side of the Cantor set by 3 have?)

· (Here, assume that the line segment that you started with was the portion of the real line between 0 and 1.) The function
f(x) = 3x
maps the left part of the Cantor set onto the whole of the Cantor set. Mathematically, this can be confirmed by observing that the function f(x) = 3x is
One-to-one If x1 and x2 are possible input values of f(x) then:
f(x1) = f(x2) if and only if x1 = x2
and,
Onto If y1 is a point in the set of possible output values of the
function f(x), then there is a point, x1, in the set of possible
input values so that:
y1 = f(x1).
· Prove that, if the set of input values is the left side of the Cantor set, and the set of possible output values is the whole Cantor set, the function
f(x) = 3x
is one-to-one and onto.
· If two sets have a function between them that is one-to-one and onto, then (in some sense) it means that the two sets have the same number of elements. The working described above suggests that the left side of the Cantor set, and the whole Cantor set have the same number of elements. But the left side of the Cantor set is contained in the whole Cantor set! Can any sense be made out of this situation?

· At each stage in the construction of the Cantor set, the geometrical object created consisted of a collection of small line segments, that is, a collection of one dimensional geometrical figures. Does the Cantor set contain any one-dimensional regions?
· At each stage in the construction of the Cantor set, the geometrical object created consisted of points that were the end-points of line segments, and points that weren’t the end-points of line segments. What about the Cantor set? Is every point that ends up in the Cantor set the end point of a small line segment at some step during the iterative process that was used to construct the Cantor set?
· (Here, assume that the line segment that you started with was the portion of the real line between 0 and 1.) The point
![]()
is in the Cantor set. Can you account for this fact? How does this change your conclusions in the previous part of this thinking opportunity?

· Consider the geometrical process that is used to construct the Cantor set one more time.

· Define two functions as follows:
· M(n) is the number of line segments at iterative step n.
· L(n) is the length of each line segment at iterative step n. (Say that the starting length is L0.)
· Find formulas for both of these functions. The total length remaining at iterative step n is:
T(n) = M(n) × L(n).
· What happens to the length of the Cantor set as the number of iterations increases? What is the ‘length’ of the Cantor set?
The Sierpinski Triangle Revisited
We have already described one way to construct the Sierpinski Triangle (pictured below) through removing triangular regions from a filled-in triangle.

Another process that can be used to construct the Sierpinski Triangle is given below. The method described here lends itself to implementation as a computer program.
Step 1
Take a triangle like the one pictured below. Within it, draw three new triangles, each with side lengths exactly one half that of the original triangle.

Step 2
In each of the three new triangles drawn in step 1, draw three new triangles (for a total of nine drawn altogether), each with side lengths one quarter that of the original triangle.

Step 3
In each of these nine triangles, draw three new triangles (for a total of 27), each with sides one eighth of the length of the very first triangle that you started with. Continue this process with larger numbers of smaller triangles, until the size of the triangles to be drawn is so small they cannotbe accurately drawn using your drawing process (e.g. plotting points on a
computer screen).

The resulting geometrical figure is the Sierpinski Triangle.

· The previous method used to draw the Sierpinski Triangle started with a two-dimensional region and proceeded by removing two-dimensional regions from this. At each point of the construction, what was the dimension of the geometrical figure?
· The latest method used to draw the Sierpinski Triangle started with a one-dimensional region and proceeded by adding one-dimensional regions to this. At each point of the construction, what was the dimension of the geometrical figure?
· The resulting geometrical figures resemble each other (i.e. after the geometrical construction has been iterated a number of times, the pictures look the same). However, since the pictures that we examine are the result of only a finite number of iterations, one figure will actually be a collection of two dimensional regions, whereas the other figure will actually be a collection of one-dimensional regions. Mathematically, this makes them very different. How can you be sure that the figures obtained after the geometric constructions have be iterated indefinitely will be, mathematically speaking, precisely the same?

· Modify the code that you developed earlier for drawing fractals based on squares to draw fractals that are based on triangles. See if you can modify the
draw_squares function to make a program that will draw a picture of the Sierpinski Triangle.

· Another fractal that is often given is the Koch Snowflake. To see a movie of this fractal being drawn and a brief discussion of it, *******CLICK HERE*****

·
There are patterns in the process of iterating the geometrical construction described above. For example, if the initial side length is
, then the side length,
, of the triangles drawn in the nth iteration of the process is given by:
![]()
· What other patterns do you see?
· How can you quantify these patterns?
· Can you explain how the concept of self-similarity applies to the Sierpinski Triangle?

· (In this thinking opportunity, we will concentrate on the ‘removal’ method of constructing the Sierpinski Triangle, as illustrated below.)

· Suppose the triangle in the n = 0 case has dimensions as indicated below. Find functions that give:
· M(n) = the number of filled in (black) triangles at the nth iterative step.
· A(n) = the area of each filled in (black) triangles at the nth iterative step.

· The total area that is filled in at the nth iterative step is given by:
T(n) = M(n) × A(n) .
· What is the behavior of T(n) as n increases? What is that area that is filled in on the Sierpinski Triangle?
Describing Fractals: Fractional Dimensions
When discussing the dimensions of geometrical figures, we have taken a very intuitive approach. For example, a line has only length so it has one dimension, a square has length and width so it has two dimensions and so on. This intuition works well with familiar objects like lines and squares. The intuition does not work so well with an object like the Sierpinski triangle. As we observed, when the geometric construction behind the Sierpinski triangle

produces a collection of two dimensional figures at each step of the iteration. However, as we observed, when the geometric construction is iterated indefinitely there are no longer any two dimensional regions. On the other hand, the Sierpinski triangle cannot be constructed (at least from a finite number of iterations) from a finite number of one-dimensional objects (like line segments). It is not very clear exactly how you might make a statement like ‘this object only has length’ concerning the Sierpinski triangle. In this last part of the lesson, we will investigate a more formal way to describe the concept of dimension that will be readily applicable to fractals.
Let’s start by considering two familiar objects a line segment (one dimensional) and a square (two dimensional). The one common theme that we have developed for fractals is that they have the property of self-similarity.
If we start with a line segment and divide it in half, we are left with two perfect copies of the line segment, each of which would have to be doubled in size in order to re-create the original line segment.

If we started with a square and divided each side in half, we would be left with four perfect copies of the original square. The side lengths of the new squares would have to be doubled in order to re-create the original square.

How can we get a notion of dimension from these observations? If we divide the ‘side’ of a line segment into n identical pieces, then the number of miniature copies of the original line segment created is n1 (= n). If each side of a square is divided into n identical pieces, then the number of miniature copies of the square created is n2. In these cases, the exponent is the dimension. We can get at the exponent by taking the logarithm,
log(number of tiny copies) = (dimension) × log(n).
The number log(n) can be recognized as the logarithm of the factor that the sides of each tiny copy would have to be multiplied by in order to re-create the original geometric figure that you started with. The formula given above could then be turned into a definition of the dimension by re-writing it as shown below.
Definition The dimension (D) of a geometrical object with the property of
self-similarity is given by:
.

· Use the definition of dimension to verify that the fractals considered in this lesson have dimensions that are not integers. For example, verify that:
|
Object |
Dimension |
|
Cantor Set |
|
|
Sierpinski Triangle |
|
· Why does it make sense that the dimension of the Cantor set is less than 1? Why does it make sense that the dimension of the Sierpinski triangle has a dimension between 1 and 2?

· Can you use the definition of dimension and the pictures of the Mandelbrot and Julia sets to find approximate values for the dimensions of these sets?
Conclusion
Hello friend,
If you have made it this far through these lessons you obviously have a great deal of natural intelligence, curiosity and interest in mathematics. I hope that these lessons have provided avenues for stimulating your interest in mathematics. I hope that you will pursue mathematics, continue beyond the scope of these lessons, and have further significant and rewarding interactions with math.
Thank you for your interest,
Dale Winter.