Viewing a saved revision (read-only)
e942243cd74a4ab7a614a83624ff13cb
Fork of Fork of HTML Starter
This interactive visualization demonstrates the Pentadic Koch Lake fractal, a variation of the Koch curve where each line segment is replaced by five smaller segments scaled to one-third of the original length, resulting in a fractal dimension of approximately 1.465. A slider controls the number of iterations from zero to five, progressively refining the triangular base shape into an increasingly complex closed curve. The fractal is rendered as an SVG path using D3.js v7, with the `d3.select` API binding the slider’s input event to regenerate and redraw the path data in real time.
AI-generated descriptionTriadic 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:
- Starting with a triangle (representing the "lake")
- For each line segment, replacing it with 3 smaller segments
- Each new segment has length 1/√7 of the original segment
- The middle segment is positioned at a specific angle, creating a triangular bump
- 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