Algorithm Search⌘K

Modeladvanced

Quadratic bending model

Also called Bergou-Wardetzky bending.

Under isometric deformation of a flat rest mesh, the bending energy is a quadratic form in the positions with a constant matrix of cotangent weights. Otherwise it is an approximation.

The quadratic bending model, also called the isometric bending model, is a bending energy for nearly inextensible triangle meshes such as cloth. Its hypotheses are that the mesh deforms isometrically, so that every edge keeps its rest length, and that the rest shape is flat. Under these hypotheses the bending energy is 12xTQx\tfrac12 \mathbf x^{\mathsf T} Q \mathbf x for a constant matrix QQ of cotangent weights, so the forces are linear in the positions and the Hessian never changes. A real simulation only keeps the edge lengths near their rest values through stiff membrane forces, so in practice the model is an approximation. It differs from discrete shells, which is nonlinear in the positions and allows a curved rest shape, and from the vertex based cotangent Laplacian, whose linear elements it replaces by edge based elements.

The machine

The smooth model. For a surface SS with mean curvature HH, Section 1 of the paper takes the bending energy

Eb(S)=12∫SH2 dA=12∫S⟨Δx,Δx⟩ dA,E_b(S) = \frac12 \int_S H^2 \, dA = \frac12 \int_S \langle \Delta \mathbf x, \Delta \mathbf x \rangle \, dA,

where x\mathbf x is the embedding of the surface and Δ\Delta is its Laplace-Beltrami operator, so that Δx\Delta \mathbf x is the mean curvature normal. Δ\Delta depends only on the metric of SS, and an isometric deformation does not change the metric. So for isometric deformations Δ\Delta is a fixed linear operator and EbE_b is quadratic in x\mathbf x. The paper calls this the central observation.

The discrete model. The positions are x=(x0,…,xn−1)∈R3n\mathbf x = (\mathbf x_0, \dots, \mathbf x_{n-1}) \in \mathbb R^{3n} (m). A mesh deforms isometrically if all its edge lengths stay the same. Section 2 asks for an energy that is (i) quadratic in x\mathbf x under isometric deformation, (ii) invariant under rigid motions and (iii) invariant under a uniform scaling, and writes it as

Eb(x)=12xTQx=12∑i,jQij⟨xi,xj⟩,Q=LTM−1L,E_b(\mathbf x) = \frac12 \mathbf x^{\mathsf T} Q \mathbf x = \frac12 \sum_{i, j} Q_{ij} \langle \mathbf x_i, \mathbf x_j \rangle, \qquad Q = L^{\mathsf T} M^{-1} L,

where QQ depends only on the rest mesh, LL is a discrete Laplacian with ∑jLij=0\sum_j L_{ij} = 0 and MM is a symmetric positive definite mass matrix that scales with the square of the length. QQ acts on each of the three coordinates in the same way. For cloth the paper uses the nonconforming Crouzeix-Raviart elements, whose degrees of freedom sit on the edges, and gives QQ as a sum of local 4×44 \times 4 matrices, one per interior edge.

Label the stencil of the interior edge e0=(x0,x1)e_0 = (\mathbf x_0, \mathbf x_1) as follows. Its triangles are t0=(x0,x1,x2)t_0 = (\mathbf x_0, \mathbf x_1, \mathbf x_2) and t1=(x0,x1,x3)t_1 = (\mathbf x_0, \mathbf x_1, \mathbf x_3) with rest areas A0A_0 and A1A_1. The other edges are e1=x0x2e_1 = \mathbf x_0 \mathbf x_2, e2=x0x3e_2 = \mathbf x_0 \mathbf x_3, e3=x1x2e_3 = \mathbf x_1 \mathbf x_2 and e4=x1x3e_4 = \mathbf x_1 \mathbf x_3, and cjkc_{jk} is the cotangent of the rest angle between eje_j and eke_k. So c01c_{01} and c02c_{02} are at x0\mathbf x_0, and c03c_{03} and c04c_{04} are at x1\mathbf x_1. Then

K0=(c03+c04, c01+c02, −c01−c03, −c02−c04),Q(e0)=3A0+A1K0TK0,K_0 = (c_{03} + c_{04},\ c_{01} + c_{02},\ -c_{01} - c_{03},\ -c_{02} - c_{04}), \qquad Q(e_0) = \frac{3}{A_0 + A_1} K_0^{\mathsf T} K_0,

