Graphics Reference
In-Depth Information
Compute dpA, dpB
;Eq. 7.60
Vrelative
<
- dot(N,( dpA - dpB)
;Eq. 7.63
if Vrelative
>
threshold
compute j
;Eq. 7.65
J
- j*N
PA <-PAþ J
<
;update object A linear momentum
PB
<
- PB - J
;update object B linear momentum
LA <-LAþ rA x J
;update object A angular momentum
LB
<
- LB - rB x J
;update object B angular momentum
else if Vrelative
-threshold
resting contact
>
else
objects are moving away from each other
FIGURE 7.24
Computing the impulse force of collision.
If there is a collision, then Equation 7.64 is used to compute the magnitude of the impulse
( Figure 7.24 ). The impulse is used to scale the contact normal, which can then be used to update
the linear and angular momenta of each object.
If there is more than one point of contact between two objects, then each must be tested for collision.
Each time a collision point is identified, it is processed for updating the momentum as above. If any
collision is processed in the list of contact points, then after the momenta have been updated, the contact
list must be traversed again to see if there exist any collision points with the new object momenta. Each
time one or more collisions are detected and processed in the list, the list must be traversed again; this is
repeated until it can be traversed and no collisions are detected.
Friction
An object resting on the surface of another object (the supporting object ) is referred to as being in a state
of resting contact with respect to that supporting object. In such a case, any force acting on the first
object is decomposed into a component parallel to the contact surface and a component in the direction
of the normal of the contact surface, called the normal force ,
F N ( Figure 7.25 ). If the normal force is
normal
parallel component
of applied force
applied
force
normal component
of applied force
FIGURE 7.25
Normal and parallel components of applied force.
 
Search WWH ::




Custom Search