Interactive deformable models with quadratic bases in Bernstein–Bézier-form

10
This is an author version The definite version is available at http://dx.doi.org/10.1007/s00371-011-0579-6 Interactive Deformable Models with Quadratic Bases in Bernstein-B´ ezier-Form Daniel Weber 1 · Thomas Kalbe 2 · Andr´ e Stork 1,2 · Dieter Fellner 1,2 · Michael Goesele 2 the date of receipt and acceptance should be inserted later Abstract We present a physically-based interactive sim- ulation technique for deformable objects. Our method models the geometry as well as the displacements using quadratic basis functions in Bernstein-B´ ezier-form on a tetrahedral finite element mesh. The Bernstein-B´ ezier formulation yields significant advantages compared to approaches using the monomial form. The implementa- tion is simplified, as spatial derivatives and integrals of the displacement field are obtained analytically avoid- ing the need for numerical evaluations of the elements’ stiffness matrices. We introduce a novel traversal ac- counting for adjacency in order to accelerate the re- construction of the global matrices. We show that our proposed method can compensate the additional effort introduced by the co-rotational formulation to a large extend. We validate our approach on several models and demonstrate new levels of accuracy and performance in comparison to current state-of-the-art. Keywords Deformation · Quadratic Finite Elements · Interactive Simulation · Bernstein-B´ ezier-form 1 Introduction A common issue in interactive deformation simulation using Finite Element Methods (FEM) is the trade-off between speed and accuracy of the solution. While ad- ding more elements improves the accuracy of the sim- ulation, the size of the resulting system often leads to prohibitively slow simulations. Instead of increasing the number of elements in the simulation, one can also in- crease the modeling power of the individual element, 1 Fraunhofer IGD, Darmstadt, Germany 2 GRIS, TU Darmstadt, Germany Fig. 1 Interactive deformation of the Bear model with 1022 quadratic tetrahedra. e.g., by replacing the commonly used linear basis func- tions with higher order bases. Mezger et al. [MS06, MTPS08] follow this approach and use quadratic poly- nomials in a monomial basis for modeling deformable bodies. They achieve an interactive simulation with a reduced number of elements and attach a detailed sur- face mesh. Implementation is, however, more complex compared to linear elements. Coefficients of basis func- tions must be determined by solving linear systems be- forehand and numerical integration must be employed. We propose to model the deformation field using quadratic interpolation functions in Bernstein-B´ ezier- form (B-form). We demonstrate that this alternative representation leads to a concise description and yields a simpler implementation. To our knowledge, this has only been done once before by Roth et al. [RGTC98, Rot02] in the context of static simulation of tissue with

Transcript of Interactive deformable models with quadratic bases in Bernstein–Bézier-form

This is an author versionThe definite version is available at http://dx.doi.org/10.1007/s00371-011-0579-6

Interactive Deformable Models with Quadratic Bases inBernstein-Bezier-Form

Daniel Weber1 · Thomas Kalbe2 · Andre Stork1,2 · Dieter Fellner1,2 ·Michael Goesele2

the date of receipt and acceptance should be inserted later

Abstract We present a physically-based interactive sim-

ulation technique for deformable objects. Our method

models the geometry as well as the displacements using

quadratic basis functions in Bernstein-Bezier-form on a

tetrahedral finite element mesh. The Bernstein-Bezier

formulation yields significant advantages compared to

approaches using the monomial form. The implementa-

tion is simplified, as spatial derivatives and integrals of

the displacement field are obtained analytically avoid-

ing the need for numerical evaluations of the elements’

stiffness matrices. We introduce a novel traversal ac-

counting for adjacency in order to accelerate the re-

construction of the global matrices. We show that our

proposed method can compensate the additional effort

introduced by the co-rotational formulation to a large

extend. We validate our approach on several models and

demonstrate new levels of accuracy and performance in

comparison to current state-of-the-art.

Keywords Deformation · Quadratic Finite Elements ·Interactive Simulation · Bernstein-Bezier-form

1 Introduction

A common issue in interactive deformation simulation

using Finite Element Methods (FEM) is the trade-off

between speed and accuracy of the solution. While ad-

ding more elements improves the accuracy of the sim-

ulation, the size of the resulting system often leads to

prohibitively slow simulations. Instead of increasing the

number of elements in the simulation, one can also in-

crease the modeling power of the individual element,

1 Fraunhofer IGD, Darmstadt, Germany2 GRIS, TU Darmstadt, Germany

Fig. 1 Interactive deformation of the Bear model with 1022quadratic tetrahedra.

e.g., by replacing the commonly used linear basis func-

tions with higher order bases. Mezger et al. [MS06,

MTPS08] follow this approach and use quadratic poly-

nomials in a monomial basis for modeling deformable

bodies. They achieve an interactive simulation with a

reduced number of elements and attach a detailed sur-

face mesh. Implementation is, however, more complex

compared to linear elements. Coefficients of basis func-

tions must be determined by solving linear systems be-

forehand and numerical integration must be employed.

We propose to model the deformation field using

quadratic interpolation functions in Bernstein-Bezier-

form (B-form). We demonstrate that this alternative

representation leads to a concise description and yields

a simpler implementation. To our knowledge, this has

only been done once before by Roth et al. [RGTC98,

Rot02] in the context of static simulation of tissue with

2 D.Weber et al.

a focus on high accuracy and C1 continuity of the re-

sulting surface. While not enforcing C1 continuity, we

show how the B-form yields a much cleaner approach

than existing FE methods based on quadratic elements.

Current state-of-the-art approaches for interactive

deformation simulation are based on a co-rotational

modeling approach in order to handle large deforma-

tions. Analyzing the performance evaluation of recent

work in that field (e.g., [MTPS08,GW08,PO09]) gives

the impression that solving the system of linear equa-

