smarticles
smarticles copied to clipboard
Rework and add some features
- Added more particle types but now they are called "particle classes"
- Make it possible to move around and zoom in/out
- Improved efficiency by using
array2d
instead of array of Vec - Separate ui and simulation threads for more flexible (or not ?) simulation. A system of events has been established to share content between the ui and simulation threads.
- Kind of improved ui (it's subjective)
- Also added interesting seeds (ignore them)
The calculations for one frame take around 30ms for 4000 particles and 40ms for 5000 particles (on my average laptop).
august 2024 edit: I added spatial partitioning which allows running similations with thousands (up to 120000) with an acceptable update rate (rarely above 50-80ms)