Algorithm Search⌘K

Modelcore

Elastically deformable models

Also called Terzopoulos deformable models.

Elastic curves, surfaces and solids whose energy measures the change of the metric and curvature tensors, discretized by finite differences and advanced by a semi-implicit step.

The elastically deformable models of Terzopoulos, Platt, Barr and Fleischer (1987) animate curves, surfaces and solids whose shape changes by the laws of elasticity, so that one set of equations describes both the shape and the motion. A point with material coordinates aa in the domain Ω\Omega is at r(a,t)r(a, t), and the motion follows the Lagrange form

∂∂t(μ∂r∂t)+γ∂r∂t+δE(r)δr=f(r,t),\frac{\partial}{\partial t}\Bigl(\mu\frac{\partial r}{\partial t}\Bigr) + \gamma\frac{\partial r}{\partial t} + \frac{\delta\mathcal E(r)}{\delta r} = f(r, t),

with the mass density μ(a)\mu(a), the damping density γ(a)\gamma(a), the external force ff and the variational derivative of the deformation energy E\mathcal E. The energy compares the fundamental forms of the current shape with those of the rest shape r0r^0, so it is zero for every rigid motion.

The machine

The measures of deformation. For a surface with coordinates a=(a1,a2)a = (a_1, a_2), the metric tensor is Gij=∂r∂ai⋅∂r∂ajG_{ij} = \frac{\partial r}{\partial a_i}\cdot\frac{\partial r}{\partial a_j}, the first fundamental form. The curvature tensor is Bij=n⋅∂2r∂ai∂ajB_{ij} = n\cdot\frac{\partial^2r}{\partial a_i\partial a_j}, with the unit normal nn, the second fundamental form. A solid has a 3×33 \times 3 metric tensor and no curvature tensor; a space curve has the arc length, the curvature κ\kappa and the torsion τ\tau.

The energies. With weighted matrix norms and the rest values marked by 0, the paper uses

Ecurve=∫Ωα(s−s0)2+β(κ−κ0)2+γ(τ−τ0)2 da,\mathcal E_{\text{curve}} = \int_\Omega\alpha(s - s^0)^2 + \beta(\kappa - \kappa^0)^2 + \gamma(\tau - \tau^0)^2\,da,
Esurface=∫Ω∥G−G0∥α2+∥B−B0∥β2 da1da2,Esolid=∫Ω∥G−G0∥α2 da1da2da3.\mathcal E_{\text{surface}} = \int_\Omega\lVert G - G^0\rVert_\alpha^2 + \lVert B - B^0\rVert_\beta^2\,da_1da_2, \qquad \mathcal E_{\text{solid}} = \int_\Omega\lVert G - G^0\rVert_\alpha^2\,da_1da_2da_3.

The simplified force for a surface. The paper takes E=∫∑i,jηij(Gij−Gij0)2+ξij(Bij−Bij0)2\mathcal E = \int\sum_{i,j}\eta_{ij}(G_{ij} - G^0_{ij})^2 + \xi_{ij}(B_{ij} - B^0_{ij})^2 and replaces the variational derivative by

e(r)=∑i,j=12−∂∂ai(αij∂r∂aj)+∂2∂ai∂aj(βij∂2r∂ai∂aj),e(r) = \sum_{i,j = 1}^2 -\frac{\partial}{\partial a_i}\Bigl(\alpha_{ij}\frac{\partial r}{\partial a_j}\Bigr) + \frac{\partial^2}{\partial a_i\partial a_j}\Bigl(\beta_{ij}\frac{\partial^2r}{\partial a_i\partial a_j}\Bigr),

with αij=ηij(Gij−Gij0)\alpha_{ij} = \eta_{ij}(G_{ij} - G^0_{ij}) and βij=ξij(Bij−Bij0)\beta_{ij} = \xi_{ij}(B_{ij} - B^0_{ij}). The weights η11\eta_{11}, η22\eta_{22} resist stretch along the coordinate directions and η12\eta_{12} resists shear; ξ11\xi_{11}, ξ22\xi_{22} resist bending and ξ12\xi_{12} resists twist.

Finite differences. The surface is an M×NM \times N grid with spacings h1h_1, h2h_2. Forward and backward differences replace the derivatives in αij\alpha_{ij}, βij\beta_{ij} and ee, and the force of the whole grid takes the form e=K(r) re = K(r)\,r, with a sparse, banded stiffness matrix KK that depends on the current shape. With the diagonal mass matrix MM and damping matrix CC, the motion becomes Mr¨+Cr˙+K(r) r=fM\ddot r + C\dot r + K(r)\,r = f.

The semi-implicit step. With central differences in time, ee evaluated at t+Δtt + \Delta t with KK frozen at rtr_t, and ff at tt, each step solves one linear system

Atrt+Δt=gt,At=K(rt)+1Δt2M+12ΔtC,A_tr_{t+\Delta t} = g_t, \qquad A_t = K(r_t) + \frac1{\Delta t^2}M + \frac1{2\Delta t}C,
gt=ft+(1Δt2M+12ΔtC)rt+(1ΔtM−12C)vt,vt=rt−rt−ΔtΔt.g_t = f_t + \Bigl(\frac1{\Delta t^2}M + \frac1{2\Delta t}C\Bigr)r_t + \Bigl(\frac1{\Delta t}M - \frac12C\Bigr)v_t, \qquad v_t = \frac{r_t - r_{t-\Delta t}}{\Delta t}.

The paper solves it by Cholesky decomposition or by Gauss-Seidel relaxation.