and the local energy is 12(x0,x1,x2,x3) Q(e0) (x0,x1,x2,x3)T\tfrac12 (\mathbf x_0, \mathbf x_1, \mathbf x_2, \mathbf x_3) \, Q(e_0) \, (\mathbf x_0, \mathbf x_1, \mathbf x_2, \mathbf x_3)^{\mathsf T}. A scratch check of this page confirmed the labelling: with it, K0K_0 applied to the four points of a flat stencil gives 00.

The elastic bending force is −∇Eb=−Qx-\nabla E_b = -Q \mathbf x. The paper adds Rayleigh damping −(α1M+α2∇2E)v-(\alpha_1 M + \alpha_2 \nabla^2 E)\mathbf v, whose bending part −α2Qv-\alpha_2 Q \mathbf v is also precomputed. The energy is multiplied by a bending stiffness as in any bending model, and the paper found no need to change the material parameters when it switched from a nonlinear hinge model to this one.

  1. ASSEMBLE-BENDING-MATRIX(rest mesh)
  2. 1Q <- the zero n by n sparse matrix
  3. 2for each interior edge e0 = (x0, x1) with triangles (x0, x1, x2) and (x0, x1, x3):
  4. 3c01, c02 <- cot of the rest angles at x0 in the two triangles
  5. 4c03, c04 <- cot of the rest angles at x1 in the two triangles
  6. 5K <- (c03 + c04, c01 + c02, -c01 - c03, -c02 - c04)
  7. 6add 3 / (A0 + A1) K^T K to the rows and columns of x0, x1, x2, x3 in Q
  8. 7return Q
  9. BENDING-FORCE(Q, x)
  10. 8return -Q x, for each coordinate separately

The standing assumptions are: the deformation is isometric, which an in-plane model with high stiffness keeps close to true (the paper treats the in-plane model as a penalty that enforces isometry); the rest shape is flat; and no rest triangle is degenerate, so the cotangents are finite. Boundary edges have no term.

What it counts

The model gives the bending energy EbE_b (J), the bending forces −Qx-Q\mathbf x (N) and the constant bending Hessian QQ. The assembly visits each interior edge once and costs Θ(∣E∣)\Theta(|E|) time, once per simulation. QijQ_{ij} is nonzero only if the vertices ii and jj lie in a common stencil, so QQ has at most 16∣E∣16 |E| nonzero entries, and one force evaluation is a sparse product in O(∣E∣)O(|E|) time. A nonlinear hinge model also costs O(∣E∣)O(|E|) per evaluation, with a larger constant, and must rebuild its Hessian at every Newton step.

The paper measured the gain (measured, hardware not given in the text): over two solvers, two scenes (cloth draped on a sphere and a flag in wind), regular and irregular meshes, and 400 to 25600 vertices, the simulation was typically two to three times faster than with a nonlinear hinge, and the bending force computation seven to eleven times faster. The overall gain depends on the share of the bending forces in the total cost.

Relation to other models

  • Discrete shells sums (θe−θˉe)2∣eˉ∣/hˉe(\theta_e - \bar\theta_e)^2 |\bar e| / \bar h_e over the edges, with the bend angle θe\theta_e. It is nonlinear in x\mathbf x, allows a curved rest shape, and needs a new Hessian at every step. For a flat rest shape and isometric motion, result 1 below shows that the quadratic model is the same energy with θe2\theta_e^2 replaced by 4sin⁡2(θe/2)4 \sin^2(\theta_e/2), times 12\tfrac12. The paper states that its edge based LxL\mathbf x is the linearization about the flat rest state of the models of Bridson et al. (2003), Cohen-Steiner and Morvan, and Grinspun et al.
  • Cotangent Laplacian. The paper names the usual linear (Lagrange) elements as one possible basis, which gives the vertex based cotangent Laplacian. It prefers the edge based Crouzeix-Raviart elements for cloth, because there the bending happens about the edges.
  • Baraff-Witkin cloth and bending springs of a mass-spring system give bending forces that are nonlinear in x\mathbf x. The paper notes that some models are linearized at every step instead, and that this loses the invariance under rigid motions; the quadratic model keeps it (result 2).
  • Fast mass-spring simulation and implicit fairing also gain speed from a constant matrix that is set up once. Here the matrix is exact only under the hypotheses above.
  • Willmore flow. The paper also uses the model for the fairing of surfaces, where isometry is a poor assumption; it reports that the model is still effective inside inexact Newton methods. The details are in a longer report by the same authors, which this page has not checked.

