Export Code

Fork of Fork of HTML Starter

Nita

Last edited Mar 20, 2025
Created on Mar 20, 2025

Pentadic Koch Lake Fractal

This visualization demonstrates a Pentadic Koch Lake fractal with the following parameters:

  • N = 5 (each line segment is replaced by 5 new segments)
  • 1/r = 3 (scaling factor)
  • D = log(5)/log(3) ≈ 1.465 (fractal dimension)

About the Fractal

The Pentadic Koch Lake is a variation of the Koch curve. Unlike the classic Koch snowflake which replaces each segment with 4 segments (forming a pointed shape), this version uses 5 segments with a specific pattern.

The construction works by:

  1. Starting with a triangle (representing the "lake")
  2. For each line segment, replacing it with 5 smaller segments
  3. Each new segment has length 1/3 of the original segment
  4. The 1st and 3rd intermediate segments are positioned at specific angles, creating triangular bumps
  5. This process is repeated for each new segment in subsequent iterations

The slider allows you to adjust the number of iterations to see how the fractal develops complexity.

Implementation

This implementation uses D3.js to render the fractal as an SVG path. The mathematics behind the construction ensures that:

  • Each iteration precisely follows the N=5, 1/r=3 parameters
  • The fractal has a dimension of D = log(5)/log(3) ≈ 1.465
MIT Licensed