tions is no longer the crucial bottleneck in the simula-

tion loop. Instead, a considerable amount of simulation

time is spent for extracting the rotations and reassem-

bling the global stiffness matrix. We analyze this part

of the simulation step and propose to use quadratic

finite elements to reduce the number of rotation ex-

tractions. Additionally, we propose to approximate the

rotation per element instead of extracting four rotation

matrices elements (in contrast to [MTPS08]). Further-

more, an optimized matrix assembly for quadratic fi-

nite elements is presented accelerating the construction

of the global stiffness matrix. We show that the use of

quadratic elements (with a comparable number of de-

grees of freedom) in the co-rotational setting is faster

and shows superior accuracy compared to linear ele-

ments. Our contributions are as follows:

– We combine the Bernstein-Bezier-based approach

for static simulations [RGTC98,Rot02] with the co-

rotation formulation of Mezger et al. [MTPS08] to

handle large deformations.

– We show that modeling with trivariate polynomi-

als in B-form can facilitate calculations and is an

elegant, alternative representation for deformation

simulation. The mathematical formulation simpli-

fies the implementation of the simulation algorithm

compared to other formulations in monomial basis.

– We present a framework for quadratic finite ele-

ments that is able to handle element inversion.

– We introduce an efficient, mesh oriented traversal

for quadratic basis functions accelerating the con-

struction of the global stiffness matrix.

– We demonstrate that quadratic elements are supe-

rior to linear ones w.r.t. speed and accuracy.

– We show that simulations of models with thousands

of degrees of freedom can be interactive using qua-

dratic bases to model the object geometry and the

deformation.

2 Related Work

Terzopoulus et al. [TW88] were among the first simu-

lating deformable models in computer graphics. Based

on physical laws, they use Green’s strain tensor formu-

lation to measure the degree of deformation and solve

the governing partial differential equations with a fi-

nite difference scheme. While this formulation handles

large deformations correctly, it is expensive to evaluate.

In order to accelerate the necessary calculations aim-

ing at interactive simulations, several authors employ

Cauchy’s strain tensor, the linearized Green’s tensor

(see [NMK∗06] for an overview). The advantages are

linear relations between the position of the deformable

body and the forces acting on it. Whereas this approx-

imation is only valid for small deformations and rota-

tions, Muller et al. [MDM∗02] proposed a co-rotational

formulation. Unrealistic behavior arising from local ro-

tations of the deformed body is avoided by calculating

the elastic forces in a local, non-rotated reference frame.

Hauth et al. [HS04] improved this technique by extract-

ing the rotational part of the deformation per element,

yielding deformations without distortion.

Mezger et al. [MS06] used Green’s tensor for mea-

suring the deformation and modeled the deformation

field with quadratic basis functions. Compared to linear

basis functions, the number of elements can be signif-

icantly reduced while maintaining the accuracy of the

simulation. In [MTPS08] this approach is improved by

using the co-rotated instead of non-linear formulation

for quadratic elements. But the numerical integration

of the strain energy has to be evaluated at carefully se-

lected points in order to maintain the quadratic conver-

gence of higher order elements. Roth et al. [RGTC98]

discussed the modeling of soft tissue in the context of

facial surgery simulation. They used higher order poly-

nomial basis functions in B-form to model the displace-

ment field. Their focus was on high accuracy for a static

simulation instead of interactive simulation.

Pena Serna et al. [PSSSM09] studied the properties

of matrices arising from a tetrahedral mesh discretiza-

tion. They analyzed the relationship between topolog-

ical elements and the resulting structure of the matrix

for linear basis functions. Georgii et al. [GW08] pre-

sented an accelerated construction of the stiffness ma-

trix by storing references from local to global matrices.

Furthermore, they use a multigrid solver and developed

a method to drastically speed up the sparse matrix

products that are needed for the update of the multi-

grid mesh hierarchy. Although finite element methods

are known for their large computational effort, Parker et

al. [PO09] recently presented algorithms for deformable

models in a gaming environment.

We combine the approaches from [RGTC98] and

[MTPS08] and extend them by an efficient mesh-orien-

ted traversal and a high-resolution mesh coupling aris-

ing naturally with the B-form. We explicitly derive the

Interactive Deformable Models with Quadratic Bases in Bernstein-Bezier-Form 3

ξ2000 ξ0020

ξ0200

ξ0002

ξ1010

ξ1100 ξ0110

ξ1001ξ0101

ξ0011

Fig. 2 Domain points for a quadratic Bezier tetrahedron.Points at the vertices have exactly one non-zero index.

governing equations for a simpler implementation. We

demonstrate that computing the matrix entries in B-

form is independent of the polynomials. The use of

quadratic elements combined with our proposed method

to construct the global matrices can significantly reduce

the additional computational effort introduced by the

co-rotational formulation. We show new levels of perfor-

mance compared to the state-of-the-art, as the amount

of simulated elements per frame is further increased.

3 Trivariate Bernstein-Bezier-Form

The basis functions for our finite element solver are

given in Bernstein-Bezier-form (B-form) (see [Far02,

Sch07] for more details). The major advantages are:

– The polynomials are defined w.r.t. a tetrahedral el-

ement making the polynomials coordinate frame in-

dependent.

– There is no need for precomputing polynomial coef-

ficients. Stiffness and mass matrix entries are inde-

pendent of the basis functions.

– All operations on polynomials in B-form, including

integral and differential operations, can be evalu-ated analytically and efficiently.

We construct a piecewise polynomial representation

of the field of unknowns on a given tetrahedral mesh

4 := (T ,F , E ,V) with a set of tetrahedra T , faces F ,

edges E and vertices V . This discretization is generated

from surface meshes with the CGAL library [CGA]. The

union of all elements forms a non-uniform partition of

