Image89

Koch snowflake

The Koch snowflake

Start with an equilateral triangle. Split every side into three equal parts, build a smaller equilateral triangle outwards on the middle part and remove its base. Every side becomes four segments a third as long. Repeat with every segment, forever. After n steps a triangle with the side s has

Nn=3·4n segments and the perimeter Pn=3s (43)n →∞

The perimeter grows without limit, while the area stays finite and tends to 8/5 of the starting triangle. Each side is made of four copies of itself at a third of the size, which gives the fractal dimension

D= log⁡4log⁡3 ≈1.262

History

The Swedish mathematician Helge von Koch described the curve in 1904. The title of his paper promised a continuous curve without a tangent, obtained by an elementary geometric construction. Mathematicians already knew such curves from the formulas of Karl Weierstrass, but they were hard to imagine; Koch's construction made the idea easy to draw. The snowflake is three of his curves joined around a triangle.

Interesting facts

How Image89 draws it

Image89 draws the outline as a dark blue line on white, with round joins at the corners. The preset depth is 5, which gives 3072 segments. Segments shorter than a pixel would only blur, so the depth drops for small images until every segment is at least a pixel long:

d=min⁡(5, ⌊log3⁡s⌋)

where s is the side of the triangle in pixels. The line is 0.4% of the shorter side of the image wide, but at least one pixel. The snowflake is fitted without distortion, with a margin of 5% of the shorter side plus half the line. The preset is in the [types.koch] section of the config.

Examples