[alogo] Koch Snowflake curve generalized-2

The following generalized Koch Snowflake curve is a fractal constructed by a self-repeating procedure described in the file Koch_Snowflake_gen.html . The only difference is that we replace the triangle used there by a rectangle (r). We start with the rectangle r(0) = r, and replace each one of its sides with the shape (s*). The rectangle involved in (s*) is similar to (r). The number of sides of the polygon r(n), after n steps is 4*5^n. The polygon shown below is r(4) with 2500 sides. It occupies 1.264.470 bytes of disc space. The reason for such a waste of memory is that for its construction uses some thousands of auxiliary rectangles similar to r. Because of the huge memory allocation it is not included in the standard examples folder of the program. It can be obtained uppon request from euclidraw.com.

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

I have constructed a [custom-user-tool] of EucliDraw (see the user-tools script KochFractal.txt), allowing the construction of an arbitrary similar fractal, based on an initial arbitrary polygon p(0), and an arbitrary polygonal line q, replacing, by similarity, each side of p(0) with q. The tool can be applied again to the resulting polygon p(1). Continuing in this way one can obtain polygons p(2), p(3), ..., p(n), representing fairly complicated fractal curves. Constructing the fractals with this tool reduces the memory waste by a factor of 6, but the responsiveness to dynamic changes remains still quite poor. An example is given in Koch.html .

Produced with EucliDraw©