A real-time, interactive 3D simulation of various chaotic strange attractors, built in Rust using Macroquad and Egui.
This project visualizes mathematical systems known as strange attractors. It numerically integrates these differential equations over time to produce continuous 3D paths. The simulation includes a built-in graphical user interface that allows you to switch between different attractor models on the fly, tweak their internal parameters, and adjust the camera to explore their unique geometric properties in 3D space.
- Real-time 3D rendering of complex mathematical attractor paths.
- Interactive UI to change simulation parameters instantly.
- Smooth camera controls with an auto-rotation feature.
- Seamless switching between 10 different mathematical models.
- Dynamically rendered path trails to visualize the chaotic flow.
The following chaotic systems are currently implemented:
- Lorenz
- Thomas
- Chen
- Dadras
- Rossler
- Halvorsen
- Rabinovich-Fabrikant
- Three Scroll
- Sprott
- Four Wing
- Langford (Aizawa)
Ensure you have Rust and Cargo installed on your system.
- Navigate to the project directory.
- Run the project using cargo:
cargo run --releaseNote: Running in release mode is highly recommended as numerical integration and 3D rendering benefit significantly from compiler optimizations.
- Attractor Selection: Use the on-screen "Controls" window to select the desired attractor type from the dropdown menu.
- Parameters: Adjust the mathematical parameter sliders to see the attractor morph in real-time.
- Visuals: Toggle "Show Particles" to enable/disable the 500-particle swarm, and adjust "Sim Speed (dt)" to control integration speed.
- Camera Position: Toggle "Auto Rotate" to have the camera continuously orbit, or manually adjust the Cam X, Y, and Z sliders.
- macroquad: For the core simulation loop and 3D rendering capabilities.
- egui-macroquad: For the immediate mode graphical user interface elements.