Skip to content

Interactive web app for exploring Koch Snowflake fractal, with adjustable parameters for detail and zoom.

License

Notifications You must be signed in to change notification settings

santagatiivan/Koch-Fractal-Manipulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Koch-Fractal-Manipulation

About the Project

Koch-Fractal-Manipulation is an interactive web application designed to explore and visualize the Koch Snowflake fractal. This project allows users to dynamically adjust parameters such as detail level and zoom, toggling between the Koch Snowflake and its inverse form to understand the beauty and complexity of fractal geometry. The application is currently deployed on Amazon Web Services (AWS) at ***.

How to Use

  1. Installation: No installation required. Simply clone this repository and open index.html in a modern web browser.
  2. Interacting with the Fractal:
    • Use the Detail slider to adjust the iteration level of the fractal, observing how each level modifies the snowflake's complexity.
    • The Zoom slider allows you to zoom in or out, offering a closer look at the fractal's intricate patterns.
    • Click the Toggle Mode button to switch between the Koch Snowflake and its inverse, exploring different fractal structures.

The Koch Snowflake: A Scientific Explanation

The Koch Snowflake is a fractal that exemplifies the infinite repetition of a geometric motif on increasingly smaller scales. Originally described by Helge von Koch in 1904, this fractal not only displays a unique geometric beauty but also serves as a fundamental example in discussions on fractal dimension and mathematical infinity.

Iterative Process

The process to construct the snowflake begins with an equilateral triangle. At each iteration, each line segment is divided into three equal parts, and a new equilateral triangle is erected on the middle segment, from which the base segment is removed. Mathematically, this process can be described as follows:

If we consider a line segment of length (L), at iteration (n), the number of segments becomes (4^n), each with length (L/3^n). The perimeter (P) of the snowflake after (n) iterations is given by:

$$P_n = P_0 \times \left(\frac{4}{3}\right)^n$$

where (P_0) is the perimeter of the initial triangle.

Area Convergence

Interestingly, while the perimeter of the Koch Snowflake grows infinitely with the increase in iterations, the area (A) of the snowflake converges to a finite value. This area, after an infinite number of iterations, is given by the formula:

$$A = A_0 + \frac{1}{2} P_0 L \sum_{n=0}^{\infty} \left(\frac{4}{9}\right)^n$$

where (A_0) is the area of the initial triangle and (L) is the length of one of its sides.

Fractal Dimension

The fractal dimension of the Koch Snowflake, a measure of its "complexity" that transcends conventional integer dimensions, can be calculated using the Hausdorff formula:

$$D = \frac{\log(4)}{\log(3)}$$

This dimension, approximately 1.2619, reflects how the Koch Snowflake fills more space than a line (dimension 1) but less than a flat area (dimension 2), a common characteristic of fractals.

Implications and Applications

Beyond its aesthetic appeal, the Koch Snowflake illustrates important concepts in mathematics and physics, such as infinity, non-integer dimensions, and self-similar structures. These ideas find application in fields ranging from fluid dynamics to chaos theory, highlighting the importance of seemingly simple but inherently complex structures like the Koch Snowflake.

Contributing

Contributions to improve Koch-Fractal-Manipulation are warmly welcomed. Please refer to CONTRIBUTING.md for more details on how to submit pull requests, report issues, or suggest improvements.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Acknowledgments

  • Inspired by the fascinating world of fractals and mathematical beauty.
  • Thanks to the p5.js library for facilitating easy graphical and interactive web development.

Example Output

Here's a view of the Koch fractals:

Koch snowflake

view1 view2 view3 view4 view5

Koch antisnowflake

view1 view2 view3 view4 view5

About

Interactive web app for exploring Koch Snowflake fractal, with adjustable parameters for detail and zoom.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published