We often simulate cloth with triangle surfaces instead of a tetrahedron. Therefore, we cannot totally rely on the volumetric approach (while we do introduce "thickness" to adapt the mechanics).
Finite Elements
Given the reference space in 3D, and the reference position as \(\mathbf X = (X, Y, Z)^T \in \mathbb R^3\), just as tetrahedron case, we represent the finite elements at point \(\mathbf X\) given by the 3 corners of the triangle \(T=(\mathbf X_0, \mathbf X_1, \mathbf X_2)\)
where \(\phi_i\) is the shape function, and as before, we apply the constraint \(\phi_0 + \phi_1 + \phi_2 = 1\Rightarrow \phi_0 = 1- \phi_1 - \phi_2\).
However, note that \(\mathbf X\) may not lie exactly on the surface of the triangle. In this case, we want to find the function for the nearest point of \(\mathbf X\) on triangle, i.e. \(proj_{T}(\mathbf X)\). In this case, we can turn the question of solving the shape function to an optimization problem. i.e.
where \(\Delta \mathbf X = \mathbf X - \mathbf X_0\)
Note that this shape function is the barycentric coordinate for \(proj_T(\mathbf X)\), and for points off the triangle
\[\mathbf X = \sum_0^2 \mathbf X_i\phi_i(\mathbf X) + \alpha N = \sum_0^2 \mathbf X_i\phi_i(\mathbf X) + \underset{\alpha}{\Delta \mathbf X^TN}\cdot N\]
where \(N\) is the normal of \(T\)
Deformation
Note that we introduce \(N_T\), while the world space have different normal on the deformed triangle \(\mathbf n\), therefore, we can simply have the deformation as
Let the cloth domain be \(\Omega\), since the cloth is thin, we can just integrate over the triangle surface, and then multiple the thickness to get the volumetric kinetic energy, i.e.
where \((V\Delta\mathbf X)\) represents the rotation, and \(\Lambda\) is the squared singular values of \(F\). Therefore, via Principal Stretches, we have
where \(\Sigma(F) = (\sigma_0(F), \sigma_1(F), \sigma_2(F))\) is the diagonal of singular value matrix from SVD of \(F\).
With this, we can filter out rotations and translations, which are unwanted as they should not change the potential energy.
Then, we want our cloth to go back to undeformed shape when external forces are removed, therefore, we introduce the quadratic energy model Co-Rotational Linear Elasticity
Note that $\mathbf D\varphi(1, 1, 1) = 0\Rightarrow $ minimum at \((1, 1, 1)\), which is the identity transformation, this energy is minimized at undeformed shape.
Since \(F\) is constant across the triangle, now we simply have the potential energy for the triangle be
The Lagrangian and EL equation is still the same, since we only change the same of the tetrahedron.
Time Integration
Usually we use linearly implicit integrator for cloth due to high membrane stiffness. Therefore, we still need the generalized force and generalized stiffness.
Note that the Hessian of \(\varphi\) will be extremely messy, therefore, instead of using the full Hessian to do the Newton's method, we can use an approximation of the Hessian and Quasi-Newton Method. In this case, we will have
Then, the problem is left with \(\frac{\partial^2 \varphi}{\partial F^2}\), which involves with the SVD.
Derivative of SVD
For a SVD \(A = U\Sigma V^T\), we can parameterized by \(A\) as \(U(A)\Sigma(A)V(A)^T\), hence the derivative w.r.t to entries of \(A\) can be written as