






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Notes; Class: COMPUTER GRAPHICS; Subject: Computer Science; University: Rice University; Term: Fall 2008;
Typology: Study notes
1 / 10
This page cannot be seen from the preview
Don't miss anything!







Lecture 6: Fractals from Iterated Function Systems He draweth also the mighty with his power: Job 24:
1. Generating Fractals by Iterating Transformations The Sierpinski gasket and the Koch snowflake can both be generated in LOGO using recursive turtle programs. But in CODO there is no recursion. How then can we generate fractals in CODO? Consider the first few levels of the Sierpinski gasket depicted in Figure 1. We begin with a triangle. The next level contains three smaller triangles. (Ignore the central upside-down triangle.) Each of these smaller triangles is a scaled down version of the original triangle. If we denote the vertices of the original triangle by € P 1 , P 2 , P 3 , then we can generate the three small triangles by scaling by € 1 / 2 around each of the points € P 1 , P 2 , P 3 -- that is, by applying the three transformations € Scale ( P 1 ,1/ 2) , € Scale ( P 2 , 1 / 2), € Scale ( P 3 ,1/ 2) to € Δ P 1 P 2 P 3. Now the key observation is that to go from level 1 to level 2, we can apply these same three transformations to the triangles at level 1. Scaling by € 1 / 2 at any corner of the original triangle maps the three triangles at level 1 to the three smaller triangles at the same corner of level 2. We can go from level 2 to level 3 in the same way, by applying the transformations € Scale ( P 1 ,1/ 2) , € Scale ( P 2 , 1 / 2), € Scale ( P 3 ,1/ 2) to the triangles in level 2. And so on and so on. Thus starting with € Δ P 1 P 2 P 3 and iterating the transformations € Scale ( P 1 ,1/ 2) , € Scale ( P 2 , 1 / 2), € Scale ( P 3 ,1/ 2) n times generates the nth level of the Sierpinski gasket. Figure 1. Levels zero through five of the Sierpinski gasket.
Let’s try another example. Consider the first few levels of the Koch curve illustrated in Figure
M 4 = Scale ( C , 1 / 3 ) Method 2: Building each transformation by specifying the image of three points. € M 1 = AffineTrans ( A , B , C ; A , F , D ) € M 2 = AffineTrans ( A , B , C ; D , H , B ) € M 3 = AffineTrans ( A , B , C ; B , I , E ) € M 4 = AffineTrans ( A , B , C ; E , G , C ) Notice that in this example, both methods generate the same set of transformations. The first method may seem more natural, but the second method is often much simpler to apply. For yet another approach to deriving these same transformations, see Exercise 6. Figure 4: The Koch curve. Key points along the curve are labeled to help specify the four transformations in the IFS that generate this curve.
3. Fractals as Attractors We have explained how to find an IFS to generate a given fractal curve, but we still do not know on what shape to start the iteration. That is, we still do not know how, in general, to find level 0 of a given fractal curve. For the Sierpinski triangle, we know to begin with an ordinary triangle, and for the Koch curve we know to begin with a triangular bump. But how do we begin for fractals with which we are not so familiar such as the fractals shown in Figure 3? Fractals generated by recursive turtle programs are independent of the base case. Could the same independence property hold for fractals generated by iterated function systems? Yes! Figure 5 illustrates this independence for the Sierpinski gasket. The same IFS is applied to three different base cases: a square, a horizontal line, and a single point. In each case after a few iterations the figures all converge to the Sierpinski gasket.
Figure 5: Levels 1,3,5 of the Sierpinski gasket. On the top, the base case is a square; in the middle, the base case is a horizontal line; on the bottom, the base case is a single point. Fractals are attractors. No matter what geometry we choose for the initial shape, the subsequent shapes are inexorably attracted to the fractal generated by the IFS. We shall explain the reason for this attraction in the next lecture. For now it is enough to know that it does not matter how we choose the initial shape. The base case is irrelevant. If we choose the right IFS, the fractal we want will magically emerge no matter what geometry we choose at the start.
Figure 7: Levels 1,3,5 of the fractal staircase. The base case is the large square, which is also the condensation set. Here the identity transformation is included in the IFS. Figure 8: Levels 1,3,5 of the fractal staircase. The base case is a pentagon and the condensation set is the large square. Notice that the pentagons converge to the diagonal of the staircase, and that the square generates the main part of the fractal. Here the identity transformation is not included in the IFS, but at each level after applying the transformations in the IFS, the large square is added back into the curve.
5. Summary Fractals are fixed points of iterated functions systems. This observation allows us to find transformations that generate a given fractal curve by finding a set of transformations that map the fractal onto itself as the union of a collection of smaller self-similar copies. Fractals are attractors. No matter what base case we choose to initiate the iteration, for a fixed IFS the shapes we generate will automatically converge to the identical fractal. Fractals may have condensation sets. We can incorporate these condensation sets into our scheme for generating fractals from an IFS by adding the condensation set back into the curve at every stage of the iteration after applying the transformations in the IFS.
Exercises
b. Using part a and the result in Exercise 7, show that € 0 < Dimension ( Cantor Set ) < 1. c. Show that the length of the Cantor set is zero. d. Consider the set generated by starting with the unit interval and recursively removing the middle half of every line segment. i. Find the transformations in the iterated function system that generate this fractal. ii. Using the result in Exercise 7, show that the dimension of this set is €
Programming Project: