Simulating colliding hard-sphere particles - collision physics help?
조회 수: 10 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Quantum Mechanics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!