the simulation domain Ω =⋃

T∈TT. Two tetrahedra of

the mesh are either disjoint or share a face, an edge, or a

vertex. The field on the simulation domain Ω is defined

by one polynomial per element. A degree-q polynomial

p|T =∑

i+j+k+l=q

bijklBijkl(x), i, j, k, l ≥ 0, (1)

is defined w.r.t. a tetrahedron T = [v0,v1,v2,v3]. Here,

the unknowns bijkl and basis functions Bijkl are asso-

ciated with the domain points or nodes

ξTijkl =iv0 + jv1 + kv2 + lv3

q, i+j+k+l= q. (2)

This is a representation of the parametric domain, where

a coefficient bijkl may be a scalar, a vector or a tensor.

In case of quadratic elements, ten coefficients bijkl are

associated with the domain points (see Fig. 2). Then,

similar to Bezier curves, the values associated with the

vertices of T (b2000, b0200, b0020 and b0002) are given

by interpolation, the six remaining edge coefficients are

defined implicitly by derivatives and positions at the

vertices. The total amount of degrees of freedom for

the tetrahedral mesh is given by the union of all tetra-

hedral nodes D4 =⋃

T∈T

⋃i+j+k+l

ξTijkl. This set can be

indexed, i.e., global indices α can be mapped to nodes

dα ∈ D4, where α = 0, . . . , N−1, N = |D4|. The(q+33

)blending or shape functions in Eq. (1) are the Bernstein

polynomials

Bijkl =q!

i!j!k!l!λi0λ

j1λk2λ

l3, i+ j + k + l = q, (3)

and form a basis of the space of degree-q polynomials Pq[Sch07]. Here, the barycentric coordinates λν ∈ P1 are

the linear polynomials determined by λν(vµ) = δν,µ.

They represent the volume fractions arising by splitting

an element at x into four tetrahedra: λi = Vi

VT. The

volume of an element T is VT = 16 det

(v0 v1 v2 v3

1 1 1 1

).

Vi can be computed by replacing the i-th vertex with x.

In case of a monomial representation the basis function

are

Nijkl(x) =∑

i+j+k+l=q

αijklxiyjzk, i, j, k, l ≥ 0, (4)

where the coefficients αijkl must be precomputed. They

can be determined by solving a linear system of equa-

tions for each element [MS06,MTPS08]. This precom-

putation is not necessary in our approach.

In the following, we show how the B-form allows for

an analytic computation of integrals independent of the

position and orientation of the underlying tetrahedron.

Only the elements’ volume and the differential changes

of the barycentric coordinates are incorporated in the

computations.

Directional Derivatives The partial derivatives∂Bijkl

∂xi

can be expressed as a sum of Bernstein polynomials of

degree q − 1 by applying the chain rule:

∂Bijkl∂xa

=

3∑c=0

∂Bijkl∂λc

∂λc∂xa

= q [Bi−1jkl∂λ0∂xa

+

Bij−1kl∂λ1∂xa

+Bijk−1l∂λ2∂xa

+ Bijkl−1∂λ3∂xa

],

(5)

where Bernstein polynomials with negative indices are

set to 0. Note that for quadratic polynomials at least

two of the terms in Eq. (5) are equal to zero. As the

4 D.Weber et al.

x

y

z

ΩΩ′

ϕ

Fig. 3 The mapping ϕ defines the relation between the un-deformed rest state Ω and the deformed configuration Ω′.

barycentric coordinates are linear polynomials, their

partial derivatives are constant during the simulation

and can be precomputed.

Multiplication The multiplication of two Bernstein

polynomials of degree q on T is computed by

Bqijkl·Bqmnop = G(i, j, k, l,m, n, o, p)B2q

(i+m)(j+n)(k+o)(l+p)

with i+ j + k + l = m+ n+ o+ p = q. Using multi-

indices (I, J) = ((i, j, k, l), (m,n, o, p)), the function G

consists of binomials: G(I, J) =(i+m

i )(j+nj )(k+o

k )(l+pl )

(2qq )

.

Integration The integral of a Bernstein polynomial

w.r.t. T is solely dependent on the degree of the poly-

nomial and the volume VT:∫TBijkl dV =

VT(q+33

) . (6)

Therefore the integral of a polynomial in B-form can be

evaluated easily by summation:∫Tp|T dV =

VT(q+33

) ∑i+j+k+l=q

bijkl. (7)

4 Elasticity and Finite Element Model

In this section we give a brief introduction to linear

elasticity and the FE discretization process. For details,

we refer to standard textbooks [BW08,ZT00,Bat82].

4.1 Linear Elasticity

A deformable body is modeled by its rest position Ω ⊂R3 and a time dependent vector field of displacements

u : R×Ω → R3, u(t,x) =(u(t,x) v(t,x) w(t,x)

)T(8)

The deformed configuration ϕ(t,x) = u(t,x) + x is a

mapping from the rest state to the current position of

every point x ∈ Ω in the simulation domain, see Fig. 3.

The deformation of a body is modeled by Green’s

strain tensor εG = 12 (∇ϕT∇ϕ − I), with deformation

gradient ∇ϕ and 3×3 identity matrix I. Linearizing εG

leads to Cauchy’s strain tensor εC = 12 (∇ϕT +∇ϕ)−I,

which is a good approximation for small deformations.

This does not hold true for large deformations, espe-

cially rotations. In order to maintain the computational

advantages of the linearized tensor, Hauth et al. [HS04]

make use of a co-rotated formulation of deformation.

The modified strain is calculated in a local, non-rotated

coordinate system, which avoids the distortions. With

a local rotation R the co-rotated strain is given by

εCR(ϕ) = εC(RTϕ), (9)

which is invariant under rigid body transformations.

The stress tensor σ ∈ R3×R3 describes the pressure

