This is a Python project to generate Koch Snowflake fractals using matplotlib
and numpy
.
It demonstrates recursion, vector math, and interactive user input.
- User-defined number of vertices (triangle, square, etc.)
- Regular or random fractal shapes
- Optional inversion of fractal orientation
- Interactive drawing (see the fractal forming step by step)
- Install required packages:
pip install matplotlib numpy Run the script: python "4. FRACTAL_LEO M_251001.py" Follow the prompts to customize your fractal: Enter the number of vertices (>=3) Choose whether you want a regular or random fractal Choose whether to invert the fractal orientation Optionally, generate another fractal after finishing
Project Structure
4. FRACTAL_LEO M_251001.py — main script with all fractal code
(Other previous attempts removed for clarity)
Future Improvements
Add GUI for better interactivity
Save generated fractals as image files
Support more fractal types
Allow adjusting fractal size or depth dynamically