**Problem**

Let us consider two billiards balls on a very large pool table. Ball is stationary located at , the other (ball ) is initially located at and has an initial velocity of and is on a collision course with the first ball. The friction and air resistance cause the ball to decelerate with . Find the positions of both balls after collision when they stop moving. Ball are of equal size (radius ) and mass, the collision is elastic (coefficient of restitution is equal to one).

**Data**

– ,

– , ,

**The solution in a couple of steps**

The velocity of the moving ball is

Assuming the friction to be constant we may write

which leads to exponential decay of velocity with time

Expressing the location of ball B with velocity is just another integral away

After integration we find, where ball will be located as a function of time

If no collision occurs, we can find the final position of the ball as

**Time of collision**

In the next step we have to find the time at which collision occurs. Collision will happen when the distance between the balls is equal to , i.e

or

Temporarily naming gives

Rearranging to a quadratic equation for :

Defining

helps us to use the quadratic formula to find the solutuion

and finally, the collision time is

There are two solutions for the collision time corresponding to the two points, where a line intersects a circle. For our case, the solution, which happens before is the correct one. As a side note, calculation of collision time may fail due to the fact the the square root or logarithm is undefined. When this happens, the collision does not occur (the ball is not on a collision course or stops before hitting the other ball)

**At the moment of collision**

At the time of collision the ball is located at

and it has a velocity of

First let us calculate a vector from the center of ball to the center of ball and normalize it:

The contact point is at

A tangent vector to the surfaces of the spheres from the contact point is .

We now decompose the velocity vectors of ball into normal and tangential directions (ball is stationary!)

During the collision the tangential components are preserved

In the normal direction, the momentum is conserved and since the collision is elastic with coefficient the restitution equal to one, the normal velocity is tranffered to balla

For a more general description of collision in 2D with an arbitrary velocity of both balls and any coefficient of restitution, see this post!

**Afer collision**

After collision, both balls are moving with velocity:

and they come to a stop at

**Example**

Consider the following data

, , , ,

**Matlab solution**

```
%
% Data
%
R=30.75/1000
alpha=0.8
rA0=[1.29; 0.56]
rB0=[1.73; 0.7]
uB0=[-0.72; -0.27]
%
% Collision time
%
a=(uB0(1)^2+uB0(2)^2)/alpha^2
b=2/alpha*( (rB0(1)-rA0(1))*uB0(1)+(rB0(2)-rA0(2))*uB0(2) )
c=(rB0(1)-rA0(1))^2 + (rB0(2)-rA0(2))^2 - (2*R)^2
dis=b^2-4*a*c
beta1=(-b+sqrt(dis))/(2*a)
beta2=(-b-sqrt(dis))/(2*a)
t1=-1/alpha*log(1-beta1)
t2=-1/alpha*log(1-beta2)
t=min(t1,t2)
%
% Ball B at collision time
%
rBc=rB0+uB0*(1-exp(-alpha*t))/alpha
uBc=uB0*exp(-alpha*t)
%
% Unit normal and tangent
%
n=(rBc-rA0)/norm(rBc-rA0);
t=[-n(2);n(1)];
%
% Collision point
%
rc=rA0+R*n;
%
% Normal and tangential velocity before collision
%
uAn=0
uBn=dot(uBc,n)
uAt=0
uBt=dot(uBc,t)
%
% Normal and tangential velocity after collision
%
uAtAC=uAt
uBtAC=uBt
uAnAC=uBn
uBnAC=uAn
%
% velocity after collision
%
uAac= uAtAC * t + uAnAC * n
uBac= uBtAC * t + uBnAC * n
%
% Final position
%
rAf=rA0+uAac/alpha
rBf=rBc+uBac/alpha
%
% Plot results
%
hold on
% spheres
circle(rA0(1),rA0(2),R,"black");
circle(rB0(1),rB0(2),R,"black");
circle(rBc(1),rBc(2),R,"blue");
circle(rAf(1),rAf(2),R,"red");
circle(rBf(1),rBf(2),R,"red");
% initial velocities
quiver(rB0(1),rB0(2),uB0(1),uB0(2),0,'-r')
% normal and tangent vectors
quiver(rc(1),rc(2),n(1)/5,n(2)/5,0,'--b')
quiver(rc(1),rc(2),t(1)/5,t(2)/5,0,'--b')
% velocity after collision
quiver(rA0(1),rA0(2),uAac(1),uAac(2),0,'-g')
quiver(rBc(1),rBc(2),uBac(1),uBac(2),0,'-g')
axis equal
grid on
hold off
function h = circle(x,y,r,color)
th = 0:pi/50:2*pi;
xunit = r * cos(th) + x;
yunit = r * sin(th) + y;
h = plot(xunit, yunit,color);
end
```

**Matlab output:**