inside the deformed body and can be used to evaluate

the force with respect to an arbitrary surface. In case

of linear materials the relationship between stress and

strain is described by Hooke’s law

σ = Dε, (10)

where the elasticity matrix D is a fourth order ten-

sor defining the material’s behavior. As the strain and

stress tensor are both symmetric, we can write them as

a 6-dimensional vector. D is then a 6 × 6 matrix and

Eq. (10) simplifies. For now, we restrict our algorithm

to the simulation of isotropic materials. In this case D

is completely defined by the two scalars Young’s mod-

ulus E and Poisson ratio ν. Alternatively the Lame

coefficients

λL =νE

(1 + ν)(1− 2ν)and µL =

E

2(1 + ν), (11)

can be used.

The elastic energy Uel of a deformed body is defined

as the product of strain and stress integrated over the

simulation domain:

Uel =

∫Ω

εTσ dV =

∫Ω

εTDεdV. (12)

The total energy U of the system is given by the sum

of the elastic, kinetic, and external energy: U = Ukin +

Uel + Uext. The equations of motion are obtained by

observing that the total amount of energy is conserved,

i.e., the first variation δU equals 0. Given the density

ρ, body forces f , and surface traction s, we have

δU =

∫Ω

δuT ρu dV +

∫Ω

δεTDεdV

−∫Ω

δuT f dV −∫∂Ω

δuT sdA,

(13)

for arbitrary infinitesimal variations prefixed by δ.

Eq. (13) can be transformed into an ordinary dif-

ferential equation by the spatial discretization process

described in the next section.

Interactive Deformable Models with Quadratic Bases in Bernstein-Bezier-Form 5

4.2 Finite Element Discretization

For clarity we use the following notational conventions

for this section: Symbols with four indices like uijkl are

associated to single nodes, with the numbering scheme

introduced in Section 3. Symbols with a T denote el-

ement contributions. This can be sequences of the ba-

sis functions (NT) or nodal displacements (uT). Global

contributions are denoted without indices, e.g., u for a

sequence of all nodal displacements or N for the accu-

mulated matrices of the basis functions.

The field of displacements uT on each element T is

given as the degree-q polynomial

u|T (x) =∑

i+j+k+l=q

uijklNijkl(x), i, j, k, l ≥ 0. (14)

The deformation gradient can be computed by

∇ϕ|T = I +∇u|T = I +∑

i+j+k+l=q

uijkl∇Nijkl(x), (15)

where ∇Nijkl(x) =(∂Nijkl

∂x∂Nijkl

∂y∂Nijkl

∂z

). Assembling

all individual element contributions (see Section 6) leads

to the global piecewise polynomial u(x) = uN. Like-

wise, the piecewise function of the global strain can be

expressed as ε = Cu, where the matrix C contains the

spatial derivatives of the basis functions.

According to the Galerkin process the same basis

functions are employed for the virtual displacements

and virtual strain. Eq. (13) is then transformed into

M u +K(u) = fext, (16)

with mass matrix M =∫Ω

NT ρN dV and stiffness ma-

trixK(u) =∫Ω

CTDC dV . The term fext =∫Ω

NT f dV−∫∂Ω

NT s dA accounts for volumetric forces like grav-

itational effects and forces acting on the boundaries.

Eq. (16) describes the motion of the deformable body

under the influence of external forces fext, where the

terms on the left hand side represent inertia and elastic

forces. The main task is now to determine the entries

of the matrices M and K, respectively. Therefore, per-

element matrices

MT =

∫T

NTT ρNT dV, KT =

∫T

CTT DCT dV (17)

need to be computed.

4.3 Time Integration

The dynamics of deformable materials are given by an

initial value problem of a second order system of ordi-

nary differential equations, see Eq. (16), which has to

be solved for u(t0) = 0. In general, high elastic forces

may occur during the simulation and the system is con-

sidered “stiff” [HES03]. This implies that a standard

explicit integration scheme can lead to unstable simu-

lations, especially for large time steps or stiff materi-

als. Therefore, we use a first order integration scheme

as proposed by Baraff et al. [BW98]. Note that we do

not consider damping explicitly, as this method intro-

duces numerical viscosity depending on the time step

size. Unfortunately, a system of linear equations has to

be solved in each time step which leads to a significant

increase of computational effort. Now, the system

A∆u = b, (18)

with A = M + ∆t2K and b = ∆t (fext −∆tKu), has

to be solved. Because K is linear, symmetric, and posi-

tive definite in the co-rotational formulation, it is solved

with a Conjugate Gradient solver. A simple diagonal

preconditioning is used for improving the convergence.

This results in differential changes of the velocity u,

which are used to update the displacements (and posi-

tions) u = ∆t∆u.

5 Algorithmic Details

The term K(u) in Eq. (16) accounts for the internal

elastic forces. With Cauchy’s strain, the relation be-

tween displacements and forces is linear in contrast to

the use of Green’s strain. The artifacts arising from the

linearization can be avoided by determining local rota-

tionsR of the deformed body and modifying the compu-

tation of the forces accordingly. Etzmuss et al. [EKS03]

determined the local rotation per element for cloth sim-

ulation, whereas Hauth et al. [HS04] and Muller et al.

[MG04] transfer that approach to deformable bodies.

A polar decomposition is used to extract the rotational

part R of the deformation gradient ∇ϕT. The current

state is then transformed to a non-rotated coordinate

system by RT , the inverse of R. With u = ϕ − x the

co-rotated force is

fcor = R[KT(RTϕ− x)

]= K ′Tϕ− f0, (19)

where f0 = RKTx. Therefore, the global stiffness matrix

K ′ has to be reconstructed in each time step. However,

simply using a polar decomposition for R can result in

inverted elements. Induced by user interaction or heavy

