I'm writing a program that simulates circular

AI Thread Summary
The discussion focuses on simulating circular particles in 2D space, specifically addressing collision handling. To determine the angle of each particle's velocity post-collision, it is essential to identify the type of collision: elastic, inelastic, or partially elastic. The velocities can be resolved into components parallel and perpendicular to the common normal, which is the line of impact between the particles. The perpendicular velocities remain unchanged, while momentum conservation along the common normal is applied, using the coefficient of restitution to relate the velocities of separation and approach. This approach provides a systematic way to calculate the new velocities after a collision.
AndrewM16921
Messages
2
Reaction score
0
I'm writing a program that simulates circular "particles" in 2d space. I'm at the collision handling part. I've already corrected their positions when an overlap occurs. So, my question is, how do I determine the angle of each particle's velocity after the collision? I have the position and velocity vectors of both particles, so I can easily calculate the angle each particle is moving in before the collision and the angle from one particle toward another.
http://nubcraft.org/stuff/img/collide.png
Thanks for any help.
 
Last edited by a moderator:
Physics news on Phys.org


First of all it depends on the type of collision ..whether it is elastic, inelastic or partially elastic...The velocity vectors of both the balls ( for ex.) can be resolved in a direction perpendicular and parallel to the common normal or what we call line of impact of both balls...IN CASE if u hav confusion about common normal or line of impact :Common normal is a line that passes through the center of both the balls and is perpendicular to the points of contact of the circles...
The velocities perpendicular to the Common normal or line of impact will remain same as before for both the balls ...No changes for both of them ...

Now conserve the momentum (along the common normal) for the velocities parallel to the common normal ...

To get these velocities u need 1 more equation that is the equation of coefficient of restitution ...
e= velocity of separation ( along common normal ) / velocity of approach (along common normal)..

U hav 2 eqns solve them get the answer...

Sorry, for the long answer...
I hope this will help..
 


Looks like just the answer I was looking for. Thanks, I will try it out. :)
 
Back
Top