A real-time cloth physics simulation using Verlet integration, written in Rust with Macroquad.
- Position-based dynamics with Verlet integration
- Structural, shear, and bending constraints
- Interactive mouse dragging
- Dynamic wind simulation
- Pin/unpin particles
- Adjustable constraint iterations
- Floor collision
- Left Mouse - Drag particles
- P - Pin/unpin particle at cursor
- W - Toggle wind on/off
- B - Toggle bending constraints
- Up/Down - Adjust constraint iterations
- Left/Right - Adjust wind strength
- R - Reset cloth
cargo build --releasecargo run --releaseparticle.rs- Particle and edge data structuresphysics.rs- Physics integration and constraint solvingcloth.rs- Cloth mesh generation and utilitiesrendering.rs- Drawing and UI functionsmain.rs- Main loop and input handling
- macroquad - Graphics and windowing
- nalgebra - Linear algebra
- rand - Random number generation