Applied forces. Gravity μg\mu g, a Hookean spring k(r0−r(a0))k(r_0 - r(a_0)) to a point, a viscous fluid force c(n⋅v)nc(n\cdot v)n with the velocity v=u−∂r/∂tv = u - \partial r/\partial t relative to a stream uu, and a collision force from the potential cexp⁡(−f(r)/ϵ)c\exp(-f(r)/\epsilon) of the inside-outside function ff of a fixed obstacle.

What it counts

E\mathcal E counts how far the lengths and the angles (through GG) and the bending (through BB) of the body are from those of its rest shape. It does not count where the body is or how it is turned. The weights select the material: a large η\eta with ξ=0\xi = 0 gives a cloth that resists stretch, a small η\eta with ξ=0\xi = 0 a rubber sheet, a large η\eta with a modest ξ\xi paper, and a larger ξ\xi a spring-like metal sheet.

Example. For one linear mode with stiffness ω2\omega^2, unit mass and no damping, the step gives (1+Δt2ω2)xn+1=2xn−xn−1(1 + \Delta t^2\omega^2)x_{n+1} = 2x_n - x_{n-1}. The amplitude falls by the factor (1+Δt2ω2)−1/2(1 + \Delta t^2\omega^2)^{-1/2} per step, for every Δt\Delta t:

Δt ω\Delta t\,\omega 0.1 1 10
factor per step 0.995037 0.707107 0.099504

So the step is stable for every step size, and it damps the fast modes strongly.

Relation to other models

  • Finite element method. The paper names finite elements as the other way to discretize Eq. 1 and uses finite differences on a regular grid. Many later methods use finite elements on meshes with a hyperelastic energy of the deformation gradient.
  • Hyperelastic materials. If the material coordinates are the rest positions, the metric tensor of a solid is the right Cauchy-Green tensor FTFF^TF, and G−G0=2EG - G^0 = 2E with the Green strain EE. So the solid energy is a weighted quadratic energy of EE, like the St. Venant-Kirchhoff model, but with weights that need not be isotropic.
  • Mass-spring systems. The finite difference terms of η11\eta_{11} and η22\eta_{22} couple neighbors along the grid lines, like springs, but the energy is quadratic in the change of the squared length.
  • Discrete shells and cloth. Later surface models also split the energy into a stretch part and a bending part.
  • Spline under tension. The paper notes that with α12=α21=0\alpha_{12} = \alpha_{21} = 0 and with α11\alpha_{11}, α22\alpha_{22} and βij\beta_{ij} independent of rr, the force is that of a thin plate surface under tension, and for curves that of a spline under tension.
  • Backward Euler. The step has the same idea: the elastic force at the new time makes the step stable for stiff materials, at the cost of one linear solve and of numerical damping.

Known results in the model

  • Rigid motions cost nothing (proved). For r↦Rr+cr \mapsto Rr + c with a rotation RR, the derivatives of rr turn by RR and nn turns by RR, so GG and BB do not change and E\mathcal E is the same; it is zero at every rigid motion of the rest shape.
  • The stretch term is an exact gradient (proved). For symmetric η\eta, δGij=δr,i⋅r,j+r,i⋅δr,j\delta G_{ij} = \delta r_{,i}\cdot r_{,j} + r_{,i}\cdot\delta r_{,j} gives δ(14∫∑ηij(Gij−Gij0)2)=∫∑αijr,j⋅δr,i\delta\bigl(\frac14\int\sum\eta_{ij}(G_{ij} - G^0_{ij})^2\bigr) = \int\sum\alpha_{ij}r_{,j}\cdot\delta r_{,i}, and integration by parts gives the first sum of e(r)e(r). So the α\alpha part is the variational derivative of the stretch energy with the weight 14η\frac14\eta.
  • The bending term is a simplification (stated in the paper). The exact variational derivative of the BB term is long, because nn depends on rr. The β\beta part of e(r)e(r) is chosen by analogy with the α\alpha part, so it is not in general the gradient of an energy (heuristic).
  • One linear solve per step (proved). AtA_t and gtg_t use only rtr_t and rt−Δtr_{t-\Delta t}, so each step is one sparse linear system in 3MN3MN unknowns for a surface in space. If α\alpha and β\beta do not depend on rr, then AtA_t is constant and one decomposition serves all steps, as the paper notes.
  • The step and the paper's form agree (proved). Putting the central differences into Mr¨+Cr˙+K(rt)rt+Δt=ftM\ddot r + C\dot r + K(r_t)r_{t+\Delta t} = f_t and writing rt−Δt=rt−Δt vtr_{t-\Delta t} = r_t - \Delta t\,v_t gives exactly AtA_t and gtg_t above.
  • Stable and damping for a linear mode (proved). The roots of (1+Δt2ω2)z2−2z+1=0(1 + \Delta t^2\omega^2)z^2 - 2z + 1 = 0 are complex with ∣z∣2=1/(1+Δt2ω2)<1\lvert z\rvert^2 = 1/(1 + \Delta t^2\omega^2) < 1, which gives the table above.
  • Self-collision (stated in the paper). The paper avoids self-intersection only with a repulsive force around the surface, and notes that this is expensive without a hierarchy of bounding boxes.

References

  1. Demetri Terzopoulos, John Platt, Alan Barr and Kurt Fleischer, Elastically deformable models, SIGGRAPH 1987, Computer Graphics 21(4), 205 to 214, Section 3, Eq. 1 (the equation of motion); Section 4, Eqs. 2 to 8 (the fundamental forms and the energies); Section 5, Eqs. 9 to 13 (the applied forces); Section 6, Eqs. 14 to 31 (the simplified force, the finite differences and the semi-implicit step)

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW3 standard
  • at least two sources