# Physics - Collision Response in one dimensional case:

by conservation of energy: * + * = * + *

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

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

from 1 we get: * + - * =

from 2 we get: * + - * =

combining we get

* + = * + = * + - *

* + 2*** - 2*** -2* * * + * = * -

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

so to get all we have to do is solve quadratic equation where:

a = + 1

b = 2**-2* *

c = *(-)

=

= -2**-2* * +- sqrt (2**-2* * -4( + 1)**(-)

-----------------------------------------------------------------------------

2*( + 1)

Here I'm stuck, if you have any ideas how to take this forward please let me know.

back to collisions

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.

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.

 Dark Basic Professional Edition - It is better to get this professional edition 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 Game Programming with Darkbasic - book for above software

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