Middle-third construction · infinite perimeter, finite area · measured live, not just quoted
Replace the middle third of every segment by two sides of an equilateral bump. One segment of length ℓ becomes 4 segments of length ℓ/3, so after n steps there are Nn = 3·4ⁿ segments of length 3⁻ⁿ (seed side = 1).
Perimeter Pn = 3·(4/3)ⁿ → ∞. Area: step k adds 3·4k−1 triangles of area A₀/9ᵏ, so An = A₀[1 + (3/5)(1 − (4/9)ⁿ)] → (8/5)A₀. Inward bumps give A₀[1 − (3/5)(1 − (4/9)ⁿ)] → (2/5)A₀ and the bumps never overlap.
Dimension: N copies scaled by r give D = ln N / ln(1/r) = ln 4 / ln 3 ≈ 1.2619. Box counting counts the boxes of side ε that touch the curve; N(ε) ∝ ε−D, and the page fits the log-log slope on the level-7 curve (about 1.25, finite resolution and finite n pull it slightly low).
Simplifications: the true Koch curve is the n → ∞ limit, which a screen cannot draw; up to n = 8 (196,608 segments) the geometry is exact in double precision, only the stroke is rasterised. Real snowflakes are six-fold dendrites grown by diffusion-limited deposition, not Koch curves; the name is only a visual likeness.
The Koch snowflake, introduced by Swedish mathematician Helge von Koch in 1904, is one of the earliest fractal curves ever described. It starts from an equilateral triangle. At every step, each straight edge is divided into three equal parts, and the middle part is replaced by two sides of a smaller equilateral triangle pointing outward — a "bump." Repeating this rule on every new segment, forever, produces the snowflake. Because every iteration multiplies the number of segments by 4 while each segment shrinks to 1/3 its previous length, the total perimeter is multiplied by 4/3 at every step. After n iterations the perimeter is P(n) = P₀ · (4/3)ⁿ, which grows without bound as n → ∞ — an infinite perimeter in the limit.
Remarkably, the area enclosed stays finite. Each iteration adds smaller and smaller triangular bumps whose combined area shrinks geometrically (by a factor of 4/9 relative to the area added in the previous step), so the total area converges to A(∞) = (8/5) · A₀, where A₀ is the area of the starting triangle. This "infinite perimeter, finite area" paradox is a signature property of fractal curves. The boundary's Hausdorff (fractal) dimension is log(4)/log(3) ≈ 1.2619 — strictly between the dimension of a line (1) and a filled plane region (2), reflecting how the curve is "rougher" than a smooth line but still doesn't fill any area itself.
The Koch snowflake was one of the first curves recognized as having no well-defined tangent anywhere — it is continuous everywhere but differentiable nowhere, a property mathematicians once considered pathological. Benoit Mandelbrot later used curves like this to help define the modern concept of fractal dimension and coined the word "fractal" itself in 1975. Coastlines behave similarly in a rough, approximate sense: the closer you look, the more detail (and measured length) appears — the origin of the famous "How Long Is the Coast of Britain?" question Mandelbrot posed in 1967.
This simulator builds the Koch snowflake by recursively replacing the middle third of every line segment with two sides of a smaller equilateral triangle. Starting from a triangle, each of the 3 sides turns into 4 segments per iteration, so segment count grows as 3·4ⁿ while each segment is 1/3ⁿ the original length — giving a perimeter that grows as (4/3)ⁿ without bound while the enclosed area converges to 8/5 of the starting triangle's area.
A recursive edge-subdivision fractal drawn on canvas. Snowflake mode closes three Koch curves into a triangle outline; curve mode shows a single open edge; anti-snowflake flips the bump direction inward, carving material away instead of adding it.
Set Iterations (0–6) to control recursion depth. Pick a shape mode from the dropdown. Toggle Animate growth to watch the construction build step by step, and Fill interior to shade the enclosed region. The Statistics panel reports live perimeter and area alongside their limiting formulas.
The Koch curve is continuous everywhere but differentiable nowhere — it has no defined tangent line at any point, a property that startled 19th and early 20th century mathematicians and helped motivate the modern theory of fractals.
Each iteration multiplies the segment count by 4 and shrinks each segment to 1/3 of its previous length, so perimeter scales by 4/3 every step — an unbounded geometric sequence. The bumps added at each step, however, get smaller by a factor of 1/9 in area and there are 4× as many, so the total added area shrinks by 4/9 each round, forming a convergent geometric series that sums to a finite total.
It is log(4)/log(3) ≈ 1.2619. This comes from the self-similarity rule: each segment is replaced by 4 copies scaled by 1/3, and dimension D satisfies 4 = 3^D. A dimension between 1 and 2 reflects a curve that is "rougher" than a smooth 1-dimensional line but still does not fill 2-dimensional area.
The anti-snowflake uses the identical construction rule but flips each bump to point inward rather than outward, carving triangular notches into the shape instead of adding them. Its perimeter formula is the same (4/3)ⁿ growth, but the enclosed area shrinks toward a finite positive limit rather than growing.
The snowflake applies the construction to all three sides of a closed equilateral triangle, forming a closed curve enclosing an area. The single Koch curve mode applies the same rule to just one open edge, so it has a well-defined length but no enclosed area, illustrating the boundary construction in isolation.
The geometry is mathematically exact at every finite iteration: each new vertex position is computed directly from the standard middle-third construction formulas, not approximated. Only the true fractal limit (n → ∞) is unreachable on a finite screen — the simulator caps iterations at 6, which already exceeds visual resolution.