How to Encode
The Jurassic Park Fractal
Fractals on the Web
Other Math Lessons
(Well, Sort of)
We can let a computer simulate the process of paper folding.
How can a computer fold paper? We must analyze the paper folding process and figure out a way to encode it for the computer. Grab a strip of paper and follow along while we try to figure this out.
Fold the strip of paper end-to-end, and open it out again at a right angle. This is the real first iteration with one fold. Imagine that this is a road, and you're driving along on this road. Start at the top and follow the path. Notice that you travel 1 unit, take 1 right turn, and travel 1 more unit. Since the distances traveled are the same, we'll disregard that and focus on the turns.
We encode the First Iteration this way:
Let's look at the second iteration with two paper folds. Start at the top blue point and follow the path again. Hey! The first half of the trip is the same as before! The first iteration (blue) is contained in the second. So on our trip we start with a right turn, make another right turn, and then a left.
We encode the Second Iteration this way:
Rules, Rules, Rules
I think we're ready to create some rules to encode the fractal without even having to look at the folded paper.
Start at the blue top corner and trace the third iteration. Notice three important points about this iteration that are true of all iterations. Think hard now, because here we go!
The Encoding Rules
- The middle entry in the table is always a right.(In this case where red meets green). Take the strip of paper in your hands and fold it once. Now think about this. No matter how many times you eventually fold the paper, this will be the middle fold. So the middle entry will always be a right.
- The entries to the left of the middle are the entries of the table before.This is because every iteration starts out with the iteration before it.
- The entries to the right of the middle are opposites of the ones to the left.In other words, if the first entry is a right, the last entry is a left. If the second entry is a right, the next-to-last entry is a left. Fold a paper twice to see why. It's the innie-outie principle. Inspect the folds on each side of the middle fold. The first fold and the last fold snuggle into the same fold - one an innie and one an outie. That means one is a right turn and one's a left.
Let's use these rules to create the table for the Third Iteration.
Rule No. 1: Put an R in the middle.
Third Iteration R
Rule No. 2: Copy the Second Iteration code onto the left side.
Third Iteration R R L R
Rule No. 3: Since the first turn is a right, make the last a left, etc.
Third Iteration R R L R R L L
Your TurnWithout actually tracing the figure for the fourth iteration, can you write out the code using the three rules?
The middle entry in the table is always a right. The entries to the left of the middle are the entries of the table before. The entries to the right of the middle are opposites of the ones to the left.
Check your answer.Without even looking at the figure for the fifth iteration, you could write out the code just by using the three rules. And that's how the computer simulates the paper-folding process, just by following the rules. Now try the challenge of encoding the Fifth Iteration.
Check your answer.
Download software that creates fractals by simulating the paper-folding process.
Or use square grid paper to draw the fifth iteration from your encoding table.
Copyright 1997-2007 Cynthia LaniusURL http://math.rice.edu/~lanius/frac/code.html