## I'm writing a program that simulates circular

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.

Thanks for any help.
 PhysOrg.com physics news on PhysOrg.com >> Study provides better understanding of water's freezing behavior at nanoscale>> Soft matter offers new ways to study how ordered materials arrange themselves>> Making quantum encryption practical
 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 seperation ( 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. :)