This directory contains the original Python implementation of the fractal generator web application that was deployed on Heroku.
app.py- Main Flask web applicationChaosFinder.py- Automatic generation of discrete chaotic attractorsFractal.py- Core fractal generation algorithmscomponents.py- UI components and renderingfinder_components.py- Chaos finder UI componentstransform_components.py- Transformation system componentschaostech/- Mathematical utilities and rule systemsdocs/- Documentation and test casesrequirements.txt- Python dependenciesruntime.txt- Python runtime version for HerokuProcfile- Heroku deployment configuration
The Python implementation includes:
- Chaos Game - Generate fractals like the Sierpinski triangle using the chaos game algorithm
- Iterated Function Systems (IFS) - Create complex fractals using transformation systems
- Automatic Chaos Finder - Automatically discover chaotic 2D discrete maps
- Multiple Fractal Types - Mandelbrot, Julia sets, Burning Ship, and more
- Interactive Parameters - Real-time parameter adjustment
- Preset Library - Pre-configured fractal parameters
This was the original implementation created for the MATH326 - Nonlinear Dynamics & Chaos course at McGill University (Fall 2021). The web application was deployed on Heroku and provided a full-featured fractal generation environment.
The Python implementation, while feature-complete, has performance limitations:
- Sierpinski Triangle: ~15,748 points/sec
- Dragon Curve: ~30,675 points/sec
- Mandelbrot Set: ~83,478 pixels/sec
For significantly improved performance, see the WebAssembly implementation in the root directory, which provides 10-100x faster rendering.
To run the original Python version:
cd python_implementation
pip install -r requirements.txt
python app.pyThen open http://localhost:5000 in your browser.
This Python implementation serves as the reference for the new WebAssembly version. The algorithms and functionality are being ported to Rust/WebAssembly for dramatically improved performance while maintaining the same features and visual output.