Graphics Reference
In-Depth Information
sufficiently small time interval is a line segment, so by tracing a ray from the
particle's origin in the direction of its velocity we can detect collisions with other
parts of the scene. All of the data structures and algorithms built for tracing light
rays can thus be applied to dynamics simulation.
It is also possible to model collisions between particles with volume while
simulating the movement of each particle as if it were a point mass. To detect a
general intersection between two particles we choose the reference frame of one
(so that it is not moving), and then extrude the other one along the relative veloc-
ity vector. For particles with spherical bounds the intersection test is relatively
simple because it is equivalent to testing whether a point is inside a capsule (a
cylinder with a hemispherical cap on each end). Collisions between other shapes
are often more difficult to compute, and the best solution can be to use a spatial
data structure to detect intersecting polygons (see Chapter 37).
35.6.5.2 Normal Forces through Transient Constraints
After a collision is detected, the system must respond to prevent particles from
penetrating the scene. We've already seen one response—normal forces. When a
collision occurs between objects with very low velocity toward each other, it is
likely due to resting contact. In this case, reacting to the collision by reversing
velocity might introduce energy into the system, since the “collision” itself is an
artifact of limited numerical precision for times and positions: Two objects in
resting contact should never have accelerated toward each other in the first place.
We can restore stability by explicitly moving the objects out of contact or applying
normal forces to prevent penetration before it occurs.
We've seen that normal forces can be tricky to apply because they must occur
“after all other forces” ...which leads to an awkward ordering constraint when
normal forces from multiple surfaces are in effect. In systems with a sophisticated
integration scheme, it is possible to apply normal forces implicitly rather than
explicitly. In these cases, contact creates a temporary “joint” between two objects,
requiring that the solution to the simulation during the time step must not move
the point of contact on either object [Lö81].
35.6.5.3 Penalty Forces
A generalization of normal forces can elegantly resolve collisions between objects
with significant velocities. A penalty force is something like a normal force.
It applies to objects that are interpenetrating. The magnitude of a penalty force
increases with the level of penetration, and the direction is that which will most
quickly separate them. This is actually a reasonable model for microscopic elec-
trostatic repulsion. Atoms never really contact one another. As they come close,
they repulse each other with increasing strength until the relative velocities reverse
and the proximity decreases. When the force is integrated over the time period
from when the penalty force first becomes significant to when it again becomes
insignificant, the net result is that of an elastic collision: The velocities of the
objects have been reflected about the normal to the plane of their “collision.”
Penalty forces are simple to compute and apply, but often difficult to tune.
If the penalty force is too weak, then objects will interpenetrate too far before
rebounding. This gives the appearance of overly rubbery materials. If the penalty
force is too strong, then any inaccuracy in the integration process can destabi-
lize the system by creating energy due to undersampling. When there are multiple
potential points of contact, uneven application of penalty forces due to differing
 
Search WWH ::




Custom Search