58 7. CONTINUUM APPROACH TO CLOTH
Just like springs have a rest length to represent the rest configuration, triangles will need
something similar. Since it is a 2D representation we will need two numbers for every particle
which are typically named .u; v/ that map a vertex into a 2D undeformed rest configuration.
is is essentially the shape that the cloth would want to attain if it wasnt subjected to any
forces. If youre familiar with computer graphics, this is exactly the same idea as .u; v/ mapping
for textures. e 3D geometry is unfolded onto a 2D surface on which textures can be painted.
Every vertex of the mesh relates to a corresponding point on the .u; v/ map.
A very simple example is shown in Figure 7.1. Here, a T-shirt is cut in a front and a back
part so it can be unfolded onto the 2D .u; v/ space. e blue dotted lines show some of the
vertex correspondences and the red lines show where the shirt is sown together.
v
u
Fr
ont Back
Figure 7.1: Example of a .u; v/ map for a simple low resolution T-shirt. e 3D mesh is cut
into front and back sections, so it can be unfolded onto the 2D .u; v/ space. A few particle
correspondences are shown with blue dotted lines and the red lines indicate the edges of triangles
that are sewed together in the 3D mesh.
Having .u; v/ maps naturally leads to a technique called flat panelling. Flat panelling refers
to the tailoring process where flat pieces of cloth are sewn together to create garments. ey will
always have the tendency to unfold back into this flat panel, but of course they cant …, because
theyre stitched. Now, we do have the option to have a rest configuration that doesnt want to
be flat by imposing rest-bend angles. is will be clear when discussing bend forces. e .u; v/
map for the dress example of Figure 2.1 is shown in Figure 7.2.
7.3 COMPUTING FORCES AND THEIR DERIVATIVES
Just like in Section 4.3, we’ll compute forces as the negative gradients of energy functions. For
the continuum approach, these energies are based on the triangle as a whole and not just the
edges as was the case in the mass-spring network. e energy functions E
c
.x/ are defined based
7.3. COMPUTING FORCES AND THEIR DERIVATIVES 59
Figure 7.2: Example of a .u; v/ map for the dress example shown in Figure 2.1.
on condition functions C.x/ as proposed by Baraff and Witkin [1998]:
E
c
.x/ D
k
2
C.x/
T
C.x/;
(7.1)
where k is a stiffness constant of our choice. e value of this parameter will determinate the
behavior of the modeled material. More specifically, for a condition C.x/ we obtain a force
f
i
2 R
3
for particle i:
60 7. CONTINUUM APPROACH TO CLOTH
f
i
D
@E
c
@x
i
D
@E
c
@x
i
x
;
@E
c
@x
i
y
;
@E
c
@x
i
z
D k
@C.x/
@x
i
C.x/:
(7.2)
We have seen earlier that for an implicit solver, we wont just need the forces but also the
force derivatives with respect to positions and velocities. Taking a second partial derivative of
the above f
i
with respect to particle j gives us a Jacobian block K
ij
2 R
33
:
K
ij
D
@f
i
@x
j
D k
@C.x/
@x
i
@C.x/
@x
j
T
C
@
2
C.x/
@x
i
@x
j
C.x/
!
D
2
6
6
6
6
6
6
6
6
6
6
4
@f
i
x
@x
j
x
@f
i
x
@x
j
y
@f
i
x
@x
j
z
@f
i
y
@x
j
x
@f
i
y
@x
j
y
@f
i
y
@x
j
z
@f
i
z
@x
j
x
@f
i
z
@x
j
y
@f
i
z
@x
j
z
3
7
7
7
7
7
7
7
7
7
7
5
:
(7.3)
Since K
ij
is the second derivative of the energy function E
c
, we have
K
ij
D
@
2
E
c
@x
i
@x
j
D
@
2
E
c
@x
j
@x
i
D K
T
j i
:
(7.4)
is means that, just like we found in Equation (5.17), the global Jacobian matrix is sym-
metric.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset