Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of HTML Starter

Public visualization

Fork of HTML Starter

0 stars1🌍 Public
NNita
Last edited Mar 20, 2025
Created on Mar 20, 2025
Forked from HTML Starter

This visualization demonstrates a Triadic Koch Lake fractal, a variation of the Koch curve where each line segment is replaced by three smaller segments scaled by 1/√7. A slider controls iteration depth from 0 to 5, revealing increasing geometric complexity in the closed loop. The fractal is rendered as a filled SVG path using D3.js v7, with the `generateTriadicKochLake` function computing vertices through iterative geometric transformations and the `drawFractal` function applying SVG path attributes for the blue-stroked, light-blue-filled shape. The parameters N=3, 1/r=√7, and fractal dimension D≈1.1291 are displayed beneath the visualization.

AI-generated description

Triadic Koch Lake Fractal

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

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

About the Fractal

The Triadic 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 3 segments with a specific scaling factor of 1/√7.

The construction works by:

  1. Starting with a triangle (representing the "lake")
  2. For each line segment, replacing it with 3 smaller segments
  3. Each new segment has length 1/√7 of the original segment
  4. The middle segment is positioned at a specific angle, creating a triangular bump
  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=3, 1/r=√7 parameters
  • The fractal has a dimension of D = log(3)/log(√7) ≈ 1.1291

Comments

Sign in to join the discussion.

MIT Licensed