Physics - Collisions in 1 dimension without using impulse

solution using impulse.

Solution using conservation of momentum and energy

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

image

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

image

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

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

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

where:

image is initial velocity of body a image is initial velocity of body b
image is final velocity of body a image is final velocity of body b
image is mass of body a image is mass of body b

We want to find the final velocities (image and image) 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: image * (image - image) = image * (image- image)

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

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

dividing 3 by this gives:image + image= image+ image

so :image image- image= - (image - image)

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

But this only tells you what the relative speed of the objects is to calculate the absolute speed, try the following:

from 2 : image* image + image* image = image* image + image* image

image* image = image* image + image* image - image* image

substituting for imagein 4 gives: (image + image - image)* image = image* image + image* image - image* image

image* (image+image) = image* (image- image)+ image*2* image

image image = image* image+ image* image

and

image= image + image - image = image + image* image + image *( image-1)

image image = image* image- image* image


 

perfectly inelastic collision

First take the case of perfectly inelastic collisions (where the objects stick together after collision) and their final velocity is equal.

So,

image = image

(image - image)*image = -(image - image)*image

image * (image + image ) = image*image + image*image

so the solution is:

image = image =image* image+ image* image

The value of the impulse is:

impulse = (image - image)*image

impulse = (image* image+ image* image - image)*image

impulse = (image* image+ image* image - image)*image

impulse = (image*- image+ image* image )*image

impulse = (image-image )* image

perfectly elastic collision

In this case the equation for impulse is the same as inelastic case (but its value is twice because the objects separate at the same rate that they approach)

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

in this case, relative separating velocity = - relative approach velocity

(image - image) = -(image - image)

-( image- image) = -(image - 2image+image)

(image - image)*image +(image - 2image+image)*image = 0

image*image - image*image +(image - 2image+image)*image = 0

image* (image + image)= image* ( image -image) + 2*image*image

which gives the solution -

image = image* image+ image* image

The value of the impulse is:

impulse = (image - image)*image

impulse = ( image* image+ image* image - image)*image

impulse = ( image*- image+ image* image)*image

 

impulse = (image- image) image*image

impulse = 2(image- image)* image


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.