Known results in the model

Let hˉe=(hˉ0+hˉ1)/6\bar h_e = (\bar h_0 + \bar h_1)/6 for the rest heights hˉk=2Ak/∣eˉ∣\bar h_k = 2 A_k / |\bar e| of the two triangles over ee, as on the discrete shells page, and let θe\theta_e be the bend angle of ee in x\mathbf x.

  1. The exact energy under the hypotheses (proved). If the rest mesh is flat and x\mathbf x is an isometric deformation of it, then
    Eb(x)=∑e12(2sin⁡(θe/2))2 ∣eˉ∣hˉe.E_b(\mathbf x) = \sum_e \tfrac12 \big(2 \sin(\theta_e / 2)\big)^2 \, \frac{|\bar e|}{\bar h_e}.
    Proof. Take a triangle (a,b,c)(\mathbf a, \mathbf b, \mathbf c) with angles α\alpha at a\mathbf a and β\beta at b\mathbf b, and put it in its own plane with a=(0,0)\mathbf a = (0, 0), b=(l,0)\mathbf b = (l, 0) and c=(p,h)\mathbf c = (p, h), h>0h > 0. Then cot⁡α=p/h\cot\alpha = p/h, cot⁡β=(l−p)/h\cot\beta = (l - p)/h, and cot⁡β a+cot⁡α b−(cot⁡α+cot⁡β) c=(0,−l)=−l u\cot\beta \, \mathbf a + \cot\alpha \, \mathbf b - (\cot\alpha + \cot\beta)\, \mathbf c = (0, -l) = -l\, \mathbf u, where u\mathbf u is the unit vector in the plane of the triangle that is normal to the edge and points to c\mathbf c. The entries of K0K_0 are the sum of this expression for t0t_0 and for t1t_1, so K0x=−∣e∣(u0+u1)K_0 \mathbf x = -|e| (\mathbf u_0 + \mathbf u_1). An isometric deformation keeps all the angles of the triangles, so the cotangents of the deformed mesh are the rest cotangents and the formula holds for x\mathbf x. The angle between u0\mathbf u_0 and −u1-\mathbf u_1 is the bend angle θe\theta_e, so ∣u0+u1∣=2sin⁡(∣θe∣/2)|\mathbf u_0 + \mathbf u_1| = 2 \sin(|\theta_e| / 2). With ∣e∣=∣eˉ∣|e| = |\bar e| and A0+A1=∣eˉ∣(hˉ0+hˉ1)/2A_0 + A_1 = |\bar e| (\bar h_0 + \bar h_1)/2, the local energy is 12⋅3⋅4∣eˉ∣2sin⁡2(θe/2)/(A0+A1)=12(2sin⁡(θe/2))2∣eˉ∣/hˉe\tfrac12 \cdot 3 \cdot 4 |\bar e|^2 \sin^2(\theta_e/2) / (A_0 + A_1) = \tfrac12 (2\sin(\theta_e/2))^2 |\bar e| / \bar h_e. □\square So under the hypotheses the model is the discrete shells energy with a flat rest shape, with θe2\theta_e^2 replaced by 4sin⁡2(θe/2)=θe2−θe4/12+O(θe6)4 \sin^2(\theta_e/2) = \theta_e^2 - \theta_e^4/12 + O(\theta_e^6) and a factor 12\tfrac12. A scratch check with a hinge bend of θ=2.5\theta = 2.5 rad on random stencils, after a random rigid motion, matched the formula to 15 digits.
  2. Rigid motions and momentum (proved). The entries of K0K_0 sum to 00, so ∑jQij=0\sum_j Q_{ij} = 0 and a translation does not change EbE_b; a rotation RR keeps every ⟨xi,xj⟩\langle \mathbf x_i, \mathbf x_j \rangle. The forces fi=−∑jQijxj\mathbf f_i = -\sum_j Q_{ij} \mathbf x_j have the sum −∑j(∑iQij)xj=0-\sum_j (\sum_i Q_{ij}) \mathbf x_j = 0, and the total torque −∑i,jQij xi×xj-\sum_{i,j} Q_{ij}\, \mathbf x_i \times \mathbf x_j is 00 because QQ is symmetric. So the bending forces keep the linear and the angular momentum. Section 2 of the paper states that condition (ii) holds if and only if ∑iQij=∑jQij=0\sum_i Q_{ij} = \sum_j Q_{ij} = 0, with the proof in the longer report; this page proves only the direction it uses.
  3. Positive semidefinite, with the affine maps in the kernel (proved). QQ is a sum of matrices cK0TK0c K_0^{\mathsf T} K_0 with c>0c > 0, so Eb≥0E_b \ge 0. For a flat rest stencil, the proof of result 1 gives K0xˉ=0K_0 \bar{\mathbf x} = 0, and K0(Axˉ+t)=AK0xˉ+t∑kK0,k=0K_0 (A \bar{\mathbf x} + \mathbf t) = A K_0 \bar{\mathbf x} + \mathbf t \sum_k K_{0,k} = 0 for any linear map AA and shift t\mathbf t. So every affine image of the flat rest mesh has zero bending energy, including in-plane stretch and shear. A scratch check found an energy below 10−2810^{-28} for a random affine map.
  4. In-plane changes that are not affine give energy (proved). Move only x3\mathbf x_3 of a flat stencil by δ\boldsymbol\delta in the plane. Then K0x=−(c02+c04)δ≠0K_0 \mathbf x = -(c_{02} + c_{04}) \boldsymbol\delta \neq 0 and Eb>0E_b > 0, although nothing bends. This is the cost of the isometry hypothesis: the model relies on the in-plane forces to keep such changes small.
  5. A curved rest shape is not an equilibrium (proved). If the rest mesh has an edge with a bend angle θˉ≠0\bar\theta \ne 0 and QQ is built from its rest angles and areas, then by the proof of result 1 that edge gives K0xˉ≠0K_0 \bar{\mathbf x} \ne 0, so xˉTQxˉ>0\bar{\mathbf x}^{\mathsf T} Q \bar{\mathbf x} > 0 and the force −Qxˉ-Q \bar{\mathbf x} is not zero, so the rest shape is not at rest in the model. So the flat rest shape is a real hypothesis; the paper says that the extension to curved rest shapes and to anisotropy is in its longer report.
  6. Scale (proved). If the rest mesh is scaled by s>0s > 0, the cotangents and K0K_0 do not change and A0+A1A_0 + A_1 scales by s2s^2, so QQ scales by 1/s21/s^2, which is condition (iii). The energy of the scaled positions sxs\mathbf x is then the same as that of x\mathbf x.
  7. Large bends (proved). By result 1 the energy per edge is at most 2∣eˉ∣/hˉe2 |\bar e| / \bar h_e, reached when the two triangles fold onto each other (θe=π\theta_e = \pi). At that angle the ratio 4sin⁡2(θ/2)/θ24 \sin^2(\theta/2) / \theta^2 is 4/π2≈0.4054/\pi^2 \approx 0.405, so the model is softer than a hinge energy in θ2\theta^2 for sharp folds. It has no jump at θ=±π\theta = \pm\pi, because it is a polynomial in x\mathbf x.
  8. Same look, less time (measured). In the paper, cloth draped on a sphere and a flag in wind looked qualitatively the same with this model and with a nonlinear hinge model, with the same material parameters, and the runs were faster as given under "What it counts". The test framework used an implicit solver in the manner of Baraff and Witkin and explicit Euler, linear finite elements for the in-plane forces, k-DOP trees for collision detection and the collision response of Bridson et al. (2002).

References

  1. Miklós Bergou, Max Wardetzky, David Harmon, Denis Zorin and Eitan Grinspun, A quadratic bending model for inextensible surfaces, Eurographics Symposium on Geometry Processing (SGP 2006), 227-230, 2006, Section 1 (the smooth energy and the central observation), Section 2 (the three conditions, Q = L^T M^-1 L, Crouzeix-Raviart elements and the local matrix of an interior edge), Section 3 (forces, Rayleigh damping, the test setup and the measured speedups) and Table 1
  2. Eitan Grinspun, Anil N. Hirani, Mathieu Desbrun and Peter Schröder, Discrete shells, Eurographics/SIGGRAPH Symposium on Computer Animation (SCA 2003), 62-67, 2003, Section 2, equation (2) (the hinge energy with the tile height, used here for comparison)

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)
WritingW4 complete
  • a review of the text: no review record reviews/CKV49R/text.yaml