Koch Snowflake Generator

Draw the classic von Koch fractal from an equilateral triangle. Change depth and style, see how perimeter grows while area stays bounded, then save your snowflake as an image.

Iteration4Perimeter ratio0Segments0Area ratio0

Infinite edge, finite area

The Koch snowflake, from Helge von Koch in 1904, is built by replacing the middle third of each side with an outward equilateral bump. Repeat on every new segment. The boundary length grows without bound while the area inside stays finite.

How the curve is built

  1. Start with an equilateral triangle.
  2. Split each side into three equal parts, remove the middle third, and add an equilateral triangle on that gap (no base).
  3. Do the same on every new segment. Repeat.

After n steps you have 3×4n segments. Perimeter scales as (4/3)n; area tends to (8/5)×(initial triangle area). The fractal dimension is log 4 / log 3 ≈ 1.26.