Home: Menu Reference: Transform Menu: Iterate: How To Construct a Sierpinski Gasket
How To . . . Construct a Sierpinski Gasket
Because iteration can be applied to any type of Sketchpad construction, the options that support it may at first seem bewilderingly complex. The best way to develop an understanding of iteration is to work through examples. In this example, you’ll use iteration to define a fractal known as the Sierpinski gasket. This fractal is the limit of the process of replacing a triangle by three smaller interior triangles; then replacing each of these three interior triangles by three even smaller triangles; and so on. Since at each stage you are replacing a pre-image triangle by three different image triangles, you’ll need three mappings to define the fractal.
1. In a new sketch, use the Segment tool to construct a triangle ABC in your sketch.
2. Construct the midpoints of your triangle’s edges. Use the Text tool to label the vertices A, B, and C, and the midpoints D, E, and F, as in the illustration below.
You now have a pre-image triangle and—implicitly—many smaller triangles, such as triangle AFE, triangle EBD, and so forth. Note that the three smaller triangles, triangle AFE, triangle FBD, and triangle EDC, form the interior “corners” of your original triangle.
3. Select the three points A, B, and C, and choose Iterate from the Transform menu.
4. In the Iterate dialog box, map
This maps the original triangle to the lower-left corner triangle FBD. You should see a series of triangles iterating into the lower-left corner of your original triangle.
Note that in this step you map B to itself, as this vertex is the same in both the original triangle and in the lower-left corner triangle.
5. Use the Structure pop-up menu to add a new mapping to your iteration rule. In the new mapping, map
This now iterates your pre-image triangle to the lower-right, while simultaneously—by the previous map—iterating each image to the lower-left.
6. Use the Structure pop-up menu again to add a third and final mapping to your iteration rule. In this third mapping, map
This iterates your previous mappings toward the upper corner of the triangle.
7. Click the Iterate button to dismiss the dialog.
Be careful not to increase the number of iterations too quickly. Since each iteration adds three times as many new triangles as the previous iteration, the construction quickly becomes very complex! Sketchpad will start to slow down if your sketch contains iterations more complex than your computer can handle gracefully.
With your completed iteration selected, you can increase or decrease the number of displayed iterations by pressing the + or – key on the keyboard.
If you could iterate an infinite number of times, the result of this process would be a Sierpinski gasket. If you imagine the area of your initial triangle as having been replaced by the area of three smaller triangles at each step, think for a moment about what happens to the total area of all of the smaller triangles as you increase the number of iterations. Since the three smaller triangles didn’t cover the initial triangle, the area must be getting smaller. Thus with each iteration the area becomes smaller. What’s the limit of the area? How do you know? What happens to the perimeter? Fractals frequently give rise to surprising properties.
You can visualize the areas by repeating the above steps in a new sketch, using a triangle ABC in which you have used Polygon Interior to construct the triangle interior. When you’re done specifying your three mappings and have dismissed the Iterate dialog box, be sure to select and hide the original interior of triangle ABC so you can see the iterated smaller triangle interiors “inside” your original triangle interior.
See also
Straightedge Tools
Selecting and Deselecting Objects
Multiple Iteration Maps
Using the Iterate Dialog Box
Iterations and Iterated Images
Polygons and Other Interiors
Interior
Iteration Properties