collisions, vertices are pushed inside the tetrahedron.

Since this also represents an equilibrium configuration

elements remain in this state.

6 D.Weber et al.

5.1 Inversion and Co-rotation of quadratic elements

The most time consuming part in recent publications

is the construction or reassembly of the stiffness ma-

trix [MTPS08,PO09]. It consists of extracting the ro-

tational part of the deformation gradient and updating

the affected entries in the stiffness matrix. In order to

reduce the time for this crucial step, we propose to make

use of a specialized traversal (see Section 6) and now

describe how to use an approximation for determining

R with quadratic elements. In contrast to Mezger et

al. [MTPS08] we only consider the corner control points

b2000,b0200,b0020 and b0002 to determine the deforma-

tion gradient and analyze the element’s deformation.

This is equivalent considering only the linear part of the

field of displacements. Hence, an acceleration of factor

four compared to [MTPS08] is achieved, as only one in-

stead of four rotations per element are extracted. For

simplicity, the deformation gradient is noted as F = ∇ϕin this section. Using the aforementioned approxima-

tion Eq. (15) reduces to

F = I +(b1000∇λ0 + . . .+ b0001∇λ3

),

with b1000 = b2000, . . . , b0001 = b0002 and precom-

puted ∇λc =(∂λc

∂x∂λc

∂y∂λc

∂z

). In case of element inver-

sion, a simple polar decomposition will lead to R with

negative determinant. This represents a reflection rather

than a rotation and will result in non-plausible behav-

ior. To recover from this undesired state we make use

of the method proposed by Irving et al. [ITF04], who

use a singular value decomposition for computing R.

5.2 Computing Matrix Entries

In Section 4.2 we described the general procedure to

determine entries for the element matrices. Now, we will

explicitly present how to compute those entries when

employing polynomials of degree two in B-form. The

element matrices T can be divided into contributions

for all control points with multi-indices (I, J). Thus, a

3× 3 entry is computed by[MT(I,J)

]ab

=

∫Tρ(BijklBmnop)δab dV,

or[KT(I,J)

]ab

=

∫TλL∂Bijkl∂xa

∂Bmnop∂xb

+µL∂Bijkl∂xb

∂Bmnop∂xa

+

µL(

2∑c=0

∂Bijkl∂xc

∂Bmnop∂xc

)δab dV, (20)

respectively. The integrals of products of degree two

Bernstein polynomials have to be evaluated for the mass

matrix. As shown in Section 3, this results in a polyno-

mial of degree four. With Bq indicating a degree q poly-

onmial and binomial coefficients G(I, J) arising from

the multiplication, the integration results in∫TB2ijklB

2mnop dV = G(I, J)

∫TB4 dV = G(I, J)

VT(73

) .The contributions for K in Eq. (20) consist of sev-

eral linear combinations of terms like∫T∂Bijkl

∂xa

∂Bmnop

∂xbdV .

The differentiation of a Bernstein polynomial w.r.t. the

coordinate axis a is given in Eq. (5). Note that poly-

nomials with negative indices vanish, so at most two

terms in the sum are non-zero. Rearranging leads to∫T

∂Bijkl∂xa

∂Bmnop∂xb

dV

=

∫T

(3∑c=0

∂Bijkl∂λc

∂λc∂xa

)(3∑d=0

∂Bmnop∂λd

∂λd∂xb

)dV

=

3∑c,d=0

∂λc∂xa

∂λd∂xb

∫T

∂Bijkl∂λc

∂Bmnop∂λd

dV.

(21)

As the differentiation of ∂B2

∂λc= 2B1 results in a linear

polynomial, the integral is∫T

∂Bijkl∂λc

∂Bmnop∂λd

dV= 4G(I, J)

∫TB2 dV =

2

5G(I, J)VT.

Here, no numerical integration or evaluation of any

basis function is needed. Only binomial coefficients, the

element’s volume, and directional derivatives of the bary-

centric coordinates affect the entries in the matrices.

6 Matrix Assembly and Traversal

For the representation of the global sparse matrices, we

use a data structure with block compressed row storage

(BCSR) similar to Parker et al. [PO09]. In this for-

mat every non-diagonal, non-zero entry together with

its column index is stored in arrays. The block size 3×3

corresponds to single node-node contributions, see Eq.

(20), so the pattern of non-zero entries is minimal for

representing the structure of the matrix. Each entry in

the global matrix can be made up of several contribu-

tions of different elements. As the stiffness matrix needs

to be updated in every iteration an efficient traversal

scheme is crucial.

The common procedure in standard finite element

literature for constructing the global matrices consists

of two steps. The first part loops over all elements and

computes the local contributions. Afterwards, these ele-

ment matrices are inserted into the global matrix. When

constructing or reassembling the matrices with this kind

Interactive Deformable Models with Quadratic Bases in Bernstein-Bezier-Form 7

a)

di, dj

b)

di

dj

c)

di

dj

d)

di

dj

Fig. 4 The possible element contributions of two nodes diand dj . The spanned topological elements are shown in red.a) Two nodes meet at a vertex V. b) Two nodes are locatedon the same edge E. c) Two nodes belong to a face F . d) Twonodes share a tetrahedron T.

of traversal, the rows have to be inspected to find the

entry with matching column index. This can be accel-

erated by a binary search, when the row entries are

sorted. However, in order to avoid searching the rows,

our aim is to completely compute one entry and add it

to the matrix data structure only once.

In the context of linear finite elements, Pena Serna

et al. [PSSSM09] analyzed the properties of matrices

arising from a tetrahedral mesh discretization. The pat-

tern of non-zero entries is directly linked to the topology

of the mesh, as every non-diagonal, non-zero entry cor-

responds to an edge between two vertices. In order to

accelerate an assembly for linear elements, Georgii et

