The Math and Physics of Billiards
SHOT
For the purposes of my program, I am equating the motion of drawing the cue back
to that of pulling on a spring. This assumes that the distance the cue is drawn
away from the cue ball is directly proportional to the desired power of the shot,
which is usually the case. Using Hooke's Law, which describes the motion
of a spring with the equation F=-kx , I can calculate the force applied to
the cue ball using the distance back the cue is drawn.
Given the force applied to the cue ball, there are two quantities I must calculate
in this stage of the simulation. The first is the initial velocity of the ball
that results from the hit. To calculate this, I use Newton's Second Law, given by
.
Using Hooke's Law, I use an adaptation of this equation derived below:
Since, for the purposes of the shot, we can assume the initial velocity of the cue
ball is zero, this equation becomes
.
The quantity Δt in this equation is the amount of time the cue is in
contact with the ball, a quantity which I assume to be relatively constant and on
the order of 10 milliseconds. The quantity m is the mass of the cue ball,
usually around .5 kg; and the quantity k is the spring constant from
Hooke’s Law, which I arbitrarily assign a reasonable value (around 10 kg·m/s2).
The vector x is the difference between the cue ball and the tip of
the cue after it is drawn back.
Besides the initial translational velocity of the cue ball, there is also a
rotational aspect of the ball’s movement that I must take into account. Anybody who
has ever played a game of pool knows the importance of applying spin to the cue ball.
Therefore, the second quantity I must calculate is the angular velocity of the cue ball.
To do this, I need to know not only how far back the cue ball is drawn, but also where
the cue ball is hit with respect to its center of mass. For example, assume the circle
below is a lateral view of the cue ball.
If the small circle is the center of the cue ball (i.e. the center of mass), and the
ball is struck where the cross is, the ball will have an initial angular velocity
(top spin”) that will affect the ball’s movement across the table as well as its
collision with any other ball.
To calculate the initial angular velocity, I use the concepts of rotational motion
and another adaptation of Newton’s Second Law, given by the equation:
In this equation, τ(torque) is the rotational equivalent to force,
and is given by the equation
.
Just as the cue must apply force to the ball to give it an initial velocity, the cue must
apply torque to the ball to give it an initial rotation. The r in this equation
represents the radius from the center that the cue ball was struck. Similarly, the moment
of inertia of the cue ball is the rotational equivalent of its mass, and is given by
the equation
.
Just as the force must overcome the mass of the ball in order to move it, the torque must
overcome the rotational inertia of the ball to rotate it. The R in this equation
represents the radius of the cue ball itself. These equations can be combined and manipulated
as shown below:
Since I can assume that the angular velocity is zero before the shot is made, this equation
simplifies to
.
The quantities in this equation are identical to those in the equation for linear velocity
given above, with the exception of the r and R, which I explained above.
Using these equations, I can calculate the initial linear and angular velocities of the cue ball
after the shot is made. This completes the first stage of my simulation.
BALL IN MOTION
Once the ball has an initial linear and angular velocities, it begins to move across the table.
After it leaves the tip of the cue, the only force acting on the cue ball is the force of friction
from the felt. The purpose of this stage of the simulation is to continually update those velocity
vectors according to this frictional force.
There are a couple important concepts that must be realized at this stage in the simulation. The
first is that the ball is not always rolling. Immediately after it is struck, it slides along the
felt for some period of time. How far it slides depends on its initial velocity and spin. The second
is that the force of friction is not being applied through the ball’s center of mass. It is actually
being applied along the ball’s perimeter, and so it becomes necessary to calculate the ball’s perimeter
speed.
The exact point at which a sliding ball becomes a rolling ball is given by the equation
.
In this equation, vp is the perimeter velocity of the ball at its contact point with
the felt, R is the radius of the ball, and ω is the angular velocity of the ball.
The perimeter velocity of the ball at the point of contact with the felt can be calculated using
the equation
,
where R is the vector extending from the center of the ball to the point of contact with
the table.
To deal with friction, I use Newton’s Second Law again. This time, however, I am dealing with
the force of friction instead of the force applied by the cue. The force of friction is given by the
equation
.
In this equation, μs is the coefficient of sliding friction (on the order or .2),
m is the mass of the ball, and g is the force of gravity. Since the direction of this
force is opposite the perimeter velocity, we can modify this equation to represent the frictional force
vector:
Combining this with Newton’s Second Law, we can get an equation for the change in the linear and
angular velocity of the ball. The change in linear velocity is derived below:
Similarly, we can derive a formula for the change in angular velocity:
By combining these equations, I can calculate the velocity a certain time later using the initial linear
and angular velocity vectors. However, these equations only apply to a sliding ball. A rolling ball
behaves similarly, but with a different coefficient of friction: the coefficient of rolling friction,
μs. The coefficient of rolling friction is significantly smaller than the
coefficient of static friction, on the order of .01.
I know whether the ball is sliding or rolling using the condition stated above. Using this information,
I can calculate velocity changes during a given time step. This completes the second stage of my simulation.
COLLISION DETECTION
To detect collisions between two balls or between a ball and a rail, I use the vector equation of a line
to describe the position of a given ball at a given time:
In this equation, r represents the position of the ball, with r0 being the
initial position; and v represents the velocity of the ball. For collisions between two balls,
I construct a position equation for each ball and calculate at what times they will be two radii apart.
This uses the distance formula, and the math is shown below.
To simplify things, I make the following assignments:
The equation above now simplifies to:
Using the quadratic formula, I can easily solve for t:
This process is similar for collisions between balls and rails, but instead I calculate the difference
between the ball and the rail and set it equal to R (not 2R).
Using the times calculated, I can determine if a collision is going to occur within a given amount of
time. If so, I move the balls to the time of that collision and recalculate their velocity vectors before
continuing.
COLLISIONS
If a collision is detected, I must recalculate the velocity vectors of the balls involved. This stage of
the simulation is the most complex, and requires concepts such as conservation of energy,
conservation of linear momentum, and conservation of angular momentum.
For collisions between balls, the first step is to calculate the normal to the collision plane. This is
along the line between the centers of the two balls, so the easiest way to calculate it is to normalize
the difference between the position vectors of the two balls.
The next step is to divide each velocity vector into a normal component and a tangential component. The
normal component for ball 2 will be in the direction of the normal vector, and the normal component for ball
1 will be in the direction opposite the normal vector. The magnitude of these normal vectors can be calculated
using the dot product, as shown below.
Once I’ve calculated the normal components of their velocity vectors, I can calculate the tangential components
using vector subtraction:
During the collision, the tangential velocity components do not change. Using the normal components, I can
treat the collision as 1-dimensional. This is depicted in the example below. The red arrows represent the
velocity vectors immediately before the collision. The blue arrows represent the normal components of those
vectors and the green arrows represent the tangential components of those vectors. The black dotted line is
the collision plane.
To deal with the one-dimensional collision, I once again use Newton’s Second Law in yet a different
form, derived below:
The quantity mv is the linear momentum of the ball, denoted by the letter p. Since there is no
net linear force on the two balls during the collision, Δp is 0. This is the concept known as
conservation of linear momentum, which states that the total momentum of a system will remain constant
in the absence of an outside force. From this, I obtain the following equation:
Since the masses of all the balls are identical, we can cancel out the mass terms, yielding the equation above.
Using the conservation of kinetic energy, we can solve for v1' and v2'.
This equation yields two possible solutions, only one of which is practical. Therefore, assuming total
elasticity in the balls,
Now I return to the 2-dimensional collision problem above. Since the normal velocity vectors can simply be
exchanged, the velocity of each ball immediately after the collision can be obtained by adding the tangential
velocity to the normal velocity of the ball it collides with. This is shown below (the red arrows now represent
the velocity vectors immediately after the collision).
The red vectors in the diagram on the right can be calculated using the equations below:
Now that I’ve handled the linear aspect of the collision, I have to consider the rotational aspect of it.
The concepts are similar, but must now concern angular momentum and angular velocity instead of linear momentum
and linear velocity. Angular momentum is denoted by L and defined below:
A rotational equivalent to the version of Newton’s Second Law given above yields the equation:
However, the net torque during the collision is not zero because of the friction between the balls. Calculating
the torque applied by this frictional force requires calculating the perimeter velocities of each of the balls at
the point of collision. This is similar to the way I calculated the frictional force applied by the felt in stage
2, with some slight changes. There is a different coefficient of friction, μb, which I will
assign to be the coefficient of friction between the two balls (on the order of 0.1). There is also extra
calculation required to determine the direction of the frictional force. Since we are dealing with two perimeter
velocities, we have to find the relative velocity of one with respect to the other. For example, the perimeter
velocity of ball 2 with respect to ball 1 would be given by the equation
.
In this equation, vectors r1 and r2 are the vectors extending from the centers
of ball 1 and ball 2, respectively, to the point of contact between them. To get the direction of the frictional
force applied to ball 2 by ball 1, I must add this relative perimeter velocity to the tangential velocity of ball 2.
To get the magnitude of the frictional force, I must know the normal force applied to ball 2 by ball 1, which is
proportional to the normal change in momentum of ball 1 (using the impulse-momentum theory given above). All of this
yields the following equation for the frictional force applied to ball 2:
Using this frictional force, I can calculate the change in angular velocity of ball 2 in the same way I did during
stage 2, substituting the proper frictional force. This is shown below.
The exact same calculations can be made for ball 1, allowing me to obtain the change in angular velocity for ball 1
as well.
For collisions between a ball and a rail, a similar process is necessary.
Back to the Project Page