7.3. COMPUTING FORCES AND THEIR DERIVATIVES 61
7.3.1 DAMPING FORCES
To obtain stable and robust cloth simulations, we will also need to apply damping forces to the
system. In the real world, energy dissipates in a number of ways and we need to mimic this in
our simulator. e damping force d 2 R
3
is defined using the condition function as follows:
d D k
d
@C.x/
@x
P
C .x/;
(7.5)
where k
d
is the damping stiffness that we are free to pick. We can thus apply damping forces
associated with the conditions imposed on the triangles.
Just like normal forces, these damping forces will also contribute to the force derivatives
matrices
@d
i
@x
j
2 R
33
:
@d
i
@x
j
D k
d
@C.x/
@x
i
@
P
C .x/
T
@x
j
C
@
2
C.x/
@x
i
@x
j
P
C .x/
!
: (7.6)
Following the findings of Pritchard [2006], we compute
P
C.x/ 2 R
3
as follows:
P
C.x/ D
d C.x/
dt
D
@C.x/
@x
@x
@t
D
X
i
C.x/
@x
i
v
i
(7.7)
with the sum over all the particles i participating in the condition function. Now pay close
attention! Up until now, all matrices were symmetric. We see in Equation (7.6) that the first
term breaks symmetry. However, the math dictates that it should be there. is complicates
solving the linear system since we saw that it is very advantageous to have symmetric matrices.
One way to overcome this difficulty is to just drop this first term so we can maintain
symmetry. Now, we’re deviating from the true mathematical model and this is not physically
justifiable, but it turns out that the results remain very good.