The standard Koch curve is constructed by a iterative process that begins with a line segment of length 1. Divide the segment into three equal segments of length 1/3 and replace the middle segment by the two sides of an equilateral triangle of the same length as the segment being removed. Now repeat, taking each of the four resulting segments, dividing them into three equal parts and replacing each of the middle segments by two sides of an equilateral triangle. Continue this construction forever.

This process can be generalized by choosing two parameters: a number *c* with 0 < *c* < 1 that defines the length of the removed subinterval, and an integer *n* ≥ 3 that defines a regular *n*-gon that replaces the removed segment. This produces the (*n*, *c*)-Koch curve. The dialog box allows you to specify the values of *c* and *n*. Pressing the Enter key after you type a new value will redraw the image for the new value. You can also click on the Draw button to redraw the image. You can copy the image to the clipboard with the standard Copy menu command (or type ctrl-C), or you can click in the picture box with the right mouse button to get a contextual menu with options to copy the image or save it to a file in gif, png, jpeg, or bitmap format.

You can adjust the value of *n* up or down using the buttons labeled with the plus and minor signs. You can adjust the value of *c* using the slider. When the slider is active you can increase/decrease the value of *c* by 0.005 using the Page Up and Page Down keys, respectively. Use the right and left arrow keys to increase/decrease the value of *c* by 0.001. Use the up and down arrow keys to increase/decrease the value of *n*. Changes made while the slider is active will be reflected immediately in the drawing. If the drawing becomes too large to view the entire image, click on the Draw button or press the "D" key.

Select a radio button to preview the first, second, or third iteration for the (*n*, *c*)-Koch curve for the current values of *c* and *n*. The slider is likely to be a bit sluggish when changing the value of *c* for the third iteration for large values of *n*. It is best to use the page up/down or arrow keys to change *c* in that case.

Check "Use recursion" (which is the default value) to quickly draw each iteration in the fractal window in the deterministic mode using recursion. The fractal will be drawn using the color chosen in the Koch Design window unless you choose "Overlay Images" in the Draw menu. To use recursion you must also have the horizontal or vertical unit line chosen as the initial polygon. Any other choice will cause the program to use the usual deterministic drawing method. You can only use recursion while the Line Fractal Design window is displayed or minimized.

**Warning**: Attempting to draw too many iterations using recursion may crash the program and/or freeze your computer. The program therefore has an upper limit on how many iterations it will attempt using recursion. Once you reach that limit, additional iterations will be drawn using the standard deterministic method. There is no way to stop the program in the middle of a recursive drawing except by using ctrl-alt-del to kill the application, so be careful using recursion!

(4, 1/3)-Koch Curve | ||

iteration 1 | iteration 2 | iteration 3 |

The (*n*, *c*)-Koch curve is self-avoiding if the curve does not cross itself. Click on the "self-avoiding" button to compute the special value **C*** for which the Koch curve will be self-avoiding for all *c* less than **C***. A Koch curve may be self-avoiding for some *c* values greater than **C***, but is guaranteed to be self-avoiding for 0 < c < **C***. See the paper by Keleti and Paquette referenced below.

Once you have chosen the values of *n* and *c*, click on the "Create IFS" button to create the IFS in the IFS window. The program will, by default, use a unit horizontal line to illustrate the design. The picture in the design window will be the same as iteration 1 for that default design polygon.

A nice way to see the early steps of the construction is to choose the deterministic method and choose "Overlay Images" from the Draw menu. Be sure to keep the unit horizontal line as the initial polygon. Here are the first three iterations of a (7, 2/9)-Koch curve.

The "Cancel" button will close the window and cause the program to revert back to the previous IFS.

Keyboard shortcuts

- In the text box for
*n*or*c*, press the Enter key to draw the chosen iteration - When the slider is activated:
- Page Up to increase the value of
*c*by 0.005 - Page Down to decrease the value of
*c*by 0.005 - Right arrow to increase the value of
*c*by 0.001 - Left arrow to decrease the value of
*c*by 0.001 - Up arrow to increase the value of
*n*by 1 - Down arrow to decrease the value of
*n*by 1

- Page Up to increase the value of

(7, 0.15)-Koch curve |

For further information, see the paper "The Trouble with von Koch Curves Built from n-gons" by Tamás Keleti and Elliot Paquette in the *American Mathematical Monthly*, Vol. 117, No. 2 (February 2010), 124-137. An online supplement containing an interactive Java applet is available at MathDL, the MAA Mathematical Sciences Digital Library.