Simulating colliding hard-sphere particles - collision physics help?
4 views (last 30 days)
Show older comments
I'm trying to simulate in two dimensions the aggregation of particles due to some forces, and I need to stop them from colliding.
So far, I use a time-step simulation to calculate the force on each point particle based on equations, then generate velocity, then position, and repeat, and then draw each particle as a circle with radius r moving over time. I need them to interact, though. I can clumsily check for overlaps and then adjust the previous position of overlapping particles to avoid it, but the hack way I do it leads to poor physics. Ideally, when a sphere hits another sphere obliquely, they will be able to roll past one another.
I see reasonable physics for things like this in games.
What is a better way?
I also want to progress to squares and hexagons able to hit each other and move and rotate accordingly. ***
I have tried lots of things that haven't worked, and I have more ideas I can try, with as much expected success. If I just model perfectly elastic or half-elastic collisions, will that work?
Help!
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!