Anybody looking into the physics of 2D and 3D- elastic collisions may also be interested in my pages http://www.plasmaphysics.org.uk/collision2d.htm and http://www.plasmaphysics.org.uk/collision3d.htm which represent direct and general solutions of the problems. I have also written corresponding Fortran and C++ codes for this ( see http://www.plasmaphysics.org.uk/programs/coll2d_for.htm , http://www.plasmaphysics.org.uk/programs/coll2d_cpp.htm , http://www.plasmaphysics.org.uk/programs/coll3d_for.htm , http://www.plasmaphysics.org.uk/programs/coll3d_cpp.htm ) which are free to use for everybody.
**************
Note that there was a bug in the collision detection routine of the 2D-versions of my programs (this led in certain cases to collisions being detected when in fact there were none). I have corrected this now. I have also made minor changes to the code in order to improve speed. Furthermore I have added a simplified version to the 2D-routines that does not not contain the collision detection routine but just returns the new velocities assuming that the input coordinates are already those of the collision.
Thomas, 11.Dec.05
*******************