You are on page 1of 7

Tour 8: Constructing a SnowflakeIteration

Note: Iteration is a rich mathematical subject, so dont worry if you dont understand all the finer points the first time through. We hope that upon completing the tour youll be inspired to experiment, read further, and become more and more comfortable with this feature.

Iteration allows you to apply constructions, transformations, or other operations over and over again. It can be used not only to save time on constructions that involve repeated steps, but also to create figures such as intricate fractals. (A fractal, roughly speaking, is a figure that looks the same when viewed at different magnifications. The parts, in other words, are scale copies of the whole.) In this tour, youll start with a construction involving dilation and rotation. Youll then use the Iterate command to apply the same construction to smaller parts of the figure. The result of this process is a fractal called the Koch curve. Once youve constructed the Koch curve, youll do a second iteration to construct the interior of the curve. Youll then turn the entire figure into a custom tool that youll apply to the three vertices of an equilateral triangle, creating a beautiful shape called a Koch snowflake.

What You Will Learn


How to use Sketchpads Iterate command. How to change the appearance of iterated images. How to change the number of iterations in an iterated image. How to change the background color of a sketch.

56

The Geometers Sketchpad Learning Guide

Constructing a SnowflakeIteration

Understanding the Koch Curve


Before getting started, its worth understanding what the Koch curve is and how its formed. It was first described by Helge von Koch in 1904, long before there was a branch of mathematics called fractal geometry. Koch studied the curve that came to bear his name to show that a curve that fits in a finite region of space can be infinitely long. Heres how it works: Start with two points. Connect these points with a segment and divide the segment into thirds. Remove the middle third and construct the top two sides of an equilateral triangle above the missing section. Do the same thing to each of the four smaller segments formed. Keep performing the construction on smaller and smaller segments (to infinity, in theory).

The mathematical term for do the same thing is iterate. The fourth figure at right is the first iteration of the previous operation.

So, how does the result of this process show that a curve fitting in a finite region can be infinitely long? Well, at each stage of the construction, the curve is longer than at the previous stage. (Can you see by how much?) If the process were carried out infinitely many times, youd end up with an infinitely long curve that fits in a finite area! Of course, Sketchpad cant carry out an iteration infinitely many times, but it can iterate enough times to reveal the structure of the Koch curve and other fractals. In this tour, youll experiment with different depths of iteration, and youll see that it doesnt take too many to get a very finely detailed approximation of the Koch curve.

The Geometers Sketchpad Learning Guide

57

Guided Tour 8

Laying the Groundwork


The first step in any iteration is to actually do the basic operations you wish to later repeat by iterating. In this case, that means dividing a segment in three and building an equilateral triangle over the middle third, as described on the previous page.
1.

In a new sketch, choose Preferences from the Edit menu. On the Text page, choose For All New Points and click OK. Points will now be automatically labeled as you create them. Use the Segment tool to construct a horizontal segment from left to right in the sketch window. Hold down the Shift key while constructing the segment to keep it horizontal. Select point B and choose Mark Center from the Transform menu. Select point A and choose Dilate from the Transform menu. Leave the numerator of the Scale Factor 1 and enter 3 for its denominator, as shown at right. Click OK. A point is constructed 1/3 of the way from point B to point A. Repeat steps 3 and 4, except this time dilate point B 1/3 of its distance from point A. Double-click point B to mark it as a center. Select point A and choose Rotate from the Transform menu. Enter 60 for the angle, as shown at right, and click Rotate. A point appears above the others. Hide the original segment connecting the left and right points.
Rotate dialog box ( Mac OS X)

2.

A
After step 2

3. 4.

Dilate dialog box ( Mac OS X)

5.

B'

A'

After step 5

6.

7.

8.

58

The Geometers Sketchpad Learning Guide

Constructing a SnowflakeIteration 9. 10.

Use the Segment tool to connect the five points with segments, as shown below right. Relabel the three middle points to match the figure at right. To change a label, double-click the label itself with the Arrow or Text tool.
A C

D E B

After step 10

Iterating
Think for a moment about what youve done to points A and B : Initially there was a segment between them, but then you did some transformations and hid that original segment. Now imagine doing the same things to points A and C doing the same transformations on them and then hiding the segment between them. Imagine also doing these things to points C and D, D and E , and E and B. This is precisely what youll do in the next several steps. Thinking about it in this way should help you understand whats going on.
11.