al. [GW08] propose to store a reference to the corre-

sponding block in the matrix for each edge.

In the case of quadratic finite elements the relation-

ship between topology and entries in the matrix is more

complex. Here, each pair of two nodes di, dj ∈ D4 shar-

ing at least one tetrahedron correspond to a non-zero

matrix entry. These relationships can be further classi-

fied into four cases, defined by the lowest dimensional

mesh element spanned by di and dj (see Fig. 4). One

can distinguish, if both nodes are

a) associated to the same vertex V ∈ Vb) located on the same edge E ∈ Ec) belong to the same face F ∈ Fd) share one tetrahedron T ∈ T

This distinction also defines how many element con-

tributions accumulate to the final result. While in the

first case it is the valency of the vertex V , in the sec-

ond case it corresponds to the number of tetrahedra

adjacent to the edge E. The number of element con-

tributions in the third case is two or one for inner and

boundary faces, respectively, whereas in the fourth case

only one element matrix contributes. This scheme can

be easily extended to finite elements with even higher

order to reveal the number of contributing element en-

tries. Note that linear finite elements are a special case

of that scheme, where only the first and second case can

occur, leading to the algorithm proposed by Georgii et

al. [GW08].

Fig. 5 Coupling a high resolution triangle mesh with a coarsesimulation mesh (315 and 960 tetrahedra). The Tweety modelis fixed at the tail and influenced by gravitation.

For our fast matrix assembly algorithm this classifi-

cation needs to be precomputed. Therefore, the relevant

dependencies between the nodes are identified, i.e., all

pairs of nodes di and dj with i < j in conjunction with

the spanned topological element t ∈ 4 are determined.

We collect this information by traversing a data struc-

ture for tetrahedral meshes with adjacency information,

e.g., [PSSSM09] and store the connectivity sorted by

the index i. The dependencies are then represented by

a mapping di → (dj , t) and are used to generate global

accumulated matrices with the following algorithm:

1: for all i = 0, . . . , N − 1 with di ∈ D4 do

2: for all j with dj ∈ (di → (dj , t)), t ∈ 4 do

3: for all T 3 t, with t ∈ 4,T ∈ T do

4: Ki,j+ = KT(I,J)

The algorithm can be considered to be directly re-

lated to the respective structure of the matrix. The

outer loop corresponds to the rows in the global stiffness

matrix, or to each node di. The second loop is related to

all non-zero columns dj in the matrix, i.e., all nodes djthat depend on di are visited. The inner loop fetches all

the element stiffness matrices KT(I,J)that contribute to

the global entry. Therefore, all relevant tetrahedra aregiven by the adjacency to the topological element t (see

Fig. 4). The presented algorithm can be easily extended

to higher order finite elements, in order to achieve an

assembly per global matrix and not per element entry.

7 Coupling

In this section, we describe the method to couple a high

resolution triangle mesh with a volumetric tetrahedral

mesh. This yields visually high-quality results and is

straightforward to implement with the field of displace-

ments in B-form.

As in [MG04], for each vertex vi of the fine tri-

angle mesh the closest tetrahedron Tj together with

its barycentric coordiantes λk are determined in a pre-

processing step. The mapping between vi and Tj with

associated barycentric coordinates λk is stored. These

relative coordinates are used to interpolate the coordi-

nates during animation. The current displacement of a

8 D.Weber et al.

Fig. 6 Armadillo model with linear (top) and quadratic(bottom) finite elements. The quadratic simulation showsmore small scale deformation, e.g., at the ears.

vertex vi can then be determined by means of the piece-

wise quadratic field of displacements in Eq. (14) on T.

The barycentric coordinates serve as direct input for

evaluating polynomials in B-form with the well-known

algorithm of de Casteljau

b[`]ijkl = λ0b

[`−1]i+1jkl + λ1b

[`−1]ij+1kl + λ2b

[`−1]ijk+1l + λ3b

