GroIMP Module XL English
Spoken text
The Koch curve is a classical example of a graphical object which can be generated by rewriting rules. The initiator is a line segment shown in the form of a cylinder. The rewriting rule in the run() method causes in every iteration a replacement of each F by four shorter line segments of similar length and with defined angles of 60° and 120°.
By using x instead of a fixed number, it is possible to make use of the value of x on the right-hand side for the next rewriting step, that means, the value of the x on the left-hand rule side is automatically inserted for the x on the right-hand side.
This example also shows another advantage of parametric L-systems. The length parameter x can be changed within a command by mathematical operators. In the first iteration x is 10, in the second 3.333 and in the third just 1.111.
With each iteration the curve becomes more folded, which basically could be repeated infinitely. That is why such a curve is also called a monster curve.
The similarity of the pattern to a snowflake resulted in the definition of the Snowflake curve, which is a Koch curve with three initiators, which are arranged in an isosceles triangle. The rewriting rule is exactly the same. After several iterations you can see very clearly the similarity to a schematically drawn snowflake.