A real-time, interactive fractal visualizer built with Python, Pygame, and Numba. It is designed for live performance and projection, featuring adaptive speed, multiple animation layers, and full user control.
The visualizer displays an animated Julia set. The fractal's shape, camera position, and zoom level are all animated independently to create a complex, hypnotic motion that slows down automatically when detailed parts of the fractal are on screen.
-
Clone this repository :
git clone https://github.com/DirtyBeastAfterTheToad/Hypnotic-Fractal-Visualizer.git cd Hypnotic-Fractal-Visualizer -
(Optional but recommended) Create a Python environment . Using conda:
conda create -n fractal-env python=3.10 conda activate fractal-env
Or using Python's built-in
venv:python -m venv fractal-env source fractal-env/bin/activate # On Linux/macOS .\fractal-env\Scripts\activate # On Windows
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the visualizer:
python fractal.py
All controls are designed for live performance:
| Key | Action |
|---|---|
F |
Toggle fullscreen mode. |
SPACE |
Pause or resume the animation. |
Left Click |
Instantly set the new center for the camera's panning animation. |
R |
Reset the camera pan and zoom to their default positions. |
+ / - (Hold) |
Smoothly zoom the camera in or out. |
Left / Right Arrows |
(When paused) Step the animation backward or forward frame-by-frame. |
ESC |
Quit the application. |
The window is fully resizable by dragging the corners (when not in fullscreen).
For better performance, navigate and animate through small window, frame rendering takes more time in full screen.