Graphics Reference
In-Depth Information
can be arbitrarily assigned to an object by the animator and the mass evenly distributed among the
object's vertices. If there is an uneven distribution of vertices throughout the object definition, then
masses can be assigned to vertices in an attempt to more evenly distribute the mass. Spring constants
are similarly arbitrary and are usually assigned uniformly throughout the object to some user-specified
value. It is most common to pair a damper with each spring to better control the resulting motion at the
expense of dealing with an extra set of constants for the dampers. To simplify the following discussion
and diagrams, the spring-damper pairs will be referred to simply as springs with the understanding that
there is usually an associated damper.
As external forces are applied to specific vertices of the object, either because of collisions, gravity,
wind, or explicitly scripted forces, vertices will be displaced relative to other vertices of the object. This
displacement will induce spring forces, which will impart forces to the adjacent vertices as well as
reactive forces back to the initial vertex. These forces will result in further displacements, which will
induce more spring forces throughout the object, resulting in more displacements, and so on. The result
will be an object that is wriggling and jiggling as a result of the forces propagating along the edge
springs and producing constant relative displacements of the vertices.
One of the drawbacks with using springs to model the effects of external forces on objects is that the
effect has to propagate through the object, one time step at a time. This means that the number of ver-
tices used to model an object and the length of edges used have an effect on the object's reaction to
forces. Because the vertices carry the mass of the object, using a different distribution of vertices to
describe the same object will result in a difference in the way the object reacts to external forces.
A simple example
In a simple two-dimensional example, an equilateral triangle composed of three vertices and three
edges with uniformmass distribution and uniform spring constants will react to an initial external force
applied to one of the vertices ( Figure 7.2 ) .
In the example, an external force is applied to vertex V 2 , pushing it generally toward the other
two vertices. Assume that the force is momentary and is applied only for one time step during the ani-
mation. At the application of the force, an acceleration ( a 2 ΒΌ F / m 2 ) is imparted to vertex V 2 by the force.
The acceleration gives rise to a velocity at point V 2 , which in turn creates a change in its position. At the
next time step, the external force has already been removed, but, because vertex V 2 has been displaced,
the lengths of edges E 12 and E 23 have been changed. As a result of this, a spring force is created along
the two edges. The spring that models edge E 12 imparts a restoring force to vertices V 1 and V 2 , while the
V 1
E 31
V 3
E 12
E 23
F
V 2
FIGURE 7.2
A simple spring-mass model of a flexible object.
 
Search WWH ::




Custom Search