Cynthia Lanius

How to Encode

The Jurassic Park Fractal

 
Table of Contents
   Introduction

  Why study fractals?
    What's so hot about
    fractals, anyway?

  Making fractals
    Sierpinski Triangle
         Using Java
         Math questions
         Sierpinski Meets Pascal
    Jurassic Park Fractal
         Using JAVA
         It grows complex
         Real first iteration
         Encoding the fractal
         World's Largest
    Koch Snowflake
         Using Java
         Infinite perimeter
         Finite area
         Anti-Snowflake
            Using Java

  Fractal Properties
    Self-similarity
    Fractional dimension
    Formation by iteration

  For Teachers
    Teachers' Notes
    Teacher-to-Teacher

  Comments
    My fractals mail
    Send fractals mail

  Fractals on the Web
    The Math Forum

  Other Math Lessons
    by Cynthia Lanius

   
A Computer Folds Paper
(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:

First Iteration
R

 

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:

Second Iteration
R R L

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
  1. 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.

  2. 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.

  3. 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 Turn

Without actually tracing the figure for the fourth iteration, can you write out the code using the three rules?

  1. The middle entry in the table is always a right.
  2. The entries to the left of the middle are the entries of the table before.
  3. The entries to the right of the middle are opposites of the ones to the left.

Fourth Iteration
                                                           

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.

Challenge Problem

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.
Email any questions or comments to
lanius@rice.edu
 
Copyright 1997-2007 Cynthia Lanius
URL http://math.rice.edu/~lanius/frac/code.html