|von Koch Curve||Lab Report|
The purpose of this project is to show how to create a von Koch curve, including a von Koch snowflake.
Swedish mathematician Helge von Koch introduced the "Koch curve" in 1904. Starting with a line segment, recursively replace the line segment as shown below:
The single line segment in Step 0, is broken into four equal-length segments in Step 1. This same "rule" is applied an infinite number of times resulting in a figure with an infinite perimeter.
Here are the next few steps:
If the original line segment had length L, then after the first step each line segment has a length L/3. For the second step, each segment has a length L/32, and so on.
After the first step, the total length is 4L/3. After the second step, the total length is 42L/32, and after the kth step, the length is 4kL/3k. After each step the length of the curve grows by a factor of 4/3. When repeated an infinite number of times, the perimeter becomes infinite. For a more detailed explanation of the length computation, see [Peitgen92B, p. 107] or Eric Weisstein's World of Math.
For the von Koch "snowflake," start with an equilateral triangle, and apply the "rule" above to each of the line segments. Assume each side of the equilateral triangle is a units long. The area of this equilateral triangle can be computed by breaking it into two 30-60-90 triangles:
The height of one of these two triangles is and the base is . So, the area of the equilateral triangle (two 30-60-90 triangles) is . In each step k, we add the area of nk little equilateral triangles with sides sk. The area at step k can be written:
Convince yourself that n1 = 3, n2 = 3·4, n3 = 3·4·4, ..., and nk = 3·4k-1. The sides of the little triangles are scaled down by a factor of 3 in each step, i.e., sk = (1/3)na. The area recurrence formula can now be written:
The total area can be computed by evaluating the geometric series formed by the above recurrence formula. The total area after an infinite number of steps is
For a more detailed explanation of the area computation, see [Peitgen92B, p. 167] or Eric Weisstein's World of Math.
In summary, the von Koch snowflake has an infinite perimeter, but a finite area!
The von Koch curve has a self-similarity, Hausdorff dimension, D = log 4/ log 3 = 1.2619. (A line is 1D and a square is 2D). See [Peitgen92A] or [Devaney89].
The "modified" Koch curve [Falconer90, pp. 120-121] uses a rectangle in each iteration instead of a triangle. (The height of the rectangle is the same as the height of the triangle in Step 1 above.)
Feel free to experiment with other "rules."
Also see Experiments in Computing: Laboratories for Introductory Computer Science in Turbo Pascal by Kenneth Abernethy and J. Thomas Allen, Jr., PWS-Kent Publishing, Boston, 1993, Chapter 20, Recursion in Fractal Geometry. The Koch Snowflake Curve, pp. 342-348; Generalized Snowflake Curves, pp. 349-350.
Materials and Equipment
Delphi 4/5 (to recompile)
VGA display with 640-by-480 screen in high/true color display mode
(Outline for now)
ScreenKochCurve unit and form:
- DrawVonKoch method
- ShellExecute to link to web site
VonKochCurveLibrary unit (separates computations from user interface):
- TVonKochCurve Class with method Draw (draws on any canvas: screen, printer, or bitmap)
- NextSegments (Local routine to Draw, which is called recursively. Since NextSegments works with any line segment, the points making up the polygon are rotated before this routine is ever called.)
- TRealPoint, RealPoint
- TRealRect, RealRect
- TDigitalPantograph [for mapping real (x,y) to integer (i,j); "corrects" direction of y-dimension]
Tell your friends: the von Koch snowflake has an infinite perimeter, but a finite area! What does that really mean?
von Koch curve, von Koch snowflake, fractals, self-similarity, Hausdorff dimension, digital pantograph, world-to-pixel mapping, recursion
Delphi 4/5 Source and EXE: VonKoch.ZIP (201 KB)
Turbo Pascal 7 Source and EXE: Koch.ZIP
Note: If you have a fast machine (233 MHz Pentium II or faster), you'll likely need a patch to run this TP 7 programs.
See this fix for "Runtime Error 200" for Turbo Pascal.
Add FormResize handler.
Links: (Also see Fractals and Chaos Section of efg's Mathematics Reference page)
|Chaos Theory: A Brief Introduction
|Fractal Geometry: A Simple Explanation
|Fractals and Fractal Geometry
|Koch's Flakes in "Fractals Polyhedra,
Flakes & L-trees"
|"Koch Snowflake" from Eric Weissteins's World of
|[Devaney89]||Robert L. Devany and Linda Keen (editors)
Chaos and Fractals -- The Mathematics Behind the Computer Graphics
Figure 2, p. 114, Hausdorff dimension
American Mathematical Society, 1989.
Fractal Geometry: Mathematical Foundations and Applications
Example 9.5, Modified von Koch Curve, pp. 120-121
John Wiley & Sons, 1990.
|[Peitgen92A]||Heinz-Otto Peitgen, Hartmut Jürgens, Dietmar Saupe
Chaos and Fractals -- New Frontiers of Science
Section 2.4, The Koch Curve, pp. 89-93
|[Peitgen92B]||Heinz-Otto Peitgen, Hartmut Jürgens, Dietmar Saupe
Fractals for the Classroom
Section 3.2, Geometric Series and the Koch Curve, pp. 164-170
|Updated||14 Jun 2009|
|Since||9 Apr 2000|