[`−1]ijkl+1,

for ` = 1, . . . , 2, with b[0]ijkl = bijkl. The result b

[2]0000

is the transformed position of the vertex vj . In order

to avoid recomputing the vertex normals of the surface

mesh after each simulation step, we simply use the rota-

tion matrices of the associated tetrahedra. Fig. 5 shows

the coupling in two different states of the deformation.

8 Results and Discussion

To evaluate our proposed methods, we compare against

a simulation with linear co-rotated finite elements. The

computation times for the different parts of the simu-

lation are listed in Table 1. All computations were per-

formed on an Intel Core 2 Duo CPU with 3 GHz using

only one of the cores. In all cases, we used a constant

time step of∆t = 20 ms, unless specified otherwise. One

can see that a considerable amount of effort is spent on

the co-rotation: Extracting the rotations (trot), updat-

ing the element stiffness matrices (tele), reconstructing

the global stiffness matrix (tmat), and evaluating the ad-

ditional forces (Eq. (19), tf0) take around 70% to 80%

0

-0.1

-0.2

-0.3

-0.4

-0.5y-coord

inate

in[m

]

200 400 600 800

time in [ms]

1.0

0.9

0.8

0.7

0.6

0.5z-coord

inate

in[m

]

200 400 600 800

time in [ms]

Fig. 7 Left : Discretized Bar model with tracked vertexmarked in red. Right : Maximum deflection colored with themagnitude of von Mises stress.

Fig. 8 Positional changes of the lower left corner of the bar.The blue curve shows the trajectory for the co-rotated for-mulation, the red curve the nonlinear formulation.

of the simulation time. Recent work that employs the

co-rotational formulation report similar ratios: For lin-

ear finite elements Georgii et al. [GW08] measured 60%

for ”Rotate” and ”Assemble”. Additionally, they need

to update their mesh hierarchy for the multigrid solver,

which requires extra effort in the context of co-rotation.

Parker et al. [PO09] use also about 50% to 60% for

the ”Solver Setup”. In summary, this shows that co-

rotation accounts for the majority of the simulation

loop while the linear solver is no longer the bottleneck.

In order to reduce this additional effort, we propose to

use quadratic finite elements, reducing the number of

tetrahedra while maintaining quality. Therefore, signif-

icantly less polar decompositions have to be performed

saving a substantial amount of computations.

We now provide a visual comparison between lin-

ear and quadratic finite elements. In Fig. 6 and in the

accompanying video, we show a simulation with lin-

ear and quadratic finite elements with nearly the same

number of degrees of freedom (2304 and 2238 nodes for

the linear and the quadratic simulation, respectively).

In both cases the leg of the armadillo model is pulled

and pushed. We show the resulting simulation with the

simulation mesh and with a coupled high resolution sur-

face. The simulation demonstrates the superior accu-

racy of quadratic finite elements, as more transient de-

tail of the deformation field is apparent. One can see the

small scale deformation at the ears and at the station-

ary leg of the model that do not occur in the linear case.

The timings presented in Table 2 clearly show that with

comparable number of degrees of freedom faster simu-

lations are achieved, as the co-rotational part is sig-

nificantly accelerated. But additional time is spent for

solving the system of linear equations (for a fair com-

parison, we used the same accuracy threshold in both

Interactive Deformable Models with Quadratic Bases in Bernstein-Bezier-Form 9

Model Tetrahedra Nodes trot tele tmat tf0tsol tall

Mechanical element 34446 6896 81 45 49 70 58 304Bunny huge 9997 2087 22 13 13 20 16 85Armadillo high 3159 1016 8 4 4 7 10 33

Table 1 Timings for co-rotated linear finite elements (in ms). The major part of the simulation step is used for the co-rotationalformulation with extracting the rotations (trot), applying the elements rotations (tele), assembling the global stiffness matrix(tmat) and rotated force computation tf0

.

Model Tetrahedra Nodes trot tele tmat tf0tsol tupd tall

Armadillo linear 9715 2304 22 12 13 20 18 3 89Armadillo quadratic 1112 2238 3 16 7 3 35 2 68Bunny Linear 3213 960 7 4 3 6 4 5 30Bunny Quadratic 450 1014 1 7 3 1 5 5 22

Table 2 Timings for co-rotated linear and quadratic finite elements with comparable complexity (in ms). Simulations withquadratic finite elements show higher performance.

Model Tetrahedra Nodes trot tele tmat tf0tsolve tupd tall FPS

Armadillo low 1112 2238 3 16 8 (13) 3 14 2 47 20.3Armadillo medium 2044 4015 5 30 14 (25) 6 26 2 85 8.1Armadillo high 3159 6098 7 45 23 (39) 10 44 2 133 5.2

Tweety low 364 757 1 5 2 (4) 2 5 5 19 41.2Tweety medium 960 1902 2 14 7 (12) 3 12 5 43 20.6Tweety high 2019 3900 5 29 14 (25) 6 26 5 86 10.8

Bunny low 1006 1973 2 15 7 (12) 3 13 5 46 20.3Bunny medium 2183 4145 5 31 15 (28) 7 29 5 94 10.3Bunny high 3213 5949 8 46 24 (40) 10 44 5 138 7.0

Table 3 (Left) Different models with varying geometric complexity. The computation time is split into the components trot(extraction of the rotational part of each tetrahedron), tfill (reassembling the stiffness matrix), tsolve (solving the linear systemof equations), tupd (updating the fine surface mesh), and tall (total computation time for one frame). The numbers show thetimings (in ms) for several stages in the solution process and frames per second, respectively.

simulations). The quadratic simulation needs more iter-

ations for convergence and a single matrix-vector multi-

plication is more expensive due to the increased number

of non-zero entries in the matrix.

We now compare the matrix assembly of our pro-

posed method (see Section 6) with the conventional one.

In the standard case, a loop over all element matrices

is performed and the contributions are added in arbi-

trary order. There, we use a binary search for inserting

the entries to the right column in the global matrix.

In Table 3 the column tmat represents the time for the

matrix construction with our method. The number in

brackets denote the time for the conventional traversal.

Furthermore, the column trot denote the time for ex-

tracting the rotation. As we approximate the element’s

rotation by one rotation matrix, the speed is increased

by a factor of four compared to [MTPS08].

8.1 Performance Analysis

Table 3 summarizes the discrete steps along with the

related computing times in the simulation for differ-

ent models. The name of each model and its resolution

(i.e., the number of tetrahedra and nodes) is given. Mi-

nor tasks, as rendering, only slightly affect the simu-

lation and are therefore omitted. The frame rates in

Table 3 clearly show that the simulation can be done

in real time for small models composed of several hun-

dreds of tetrahedra. We achieve a frame rate of still 7

fps for models with about 3000 tetrahedra. E.g., for the

Bunny model with 3213 tetrahedra, which consist of

5949 nodes, we have to solve a linear system of equa-

tions with dimension 17847× 17847.

In summary, we observe a significant performance

increase compared to Mezger et al. [MTPS08]. In par-

ticular, the simulation with about a thousand tetrahe-

dral elements (their Armadillo 20k and our Armadillo

low model) is roughly three times faster. Moreover,

their computation of rotations and reconstruction of

the stiffness matrix is slower than our approach. Their

co-rotational formulation requires 73 ms, whereas our

method needs about 26 ms. As they make no concrete

statement about the used solver in terms of accuracy

and type, the timings are not directly comparable. How-

ever, our choice requires only 14 ms compared to 66 ms.

8.2 Co-rotation of Quadratic Elements

We now compare the Green-Strain formulation with the

co-rotated approach in B-form. To avoid computing the

time-dependent Jacobian ∇uK(u) for the non-linear

formulation, we restrict our analysis to an explicit time

integration scheme. Since explicit schemes are not un-

conditionally stable, we use a time step of ∆t = 0.5 ms

to achieve a stable simulation for the following scenario.

A bar with dimension 0.4× 0.4× 1[m3], Young’s mod-

ulus E = 200 [kPa], Poisson coefficient ν = 0.34 and

density ρ = 500[kg ·m−3

]is held fixed on one side

and gravity is applied (see Fig. 7). We track the move-

ment of the lower left corner of the bar. Fig. 8 shows

10 D.Weber et al.

the plots of the vertex motion in the co-rotated (shown

in blue) and non-linear approach (red). As one can see,

the trajectories are very close, confirming the use of one

rotation per element. Only small numerical errors arise

from the approximation of the co-rotation in B-form

(see the detailed discussion in [HS04]).

8.3 Examples

In this section and in the accompanying video, we pre-

sent simulations of deformations with different models

in various scenarios. In these examples, we use the fol-

lowing material properties: A high ν = 0.45 for model-

ing nearly incompressible materials, ρ = 500[kg ·m−3

]and E is varied from 200 [kPa] to 1.5 [MPa]. Fig. 1 shows

a deformation of the Bear model lifted above the plane

and released afterwards. To demonstrate the effect of

co-rotation, we fixed the tail of the Tweety model (see

Fig. 5) and let the model deform under the influence

of gravity. Note that even large rotations do not re-

sult in artifacts. The recovery from element inversion is

demonstrated in the accompanying video.

9 Conclusions and Future Work

We presented a novel system for interactive simula-

tion of deformable models with quadratic bases in B-

form The system extends previous work on B-based

quadratic simulations to large deformations using a co-

rotational approach without compromising the simplic-

ity of the mathematical formulation. To reduce the ad-

ditional effort for the co-rotation, we proposed to use

quadratic finite elements and a per element rotation ex-

traction. Furthermore, we introduced a mesh-oriented

traversal to speed up the reassembly of the matrices for

quadratic finite elements. Our approach shows leading

edge performance beyond current state-of-the art.

For our future work, we plan to extend our approach

to a Green’s strain formulation with an inexact simpli-

fied Newton iteration. In that case, the computation of

the rotation matrix is dispensable and the advantages of

the B-form can be exploited further. Moreover, impor-

tant simulation techniques like proper collision detec-

tion and response will be integrated in our framework.

In addition, a GPU-based implementation to further

increase the number of simulated elements per frame is

considered.

Acknowledgements

The first author was supported by JTI CleanSky (GRA-

LNC), the second author by the DFG project FE 431/9-

2. We would like to thank Patrick Charrier and Con-

stantin Muller for capturing and editing the video.

References

[Bat82] Bathe K.-J.: Finite element procedures in engi-neering analysis. Prentice-Hall, 1982.

[BW98] Baraff D., Witkin A.: Large steps in cloth sim-ulation. Computer Graphics 32 (1998), 43–54.

[BW08] Bonet J., Wood R. D.: Nonlinear ContinuumMechanics for FEA. Cambridge University Press,NY, 2008.

[CGA] Cgal, Computational Geometry Algorithms Li-brary. http://www.cgal.org.

[EKS03] Etzmuss O., Keckeisen M., Strasser W.: Afast finite element solution for cloth modelling.In PG (2003).

[Far02] Farin G.: Curves and surfaces for CAGD: Apractical guide. MK Publishers Inc., 2002.

[GW08] Georgii J., Westermann R.: Corotated finiteelements made fast and stable. In VRIPHYS(2008), pp. 11–19.

[HES03] Hauth M., Etzmuss O., Strasser W.: Analysisof numerical methods for the simulation of de-formable models. The Visual Computer (2003).

[HS04] Hauth M., Strasser W.: Corotational simu-lation of deformable solids. In WSCG (2004),pp. 137–144.

[ITF04] Irving G., Teran J., Fedkiw R.: Invertible finiteelements for robust simulation of large deforma-tion. In SCA (2004).

[MDM∗02] Muller M., Dorsey J., McMillan L., JagnowR., Cutler B.: Stable real-time deformations. InSCA (2002).

[MG04] Muller M., Gross M.: Interactive virtual ma-terials. In GI (2004), pp. 239–246.

[MS06] Mezger J., Strasser W.: Interactive soft ob-ject simulation with quadratic finite elements. InAMDO (2006).

[MTPS08] Mezger J., Thomaszewski B., Pabst S.,Strasser W.: Interactive physically-based shapeediting. In SPM (2008).

[NMK∗06] Nealen A., Muller M., Keiser R., BoxermanE., Carlson M.: Physically based deformablemodels in computer graphics. CGF (2006).

[PO09] Parker E. G., O’Brien J. F.: Real-time defor-mation and fracture in a game environment. InSCA ’09 (2009).

[PSSSM09] Pena Serna S., Silva J., Stork A., MarcosA.: Neighboring-based linear system for dynamicmeshes. In VRIPHYS (2009).

[RGTC98] Roth S., Gross M., Turello S., Carls F.:A bernstein-bezier based approach to soft tissuesimulation. CGF 17, 3 (1998), 285–294.

[Rot02] Roth S.: Bernstein-Bezier Representations forFacial Surgery Simulation. PhD thesis, ETHZ,2002.

[Sch07] Schumaker L.: Spline Functions on Triangula-tions. Cambridge University Press, 2007.

[TW88] Terzopoulos D., Witkin A.: Deformable mod-els. IEEE CGA 8, 6 (November 1988), 41–51.

[ZT00] Zienckiewicz O. C., Taylor R. L.: The FiniteElement Method. Butterworth-Heinemann, 2000.