Using recursion, it’s very easy to generate in LOGO some special curves called fractals in mathematics.
Here are the first steps to create the Van Koch broken line:
Between two steps:
What is important: Let’s have a look at step 2, we can see that the broken lines contains four identical motifs
corresponding to precedent step with a 3 lesser size. Here we have found the recursive structure of the
Let’s call Ln,ℓ the motif of size ℓ, corresponding to step n.
To draw this motif:
With LOGO, it’s very easy to write:
If we draw an equilateral triangle with three Van Koch lines, we obtain a beautiful Van Koch snowflake.
Then run: snowflake 200 6