In the context of classical mechanics simulations and physics engines employed within video games, collision response deals with models and algorithms for simulating the changes in the motion of two solid bodies following collision and other forms of contact.
Two rigid bodies in unconstrained motion, potentially under the action of forces, may be modelled by solving their equations of motion using numerical integration techniques.
On collision, the kinetic properties of two such bodies seem to undergo an instantaneous change, typically resulting in the bodies rebounding away from each other, sliding, or settling into relative static contact, depending on the elasticity of the materials and the configuration of the collision.
The origin of the rebound phenomenon, or reaction, may be traced to the behaviour of real bodies that, unlike their perfectly rigid idealised counterparts, do undergo minor compression on collision, followed by expansion, prior to separation.
During the compression and expansion phases of two colliding bodies, each body generates reactive forces on the other at the points of contact, such that the sum reaction forces of one body are equal in magnitude but opposite in direction to the forces of the other, as per the Newtonian principle of action and reaction.
If the effects of friction are ignored, a collision is seen as affecting only the component of the velocities that are directed along the contact normal and as leaving the tangential components unaffected The degree of relative kinetic energy retained after a collision, termed the restitution, is dependent on the elasticity of the bodies‟ materials.
of the relative post-collision speed of a point of contact along the contact normal, with respect to the relative pre-collision speed of the same point along the same normal.
close to zero indicate inelastic collisions such as a piece of soft clay hitting the floor, whereas values close to one represent highly elastic collisions, such as a rubber ball bouncing off a wall.
The kinetic energy loss is relative to one body with respect to the other.
In the real world, friction is due to the imperfect microstructure of surfaces whose protrusions interlock into each other, generating reactive forces tangential to the surfaces.
To overcome the friction between two bodies in static contact, the surfaces must somehow lift away from each other.
As such, friction depends upon the nature of the two surfaces and upon the degree to which they are pressed together.
Friction always acts parallel to the surface in contact and opposite the direction of motion.
, that is, a smaller time interval must be compensated by a stronger reaction force to achieve the same impulse.
When modelling a collision between idealized rigid bodies, it is impractical to simulate the compression and expansion phases of the body geometry over the collision time interval.
allows for the derivation of a formula to compute the change in linear and angular velocities of the bodies resulting from the collision impulses.
is given and using Newton's laws of motion the relation between the bodies' pre- and post- linear velocities are as follows where, for the
of the bodies at the point of contact may be computed in terms of the respective linear and angular velocities, using for
yields[1] Thus, the procedure for computing the post-collision linear velocities
More specifically, the static and dynamic friction force magnitudes
defines a maximum magnitude for the friction force required to counter the tangential component of any external sum force applied on a relatively static body, such that it remains static.
Thus, if the external force is large enough, static friction is unable to fully counter this force, at which point the body gains velocity and becomes subject to dynamic friction of magnitude
The Coulomb friction model effectively defines a friction cone within which the tangential component of a force exerted by one body on the surface of another in static contact, is countered by an equal and opposite force such that the static configuration is maintained.
is required for robustly computing the actual friction force
Informally, the first case computes the tangent vector along the relative velocity component perpendicular to the contact normal
If there is no tangential velocity or external forces, then no friction is assumed, and
Equations (6a), (6b), (7) and (8) describe the Coulomb friction model in terms of forces.
By adapting the argument for instantaneous impulses, an impulse-based version of the Coulomb friction model may be derived, relating a frictional impulse
is the magnitude of the reaction impulse acting along contact normal
as higher values may introduce additional kinetic energy into the system.