Von Koch Snowflake

2026 · SVG · JavaScript

A scroll-driven Von Koch fractal that continuously morphs from a plain triangle into a full snowflake.

The Von Koch snowflake is one of the first described fractal curves. Named after the Swedish mathematician Helge von Koch, who introduced it in 1904, it is a curve that is continuous everywhere but differentiable nowhere — the more you zoom in, the more jagged detail you find.

Construction

It starts as an equilateral triangle. To build the next stage, replace the middle third of every straight segment with the two sides of an outward-pointing equilateral triangle. Repeating this on every segment, forever, produces the snowflake.

At every stage each segment is split into four shorter ones, each a third of the length of its parent:

  1. Start with an equilateral triangle — this is stage 0.
  2. On every segment, erase the middle third and raise an outward bump — stage 1.
  3. Repeat recursively — stage 2, 3, 4, …

The infinite perimeter

Because each stage replaces one segment with four segments of one-third the length, the perimeter multiplies by 4/3 at every stage. After N stages the length is (4/3)^N times the original triangle’s perimeter, so as N grows the perimeter tends to infinity — an infinitely long line wrapped inside a finite shape.

The area, on the other hand, converges: each stage adds a fixed fraction of what was added before, and the snowflake settles on an area exactly 8/5 of the starting triangle.

A fractional fractal

The fractal’s dimension is log 4 / log 3 ≈ 1.2619 — a shape that is more than a line but less than a plane.

This site’s demo cheats in a fun way: instead of jumping from stage to stage, it interpolates the bump heights continuously, so the curve can be drawn at a fractional stage. That’s what lets the snowflake on this page smoothly grow from a bare triangle to a full step-5 fractal as you scroll.

Scroll to watch it grow

step 0.00 / 5