Select points A and B and choose Iterate from the Transform menu. The Iterate dialog box appears, prompting you to match A and B.

Step 12: Clicking on point A to map it to itself

12.

You want to do to points A and C what you did to points A and B. So click on point A in the sketch to map point A to itself, as shown above. Then click on point C to map point B to point C . You should see A and C under First Image in the Iterate dialog box.

The Geometers Sketchpad Learning Guide

59

Guided Tour 8 13.

Choose Add New Map from the Structure pop-up menu in the Iterate dialog box. A second map appears, prompting you to once again map A and B to new points. This time, click on points C and D to do to points C and D what you did to points A and B. Repeat steps 13 and 14 once for points D and E and again for points E and B.

14. The keyboard shortcut for Add New Map is +A ( Mac) or Ctrl+A ( Windows). 15.

Youre almost ready to click Iterate, but notice in the preview in the sketch that the larger segments werent hidden from iteration level to iteration level. The next step will fix this. ( If youre not sure what were talking about here, just do the next step and observe the effect this has on the sketch.)
16. 17.

Choose Final Iteration Only from the Display submenu of the Iterate dialog box. Your Iterate dialog box should look like the one below. If it does, click Iterate. If it doesnt, highlight any boxes that are different and click on the proper points.

18.

Hide the four original segments.

Congratulations! Youve constructed a fractalthe Koch curve (or, more precisely, an iterated approximation of this curve). Drag points A and B to get a better idea of how its constructed.

60

The Geometers Sketchpad Learning Guide

Constructing a SnowflakeIteration

Iteration Depth, Background Color, and Full Orbit Iteration


By default, Sketchpad repeated the iteration three times. You can change the numberor depthof iteration to change the curve. Heres how:
You can use the + or keys on your standard keyboard or those on your numeric keypad ( if you have one). 19.

Select any part of the iterated image and press the + and keys on your keyboard. This increases and decreases the number of iterations. Return to iteration depth 3. The easiest way to do this is to press the key over and over until nothing changesthis is depth 1. Now press the + key twice to get to depth 3.

20.

We promised that youd be creating a snowflake, so it only makes sense to work against a blue background.
21.

Open the Preferences dialog box and go to the Color panel. Click on the Background color swatch. Use the controls to get a nice shade of sky blue. Click OK twice.

Now youll create a second iterated image of white polygon interiors that will form the snowflake itself.
22.

Select points C, D, and E and choose Triangle Interior from the Construct menu. With the new interior selected, choose Display | Color | Other. Use the controls there to produce white and click OK.

D A C
Step 22

23.

24. 25.

Repeat steps 1115. ( Dont choose Final Iteration Only, as in step 16: You do want to see the full orbit here.) Click Iterate. Try increasing or decreasing the iteration depth of both iterations (the curve and the interiors) simultaneously. To do this, select everything and use the + and keys as in step 19. Hide points C, D, and E.

26.

The Geometers Sketchpad Learning Guide

61

Guided Tour 8

The Koch Snowflake


From here its not too hard to construct the beautiful figure known as the Koch snowflake. First youll create a new custom tool to repeat everything youve done so far. Then youll construct an equilateral triangle and apply your new custom tool to its other two sides.
27. 28. You may need to scroll down or increase the size of your sketch window to see the rotated point.

Select everything in the sketch by choosing Select All from the Edit menu. Choose Create New Tool from the Custom Tools menu in the Toolbox. Enter the name Snowflake Edge and click OK. Rotate point A by 60 around point B. To do this, double-click point B to mark it as a center. Then select point A and choose Rotate from the Transform menu. The value for Angle should already be set to 60, so click Rotate. Construct the triangle interior defined by the three points in your sketch. See step 22 if you need a reminder how to do this. Apply the Snowflake Edge tool to the other two sides of the new interior. To do this, choose Snowflake Edge from the Custom Tools menu. Click on B and A to make one side and then on A and A to make the other.

29.

30.

What would happen if you clicked on points in the order opposite to that described in step 31? Try it and see.

31.

32.

Hide all points in the sketch, save it (for posterity), then kick up your heels and relaxyouve completed the introductory tours!
The Geometers Sketchpad Learning Guide

62

You might also like