[Physics] Determine resultant velocity of an elastic particle-particle collision in 3d space

collisionconservation-lawshomework-and-exercisesinertial-framesnewtonian-mechanics

So I have two particles that have collided in 3 dimensional space. I want the particles to rebound off of each other in an elastic manner. How do I determine the resultant velocity vector if I know: Both particles' initial velocity vector, their masses, and their initial position vectors relative to the origin.

I tried to follow the instructions on this website but I am not sure how to make their equations work without polar coordinates / how to translate my data to polar coordinates.

Also, if you answer my question in terms of polar coordinates, can you explain which angle is theta and which is phi? Since there are 2 different conventions, I am not really sure which angle is being referred to in the explanation on the aforementioned website.

EDIT: This isn't for a class. I'm writing a physics engine for a gravity simulation I am making using Unity. I haven't taken kinematics since I was in high school, which is why I am so rusty.

Best Answer

I'm shocked that there isn't a satisfactory answer on this site yet!

This can be answered in any number of dimensions with some relatively simple vector math. As follows intuitively (rigorously in the center-of-mass frame), for equal mass particles, the relative velocities of the particles are reversed along the normal direction. All that needs to be done is translate that into vector equations.

The algorithm

Calculate the vector normal of collision: $$\hat{\bf n}=\frac{{\bf r}_1-{\bf r}_2}{\|{\bf r}_1-{\bf r}_2\|}$$ Calculate the relative velocity of the particles in the direction of the normal, using a dot product: $$v_{\mathrm{rel}}=(\dot{\bf r}_1-\dot{\bf r}_2)\cdot \hat{\bf n}$$

To reverse the velocities of the particles along the normal of collision, take:

$$\dot{\bf r}_1\mapsto \dot{\bf r}_1- v_{\mathrm{rel}}\hat{\bf n}$$ $$\dot{\bf r}_2\mapsto \dot{\bf r}_2+ v_{\mathrm{rel}}\hat{\bf n}$$

That's it. Easy peasy. It works in 1D, 2D, 3D, 4D, 5D; any number of dimensions. And it's rather simple!

Seeing that the algorithm works

To see that this reverses the velocities along the normal direction, calculate $\dot{\bf r}_1\cdot \hat{\bf n}$ before and after. You'll find: \begin{align*} v_{\mathrm{rel}}= (\dot{\bf r}_1-\dot{\bf r}_2)\cdot \hat{\bf n} &\mapsto \dot{\bf r}_1\cdot \hat{\bf n}- v_{\mathrm{rel}}\hat{\bf n}\cdot \hat{\bf n}-\dot{\bf r}_2\cdot \hat{\bf n}- v_{\mathrm{rel}}\hat{\bf n}\cdot \hat{\bf n}\\ &=v_{\mathrm{rel}}-2v_{\mathrm{rel}}\\ &=-v_{\mathrm{rel}} \end{align*}

Related Question