Koch Curve
Visualization
AIFS program
@
$dim=2
$subspace=[s,0]
s=$companion([1,-1])
g=s+1
A=g^-2*(s|s^2*[1,-1]|[-1,2]|s*[2,0])*A
Overview
The Koch curve was introduced by Swedish mathematician Helge von Koch in 1904 as an example of a continuous curve that is nowhere differentiable. The familiar Koch snowflake is obtained by applying the construction to all three sides of an equilateral triangle.
Construction
Starting from a unit line segment, at each step replace the middle third with two sides of an equilateral triangle (pointing outward), removing the base:
After steps the curve has segments each of length , so the total length grows as .
Definition
The IFS lives in where is a primitive 6th root of unity.
The companion matrix (defined as $companion([1,-1]) in AIFS) satisfies ;
in the projected plane it acts as rotation by 60°.
The expansion has and , so — a pure contraction by with no rotation.
The four maps factor as with integer-coefficient operators:
| Map | AIFS | Net effect in |
|---|---|---|
s | scale , no rotation; | |
s^2*[1,-1] | scale , rotate ; | |
[-1,2] | scale , rotate ; | |
s*[2,0] | scale , no rotation; |
The translations , , are exact integers in ; the irrational values , , emerge only after projecting via , with no floating-point approximation.
The directive $subspace=[s,0] tells the renderer to project the lattice onto
the eigenplane of , where basis vector maps to and maps to
.
Properties
- Fractal dimension:
- Perimeter: Infinite
- Number of transforms: 4, all contraction ratio
- Self-similarity: Each quarter of the curve is a scaled, rotated copy of the whole
References
- Koch, H. von (1904). Sur une courbe continue sans tangente. Arkiv för Matematik.
- Koch snowflake — Wikipedia
- Riddle, L. Classic IFS — Koch Curve. Agnes Scott College.