[alogo] General Koch snowflake

The following generalized Koch Snowflake curve is a fractal constructed by a [custom-user-tool] of EucliDraw (see the user-tools script KochFractal.txt).This tool operates in two stages: Stage-1: selects an arbitrary closed polygon p(0). Stage-2: selects an arbitrary open polygonal line q. The tool replaces, by similarity, each side of p(0) with q, producing a closed polygon p(1). By repeating the procedure one can construct a sequence of polygons p(0), p(1), p(2), .... converging to a fairly complex fractal curve. Below is the picture of p(6), where p(0) is the triangle shown and the polygonal line is ABCDE. p(6) has 12288 sides. The five intermatiate polygons p(1), ..., p(5) are hidden. The magnifying glass shows a 10-fold magnification of a small region of the curve. In this example the disk storage space is significantly reduced (compared to Koch_Snowflake_gen2.html ).
The responsiveness to dynamic changes though is still very poor. By modifications of the master-shapes, which are the triangle and the broken line, the program has to recalculate all the intermediate polygons p(0), ..., p(6). This consumes a considerable amount of CPU time.

[0_0] [0_1] [0_2] [0_3]
[1_0] [1_1] [1_2] [1_3]

There is another picture constructed by a generalized tool that avoids the maintenance of the intermediate polygons. See the file Koch2.html for details.

Produced with EucliDraw©