Physics - Collisions in 1 dimension

Result Summery

This page is about calculating the outcome of a collision between 2 solid bodies. In other words given the initial velocities and masses of the objects, what will be the final velocities?

The results are summarised here, these results are proved in the remainder of this page.

 

Perfectly elastic (Conservation of energy)

- = - ( - )

 

Perfectly inelastic (Objects connect)

=

 

General Case (between Perfectly elastic and Perfectly inelastic)

e = (- ) / ( - )

coefficient of restitution e=1 e = 0 e depends on materials
impulse = 2*(- )* (- )* (e+1)*(- )*
Final velocity of object a= = * + * * + * * +*(e+1)*
Final velocity of object b= = * - * * + * *(e+1)* +

Assumptions

We are making some simplifying assumptions,

The outcome depends on the material of the colliding objects, it will be somewhere between the following two extremes:

The value between these two extremes depends on the materials of the two objects, this is defined by the coefficient of restitution (e) which is the ratio of speed of separation to speed of approach in a collision.

There are two methods shown here:

  1. solution using conservation of momentum and energy
  2. solution using impulse

Solution using impulse

In this case we want to find the minimum impulse required to prevent the objects overlapping, the minimum impulse required is that needed to reduce the approach velocity to zero.

In this case the objects will remain in contact, and their final velocities are the same. (They are not diverging or converging) so =

impulse = ( - )* = -( - )*

where:
symbol
description
type
units
v final velocity of object a vector m/s
v initial velocity of object a vector m/s
ma mass of object a scalar kg
v final velocity of object b vector m/s
v initial velocity of object b vector m/s
mb mass of object b scalar kg

therefore:

impulse/ = ( - ) and impulse/ = -( - )

approach velocity = -

and diverge velocity = 0 = - since = as explained above

 

approach velocity = -= ( - ) -( - )

approach velocity = impulse/ + impulse/

rearranging gives:

impulse = approach velocity*

In this case the kinetic energy of the complete system after the collision will be less than the kinetic energy before, the difference being dissipated as heat or sound, etc.


coefficient of restitution

the coefficient of restitution (e) is the ratio of speed of separation to speed of approach in a collision.

So,

e = (- ) / ( - )

so in the perfectly elastic (Conservation of energy) case

- = - ( - )

therefore e = 1

In the perfectly inelastic (Objects connect) case

=

therefore e = 0

Solution using impulse and coefficient of restitution

This is a more general case where the colliding objects may bounce off each other depending on the nature of the objects.

So,

impulse = ( - )* = -( - )*

and

e = (- ) / ( - )

where:
symbol
description
type
units
v final velocity of object a vector m/s
v initial velocity of object a vector m/s
ma mass of object a scalar kg
v final velocity of object b vector m/s
v initial velocity of object b vector m/s
mb mass of object b scalar kg
e coefficient of restitution which depends on the nature of the two colliding materials scalar  

therefore:

impulse/ = ( - ) and impulse/ = -( - )

so adding these together gives:

impulse/ +impulse/ = ( - ) -( - )

rearranging gives:

impulse( 1/ +1/ )= ( - ) -( - )

substituting (- ) = e*( - )

gives:

impulse*( 1/ +1/ )= - (e+1)*( - )

rearranging gives:

impulse = (e+1)*approach velocity*


Solution using conservation of momentum and energy

before the collision the two bodies are approaching in the same plane:

after the collision they have new velocities but are still in the same plane:

(note: all velocities are positive toward the right, the arrows on the diagrams above just indicate their motion relative to each other)

by conservation of energy: * + * = * + * (both sides of equation multiplied by two)

by conservation of momentum: * + * = * + *

where:

where:
symbol
description
type
units
v final velocity of object a vector m/s
v initial velocity of object a vector m/s
ma mass of object a scalar kg
v final velocity of object b vector m/s
v initial velocity of object b vector m/s
mb mass of object b scalar kg

We want to find the final velocities ( and ) so there are 2 unknowns and 2 equations, so we can solve:

This is a simultaneous quadratic equation which is difficult to solve, here is my attempt. But there is a trick, that is to measure in the frame of reference of one of the bodies, that way we can show that after the collision the bodies will move apart at the same rate that they approached each other before the collision:

rearranging 1 gives: * ( - ) = * (- )

giving : * ( + )*( - ) = * (+ ) * (- )

and from 2 we get: * ( - ) = * (- )

dividing 3 by this gives: + = +

so : - = - ( - )

i.e. the bodies move away form each other at minus the speed that they were approaching.

as above:

impulse = ( - )* = -( - )*

 

velocity change = approach velocity - approach velocity

velocity change = - - (- ) = 2*( - ) = 2*approach velocity

velocity change = impulse/ + impulse/

rearranging gives:

impulse = velocity change*

impulse = 2*approach velocity*

Calculating the final velocities from impulse

Now that we know the impulse we can calculate the final velocities,

Calculating Vaf

impulse = ( - )*

= impulse/ +

substitute impulse = (e+1)*(- )*

gives,

= (e+1)*(- )* +

= (e+1)*(- )* + (+ )

= * + ((e+1)*(- )+ )*

= * +*(e+1)*

In the perfectly inelastic case e=0 so: = * + *

In the perfectly elastic case e=1 so: = * + *

Calculating Vbf

impulse = -( - )*

= -impulse/ +

substitute impulse = (e+1)*(- )*

gives,

= -(e+1)*(- )* +

= -(e+1)*(- )* + (+ )

= *(e+1)* +

In the perfectly inelastic case e=0 so: = * + *

In the perfectly elastic case e=1 so: = * - *

 

 

We could also calculate the final velocities directly from conservation laws without using impulse as shown here but the impulse concept seems to work better for 2 and 3 dimensional cases.

Next stages

You could go on to the two dimensional case but this is quite complicated as cross-multiplication of vectors only applies to three dimensions so you might want to go straight to 3 dimensions.


metadata block
see also:

 

Correspondence about this page

Book Shop - Further reading.

Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them.

cover Physics for Game Developers - Assumes a knowledge of vectors, Matrix and trigonometry (the book has a one page introduction to quatnions). The book introduces Newtons laws but it does assume a basic knowledge physics. It covers Kinematics, Force, Kinetics, Collision (detection), Projectiles, Aircraft, Ships, Hovercraft, Cars, Real-time, 2D rigid body, Collision Response, Rigid body rotation, 3D rigid body, multiple bodies in 3D and particles. (I cant find a general formula for collision response which combines linear and rotation, but there may be something in the code included?). If you don't have the prerequisite knowledge of Matrices etc. you may want to get the Mathematics for 3D Game programming book first.

Commercial Software Shop

Where I can, I have put links to Amazon for commercial software, not directly related to the software project, but related to the subject being discussed, click on the appropriate country flag to get more details of the software or to buy it from them.

 

cover Dark Basic Professional Edition - It is better to get this professional edition

cover This is a version of basic designed for building games, for example to rotate a cube you might do the following:
make object cube 1,100
for x=1 to 360
rotate object 1,x,x,0
next x

cover Game Programming with Darkbasic - book for above software

This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2023 Martin John Baker - All rights reserved - privacy policy.