Jonathan. Frech’s WebBlog

Koch Snowflake (#121)

Jonathan Frech

In my col­lec­tion of programs generating fractals this famous one cannot miss.
The Koch snowflake is gen­er­ated by starting with an equilateral triangle. Every side of the triangle then gets cut into three equal pieces and the center one gets replaced with yet another equilateral triangle.
To get the perfect fractal, you would need to repeat this process infinitely many times.
More information on the snowflake can be found in this Wikipedia entry.

Controls

Source code: koch-snowflake.py