Re:Show HN: Gravitle – 2D soft-body engine built with Rust f...
by joelthelion on Sunday June 23, 2019 @03:41AM
(#20253803)
You might want to look into finite elements. That's a bit harder conceptually, but it's not that hard to implement and should be far more realistic and robust.
Drag is computed[2] for all the particles using something similar to the Drag equation[3].
Also, like electricslpnsld said, having a small enough time step helps.
[1] https://github.com/loicbourgois/gravitle/blob/master/fronten...
[2] https://github.com/loicbourgois/gravitle/blob/master/src/par...
[3] https://en.wikipedia.org/wiki/Drag_equation