653
()
21
12
ˆˆ( 1).
p 11
mm
==ε+ ⋅ − ⋅
+
pn vnvnn
Notice that if the coeffi cient of restitution is one (perfectly elastic collision) and
if the mass of body 2 is eff ectively infi nite (as it would be for, say, a concrete
driveway), then (1/m 2 ) = 0, v 2 = 0 , and this expression reduces to a refl ection of
the other body’s velocity vector about the contact normal, as we’d expect:
()
()
()
11
1 1 11 1 1
11
11
ˆ 2 ;
ˆ 2
2.
m
mm
mm
=− ⋅
′==+ −⋅
=− ⋅
p v nn
v p p v v nn
v v nn
The solution gets a bit hairier when we take the rotations of the bodies
into account. In this case, we need to look at the velocities of the points of
contact on the two bodies rather than the velocities of their centers of mass,
and we need to calculate the impulse in such a way as to impart a realis-
tic rotational eff ect as a result of the collision. We won’t get into the details
here, but Chris Hecker’s article, available at htt p://chrishecker.com/images/e/
e7/Gdmphys3.pdf, does an excellent job of describing both the linear and the
rotational aspects of collision response. The theory behind collision response
is explained more fully in [15].
12.4.7.3. Penalty Forces
Another approach to collision response is to introduce imaginary forces called
penalty forces into the simulation. A penalty force acts like a stiff damped spring
att ached to the contact points between two bodies that have just interpenetrat-
ed. Such a force induces the desired collision response over a short but fi nite
period of time. Using this approach, the spring constant k eff ectively controls
the duration of the interpenetration, and the damping coeffi cient b acts a bit
like the restitution coeffi cient. When b = 0, there is no damping—no energy is
lost, and the collision is perfectly elastic. As b increases, the collision becomes
more plastic.
Let’s take a brief look at some of the pros and cons of the penalty force ap-
proach to resolving collisions. On the positive side, penalty forces are easy to
implement and understand. They also work well when three or more bodies
are interpenetrating each other. This problem is very diffi cult to solve when
resolving collisions one pair at a time. A good example is the Sony PS3 demo
in which a huge number of rubber duckies are poured into a bathtub—the
simulation was nice and stable despite the very large number of collisions.
The penalty force method is a great way to achieve this.
12.4. Rigid Body Dynamics