Siggraph Asia 2008 DDGCourse
Siggraph Asia 2008 DDGCourse
An Applied Introduction
ORGANIZERS LECTURERS
Eitan Grinspun Mathieu Desbrun
Max Wardetzky Peter Schröder
Max Wardetzky
Preface A chapter-by-chapter synopsis
The behavior of physical systems is typically The course notes are organized similarly to the
described by a set of continuous equations using tools lectures. We introduce discrete differential geometry
such as geometric mechanics and differential in the context of discrete curves and curvature
geometry to analyze and capture their properties. For (Chapter 1). The overarching themes introduced here,
purposes of computation one must derive discrete (in convergence and structure preservation, make
space and time) representations of the underlying repeated appearances throughout the entire volume.
equations. Researchers in a variety of areas have We ask the question of which quantities one should
discovered that theories, which are discrete from the measure on a discrete object such as a triangle mesh,
start, and have key geometric properties built into their and how one should define such measurements
discrete description can often more readily yield (Chapter 2). This exploration yields a host of
robust numerical simulations which are true to the measurements such as length, area, mean curvature,
underlying continuous systems: they exactly preserve etc., and these in turn form the basis for various
invariants of the continuous systems in the discrete applications described later on. We conclude the
computational realm. Such theories make up the introduction with a summary of curvature measures
nascent field of discrete differential geometry. for discrete surfaces (Chapter 3).
This volume documents the full day course Discrete The discussion of immersed surfaces paves the way to
Differential Geometry: An Applied Introduction at the development of a physical model for thin, flexible
SIGGRAPH Asia 2008 in Singapore on 12 December surfaces (Chapter 4). The case of nearly inextensible
2008. These notes supplement the lectures given by surfaces is commonplace and allows for particularly
Mathieu Desbrun, Peter Schröder, and Max fast cloth simulation and Willmore flow (Chapter 5).
Wardetzky. These notes include contributions by The mathematical modeling and simulation of elastic
Miklos Bergou, Mathieu Desbrun, Sharif Elcott, rods (flexible curves with twist) requires not only a
Akash Garg, Eitan Grinspun, David Harmon, Eva discrete curvature but also discrete framed curves and
Kanso, Felix Kälberer, Saurabh Mathur, Ulrich parallel transport (Chapter 6).
Pinkall, Peter Schröder, Adrian Secord, Boris
Springborn, Ari Stern, John M. Sullivan, Yiying Tong, At this point we shift down to explore the low-level
Max Wardetzky, and Denis Zorin, and build on the approach of discrete exterior calculus: after an
ideas of many others. overview of the field (Chapter 7), we lay out the
simple tools for implementing DEC (Chapter 8). With
this in place, numerically robust and efficient
Changes in the 3rd Edition simulations of the Navier-Stokes equations of fluids
become possible (Chapter 9).
In this third offering of the course we have introduced DEC can be used to formulate various differential
and revised several chapters. A considerable effort operators, including the so-called cotangent Laplacian.
was invested to ensure that chapters 1-3, 4-5, and 7-8 While this discrete operator has long been used for
provide a structured, didactic introduction to discrete parameterization based on harmonic functions, it
curvature, plate/shell simulation, and differential reappears in an altogether different manner when one
forms, respectively. considers discrete conformal maps and the conformal
equivalence of triangle meshes (Chapter 10).
Our topic is advancing at a rapid pace, and these notes
would not present a complete picture if we did not The cotangent Laplacian preserves some (but not all)
include some of the most recent advances. We have core structures of the smooth Laplace-Beltrami
therefore decided to include four exact reprints of late- operator. Recent results suggest the impossibility of
breaking relevant work. Rather than placing these as simultaneously preserving all the important smooth
appendices, we have chosen to situate them by their structures (Chapter 11).
natural relation to the progression of the notes.
Simulations of thin-shells, cloth, and fluids, and
geometric modeling problems such as fairing and
parameterization, require robust numerical time
integration. We conclude with an overview of discrete
geometric mechanics and variational time integrators
(Chapter 12).
Chapter 1:
Introduction to Discrete Differential Geometry:
The Geometry of Plane Curves
Eitan Grinspun Adrian Secord
Columbia University New York University
1 Introduction
The nascent field of discrete differential geometry deals with
discrete geometric objects (such as polygons) which act as
analogues to continuous geometric objects (such as curves).
The discrete objects can be measured (length, area) and
can interact with other discrete objects (collision/response).
From a computational standpoint, the discrete objects are
attractive, because they have been designed from the ground
up with data-structures and algorithms in mind. From a
mathematical standpoint, they present a great challenge:
the discrete objects should have properties which are ana-
logues of the properties of continuous objects. One impor- P
tant property of curves and surfaces is their curvature, which
plays a significant role in many application areas (see, e.g.,
Chapters 4 and 5). In the continuous domain there are re- Figure 1: The family of tangent circles to the curve at point
markable theorems dealing with curvature; a key require- P . The circle of curvature is the only one crossing the curve
ment for a discrete curve with discrete curvature is that it at P .
satisfies analogous theorems. In this chapter we examine the
curvature of continuous and discrete curves on the plane.
The notes in this chapter draw from a lecture given by P . If the curve is sufficiently smooth (“curvature-continuous
John Sullivan in May 2004 at Oberwolfach, and from the at P ”) then the circle thus approaches a definite position
writings of David Hilbert in his book Geometry and the known as the circle of curvature or osculating circle; the
Imagination. center and radius of the osculating circle are the center of
curvature and radius of curvature associated to point P on
the curve. The inverse of the radius is κ, the curvature of
2 Geometry of the Plane Curve the curve at P .
Consider a plane curve, in particular a small piece If we also consider a sense of traversal along the curve
of curve which does not cross itself (a simple curve). segment (think of adding an arrowhead at one end of the
Choose two points, P and Q, segment) then we may measure the signed curvature, iden-
on this curve and connect them tical in magnitude to the curvature, but negative in sign
P with a straight line: a secant. whenever the curve is turning clockwise (think of riding a
Fixing P as the “hinge,” ro- bicycle along the curve: when we turn to the right, it is
tate the secant about P so because the center of curvature lies to the right, and the
Q that Q slides along the curve curvature is negative).
toward Q. If the curve is Another way to define the circle of curvature is by con-
sufficiently smooth (“tangent- sidering the infinite family of circles which are tangent to
continuous at P ”) then the se- the curve at P (see Figure 1). Every point on the normal
cant approaches a definite line: the tangent. Of all the to the curve at P serves as the center for one circle in this
straight lines passing through P , the tangent is the best family. In a small neighborhood around P the curve divides
approximation to the curve. Consequently we define the di- the plane into two sides. Every circle (but one!) in our fam-
rection of the curve at P to be the direction of the tangent, ily lies entirely in one side or the other. Only the circle of
so that if two curves intersect at a point P their angle of curvature however spans both sides, crossing the curve at P .
intersection is given by the angle formed by their tangents It divides the family of tangent circles into two sets: those
at P . If both curves have identical tangents at P then we with radius smaller than the radius of curvature lying on one
say “the curves are tangent at P .” Returning to our sin- side, and those with greater radius lying on the other side.
gle curve, the line perpendicular to the tangent and passing There may exist special points on the curve at which the
through P is called the normal to the curve at P . Together circle of curvature does not locally cross the curve, and in
the tangent and normal form the axes of a local rectangular general these are finite and isolated points where the curve
coordinate system. In addition, the tangent can be thought has a (local) axis of symmetry (there are four such points on
of as a local approximation to the curve at P . an ellipse). However on a circle, or a circular arc, the special
A better approximation than the tangent is the circle of points are infinitely many and not isolated.
curvature: consider a circle through P and two neighboring That the circle of curvature crosses the curve may be rea-
points on the curve, and slide the neighboring points towards soned by various arguments. As we traverse the curve past
1
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
+1 -1 +2 0
Figure 2: The Gauss map assigns to every point on the curve Figure 3: Turning numbers of various closed curves. Top
a corresponding point on the unit circle. row: Two simple curves with opposite sense of traversal,
and two self-intersecting curves, one of which “undoes” the
turn. Bottom row: Gaussian image of the curves, and the
point P , the curvature is typically either increasing or de- associated turning numbers.
creasing, so that in the local neighborhood of P , so that
the osculating circle in comparison to the curve will have
a higher curvature on one side and lower on the other. An curve: the image is always the unit circle. If we allow the
alternative argument considers our three point construction. closed curve to intersect itself, we can count how many times
Trace along a circle passing through three consecutive points the image completely “wraps around” the unit circle (and in
on the curve to observe that the circle must pass from side which sense): this is the turning number or the index of
A to side B on the first point, B to A on the second, and A rotation, denoted k. It is unity for a simple closed curve
to B on the third. Similar reasoning of our two-point con- traversed counterclockwise. It is zero or ±2 for curve that
struction shows that in general the tangent does not cross self-intersects once, depending on the sense of traversal and
the curve—the isolated exceptions are the points of inflec- on whether or not the winding is “undone.”
tion, where the radius of curvature is infinite and the circle Turning Number Theorem. An old and well-known
of curvature is identical to the tangent. fact about curves is that the integral of signed curvature over
Informally we say that P , the tangent at P , and the oscu- a closed curve, Ω, is dependent only on the turning number:
lating circle at P have one, two, and three coincident points
in common with the curve, respectively. Each construction
κ ds = 2πk .
in sequence considers an additional approaching point in the Ω
neighborhood of P and the so-called order of approximation
(0, 1, and 2 respectively) is identical to the number of addi- No matter how much we wiggle and bend the curve, if we
tional points. do not change its turning number we do not change its to-
In 1825 Karl F. Gauss introduced a new tool for thinking tal signed curvature 1 . To change the total signed curvature
about the shape of curves and surfaces. Begin by fixing a of Ω we are forced to alter its turning number by adjusting
sense of traversal for the curve, naturally inducing for every the curve to introduce (or rearrange) self-intersecting loops.
point on the curve a direction for the tangent. By conven- This theorem about the significance of the turning number
tion, the normal points a quarter turn counterclockwise from is a piece of mathematical structure: together all the struc-
tangent direction. Gauss’s idea is to draw a unit circle on ture we discover embodies our understanding of differential
the plane of the curve, and for any point on the curve, to geometry. Consequently, our computational algorithms will
represent the normal by the radius of the circle parallel to take advantage of this structure. In computing with dis-
the normal and having the same sense as the normal. To any crete approximations of continuous geometry, we will strive
point P on the curve, the Gauss map assigns a point Q on to keep key pieces of structure intact.
the unit circle, namely the point where the radius meets the
circle (here, radius means the line segment from the center
of the circle to a point on the circumference). Observe that 3 Geometry of the Discrete Plane Curve
the normal at P is parallel to the radius of the circle, and the
tangent to the curve at P is parallel to the tangent to the cir- Given a curve, r, approximate it drawing an in-
cle at Q. That the tangent at P and Q are parallel is used to scribed polygon p: a finite sequence of (point)
simplify important definitions in differential geometry (see, vertices, V1 , V2 , . . . Vn ,
e.g., the definition of the shape operator in the chapter on ordered by a traversal
discrete shells). While the Gauss map assigns exactly one of the curve, and line
point on the unit circle to any point on the curve, there may segments connecting
be multiple points on the curve that map to the same point successive vertices2 .
on the circle, i.e.the map is not one-to-one. 1 Beware that in the context of space curves, the phrase “total
Consider the image of the curve under the Gauss map: curvature” is occasionally used to denote the Pythagorean sum
the Gaussian image of a curve is the union of all points of torsion and curvature—a pointwise quantity like curvature. In
on the unit circle corresponding to all points on the given contrast, here we mean the integral of curvature over the curve.
curve. For an open curve, the Gaussian image may be an 2 While we concern ourselves here only with plane curves, this
arc or may be the unit circle. Consider a closed simple plane treatment may be extended to curves in a higher-dimensional am-
2
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
3
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Structure preservation. Does the Turning Number along the path, then part of the acceleration is due to cur-
Theorem hold for discrete curves? Yes. Recall that the vature, and part is due to speeding up and slowing down.
sum of exterior angles of a simple closed polygon is 2π. This A parameterization encodes velocity—this can be extremely
observation may be generalized to show that tsc(p) = 2πk useful for some applications.
where k is the turning number of the polygon. We stress a Parameterization enables us to reformulate our statement
key point: the Turning Number Theorem is not a claim that of convergence. Given a sequence of parameter values, 0 =
the total signed curvature converges to a multiple of 2π in t1 ≤ t2 . . . ≤ tn−1 ≤ tn = b, for a “sufficiently well-behaved”
the limit of a finely refined inscribed polygon. The Turning parameterization of a “sufficiently well-behaved” curve6 , we
Number Theorem is preserved exactly and it holds for any may form an inscribed polygon taking Vi = R(ti ). Then the
(arbitrarily coarse) closed polygon. Note, however, that the parametric mesh size of the inscribed polygon is the greatest
turning number of an inscribed polygon may not match that of all parameter intervals [ti , ti + 1]:
of the smooth curve, at least until sufficiently many vertices
are added (in the right places) to capture the topology of hR (p) = max(ti+1 − ti ) .
i
the curve.
Unlike geometric mesh size, parametric mesh size is depen-
dent on the chosen parameterization.
4 Parameterization of the Plane Curve As before, consider a sequence of inscribed polygons, each
So far in our exploration of curves our arguments have sampling the curve at more parameter points, and in the
never explicitly made reference to a system of coordinates. limit sampling the curve at all parameter points: the as-
This was to stress the point that the geometry (or shape) sociated sequences of discrete measurements approach their
of the curve can be described without reference to coor- continuous analogs:
dinates. Nevertheless, the idea of parameterizing a curve
len(r) = lim len(pi ) ,
occurs throughout applied mathematics. Unfortunately, pa- hR (pi )→0
rameterization can sometimes obscure geometric insight. At
the same time, it is an exceedingly useful computational tool, tsc(r) = lim tsc(pi ) .
hR (pi )→0
and as such we complete our exploration of curves with this
topic.
In working with curves it is useful to be able to indicate 5 Conclusion and Overview
particular points and their neighborhoods on the curve. To
that end we parameterize a curve over a real interval map- So far we have looked at the geometry of a plane curve and
ping each parameter point, t ∈ [0, a], to a point R(t) on the demonstrated that it is possible to define its discrete ana-
plane: logue. The formulas for length and curvature of a discrete
R : [0, a] → R2 . curve (a polygon) are immediately amenable to computa-
tion. Convergence guarantees that in the presence of abun-
Thus the endpoints of finite open curve are R(0) and R(a);
dant computational resources we may refine our discrete
for closed curves we require R(0) = R(a).
curve until the measurements we take match to arbitrary
The parameterization of a curve is not unique. Besides the
precision their counterparts on a smooth curve. We dis-
geometric information encoded in the image of R, the para-
cussed an example of structure preservation, namely that the
meterization also encodes a parameterization-dependent ve-
Turning Number Theorem holds exactly for discrete curves,
locity. To visualize this, observe that moving the parameter
even for coarse mesh sizes. If we wrote an algorithm whose
at unit velocity slides a point R(t) along the curve: the rate
d correctness relied on the Turning Number Theorem, then
of change of R(t), or velocity, is the vector $v (t) = dt R(t). the algorithm could be applied to our discrete curve.
Indeed, given any strictly increasing function t(s) : [0, b] → The following chapters will extend our exploration of dis-
[0, a] we reparameterize the curve as R(t(s)) so that moving crete analogues of the objects of differential geometry to the
along s ∈ [0, b] generates the same points along the curve; the settings of surfaces and volumes and to application areas
geometry remains the same, but by chain rule of the calculus spanning physical simulation (thin shells and fluids) and
d d d
the velocity is now $v (s) = ds R(t(s)) = dt R(t(s)) ds t(s): at geometric modeling (remeshing and parameterization). In
every point the R(t(s)) reparameterization scales the veloc- each application area algorithms make use of mathemat-
d
ity by ds t(s). ical structures that are carried over from the continuous
Given a parameterized curve there is a unique reparame- to the discrete realm. We are not interested in preserv-
terization, R̂(s) = R(t(s)), with the property that #$v (s)# = ing structure just for mathematical elegance—each applica-
1, s ∈ [0, b]. In arc-length parameterization of a curve, unit tion demonstrates that by carrying over the right structures
motion along the parameter s corresponds to unit motion from the continuous to the discrete setting, the resulting
along the length of the curve. Consequently, s is the length algorithms exhibit impressive computational and numerical
traveled along the curve walking from R̂(0) to R̂(s), there- performance.
fore b is the length of the entire curve.
In the special setting of an arc-length parameterization
the curvature at a point R(s) is identical to the second deriv- 6 Indeed, the following theorems depend on the parameteriza-
d2
ative ds 2 R(s). It is a grave error to identify curvatures with tion being Lipschitz, meaning that small changes in parameter
second derivatives in general. The former is a geometric value lead to small motions along the curve:
quantity only, and we defined it without reference to a para-
meterization; the latter encodes both geometry and velocity, d(R(a), R(b)) ≤ C|a − b| ,
and is parameterization-dependent. Here a spaceship anal- for some constant C. The existence of a Lipschitz parameteriza-
ogy is helpful. If a spaceship travels at unit speed along a tion is equivalent to the curve being rectifiable, or having finite
curved path, the curvature give the acceleration of the space- arclength. Further care must be taken in allowing non-continuous
ship. Now if the spaceship travels at a nonuniform velocity curves with finitely many isolated jump points.
4
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Chapter 2:
What Can We Measure?
Peter Schröder
Caltech
1 Introduction their overlap. For example, consider the volume of the union
of two sets which clearly has this property. It will also turn that
When characterizing a shape or changes in shape we must first the additivity property is the key to reducing measurements
ask, what can we measure about a shape? For example, for for complicated sets to measurements on simple sets. We will
a region in R3 we may ask for its volume or its surface area. furthermore require that all measures we consider be invariant
If the object at hand undergoes deformation due to forces act- under Euclidian motions, i.e., translations and rotations. This
ing on it we may need to formulate the laws governing the is so that our measurements do not depend on where we place
change in shape in terms of measurable quantities and their the coordinate origin and how we orient the coordinate axes.
change over time. Usually such measurable quantities for a A measure which depended on these wouldn’t be very useful.
shape are defined with the help of integral calculus and often Let’s see some examples. A well known example of such a
require some amount of smoothness on the object to be well measure is the volume of bodies in R3 . Clearly the volume of
defined. In this chapter we will take a more abstract approach the empty body is zero and the volume satisfies the additivity
to the question of measurable quantities which will allow us axiom. The volume also does not depend on where the coordi-
to define notions such as mean curvature integrals and the cur- nate origin is placed and how the coordinate frame is rotated.
vature tensor for piecewise linear meshes without having to To uniquely tie down the volume there is one final ambiguity
worry about the meaning of second derivatives in settings in due to the units of measurement being used, which we must
which they do not exist. In fact in this chapter we will give remove. To this end we enforce a normalization which states
an account of a classical result due to Hadwiger, which shows that the volume of the unit, coordinate axis aligned parallelip-
that for a convex, compact set in Rn there are only n + 1 iped in Rn be one. With this we get
unique measurements if we require that the measurements be
invariant under Euclidian motions (and satisfy certain “sanity” µn
n (x1 , . . . , xn ) = x1 · . . . · xn
conditions). We will see how these measurements are con-
structed in a very straightforward and elementary manner and for x1 to xn the side lengths of a given axis aligned paral-
that they can be read off from a characteristic polynomial due lelipiped. The superscript n denotes this as a measure on Rn ,
to Steiner. This polynomial describes the volume of a family while the subscript denotes the type of measurement being
of shapes which arise when we “grow” a given shape. As a taken. Clearly the definition of µn n is translation invariant. It
practical tool arising from these consideration we will see that also does not depend on how we number our coordinate axes,
there is a well defined notion of the curvature tensor for piece- i.e., it is invariant under permutations of the coordinate axes.
wise linear meshes and we will see very simple formulas for Finally if we rotate the global coordinate frame none of the
quantities needed in physical simulation with piecewise linear side lengths of our parallelipiped change so neither does µn n.
meshes. Much of the treatment here will initially be limited to Notice that we have only defined the meaning of µn n for axis
convex bodies to keep things simple. This limitation that will aligned parallelipipeds as well as finite unions and intersec-
be removed at the very end. tions of such parallelipipeds. The definition can be extended
The treatment in this chapter draws heavily upon work to more general bodies through a limiting process akin to how
by Gian-Carlo Rota and Daniel Klein, Hadwigers pioneering Riemann integration fills the domain with ever smaller boxes
work, and some recent work by David Cohen-Steiner and col- to approach the entire domain in the limit. There is nothing
leagues. here that prevents us from performing the same limit process.
In fact we will see later that once we add this final require-
ment, that the measure is continuous in the limit, the class of
2 Geometric Measures such measures is completely tied down. This is Hadwiger’s
famous theorem. But, more on that later.
To begin with let us define what we mean by a measure. A Of course the next question is, are there other such invariant
measure is a function µ defined on a family of subsets of some measures? Here is a proposal:
set S, and it takes on real values: µ : L → R. Here L denotes
this family of subsets and we require of L that it is closed µn
n−1 (x1 , . . . , xn ) =
under finite set union and intersection as well as that it contains x1 x2 + x1 x3 + . . . + x1 xn + x2 x3 + . . . + x2 xn . . .
the empty set, ∅ ∈ L. The measure µ must satisfy two axioms:
(1) µ(∅) = 0; and (2) µ(A ∪ B) = µ(A) + µ(B) − µ(A ∩ For an axis aligned parallelipiped in R3 we’d get
B) whenever A and B are measureable. The first axiom is
required to get anything that has a hope of being well defined. µ32 (x1 , x2 , x3 ) = x1 x2 + x2 x3 + x3 x1
If µ(∅) was not equal to zero the measure of some set µ(A) =
µ(A ∪ ∅) = µ(A) + µ(∅) could not be defined. The second which is just half the surface area of the paralellipiped with
axiom captures the idea that the measure of the union of two sides x1 , x2 , and x3 . Since we have the additivity property
sets should be the sum of the measures minus the measure of we can certainly extend this definition to more general bodies
5
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
6
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Are these all such measures? It turns out there is one mea- 4 The Intrinsic Volumes and Had-
sure missing, which corresponds to the elementary symmetric wiger’s Theorem
function of order zero
1 n>0 The above machinery can now be used to define the intrinsic
µ0 (x1 , . . . , xn ) = volumes as functions of the Euler characteristic alone for all
0 n=0
finite unions of convex bodies G
This very special measure is the Euler characteristic of a con-
vex body. It takes the value 1 on all non-empty convex bodies. µn
k (G) = µn n
0 (G ∩ ω) dλn−k (ω).
The main trick is to prove that µ0 is indeed well defined. This
can be done by inducation. In dimension n = 1 we consider Here µn 0 (G ∩ ω) plays the role of XG (ω) we used earlier to
closed intervals [a, b], a < b. Instead of working with the set count the number of times ω hits G.
directly we consider a functional on the characteristic function There is one final ingredient missing, continuity in the limit.
f[a,b] of the set which does the trick Suppose Cn is a sequence of convex bodies which converges
to C in the limit as n → ∞. Hadwiger’s theorem says that if a
χ1 (f ) = f (ω) − f (ω+) dω. Euclidean motion invariant measure µ of convex bodies in Rn
R is continuous in the sense that
Here f (ω+) denotes the right limiting value of f at ω:
lim µ(Cn ) = µ(C)
lim!→0 f (ω + %), % > 0. For the set [a, b], f (ω) − f (ω+) Cn →C
is zero for all ω ∈ R except b since f (b) = 1 and f (b+) = 0.
For higher dimensions we proceed by induction. In Rn take a then µ must be a linear combination of the intrinsic volumes
straight line L and consider the affine subspaces Aω of dimen- µnk , k = 0, . . . , n. In other words, the intrinsic volumes, under
sion n − 1 which are orthogonal to L and parameterized by ω the additional assumption of continuity, are the only linearly
along L. Letting f be the characteristic function of a convex independent, Euclidean motion invariant, additivie measures
body in Rn we get on finite unions and intersections of convex bodies in Rn .
What does all of this have to do with the applications we
have in mind? A consequence of Hadwiger’s theorem assures
χn (f ) = χn−1 (fω ) − χn−1 (fω+ ) dω.
R us that if we want to take measurements of piecewise linear
geometry (surface or volume meshes, for example) such mea-
Here fω is the restriction of f to the affine space Aω or al- surements should be functions of the intrinsic volumes. This
ternatively the characteristic function of the intersection of assumes of course that we are looking for additive measure-
Aω and the convex body of interest. With this we define ments which are Euclidean motion invariant and continuous in
µn0 (G) = χn (f ) for any finite union of convex bodies G and the limit. For a triangle for example this would be area, edge
f the characteristic function of the set G ∈ Rn . length, and Euler characteristic. Similarly for a tetrahedron
That this definition of µn
0 amounts to the Euler characteris- with its volume, surface area, mean width, and Euler charac-
tic is not immediately clear, but it is easy to show, if we con- teristic. As the name suggests all of these measurements are
vince ourselves that for any non empty convex body C ∈ Rn intrinsic. For a 2-manifold mesh which is the boundary of a
solid one of these measurements is an extrinsic quantity cor-
µn n
0 (Int(C)) = (−1) .
responding to the dihedral angle between triangles meeting at
For n = 1, i.e., the case of open intervals on the real line, this an edge (see below).
statement is obviously correct. We can now apply the recursive
definition to the characteristic function of the interior of C and
get
5 Steiner’s Formula
We return now to questions of discrete differential geometry
µn
0 (Int(C)) = χn−1 (fω ) − χn−1 (fω+ ) dω. by showing that the intrinsic volumes are intricately linked
ω
to curvature integrals and represent their generalization to
By induction the right hand side is zero except for the first ω at the non-smooth setting. This connection is established by
which Aω ∩ C is non-empty. There χn−1 (fω+ ) = (−1)n−1 , Steiner’s formula.
thus proving our assertion for all n. Consider a non-empty convex body K ∈ Rn together with
The Euler-Poincaré formula for a polyhedron its parallel bodies
which relates the number of faces, edges, and vertices to the where d(x, K) denotes the Euclidean distance from x to the
genus now follows easily. Given a polyhedron simply write set K. In effect K! is the body K thickened by %. Steiner’s
it as the non-overlapping union of the interiors of all its cells formula gives the volume of K! as a polynomial in %
from dimension n down to dimension 0, where the interior of
n
a vertex (0-cell) is the vertex itself. Then
V (K! ) = V (Bn−j )Vj (K)%n−j .
µn
0 (P ) = µn
0 (Int(c)) = c0 − c1 + c2 − . . . j=0
c∈P
Here the Vj (K) are the measures µn k we have seen earlier.
where ci equals the number of cells of dimension i. For the For this formula to be correct the Vj (K) are normalized so
case of a polyhedron in R3 this is exactly the Euler-Poincaré that they compute the j-dimensional volume when restricted
formula. to a j-dimensional subspace of Rn . V (Bn−j ) = π n/2 /Γ(1 +
7
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
1/2n) denotes the (n − j)-volume of the (n − j)-unit ball. In while for a convex body M with C 2 smooth boundary the for-
particular we have V (B0 ) = 1, V (B1 ) = 2, V (B2 ) = π, and mula reads as
V (B3 ) = 4π/3.
In the case of a polyhedron we can verify Steiner’s formula V (M! ) = V3 (M ) +
“by hand.” Consider a tetrahedron in T ∈ R3 and the volume
of its parallel bodies T! . For % = 0 we have the volume of T
itself (V3 (T )). The first order term in %, 2V2 (T ), is controlled µ20 (κ1 (p), κ2 (p)) dp %+
∂M
by area measures: above each triangle a displacement along =1
the normal creates additional volume proportional to % and the
area of the triangle. The second order term in %, πV1 (T ), cor- =A
4π φG
P (B) = Kv and φH
P (B) = l(e ∩ B)θe ,
V (K! ) = 1V3 (K) + 2V2 (K)% + πV1 (K)%2 + V0 (K)%3
3 v∈V ∩B e∈E
8
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
where Kv = 2π − j αj is the excess angle sum at vertex Acknowledgments This work was supported in part by
v defined through all the incident triangle angles at v, while NSF (DMS-0220905, DMS-0138458, ACI-0219979), DOE
l(.) denotes the length and θe is the signed dihedral angle at e (W-7405-ENG-48/B341492), nVidia, the Center for Inte-
made between the incident triangle normals. Its sign is positive grated Multiscale Modeling and Simulation, Alias, and Pixar.
for convex edges and negative for concave edges (note that
this requires an orientation on the polyhedron). In essence this
is simply a restatement of the Steiner polynomial coefficients References
restricted to the intersection of the ball B and the polyhedron
P . To talk about the second fundamental form IIp at some C OHEN -S TEINER , D., AND M ORVAN , J.-M. 2003. Re-
point p in the surface, it is convenient to first extend it to all of stricted Delaunay Triangulations and Normal Cycle. In Pro-
R3 . This is done by setting it to zero if one of its arguments is ceedings of the 19th Annual Symposium on Computational
parallel to the normal p. With this one may define Geometry, 312–321.
¯ P (B) =
II l(e ∩ B)θe en ⊗ en , en = e/+e+. K LAIN , D. A., AND ROTA , G.-C. 1997. Introduction to
e∈E
Geometric Probability. Cambridge University Press.
The dyad en ⊗ en (u, v) = ,u, en -,v, en - projects given vec- K LAIN , D. A. 1995. A Short Proof of Hadwiger’s Character-
tors u and v along the normalized edge. What is the geometric ization Theorem. Mathematika 42, 84, 329–339.
interpretation of the summands? Consider a single edge and
the associated dyad. The curvature along this edge is zero
while it is θ orthogonal to the edge. A vector aligned with
the edge is mapped to θe while one orthogonal to the edge is
mapped to zero. These are the principal curvatures except they
are reversed. Hence II ¯ P (B) is an integral measure of the cur-
vature tensor with the principal curvature values exchanged.
For example we can assign each vertex a three by three tensor
by summing the edge terms for each incident edge. As a tan-
gent plane at the vertex, which we need to project the three by
three tensor to the expected two by two tensor in the tangent
plane, we may take a vector parallel to the area gradient at the
vertex. Alternatively we could defined II ¯ P (B) for balls con-
taining a single triangle and its three edges each. In that case
the natural choice for the tangent plane is the support plane of
the triangle. In practice one often finds that noise in the mesh
vertex positions makes these discrete computations noisy. It is
then a simple matter of enlarging B to stabilize the computa-
tions.
Cohen-Steiner and Morvan show that this definition can
be rigorously derived from considering the coefficients of
the Steiner polynomial in particular in the presence of non-
convexities (which requires some fancy footwork...). They
also show that if the polyhedron is a sufficiently fine sample
of a smooth surface the discrete curvature tensor integrals have
linear precision with regards to continuous curvature tensor in-
tegrals. They also provide a formula for a discrete curvature
tensor which does not have the principal curvatures swapped.
7 Further Reading
The material in this section only gives the rough outlines of
what is a very fundamental theory in probability and geomet-
ric measure theory. In particular there are many other con-
sequences which follow from relationships between intrin-
sic volumes which we have not touched upon. A rigorous
derivation of the results of Hadwiger, but much shorter than
the original can be found in [Klain 1995]. A complete and
rigorous account of the derivation of intrinsic volumes from
first principles in geometric probability can be found in the
short book by Klain and Rota [Klain and Rota 1997], while
the details of the discrete curvature tensor integrals can be
found in [Cohen-Steiner and Morvan 2003]. Approximation
results which discuss the accuracy of these measure vis-a-vis
an underlying smooth surface are treated by Cohen-Steiner
and Morvan in a series of tech reports available at http://www-
sop.inria.fr/geometrica/publications/.
9
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Chapter 3:
Curvature Measures for Discrete Surfaces
John M. Sullivan
[email protected]
Institut für Mathematik, TU Berlin MA 3–2
Str. des 17. Juni 136, 10623 Berlin
The curvatures of a smooth curve or surface are local mea- parameter s, the defining equations are T := γ ! and
sures of its shape. Here we consider analogous measures !
for discrete curves and surfaces, meaning polygonal curves T 0 κ 0 T
and triangulated polyhedral surfaces. We find that the most N = −κ 0 τ N .
useful analogs are those which preserve integral relations for B 0 −τ 0 B
curvature, like the Gauß–Bonnet theorem. For simplicity,
we usually restrict our attention to curves and surfaces in For a curve γ lying on a surface M , it is often more use-
euclidean space R3 , although many of the results would eas- ful to consider the Darboux frame (T, η, ν), adapted to this
ily generalize to other ambient manifolds of arbitrary dimen- situation. This orthonormal frame includes the tangent vec-
sion. tor T to γ and the normal vector ν to M . Its third element
is thus η := ν × T , called the cornormal. The curvature vec-
These notes are based on work by many people, but un- tor of γ decomposes into parts tangent and normal to M as
fortunately do not include proper citations to the literature. T ! = κN = κg η +κn ν. Here in fact, κn measures the normal
curvature of M in the direction T , and is independent of γ.
10
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Mean curvature is certainly not intrinsic, but it has a nice The right-hand side represents the total vector area of any
variational interpretation. Consider a variation vectorfield V surface spanning γ, and the relation shows this to depend
on M , compactly supported away from any boundary. Then only on γ (and this time not even on a collar neighborhood).
H = −δ Area /δ Vol in the sense that The integrand on the left-hand side depends on a choice of
origin for the coordinates, but because we integrate over a
δV Vol = V · ν dA, δV Area = − V · Hν dA. closed loop, the integral is independent of this choice. Both
sides of this vector area formula can be interpreted directly
for a polyhedral surface, and the equation remains true in
With respect to the L2 inner product "U, V # := Up · Vp dA that case.
on vectorfields, the vector mean curvature is the negative A simple integral for curve γ from p to q says that
gradient of the area functional, often called the first variation
of area: H = −∇ Area. (Similarly, the negative gradient of q
where dx = T ds is the vector line element along γ. This 2.1 Gauß curvature
implies that the total Gauß curvature of D depends only
on a collar neighborhood of γ: if we make any modification It is well known how the notion of Gauß curvature extends
to D supported away from the boundary, the total curvature to such discrete surfaces M . Any two adjacent triangles
is unchanged (as long as D remains topologically a disk). (or, more generally, any simply connected region in M not
We will extend the notion of Gauß curvature from smooth including any vertices) can be flattened—developed isomet-
surfaces to more general surfaces (in particular polyhedral rically into the plane. Thus the Gauß curvature is supported
surfaces) by requiring this property to remain true. on the vertices p ∈ M . In fact, to keep the Gauß–Bonnet
theorem true, we must take
The other relations are all proved by Stokes’ Theorem,
and thus only depend on γ being the boundary of D in a
homological sense; for these D is not required to be a disk. K dA := Kp ; Kp := 2π − θi .
D
First consider the vector area p∈D i
11
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
at p. If D is any neighborhood of p contained in Star(p), Suppose that vertices adjacent to p are p1 , . . . , pn . Then
then ∂D η ds = θi ; when the triangles are acute, this is we have
most easily seen by letting ∂D be the path connecting their
circumcenters and crossing each edge perpendicularly. 3Ap = 3∇p Vol = ν dA
(Similar arguments lead to a notion of Gauß curvature— Star p
defined as a measure—for any rectifiable surface. For our 1 1
polyhedral surface, this measure consists of point masses at = 2
x × dx = 2
pi × pi+1
Link p i
vertices. Surfaces can also be built from intrinsically flat
pieces joined along curved edges. Their Gauß curvature is and similarly
spread out with a linear density along these edges. This
technique is often used in designing clothes, where corners
2Hp = Hppi = −2∇p Area = Ji (pi+1 − pi )
would be undesirable.)
Note that Kp is clearly an intrinsic notion, as it should = (cot αi + cot βi )(p − pi ),
be, depending only on the angles of each triangle and not i
on the precise embedding into R3 . Sometimes it is useful
to have a notion of combinatorial curvature, independent of where αi and βi are the angles opposite edge ppi in the two
all geometric information. Given just a combinatorial tri- incident triangles.
angulation, we can pretend that each triangle is equilateral Note that if we change the combinatorics of a discrete
with angles θ = 60◦ , whether or not that geometry could surface M by introducing a new vertex p along an existing
be embedded in space. The resulting combinatorial curva- edge e, and subdividing the two incident triangles, then Hp
ture is Kp = π3 (6 − deg p). In this context, the global form in the new surface equals the original He , independent of
Kp = 2πχ(M ) of Gauß–Bonnet amounts to nothing more where along e we place p. This allows a variational interpre-
than the definition of the Euler characteristic χ. tation of He .
12
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Still,
13
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Chapter 4:
A Discrete Model of Thin Shells
Eitan Grinspun
Columbia University
Figure 1: A measure of discrete strain is used to fracture a thin shell in this simulation of a shattering lightbulb.
Abstract
We describe a discrete model for the dynamics of thin flexible struc-
tures, such as hats, leaves, and aluminum cans, which are charac-
terized by a curved undeformed configuration. Previously such thin
shell models required complex continuum mechanics formulations
and correspondingly complex algorithms. We show that a simple
shell model can be derived geometrically for triangle meshes and
implemented quickly by modifying a standard cloth simulator. Our Figure 2: The local coordinate frame in a small neighborhood of a
technique convincingly simulates a variety of curved objects with thin shell: two axes span the middle surface, and the normal shell
materials ranging from paper to metal, as we demonstrate with sev- director spans the thickness.
eral examples including a comparison of a real and simulated falling
hat.
This chapter is based on the publication by Eitan Grinspun, Anil captures the same characteristic behaviors as more complex mod-
Hirani, Mathieu Desbrun, and Peter Schröder which appeared in els, with a surprisingly simple implementation. We demonstrate the
the Proceedings of the Symposium for Computer Animation 2003, realism of our approach through various examples including com-
and on subsequent collaborations with the group of Denis Zorin at parisons with real world footage (see Figure 4).
New York University and Zoë Wood at Cal Poly San Luis Obispo.
2 Kinematics
1 Introduction
Since it is thin, the geometry of the shell is well described by its
Thin shells are thin flexible structures with a high ratio of width to middle-surface (see Figure 2). At any point on the middle sur-
thickness (> 100) [Ciarlet 2000]. While their well-known counter- face the local tangent plane and surface normal induce a coordinate
parts, thin plates, relax to a flat shape when unstressed, thin shells frame in which to describe “motion along the surface” and “motion
are characterized by a curved undeformed configuration. Cloth, re- along thickness.”
cently studied in the computer animation literature, may be mod- In the discrete setting, the topology of the middle surface is
eled as a thin plate, since garments are typically constructed from represented by the combinatorics of an oriented 2-manifold sim-
flat textiles. In stark contrast, thin-walled objects which are natu- plicial complex, M = {v, e, f }, where v = {v1 , v2 , . . .}, e =
rally curved (e.g., leaves, fingernails), or put into that shape through {e1 , e2 , . . .}, f = {f1 , f2 , . . .} are sets of vertices, edges and faces
plastic deformation (e.g., hats, cans, carton boxes, pans, car bodies, respectively. The geometry of the middle surface is given by the
detergent bottles) are thin shells and cannot be modeled using plate discrete configuration map, C : v 7→ R3 , which assigns to every
formulations. vertex, vi , a position, C(vi ), in the ambient space. Together M and
Thin shells are remarkably difficult to simulate. Because of C correspond to the usual notion of a triangle mesh in R3 ; in our
their degeneracy in one dimension, shells do not admit to straight- exposition we assume fixed combinatorics M , and discuss a tem-
forward tessellation and treatment as three-dimensional solids; in- porally evolving configuration, Ct where the subscript refers to a
deed, the numerics of such approaches become catastrophically ill- specific instant in time.
conditioned, foiling numerical convergence and/or accuracy. Ro- Restricting our attention to elastic (“memory-less”) materials,
bust finite element methods for thin shell equations continue to be the physics can be understood in terms of the undeformed config-
an active and challenging research area. uration (the stress-free shape) and the deformed configuration (the
In this chapter we develop a simple model for thin shells with stressed shape at the current instant in time), C0 and C1 , respec-
applications to computer animation. Our discrete model of shells tively. The elastic response of a material depends on the change in
14
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
15
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
16
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
We exercised our implementation on various problems, including Plastoelasticity As discussed in the early work of Kergosien
fixed beams, falling hats, and pinned paper. Computation time, on and coworkers, a compelling simulation of paper would require a
a 2GHz Pentium 4 CPU, ranged from 0.25s–3.0s per frame; timings mechanical shell model [Kergosien et al. 1994]. Using our simple
are based on a research implementation that relies on automatic dif- shell model, we can easily simulate a sheet of paper that is rolled,
ferentiation techniques. then creased, then pinned (see Figure 6). Here the physics require
plastic as well as elastic deformations. We begin with a flat sur-
face, and gradually increase the undeformed angles, θ̄e . Notice:
modifying the undeformed configuration effects a plastic deforma-
tion. The kinematics of changing θ̄e span only physically-realizable
bending, i.e., inextensible plastic deformations. In contrast, directly
modifying x̄ could introduce plastic deformations with unwanted
membrane modes. We introduced elastic effects by applying three
pin constraints to the deformed configuration. Observe the half-
crease on the left side. The energy of the undeformed state is no
flat beam v beam
longer zero! The (plastically-deformed) left and (untouched) right
halves have incompatible undeformed shapes, consequently the un-
deformed configuration is not stress-free.
Figure 5: Three pairs of flat and v-beams with increasing flexural
stiffness K θ (left to right) of 100, 1000, and 10000; the non-flat
cross section of the v-beam contributes to structural rigidity.
17
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
18
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
19
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Chapter 5:
Simple and Efficient Implementation of Discrete Plates and Shells
Max Wardetzky Miklós Bergou Akash Garg David Harmon Denis Zorin Eitan Grinspun
University of Göttingen Columbia University Columbia University Columbia University New York University Columbia University
Figure 1: Snapshots from our simulation of a billowing flag. Despite its economy of cost, the proposed bending model achieves qualitatively
the same dynamics as popular nonlinear models.
20
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
n(0) n(1)
2 Isotropic Bending x1
21
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
1 − cos 2u, with u = (θ − θ̄)/2, we arrive at an expression of retroactively understand the bending models of [Baraff and Witkin
energy associated to the ith hinge: 1998; Bridson et al. 2003; Grinspun et al. 2003] in terms of fi-
nite elements, and (b) to provide the theoretical foundation for the
3|ēi |2 anisotropic model of §4.
Eb (x)i = (1 − cos(θi − θ̄i )) . (5) CR elements are non-conforming elements which are linear on
Āi
triangles and have their degrees of freedom (DOFs) associated with
In this section, we prove that for isometric deformations this hinge edges. A CR basis, {φi }, is given by those functions φi for which
energy is cubic in x. We offer two parallel proofs: a geometric one φi (j) = δij , where δij is the Kronecker delta. The corresponding
and a finite element derivation. stiffness and mass matrices take the respective forms
Z Z
3.1 Geometric View Kij = h∇φi , ∇φj idA and Mij = φi φj dA , (9)
S S
Our derivation uses the geometric construction in Figure 2, which
defines local indices of the triangles, {T0 , T1 }, edge vectors, where ∇ denote the gradient operator.
{e0 , . . . , e4 }, and vertex positions, {x0 , . . . , x3 }, associated to a Similarly to (3), the pointwise mean curvature vector is a vector-
hinge. Note the construction of perpendiculars ti : each edge vec- valued function over the surface whose coefficient vector in the
tor ei is rotated 90 degrees, on the plane of the triangle, to point above CR basis is given by
outwards (thus |ti | = |ei | and hti , ei i = 0). Since e0 is associated
(0)
to two triangles, we construct two perpendiculars, t0 and t0 , on
(1)
H = M−1 K T x , (10)
the planes of triangles T0 and T1 respectively.
(0) (1)
Expressing the perpendiculars t0 (resp. t0 ) in the edge basis where the linear transformation operator T takes the mesh embed-
{e1 , e3 } (resp. {e2 , e4 }) we obtain ding, x, having vertex-based DOFs, to the space of CR functions
having edge-based DOFs (see below). To better understand (10),
(0)
t0 = − cot α03 e1 − cot α01 e3 , (6) consider the weak-form formulation of (3), i.e.,
(1) Z Z Z
t0 = − cot α04 e2 − cot α02 e4 . (7)
φH dA = φ∆x dA = h∇φ, ∇xi dA , (11)
S S S
Under isometric deformation, interior angles remain constant,
(0) (1)
therefore t0 and t0 are linear expressions in the position of the where φ is a scalar (test) function on S and h∇φ, ∇xi denotes the
mesh. Furthermore, the geometry of Fig. 2-bottom reveals that3 vector-valued function evaluated separately for each of the three
components of the embedding function x. The apparently missing
(0) (1) minus sign in the last equality of (11) is due to our sign convention
−ht0 , t0 i β[e0 , e1 , e2 ]
cos θ = , and sin θ = − , for the Laplace operator, which we require to be positive, and not
|e0 |2 |e0 |2
negative, semi-definite. Moving to the discrete case and using the
where [ei , ej , ek ] is the scalar triple product (ei × ej ) · ek , and CR basis, we can write
β = |e10 | (cot α01 + cot α03 )(cot α02 + cot α04 ). X X
Expanding (5) by the identity cos(θ − θ̄) = cos θ cos θ̄ + x= φi (T x)i and H = φi Hi , (12)
i i
sin θ sin θ̄, substituting the above expressions for cos θ and sin θ,
and simplifying the resulting expression by using the isometry as-
where (T x)i and Hi are edge-based coefficient vectors. Notice
sumption (|ēi | = |ei |) we find that (5) equals
that our discrete mesh is given by vertex-based DOFs; therefore we
3 “ ” 3β̄ need the linear transformation T to map those DOFs to edge-based
(0) (1)
|ē0 |2 + ht0 , t0 i cos θ̄ + [e0 , e1 , e2 ] sin θ̄ . (8) ones. Consequently, if xp and xq denote two mesh vertices that
Ā Ā
| 0 {z } | 0 {z } are connected by edge ei , then (T x)i = (xp + xq )/2. Finally, by
thin plate component cubic term plugging (12) into (11) and using (9), we immediately arrive at (10).
Each coefficient vector in (12) corresponds to the edge-based
Under isometry, the energy associated to an individual hinge is a mean curvature vector
cubic polynomial in x. We have thus established that—as in the „ «
smooth picture—the discrete bending energy (4) is cubic. Note that 3|ei | θi
for the special case θ̄ = 0, we recover the quadratic bending thin Hi = 2 sin n̂i , (13)
Ai 2
plate energy of [Bergou et al. 2006] simply by substituting (6) and
(7) into (8). where Ai is the area of ei ’s hinge stencil as before, and n̂i is the
angle-bisecting normal of the dihedral angle at edge ei . This for-
3.2 Finite Element Derivation mula is obtained from an explicit calculation of the entries of the
mass and stiffness matrix in (9). In particular, the CR mass ma-
Our discrete IBM may be explained in terms of so-called non- trix is diagonal and satisfies Mii = Ai /3; therefore, as observed
conforming Crouzeix-Raviart (CR) finite elements. This analysis is in [Wardetzky et al. 2007], the thin plate energy can be written as
primarily a theoretical contribution that achieves two goals: (a) to
1X X Ai 2
3 The expression for sin θ was derived from Eb (x) = Mii H2i = Hi .
2 i i
6
(0) (0) (1)
ht0 , n(1) i [t , t0 , e0 ] β[e0 , e1 , e2 ]
sin θ = =− 0 =− , However, without the intuition gained from the geometric picture
|e0 |2 |e0 |3 |e0 |2
in §3.1, it is not trivial to extend the CR viewpoint to the thin shell
where n(1) = (|e0 |/|e4 × e2 |)e4 × e2 is a scaled triangle normal. The setting. From the smooth energy, (2), and the corresponding dis-
(0) (1)
last step is obtained by using (6) and (7) to replace t0 and t0 , followed crete energy, (8), it follows that one needs to treat three terms in the
by observing that e4 = e2 − e0 and e3 = e1 − e0 . FE discretization. The CR formulation of the first and third terms
22
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
follows directly from the thin plate setting: The most obvious of the remaining three parameters are two
Young’s moduli, Y 0 and Y 1 , which determine bending stiffness
Z X Ai 2 X 3|ei |2 „ «2 ! along two material directions. The third parameter is the shear
2 θi
H dA ∼ Hi = 2 sin , modulus, G01 , which, for in-plane deformations, determines the re-
S 3 Ai 2
i i sistance to shear. In the case of bending, the shear modulus allows
(14) for additional directional variability of bending stiffness. Specifi-
cally, bending stiffness at an angle α with respect to the material
!
Z X Āi 2 X 3|ēi |2 „ «2
θ̄i
H̄ 2 dA ∼ H̄i = 2 sin . axis 0, is given by (up to a scale factor):
S i
3 i
Āi 2
(15) Y 0 cos4 α + Y 1 sin4 α + 2G01 sin2 α cos2 α . (17)
The cubic term, H H̄ = hH, H̄ n̂i, requires special treatment in the Consider the adjacent plot G 01 = 2K
discrete case: Hi and H̄i are in general not parallel vectors, thus of directional stiffness as a G 01 = K
90 G 01 = .01K
H H̄ 6= hHi , H̄i i. We approximate collinearity by conceptually function of α, for three ma-
0
applying a rigid transformation to the isometrically deformed mesh terials all sharing Y =
such that the positions of the triangles T̄0 and T0 coincide4 . Such a Y 1 , but with shear moduli
rigid transformation does not alter elastic energy, but it in the limit 0.1K, K, and 2K. Note
of mesh refinement it attains Hi kH̄i . that for low shear, typical for
With this (conceptual) transformation in effect, we may evaluate cloth, the maximal to min- 180 0
H H̄ ≈ hHi , H̄i i = |Hi ||H̄i | cos ∠(Hi , H̄i ). The lengths |Hi | imal bending stiffness ratio
and |H̄i | are obtained via (13). To obtain ∠(Hi , H̄i ), observe that is 2. As shown in Figure 9,
edge-based mean curvature vectors bisect the dihedral angle of their this has a significant effect
incident flap triangles; therefore, ∠(Hi , H̄i ) = (θi − θ̄i )/2. As- on drapability, and cannot be
270
sembling these observations, and using that under isometry we have achieved by a simple model
|ei | = |ēi | and Ai = Āi , the cubic term is given by H H̄ ≈ using just two parameters. Similarly, the shear modulus affects re-
sistance of cloth to twisting, even if Y 0 = Y 1 , as twisting may lead
9|ēi |2 to diagonal bending.
„ «„ «
θi θ̄i θi − θ̄i
hHi , H̄i i = 2 sin 2 sin cos . (16) Directional stiffness is particularly important in the case of
Ā2i 2 2 2
quasi-inextensible flat sheets. Such sheets have small Gaussian cur-
Together, (14), (15), and (16) simplify to Eb (x)i = vature (the product of the two principal curvatures), which implies
that strong bending can be present only in a single direction.
«2 In contrast to directional stiffness, forces arising from the inter-
3|ēi |2
„
Āi ` 2 θi − θ̄i
Hi + H̄2i − 2hHi , H̄i i =
´
2 sin , action of multiple bending directions (e.g., due to the Poisson ratio
6 2Āi 2 in the isotropic case) appear to be qualitatively less important. In
fact, one can show that for directional stiffness this interaction re-
which exactly corresponds to the geometric formulation (4). sults in effective increase in the shear modulus. One can prove that
in the simple case of bending of a plate with fixed boundaries the
bending forces (unlike stretching) are independent of the Poisson
4 Orthotropic Bending ratio.
The Kawabata system characterizes cloth by its resistance to
We now generalize our bending model to orthotropic materials— bending along warp and along weft directions, and by tensile, shear-
an important class of anisotropic materials whose elastic properties ing and compressive stiffnesses measured as functions of deforma-
depend on the direction along which they are measured [Ventsel tion. In the orthotropic elasticity model, stiffnesses are assumed
and Krauthammer 2001]. A fully general linear elasticity model for to be independent of the deformation, which appears to be a good
deformable surfaces has six parameters (not counting the choice of approximation for qualitative modeling. Furthermore, plasticity ef-
anisotropy axes) some of which are hard to interpret intuitively. We fects are ignored, and the compressive and tensile stiffnesses are
focus on a more restricted orthotropic elasticity model whose four assumed to be equal. As pointed out in [Breen and Donald 1994],
parameters have more intuitive meaning and appear to be useful linear elasticity provides a good approximation for Kawabata mea-
for material behavior control in animation. Most common man- surements for small deformations, although it ignores some of the
made materials are orthotropic, for example, cloth, plastic rein- subtler initial-resistance effects.
forced by fibers, sheet metal, and paper. Non-orthotropic thin ma- Given Kawabata measurements of a fabric, Y 1 and Y 0 can be
terials are less common (e.g., thin sheets obtained by cutting a 3D inferred from directional bending stiffnesses and tensile measure-
orthotropic material at an angle, or composite materials). For cloth, ments, and G01 from shear measurements. Alternatively, Y 1 , Y 0 ,
orthotropic approximation naturally matches most of the parame- G01 , and the material axes may be directly controlled by an artist,
ters of the Kawabata cloth evaluation system [Kawabata 1980], a adjusting parameters based on the notion that Y 1 and Y 0 determine
commonly used system for characterizing cloth properties, as ex- resistance to bending along the two orthogonal material directions
plained below. and G01 determines the resistance of the material to draping over
We are primarily interested in how these material parameters af- an object.
fect bending, rather than in-plane deformations. From the four pa- Given the material parameters, and applying a standard for-
rameters of orthotropic materials, one parameter can be eliminated mulation of Hooke’s law for orthotropic materials, we can ex-
if we assume that bending the surface along material directions does press the bending energy density of a deformed surface as a func-
not have any effect on bending on the other direction (this corre- tion of bending strain , using one additional material parameter
sponds to having zero Poisson ratio in the isotropic case). For sim- Y 01 = ν01 Y 1 = ν10 Y 0 , where ν10 and ν01 are Poisson ratios
plicity we will assume that this is the case, and briefly discuss the (which always satisfy ν 01 /Y 0 = ν 10 /Y 1 ). The energy density is
role of the Poisson ratio at the end of this section.
c Y 0 200 + Y 1 211 + 2Y 01 00 11 + 2hG01 201 ,
` ´
4 Existence of this transformation is ensured by the isometry assumption. (18)
23
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
24
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Figure 3: Deformations are primarily characterized by the ratio of bending to membrane stiffness. Despite having forces linear in positions,
the quadratic bending model is valid over a broad range of stiffness values. Shown here (left to right): 10−5 : 1, 10−3 : 1, and 10−2 : 1.
where λ̄i is the stiffness of the hinge and Āi is the combined value problems (IVPs) of the form
area of the two hinge triangles, In local indices, we have K̄ =
(c̄03 + c̄04 , c̄01 + c̄02 , −c̄01 − c̄03 , −c̄02 − c̄04 ) ∈ R4 , where M ẍ(t) = f (t, x(t), ẋ(t)) , (20)
c̄jk = cot ∠(ēj , ēk ).
where M is the (physical) mass matrix; f (t, x(t), ẋ(t)) are forces
Force Computation Compute forces by adding thin plate and depending on time, position, and velocity; and the initial position
(if dealing with shells) nonflat contributions. Compute thin plate and velocity of the cloth are prescribed [Hauth 2004]. For analysis
contributions globally as the matrix-vector products f x = Q̄xx , one often introduces velocity as a separate variable, rewriting the
f y = Q̄xy , f z = Q̄xz . Compute nonflat contributions by accumu- above as a coupled first-order system,
lating local hinge contributions
„ «„ « „ «
Id 0 ẋ(t) v(t)
f0 = −f1 − f2 − f3 , f1 = k̄(e1 × e2 ) , 0 M v̇(t)
=
f (t, x(t), v(t))
,
f2 = k̄(e2 × e0 ) , f3 = k̄(e0 × e1 ) ,
with appropriate initial conditions. The temporal discretization of
where k̄ = 3λ̄i (c̄01 − c̄03 )(c̄04 − c̄02 )[ē0 , ē1 , ē2 ]/(Ā0 |ē0 |3 ). this system is a well-studied and active area of applied mathemat-
ics and computational mechanics, with a host of attendant meth-
Force Jacobian Computation The exact force Jacobian ods. For treatments tailored to cloth simulation we refer the reader
(R3n × R3n ) is obtained by adding the thin plate and (in the case to [Baraff and Witkin 1998; Etzmuss et al. 2000; Hauth and Etz-
of shells) the nonflat contributions. The thin plate contributions are muss 2001; Choi and Ko 2002; Ascher and Boxerman 2003; Brid-
given by ∂f x /∂xx = ∂f y /∂xy = ∂f z /∂xz = Q̄. For best per- son et al. 2003; Hauth et al. 2003; Boxerman and Ascher 2004;
formance (without sacrifice of accuracy), the nonflat contribution Hauth 2004]).
is omitted (as explained in §6); for completeness of exposition the As a general observation, each force may be treated explic-
nonflat contribution is detailed in the Appendix A. itly or implicitly. An explicit treatment requires the (possibly re-
Orthotropic Hinge The simple expressions above are all that is peated) evaluation of the force per discrete time step; an implicit
required to implement a cubic hinge-based bending force, given a method requires additionally the (possibly repeated) evaluation of
stiffness value λ̄i per hinge. For homogeneous isotropic materials, the force Jacobian per discrete time step. In the case of a conserva-
λ̄i = λ̄ does not vary over the mesh, and the above derivation suf- tive force, such as elastic bending, the force Jacobian is minus the
fices; if a general class of orthotropic materials is desired, then λ̄i energy Hessian. In the case of a dissipative Rayleigh force, such
should be computed by the formula derived in (§4.1); recall λ̄i = as damping of the bending modes, the Jacobian is expressed as a
linear combination of the physical mass and energy Hessian. Et-
1 ` 01 zmuss, Hauth et al. [2000; 2001; 2003; 2004] as well as Ascher
(cY 0 ) sin4 γ0 + (cY 1 ) cos4 γ0 + cY + hG01 sin2 (2γ0 ) ,
´
2 and Boxerman [2003; 2004] analyzed the behavior of time integra-
tion schemes and presented arguments for the adoption of implicit-
where γ0 is the angle between the hinge edge and the first material explicit (IMEX) integrators; Bridson et al. [2003] presented a semi-
axis, ŷ0 , and Y 0 , Y 1 , Y 01 , and G01 are the material parameters implicit method that treats damping implicitly and elastic forces ex-
described above. The above expression is all that is needed to im- plicitly. Our results indicate that IBM accelerates both explicit or
plement orthotropic bending for cubic shells, and indeed for any implicit treatments of bending.
existing hinge-based model. Among common discrete time-stepping schemes [Baraff and
In our implementation, the (spatially-varying) direction of ŷ0 is Witkin 1998; Hauth 2004; Hairer et al. 2006], implicit schemes
encoded by a coordinate function over a given parameterization of are popular in animation due to their stability. Implicit schemes
the surface. In particular, we use the color values of a texture map advance time by solving a (typically nonlinear) system of equa-
to encode the direction of the material axis. tions. The system is usually solved by repeated Newton iterations
(although semi-implicit methods complete a single Newton itera-
tion) [Press et al. 1992]. Each Newton iteration requires an evalua-
6 Efficient Plate & Shell Dynamics tion of the force, −∇E, as well as the force Jacobian.
Whether in the high-fidelity or interactive setting, rapid simulation Inexact Newton’s Method The thin plate case (§6.1) is dis-
requires an efficient numerical integrator for second order initial tinguished by the property that the force Jacobian is constant, and
25
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Draping problem regular mesh (resolution, in no. vertices) irregular mesh (resolution, in no. vertices)
400 1600 6400 25600 450 2100 6500 22500
Gradient nonlinear hinge 0.937 3.45 16.4 66.6 1.10 5.43 17.6 67.8
cost (ms) quadratic IBM 0.081 0.338 2.19 9.15 0.098 0.494 2.32 9.68
Hessian nonlinear hinge 12.8 54.2 218 890. 15.2 77.2 246 888
cost (ms) quadratic IBM 0.237 0.963 3.87 15.7 0.266 1.28 3.99 13.6
Explicit step nonlinear hinge 3.81 6.64 27.5 112. 2.16 9.53 31.4 140.
cost (ms) quadratic IBM 2.63 2.90 11.9 48.8 0.964 4.35 15.2 76.5
Implicit step nonlinear hinge 28.6 138 470. 1730 33.9 219 557 1880
cost (ms) quadratic IBM 11.0 62.7 168 505 13.6 103 219 612
Flag problem regular mesh (resolution, in no. vertices) irregular mesh (resolution, in no. vertices)
400 1600 6400 25600 450 2100 6500 22500
Gradient nonlinear hinge 0.975 3.99 16.0 64.0 1.10 5.43 17.8 68.7
cost (ms) quadratic IBM 0.085 0.341 2.14 8.75 0.099 0.490 2.31 9.28
Hessian nonlinear hinge 13.4 54.8 212 849 15.2 77.4 247 887
cost (ms) quadratic IBM 0.251 0.974 3.79 14.99 0.267 1.30 3.96 13.7
Explicit step nonlinear hinge 1.73 7.05 27.7 112. 1.97 9.80 32.7 134
cost (ms) quadratic IBM 0.780 3.26 13.3 53.4 0.900 4.54 16.1 70.0
Implicit step nonlinear hinge 27.6 106 420. 1680 33.5 155 513 1880
cost (ms) quadratic IBM 9.53 32.9 127 490 12.5 50.4 166 608
Table 1: Computational cost per time step for a variety of regular- and irregular-mesh resolutions, comparing our quadratic energy to the
popular nonlinear hinge energy. Costs reported include the time required for collision detection and response. These tests were conducted on
a single process, Pentium D 3.4GHz, 2GB RAM.
can be pre-computed once (see §5). In the cubic shells case (§6.2),
however, the force Jacobian is no longer constant. Here the follow-
ing observation comes to the rescue. Consider Newton’s method,
applied to an implicit time-stepping scheme,
The fixed points of this method remain unaltered when the Jaco-
bian, J = ∇G, is replaced by any invertible matrix, J̃ ≈ J.
This observation justifies the inexact Newton’s method: Instead of a
costly J, use any good but efficient approximation J̃ [Morini 1999].
Approximating the Jacobian may affect (the rate or radius of) con-
vergence, but it will not affect the limit value of converging itera-
tions. In contrast, approximating G will affect the value of the fixed Figure 4: Final rest state of a cloth draped over a sphere, for
points; therefore, inexact Newton approximates only the Jacobian (left) the proposed isometric bending model and (right) the widely-
∇G, not the function G. The isometric deformation assumption adopted nonlinear hinge model.
gives the constant approximant, J̃, to the flow Jacobian, J, where
J = Id − h Hess(Eb )(x) ≈ Id − h Q̄ = J̃ , the hinge forces and Jacobians was hand tuned and not based on
automated methods.
where Q̄ is the constant matrix computed in §5. Replacing the nonlinear hinge model with the quadratic IBM
Hauth [Hauth 2004] used an approximation of the in-plane reduces bending force computation cost by seven- to eleven-fold.
stretching force Jacobian, and an inexact Newton framework, to Where a force Jacobian is required, IBM’s constant Hessian is pre-
accelerate cloth simulations; our work is similar, but we approxi- computed once and stored in a sparse matrix datastructure, elim-
mate the bending Jacobian. We will revisit the inexact Newton’s inating the computational cost of bending Jacobian assembly. Of
method in §7, where it enables an acceleration of Willmore-type course, the actual net performance improvement in any given ap-
fairing applications. plication depends on the fraction of total computation associated to
bending.
6.1 Thin Plates
Test Setup To estimate this, we implemented both the implicit
We compare the computational cost and visual quality of the iso- solver framework of [Baraff and Witkin 1998] as well as a simple
metric bending model to the widely-used bending hinge-based en- explicit Euler solver. Our choice of solvers is motivated by a de-
ergy described in [Baraff and Witkin 1998; Bridson et al. 2003; sire to estimate profitability of incorporating IBM whether or not a
Grinspun et al. 2003], for regular- and irregular-meshes ranging framework requires bending force Jacobians. The test framework
from 400 to 25600 vertices, on a draping problem as well as a dy- incorporates: (a) the usual constant strain linear finite element for
namic billowing flag. Figures 1-4 provide a qualitative point of membrane response [Zienkiewicz and Taylor 1989; Hughes 1987],
comparison between IBM and the nonlinear hinge model. which computationally is at least as costly as the membrane model
Implementing our discrete IBM for thin plates is straightforward, proposed in [Baraff and Witkin 1998]; (b) the robust collision de-
as explained in §5. In contrast, an efficient implementation of a tection and response methods of [Bridson et al. 2002], augmented
nonlinear model such as a hinge spring requires both significant with k-DOP trees [Klosowski et al. 1998]; (c) the PETSc solver
(human and computer) gradient calculations, or leads to adoption of library [Balay et al. 2001]. Further optimization of our collision
costly automatic-differentiation techniques [Grinspun et al. 2003]. detection using [Govindaraju et al. 2005] is likely to reduce the
For comparison of computational efficiency, our implementation of overhead of collision computations for large meshes. For a more
26
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Simulated Time / CPU Sec Orthotropic Flags Falling Cylinders Falling Bowl Mesh Resolution
2e-05
5e-01
2.5x
5e-07
3e-02
(NH, NH)
(NH, CS)
(NH, CC)
3e-08
8e-03
(CS, CS)
(CS, CC) } 2.5x
1e-03 4e-03 2e-02 1e-04 5e-04 2e-03 3e-05 1e-04 5e-04 10x10 20x20 40x40 80x80 160x160
dt dt dt Mesh Resolution
Figure 5: (Left:) Performance measured in completed simulation time per CPU second (y-axes) as a function of discrete time step (x-axes).
Higher values mean better performance. In an inexact Newton framework, Cubic Shells dominate performance for all tested scenarios,
including (left-to-right) Orthotropic Flags (Fig. 10), Falling Cylinders (Fig. 8), and Falling Bowl (Fig. 12). Right: Performance as a function
of mesh resolution (from 10 × 10 to 160 × 160 regular grids), demonstrating that the benefits of cubic shells are not resolution-dependent.
Timing numbers include timestepping and collision detection/response.
detailed comparison, see Table 1. We observe a consistent reduc- 6.2 Thin Shells
tion in total computational cost compared to the nonlinear hinge
model, across the two problem setups, two mesh types, and resolu- The separability of the force Jacobian (see §5) of our cubic bending
tions ranging from 400 to 25600 vertices. model into a constant and linear term, combined with an inexact
Newton’s method, opens several interesting possibilities for effi-
Draping Cloth We simulated the draping of a square sheet over cient time integration of thin shell dynamics.
a sphere. As shown in Figure 4, the draped cloths are qualita- Experiment We consider the application of the inexact New-
tively similar in their configuration and distribution of wrinkles ton’s method with approximations to the bending force Jacobian.
and folds. Since only the final draped state was important, we To provide a standard and easily-reproducible point of reference,
introduced a dissipative Rayleigh force allowing for larger time we consider the Euler method, fully-implicit on stretching and
steps [Hughes 1987]. For this example we might also consider a bending elastic forces, without any additional damping forces.
quasistatic method, as recently considered in [Teran et al. 2005]. In our experiments we pair two possible bending forces with
Since quasistatics requires repeated evaluation of forces and their three possible force Jacobians. For the two forces we con-
Jacobian, the proposed bending model will also be profitable in the sider the nonlinear hinge (NH)—the force resulting from treating
quasitatic setting. Together Figures 4-3 capture the behaviour of bending energy fully nonlinearly (i.e., by dropping the isometry
IBM under a range of bending stiffnesses. assumption)—and the cubic shells force (CS) arising from our cubic
energy as discussed in the previous section. For the three force Ja-
Billowing Flag We simulated the dynamics of a flag under wind. cobians we consider the nonlinear hinge Jacobian (NH), the entire
As shown in the accompanying movie (see also Fig. 1) the motion cubic shells Jacobian (CS), and the constant part (CC) of the cubic
of the flag is qualitatively unaffected when we substitute the more shells Jacobian. A particular choice of (inexact) Newton is denoted
economical quadratic bending energy. Furthermore, we found that by a 2-tuple, e.g., (CS,CC) denotes the use of the cubic shell bend-
there is no need to readjust material parameters when switching ing forces paired with an approximate constant Jacobian; (NH,NH)
from the nonlinear hinge to the IBM model; this is not unexpected denotes the usual fully-implicit implementation of the nonlinear
in light of the link between the two energies, as discussed in Foot- hinge.
note 2. We modeled wind by a constant homogeneous velocity As a baseline, we run (NH,NH) at the maximum stable step size,
field, with force proportional to the projection of the wind veloc- and four smaller step sizes; these step sizes are reused in runs of
ity onto the area-weighted surface-normal. For more sophisticated (NH, CS), (NH, CC), (CS, CS), (CS, CC). We measure performance
effects of wind fields on cloth see [Keckeisen et al. 2004]. Purely of these runs for various problem scenarios (see §6.3).
for contrast with the draping example, we did not introduce any spe-
We record the performance of each method, measured as the ra-
cific damping forces, although the implicit Euler method is known
tio completed simulation time per CPU second, i.e., higher values
to exhibit numerical damping.
mean better performance (see Figure 5–left). The cubic shells with
an approximate constant Jacobian, (CS,CC), dominates all meth-
IMEX Methods We stress that the proposed model is not spe-
ods for all problem scenarios. Note that the performance gains ob-
cialized to our test framework. Consider for example the in-
served for (CS, CC) are independent of mesh resolution (see Fig-
tegration of the IBM into the framework described by Bridson
ure 5–right).
et al. [2003], which treats elastic (position-dependent, velocity-
independent) forces explicitly, and treats damping forces implic-
itly. With IBM both force and Jacobian computation is greatly 6.3 Visual Impact of Orthotropic Effects
reduced; therefore explicit, implicit, and semi-implicit treatments
are all prime candidates. Bridson et al. describe a very efficient Orthotropic parameters provide additional artistic control over the
matrix-free solver strategy, involving as few as one to two conju- dynamics of wrinkles and folds. Consider for example a flag tai-
gate gradient iterations: this heightens the relevance of fast (elastic lored by cutting a rectangular pattern from an orthotropic textile.
and damping) bending force computations, since with fewer conju- The orientation of warp and weft relative to the flag’s pattern, as
gate gradient iterations, the balance of computation shifts further to well as the values of Young’s and shear moduli, have considerable
the computation of the cached nonlinear position-dependent terms visual impact on the resulting dynamics (see Fig. 10).
as well as the algebraic system’s right hand side. In incorporating The orthotropic shear modulus plays an important role in the
IBM in this context, the requisite matrix-vector multiplication may drapability of a fabric [Sidabraite and Masteikaite 2002]; the shear
be distributed, (Km + Kb )~x = Km ~x + Kb ~x, where the precom- modulus is not captured by geometric models that employ Euler’s
puted Kb is a multiple of the constant bending Jacobian, and Km formula, such as [Baraff and Witkin 1998; Volino and Magnenat-
is the membrane Jacobian. Thalmann 2006], or elliptic interpolation, such as [Choi and Ko
27
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Figure 6: Initial and final frames of Willmore flow applied to Figure 7: Initial and final frames of Willmore flow applied to solve
smooth (top) a 44928 triangle dinosaur and (bottom) a 24192 tri- two tasks posed by Bobenko and Schröder. (top) Smoothing a 4-
angle hand at interactive rates. 16 smoothing steps require a total times subdivided icosahedron into a sphere and (bottom) a hole fill-
of 7.47s and 4.42s, with one-time factorization costing 8.77s and ing problem. The sphere converged in 120ms (12ms × 10 smooth-
5.31s, for the dinosaur and the hand, respectively. Images rendered ing steps), with 200ms for Hessian prefactorization. The hole fill-
with flat shading. ing problem required 640ms after 120ms for prefactorization. Ren-
dered with flat shading.
28
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Implementations of discrete Willmore flow were reported by sev- scribed boundary conditions up to first order, and integrate the geo-
eral authors. Ken Brakke’s Surface Evolver [Brakke 1992; Hsu metric flow until it reaches a stationary point. The solution required
et al. 1992] used a discretized version of mean curvature as a build- 760ms, which includes 120ms for Jacobian pre-factorization.
ing block for Willmore energy. Yoshizawa et al. [Yoshizawa and Due to its constant, pre-factored Jacobian, our method scales
Belyaev 2002] discretized directly the energy gradient, using the well to larger meshes. We applied Willmore flow to smooth sev-
cotangent formula. The latter introduced an additional tangential eral large meshes, including the dinosaur (45k triangles) and hand
force to improve the quality of the evolving mesh. Clarenz et (24k triangles), shown in Figure 6. Unlike Laplacian smoothing,
al. [Clarenz et al. 2004] discretized the variation of the Willmore for which fast implicit methods have been demonstrated [Desbrun
energy in terms of linear Lagrange elements and treated the corre- et al. 1999], Willmore flow is derived from a scale-invariant energy,
sponding L2 -flow by a coupled system of second order equations. hence it is not biased toward shrinking the surface. The inexact
Finally, Bobenko et al. [Bobenko et al. 2005] presented a discrete Newton’s method enabled us to accelerate computation by several
version of the fact that the integrand of the smooth Willmore energy orders of magnitude. The near-interactive times are reported using a
is conformally invariant. However, existing approaches did not fo- notebook computer, suggesting that fully-interactive Willmore flow
cus on the economy that arises from assuming (or rather pretending) for large meshes is well within the reach of the discrete IBM.
that deformations are isometric.
To compute a geometric flow, one must integrate the flow trajec-
tory over time. This may be achieved via explicit or implicit meth- 8 Discussion
ods, as described in §6. Following the direction laid out by Desbrun
and coworkers [Desbrun et al. 1999], who note that the stability of Limitations The IBM does not overcome those limitations that
implicit integration methods improves the performance of geomet- are shared by all hinge-based approaches. In particular, the simplic-
ric flows, we implemented an implicit method, in particular using ity of hinge-based models comes at the cost of limited convergence
the inexact Newton’s method. behavior and meshing-dependence [Grinspun et al. 2006]. Beyond
Discrete IBM in Willmore Solver In contrast to our treatment those limitations inherited from the general class of hinge-based
of cloth and inextensible thin plates, in applications of Willmore methods, the approach here is built on the assumption of inextensi-
energy the presence of an accompanying isometry-enforcing term bility. We performed a cursory evaluation of the sensitivity of the
is notably absent. Indeed, the deformations governed by Willmore method to violations of this assumption (recall §6.4); a more rigor-
flow are generally not isometric so that the energy gradient will ous evaluation is required to complete the picture.
not be linear, as it was for cloth. It may therefore seem surprising
that our proposed Willmore flow application, while incorporating Conserved Momenta In all circumstances, and in particular
an isometry assumption, gains speed without paying in visual qual- even when parasitic stretching is observed due to a broken isometry
ity. The inexact Newton Method serves as the numerical framework assumption, the simulated model conserves linear and angular mo-
in which this phenomenon can explained. menta. To see this, note that the quadratic forces arising from the
Using the PETSc [Balay et al. 1996] and PARDISO [Schenk and cubic energy are not approximated (only their Jacobian is); since
Gärtner 2004] solver libraries, we implemented the backward Eu- the cubic energy is invariant under rigid body transformations of
ler method with an inexact Newton solver. We found that a semi- the deformed (and also the undeformed) configuration, forces in-
implicit treatment, which stops Newton’s method after one itera- duced by this energy do not apply a global acceleration or torque.
tion, exhibits the best trade-off between stable time step size and
Who Should Use This Method? In any practical application,
cost per time step, for a prescribed level of accuracy.
the final decision on incorporating a proposed technique hinges on
We briefly discuss the details that led to efficient Newton itera-
the implementation cost and performance benefit of the method.
tions. To make clear the structure of the linear solve, we write the
We have presented a model for bending that involves simply com-
Newton iteration as
puting the entries of a sparse matrix. This computation is straight-
(i+1) (i) (i) forward, as shown in §6. Finally, incorporation of the proposed
(∇G)(xk+1 − xk+1 ) = −G(xk+1 ) .
model is a minimally-invasive task. Given these considerations, we
For the right hand side, we compute the full nonlinear expres- suggest that it will be straightforward to evaluate the efficacy of
sion ∇Eb (x); consult Appendix C for a derivation. For the left the proposed model within the reader’s preferred cloth simulation
hand side, we replace ∇G by the constant precomputed ma- framework.
trix Q̄ (see §5). We used PARDISO’s LLT solver, which fac- Shortly after the work described in this chapter was completed,
tors Q̄ symbolically and numerically. Since Q̄ is known at pro- Goldenthal et al. [2007] proposed a fast projection method for en-
gram start, the symbolic factorization step—the bulk of the linear forcing inextensibility of a quadrilateral surface mesh. Building
solver’s computation—can be executed just once at startup. The on this, English and Bridson [2008] observed that fast projection
pre-factorization of Q̄, and the elimination of repeated matrix as- could be applied to enforce inextensibility of triangle meshes, by
sembly, accounts for the speedup we observed. constraining the edge lengths of the dual-mesh; one interpretation
is that the discontinuous surface given by the Crouzeix-Raviart el-
Results To evaluate the performance of our method, we du- ements deforms isometrically. This view illuminates the natural
plicated several problem scenarios presented by Bobenko et connection between the projection used to enforce inextensibility,
al. [Bobenko et al. 2005] (see Figures 6 & 7). Whereas Bobenko’s and the IBM forces described in this chapter. English and Bridson
work preserves the Möbius symmetries of the underlying continu- observe this connection when they select the IBM as the simple,
ous system, our focus is on rapid computation at nearly interactive natural choice of bending model for the simulation of developable
rates, maintaining good surface quality, while retaining invariance triangle meshes.
under a subset of all Möbius transformations: rigid transformations
and uniform scaling. Acknowledgments We thank David Eberle for his feedback.
Figure 7-bottom shows the result of a six-sided hole filling prob- This work was supported in part by the DFG Research Center
lem (compare with [Bobenko et al. 2005]). In this problem setup, M ATHEON in Berlin, the NSF (MSPA-IIS-05-28402, CSR-CNS-
the boundary conditions are taken from a smooth Loop subdivision 06-14770, CCR-0093390, CAREER-CCF-06-43268), Autodesk,
surface, and the interior triangles are initialized with a trivial non- Elsevier, mental images, NVIDIA, and an IBM Faculty Parternship
smooth solution. We fix two rings of vertices to enforce the pre- award.
29
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
30
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
BALAY, S., B USCHELMAN , K., G ROPP, W. D., K AUSHIK , D., E TZMUSS , O., E BERHARDT, B., AND H AUTH , M. 2000. Implicit-
K NEPLEY, M., M C I NNES , L. C., S MITH , B. F., AND Z HANG , explicit schemes for fast animation with particle systems. In
H. 2001. PETSc homepage. http://www.mcs.anl.gov/petsc. Computer Animation and Simulation 2000, 138–151.
BARAFF , D., AND W ITKIN , A. 1998. Large steps in cloth simula- G ARG , A., G RINSPUN , E., WARDETZKY, M., AND Z ORIN , D.
tion. In SIGGRAPH, ACM Press, 43–54. 2007. Cubic Shells. In Siggraph/Eurographics Sympos. Comput.
Anim., 91–98.
B ERGOU , M., WARDETZKY, M., H ARMON , D., Z ORIN , D., AND
G RINSPUN , E. 2006. A Quadratic Bending Model for Inexten- G INGOLD , Y., S ECORD , A., H AN , J. Y., G RINSPUN , E., AND
sible Surfaces. In Siggraph/Eurographics Sympos. Geom. Pro- Z ORIN , D. 2004. A Discrete Model for Inelastic Deformation
cessing, 227–230. of Thin Shells. Tech. rep., Aug.
B LASCKE , W. 1929. Vorlesungen über Differentialgeometrie. G OLDENTHAL , R., H ARMON , D., FATTAL , R., B ERCOVIER , M.,
Springer. AND G RINSPUN , E. 2007. Efficient Simulation of Inextensible
Cloth. SIGGRAPH ( ACM Transactions on Graphics) 26, 3.
B OBENKO , A. I., , AND S CHR ÖDER , P. 2005. Discrete Willmore
Flow. Europgaphics Symposium on Geometry Processing, 101– G OVINDARAJU , N. K., K NOTT, D., JAIN , N., K ABUL , I., TAM -
110. STORF, R., G AYLE , R., L IN , M. C., AND M ANOCHA , D. 2005.
Interactive collision detection between deformable models using
B OBENKO , A. I. 2005. A conformal energy for simplicial surfaces.
chromatic decomposition. ACM Transactions on Graphics 24, 3
Combinatorial and Computational Geometry, 133–143.
(Aug.), 991–999.
B OXERMAN , E., AND A SCHER , U. 2004. Decompos-
G RINSPUN , E., H IRANI , A. N., D ESBRUN , M., AND S CHR ÖDER ,
ing cloth. In SCA ’04: Proceedings of the 2004 ACM
P. 2003. Discrete shells. SCA, 62–67.
SIGGRAPH/Eurographics symposium on Computer animation,
ACM Press, New York, NY, USA, 153–161. G RINSPUN , E., G INGOLD , Y., R EISMAN , J., AND Z ORIN , D.
B RAKKE , K. 1992. The surface evolver. Exper. Math. 1, 2, 141– 2006. Computing discrete shape operators on general meshes.
165. Comput. Graph. Forum 25, 3.
B REEN , D., AND D ONALD , H. 1994. House, and Michael J. H AIRER , E., L UBICH , C., AND WANNER , G. 2006. Geomet-
Wozny. Predicting the drape of woven cloth using interacting ric Numerical Integration: Structure-Preserving Algorithms for
particles. Proceedings of SIGGRAPH ’94, 365–372. Ordinary Differential Equations. Springer.
B RIDSON , R., F EDKIW, R., AND A NDERSON , J. 2002. Robust H AUTH , M., AND E TZMUSS , O. 2001. A high performance solver
treatment of collisions, contact and friction for cloth animation. for the animation of deformable objects using advanced numeri-
ACM TOG 21, 3, 594–603. cal methods. Computer Graphics Forum 20, 3, 319–328.
B RIDSON , R., M ARINO , S., AND F EDKIW, R. 2003. Simulation H AUTH , M., E TZMUSS , O., AND S TRASSER , W. 2003. Analysis
of clothing with folds and wrinkles. SCA, 28–36. of numerical methods for the simulation of deformable models.
Visual Computer 19, 7-8, 581–600.
C ANHAM , P. 1970. The Minimum Energy of Bending as a Possible
Explanation of the Biconcave Shape of the Human Red Blood H AUTH , M. 2004. Visual Simulation of Deformable Models. PhD
Cell. Journal of Theoretical Biology 26, 61–81. thesis, University of Tübingen.
C HOI , K.-J., AND KO , H.-S. 2002. Stable but responsive cloth. H ELFRICH , W. 1973. Elastic Properties of Lipid Bilayers: Theory
ACM Transactions on Graphics 21, 3 (July), 604–611. and Possible Experiments. Zeitschrift fr Naturforschung Teil C
28, 693–703.
C HOI , K.-J., AND KO , H.-S. 2003. Extending the immedi-
ate buckling model to triangular meshes for simulating complex H ILDEBRANDT, K., AND P OLTHIER , K. 2004. Anisotropic filter-
clothes. In Eurographics 2003 Short Presentations, 187–191. ing of non-linear surface features. CGF 23, 3, 391–400.
C IARLET, P. 2000. Mathematical Elasticity, Vol III: Theory of H SU , L., K USNER , R., AND S ULLIVAN , J. 1992. Minimizing
Shells. North-Holland. the squared mean curvature integral for surfaces in space forms.
Experiment. Math. 1, 3, 191–207.
C LARENZ , U., D IEWALD , U., D ZIUK , G., RUMPF, M., AND
RUSU , R. 2004. A finite element method for surface restora- H UGHES , T. J. R. 1987. Finite Element Method - Linear Static
tion with smooth boundary conditions. CAGD, 427–445. and Dynamic Finite Element Analysis. Prentice-Hall, Engle-
wood Cliffs.
C OHEN -S TEINER , D., AND M ORVAN , J.-M. 2006. Second fun-
damental measure of geometric sets and local approximation of K AWABATA , S. 1980. The Standardization and Analysis of Hand
curvatures. J. Differential Geom. 73, 3, 363–394. Evaluation. The Hand Evaluation and Standardization Commit-
tee, The Textile Machinery Society of Japan.
D ESBRUN , M., M EYER , M., S CHR ÖDER , P., AND BARR , A. H.
1999. Implicit fairing of irregular meshes using diffusion and K ECKEISEN , M., K IMMERLE , S., T HOMASZEWSKI , B., AND
curvature flow. SIGGRAPH’99 Conference Proceedings, 317– WACKER , M. 2004. Modelling Effects of Wind Fields in Cloth
324. Animations. In Journal of WSCG, vol. Vol. 12, 205–212.
DO C ARMO , M. 1992. Riemannian Geometry. Mathematics: The- K LOSOWSKI , J. T., H ELD , M., M ITCHELL , J. S. B., S OWIZ -
ory and Applications. Birkhäuser. RAL , H., AND Z IKAN , K. 1998. Efficient collision detection
using bounding volume hierarchies of k-dops. IEEE TVCG 4, 1
E NGLISH , E., AND B RIDSON , R. 2008. Animating developable (January-March), 21–36.
surfaces using nonconforming elements. In SIGGRAPH ’08:
ACM SIGGRAPH 2008 papers, ACM, New York, NY, USA, 1– M ERCAT, C. 2001. Discrete Riemann surfaces and the Ising model.
5. Communications in Mathematical Physics 218, 1, 177–216.
31
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
32
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Figure 8: Thin-shell simulation of falling orthotropic cylinders. Material axes vary from left-to-right: isotropic, vertical, horizontal, diagonal.
Left Image: stress formed on the cylinders upon impact. Right Image: the effects of anisotropy after impact. Note the extreme flatenning of
the cylinder with axis aligned vertically and the high bounce of the cylinder with axis aligned horizontally.
Figure 9: Shear vs. no bending shear: a high bending shear modulus tends to align folds and wrinkles to the material axes (leftmost); a lower
shear modulus allows the fabric to fold along other directions, and therefore to obtain a closer fit to the body (second frame). Shearing effects
cannot be reproduced by simply tuning Young moduli (3 unsuccessful attempts shown on the right).
Figure 10: Varying material axes at no additional cost. From left-to-right: isotropic, vertical, horizontal and diagonal.
Figure 11: Thin plates: adjustable directions of fracture patterns. Left-to-right: isotropic, vertical, horizontal and diagonal.
Figure 12: Thin shells: adjustable directions of fracture patterns. Left-to-right: isotropic, vertical, horizontal and diagonal.
33
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Chapter 6:
Discrete Elastic Rods
Miklós Bergou Max Wardetzky Stephen Robinson Basile Audoly Eitan Grinspun
Columbia University University of Göttingen Columbia University CNRS / UPMC Univ Paris 06 Columbia University
Figure 1: Experiment and simulation: A simple (trefoil) knot tied on an elastic rope can be turned into a number of fascinating shapes
when twisted. Starting with a twist-free knot (left), we observe both continuous and discontinuous changes in the shape, for both directions
of twist. Using our model of Discrete Elastic Rods, we are able to reproduce experiments with high accuracy.
CR Categories: I.3.7 [Computer Graphics]: Three-Dimensional Graphics Elegant model of elastic rods We build on a representation
and Realism—Animation of elastic rods introduced for purposes of analysis by Langer and
Singer [1996], arriving at a reduced coordinate formulation with a
Keywords: rods, strands, discrete holonomy, discrete differential geometry minimal number of degrees of freedom for extensible rods that rep-
resents the centerline of the rod explicitly and represents the mate-
1 Introduction rial frame using only a scalar variable (§4.2). Like other reduced
coordinate models, this avoids the need for stiff constraints that
Recent activity in the field of discrete differential geometry (DDG) couple the material frame to the centerline, yet unlike other (e.g.,
has fueled the development of simple, robust, and efficient tools for curvature-based) reduced coordinate models, the explicit centerline
geometry processing and physical simulation. The DDG approach representation facilitates collision handling and rendering.
to simulation begins with the laying out of a physical model that is
discrete from the ground up; the primary directive in designing this Efficient quasistatic treatment of material frame We addition-
model is a focus on the preservation of key geometric structures that ally emphasize that the speed of sound in elastic rods is much faster
characterize the actual (smooth) physical system [Grinspun 2006]. for twisting waves than for bending waves. While this has long
been established, to the best of our knowledge it has not been used
to simulate general elastic rods. Since in most applications the
slower waves are of interest, we treat the material frame quasistat-
ically (§5). When we combine this assumption with our reduced
coordinate representation, the resulting equations of motion (§7)
become very straightforward to implement and efficient to execute.
34
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Figure 2: Helical perversion in experiment and simulation: starting from the natural shape of a Slinky R (top) we first remove writhe by
pinching the flat cross-section between two fingers and traveling from one end to the other, arriving at a fully stretched, almost flat ribbon
(middle). By bringing the ends together, a persistent perversion forms (bottom), whose shape is surprisingly different from the natural shape.
simple algebraic tools and mnemonic diagrams that make it possi- plifies both the analytical formulation and the numerical implemen-
ble to carry out in a methodical manner derivations involving the tation of the dynamics of symmetric rods.
discrete connection induced by parallel transport. These tools are
the central building blocks for deriving forces associated to dis- In graphics, Terzopoulos et al. [1987] introduced tensorial treat-
placements of the rod’s centerline and twist of the material frame. ments of elastica, and Pai [2002] applied a discretization of the
Cosserat rod model to simulate a strand. Bertails et al. [2006]
used a piecewise helical discretization to produce compelling an-
Inextensibility and encapsulated coupling with rigid-bodies
imations of curly hair using few elements per strand. Hadap [2006]
When simulating inextensible rods, it becomes profitable to enforce
considered a serial multi-body chain and used differential algebraic
the rod’s inextensibility via constraints rather than stiff penalty
equations to treat the attendant numerical stiffness. These recent
forces. Also, in general simulation applications, and in computer
works used an implicit centerline representation based on reduced
animation and gaming, it is often useful to enforce boundary con-
(curvature) coordinates.
ditions by coupling the rod to another physical system—most natu-
rally, to a rigid-body, which carries exactly the degrees of freedom By contrast, Choe et al. [2005] represented the centerline explicitly
as any point on an elastic rod (i.e., position and orientation). Our by a sequence of edges connected by linear and torsional springs.
approach in §8 handles both types of constraints, emphasizing phys- Grégoire and Schömer [2007] proposed an explicit centerline dis-
ical correctness as well as an important software reuse principle: cretization coupled to a quaternionic material frame representa-
the method of coupling allows our rod simulation to interact with tion. Spillmann and Teschner [2007; 2008] built on this idea in
any existing rigid-body simulation without internal modification of their development of algorithms for dynamic contact. Theetten et
either the rod or rigid-body codes. al. [2006] presented a geometric spline-based approach that can
model large-displacement plastic deformations. These authors ar-
Validation We show how to model and simulate inextensi- gue that an explicit (displacement) representation of the centerline
ble elastic rods with arbitrary curved undeformed centerline and facilitates the simulation of complex contact scenarios and looping
anisotropic bending response (§7), and we show the simplifica- phenomena. We share this view.
tions that occur for naturally straight rods with isotropic bending
response. We validate our model against known analytic solutions
and present empirical evidence supporting the good convergence
3 Overview
behavior of our discrete model to its smooth counterpart (§9). In many applications, the rod tends to bend or twist rather than to
stretch; therefore, the case of inextensible rods is prevalent and im-
2 Related work
Mathematical analysis, modeling, and simulation of elastic rods Algorithm 1 Discrete elastic rod simulation
is an active field in mechanics [van der Heijden et al. 2003; Require: u0 // Bishop frame vector in frame {t0 , u0 , v0 } at edge 0
Goyal et al. 2007], numerical analysis [Falk and Xu 1995], and Require: x0 . . . xn+1 // position of centerline in rest state
geometry [Bobenko and Suris 1999; Lin and Schwetlick 2004] Require: (x0 , ẋ0 ) . . . (xn+1 , ẋn+1 ) // initial position/velocity of centerline
with applications spanning medicine [Lenoir et al. 2006], Require: boundary conditions // free, clamped or body-coupled ends
biology [Yang et al. 1993; Klapper 1996], the study of j
1: precompute ω i using (2)
knots [Phillips et al. 2002; Brown et al. 2004], and computer 2: set quasistatic material frame (§5.1)
graphics [Chang et al. 2007]. It is impossible to survey the many 3: while simulating do
works in this area in a brief space, so we discuss only the most 4: apply torque to rigid-body (§8.2)
closely-related works. For a broader starting point, refer to the 5: integrate rigid-body (external library) // [Smith 2008]
expositions of Rubin [2000] and Maddocks [1984; 1994]. For the 6: compute forces on centerline (§7.1)
state of the art in strand and hair simulation, refer to the survey by 7: integrate centerline (§7.2) // [Hairer et al. 2006]
Ward et al. [2007] and the course notes of Hadap et al. [2007]. 8: enforce inextensibility and rigid-body coupling (§8)
In mechanical engineering, elastic rods are typically treated with a 9: collision detection and response // [Spillmann and Teschner 2008]
finite difference [Klapper 1996] or finite element [Yang et al. 1993; 10: update Bishop frame (§4.2.2)
Goyal et al. 2007] discretization of the smooth equations. Gold- 11: update quasistatic material frame (§5.1)
12: end while
stein and Langer [1995] observed that using the Bishop frame sim-
35
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Notice that since t′ = κ , the first two of the above terms, ω1 and 4.1.2 Twisting energy
ω2 , represent the rod’s curvature vector expressed in material coor-
dinates and measure the bending of material frame. The last term, Letting m = m′1 · m2 denote the twist of the material frame about
m, refers to the twist of the material frame around the tangent. Ac- the centerline, the twisting energy is given by
cordingly, total elastic energy contains bending and twisting contri-
1
Z
butions: Etwist (Γ) = β m2 ds .
2
E(Γ) = Ebend (Γ) + Etwist (Γ) .
The formula m = m′1 · m2 gives an expression for the twist in terms
The classical Kirchhoff equations for rods are obtained of material vectors immersed in ambient space. We now seek an
from this type of energy using Lagrangian mechanics (see, equivalent expression that exposes a reduced set of coordinates.
e.g., [Audoly and Pomeau 2008]). The goal of the present paper is
to derive a discrete form of these equations.
Parallel transport and the Bishop (natural) frame Given a
Our assumption that s is an arc length parameterization implies that fixed centerline, consider the task of assigning to it the geometri-
the rod is inextensible; therefore, we do not include a stretching en- cally most natural (and physically the most relaxed) frame. The
ergy. Instead, we enforce inextensibility via an auxiliary constraint Bishop frame {t(s), u(s), v(s)} for a given centerline is an adapted
(§8). It is straightforward to drop this assumption by also including frame with zero twist uniformly, i.e., u′ · v = −v′ · u = 0. The as-
a stretching term. signment of an adapted frame to one point on the curve uniquely
fixes the Bishop frame throughout the curve. Our convention is to
4.1.1 Bending energy assign the Bishop frame at the first endpoint (s = 0) of the curve.
When the rod’s undeformed configuration is straight (as opposed Consider traversing the centerline from one end to the other at unit
to curved) and the bending response is isotropic (as opposed to giv- speed. The evolution of the Bishop frame (and any other orthonor-
ing preference to some bending directions over others), the bending mal frame) can be described in terms of its Darboux vector, Ω(s):
energy takes the simple form
t′ = Ω × t , u′ = Ω × u , and v′ = Ω × v .
1 1
Z Z
Ebend (Γ) = ω 2 ds =
αω κ 2 ds ,
ακ Since by the definition of the Bishop frame, u′ · v = 0, it fol-
2 2
lows from the second equation that Ω has no tangential component
where the 2-vector ω = (ω1 , ω2 )T represents the centerline curva- (along t). This, together with the first equation implies that Ω = κ b,
ture vector expressed in the material frame coordinates and α is the where κ b = t × κ is the curvature binormal along the centerline.
rod’s bending modulus.
The Darboux vector of the Bishop frame serves to define paral-
We generalize this to anisotropic bending response by replacing lel transport, a concept that plays a central role in the remainder
the (isotropic) dot product with a general quadratic form B (a sym- of this paper. We parallel transport a vector x from one point on
metric positive definite 2 × 2 matrix), so that ω T Bω is the bending the centerline to another by integrating the equation x′ = κ b × x.
36
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Curve-angle representation The (twist-free) Bishop Recall that the key player for formulating elastic bending energy in
frame allows for a simple parameterization of the material the smooth case was the curvature of the centerline.
frame [Langer and Singer 1996]. Let θ (s) be the scalar function
that measures the rotation about the tangent of the material frame Discrete curvature Since each edge is straight, it follows that
relative to the Bishop frame (see Fig. 3): discrete curvature is naturally associated with vertices. Letting φi
denote the turning angle between two consecutive edges (see Fig. 4)
m1 = cos θ · u + sin θ · v , m2 = − sin θ · u + cos θ · v . we define (integrated) curvature by
The key observation is that twist, m, can be expressed in terms of θ φi
κi = 2 tan .
by m(s) = θ ′ (s). This relation is easily derived using the facts that 2
m = (m1 )′ · m2 and u′ · v = 0. Hence, we write the twist energy as
We will see in §6 that this definition of discrete curvature emerges
1
Z naturally from an analysis of the geometry of discrete rods, and to
Etwist (Γ) = β (θ ′ )2 ds . be consistent throughout, we will use this definition in the bending
2 energy. Note that κi → ∞ as incident edges bend toward each other,
Observe that we have expressed the elastic energy of Kirchhoff rods so this measure of curvature will penalize sharp kinks in the rod.
by two dominant players: the position of the centerline, γ , and the
angle of rotation, θ , between the Bishop and the material frame. Discrete curvature binormal We define the curvature binormal
This reduced coordinate representation is the cornerstone of our at a vertex (an integrated quantity) by
discrete theory.
2ei−1 × ei
(κ b)i = . (1)
4.2 Discrete Kirchhoff rods |ei−1 ||ei | + ei−1 · ei
Observe that the vector (κ b)i is orthogonal to the osculating
When painting the discrete picture, our guiding principle is to seek plane passing through two consecutive edges and has magnitude
a viewpoint that builds on the same geometric principles as the cor- 2 tan(φi /2). In particular, this quantity is well-defined in the case of
responding smooth theory. collinear edges, even though the binormal itself is not.
Primal vs. dual We distinguish between primal quantities, as- Discrete bending energy We now have all the pieces to assem-
sociated with vertices and decorated with lower indices, and dual ble the bending energy of a discrete naturally straight, isotropic rod:
quantities, associated with edges and decorated with upper indices.
1 n κ bi 2 l i n
α (κ bi )2
This diagram summarizes our indexing and notation conventions:
Ebend (Γ) = ∑ α =∑ .
2 i=1 l i /2 2 i=1 li
x1 x3 xn
x0 x2 xn+1
0
e e1
e 2
en The division by l i /2 is due to converting the integrated quantity κ bi
into a pointwise one (see above), whereas the multiplication by l i /2
takes care of the measure of the domain of integration, Di .
Discrete framed curves A discrete framed curve, Γ, consists of
a centerline comprised of (n + 2) vertices x0 , . . . , xn+1 and (n + 1) Recall that for an anisotropic bending response, we require the ma-
terial curvatures given by inner products between curvature vectors
straight edges e0 , . . . , en such that ei = xi+1 − xi , together with an and material frame vectors. Using the curvature binormal (κ b)i as
assignment of material frames Mi = {ti , mi1 , mi2 } per edge (see defined by (1), we express the material curvatures as
Fig. 4). We consider adapted frames, where ti = ei /|ei | is the unit T
tangent vector per edge. Notice that tangent vectors of polygonal ω ij = (κ b)i · m2j , −(κ b)i · m1j for j ∈ {i − 1, i} . (2)
curves are uniquely defined at edges, whereas their definition at
37
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Here, following our primal-dual notation, the double indices— 5 Quasistatic material frame postulation
upper and lower—correspond to an edge-vertex pair. Barred quan-
tities we denote evaluation on the undeformed configuration. Our goal is to arrive at equations describing the time-evolution of
the centerline of the rod. We first pave the way with an important
With these definitions, the bending energy of a discrete rod is simplifying assumption.
n i T
1 j
Ebend (Γ) = ∑ ∑ ω ij − ω ij B ω ij − ω ij . (3) The speed of a twist wave increases as the rotational inertia of
i=1 2l i j=i−1 the cross section vanishes. By contrast, bending waves are disper-
sive [Sommerfeld 1964]—their speed depends on their wavelength,
This formulation allows for a general (anisotropic) bending re- λ —with velocity vh/λ , where h is the rod radius, and v is solid ma-
sponse and a general (curved) undeformed configuration. As in the terial’s speed of sound. Consequently, twist waves travel faster than
smooth case, the simple expression of the special case is recovered bending waves, for bending waves with large wavelengths λ ≫ h,
j j
by taking B = α Id2×2 and ω i = 0 . i.e., much larger than the rod radius. For the problems we consider,
the relevant dynamics are in (large-wavelength) bending modes,
4.2.2 Discrete twisting energy and it is wasteful of computation to resolve the temporal evolution
of the twist waves.
To formulate the discrete twisting energy, we follow the same pro-
gression as in the smooth setting, first laying out the notions of Consider the limit of a vanishing cross-sectional rotational inertia:
parallel transport and the Bishop frame, and then introducing the twist waves propagate instantly. At any instant in time, the material
angle of rotation to the material frame. frames are the minimizer of elastic energy, subject to any given
boundary conditions on the material frame:
Discrete parallel transport and Bishop frame We define ∂ E(Γ)
discrete parallel transport in analogy to the smooth case, i.e., =0, (4)
∂θ j
as a rotation Pi about the curvature binormal,
Note that the quasistatic treatment of the material frame eliminates
Pi ti−1 = ti , Pi ti−1 × ti = ti−1 × ti . the θ j variables as degrees of freedom from the system: given the
rod’s centerline and the boundary conditions on the material frame,
By convention, Pi is the identity if ti−1 = ti , (4) is used to determine what the material frame must be.
whereas Pi is not defined if ti−1 = −ti . Par-
allel transport is a key notion that allows us
to generalize the notion of twist from the Boundary conditions The value of θ j for an edge may be pre-
smooth to the discrete setting. scribed by a given boundary condition on the material frame. In
practice, we consider stressfree ends (i.e., no boundary conditions)
In order to define Bishop frames, we draw upon the smooth case by or clamped ends (i.e., assigning the material frame for j = 0 and
transporting a unit vector u0 , which is orthogonal to t0 , along the j = n). We use (4) for all θ j variables whose value is not pre-
rod using our rotation operators Pi , i.e., we iteratively define scribed by a boundary condition, ensuring that the number of equa-
tions matches the number of unknowns for the angles θ j .
ui = Pi ui−1 .
5.1 Quasistatic update
The third axis of each Bishop frame is then vi = ti × ui .
During simulation, we enforce the quasistatic nature of the material
Bishop frame update The Bishop frame is by definition adapted frame by ensuring that (4) is satisfied before forces are computed.
to the centerline. This requires that u0 ⊥ t0 , a condition that must
be maintained during simulation. Each simulation step moves the
centerline to a new position, so that in general after Algorithm step Special case of naturally straight, isotropic rods For an
9 the requirement u0 ⊥ t0 may be violated (the exception is when isotropic rod with a naturally straight undeformed configuration, (4)
t0 is clamped). We re-adapt the frame by parallel transporting the implies that a clamped rod has uniform twist,
Bishop vector (in time)—in analogy to the parallel transport along
the centerline—by computing a rotation operation. mi θn −θ0
= = constant , (5)
li 2L
Material frame representation Since both the material frame
where 2L = ∑ni=1 l i , and the pointwise twist mi /l i (recall §4.2.2)
and Bishop frame are defined at edges, let θ i denote the angle
depends only on the boundary conditions: the difference of angles
needed to rotate the Bishop frame into the material frame at edge ei
of the end edges, θ n − θ 0 . Substituting the above into the formula
(see Fig. 4). Then the material frame vectors at edge i are
for E(Γ) gives the simplified expression
mi1 = cos θ i · ui + sin θ i · vi , and mi2 = − sin θ i · ui + cos θ i · vi . 2
n α (κ b)2i β θn −θ0
Discrete twisting energy In perfect analogy to the curve-angle
E(Γ) = ∑ + . (6)
i=1 li 2L
representation in the smooth case, we adopt the twisting energy
n
(θ i − θ i−1 )2 n β m2 Observe that the twist energy depends only on the angle between
i
Etwist (Γ) = ∑β li
=∑ , material and Bishop frame at the boundary edges of the rod. For
i=1 i=1 l i the naturally straight, isotropic case, the above implies that a rod
with stressfree ends has no twist.
where the scalar mi = θ i − θ i−1 is the (integrated) discrete twist.
The variable mi measures the angle between two adapted frames:
the result of parallel transporting the material frame from edge ei−1 General case For the general case, we use Newton’s method
to ei and the material frame at edge ei itself. to minimize the elastic energy E(Γ) with respect to the material
38
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
6 Discrete holonomy
Holonomy is a classical concept from differential geometry: it mea-
sures the deficit of geometric data (frames) to close up when paral-
lel transported around a closed loop. In our case (of discrete rods),
holonomy depends—just like parallel transport itself—only on the
centerline; it measures the (scalar) angle when parallel transporting
an adapted frame along a closed loop of discrete edges. Indeed, the
fact that holonomy can be expressed as a scalar is the reason why
it is such a useful concept for computing forces.
Consider the variation of two consecutive edges ei−1 (ε ) and ei (ε )
with tangents ti−1 (ε ) and ti (ε ), and parallel transport Pi (ε ), where
ε denotes the variation parameter. We denote by P̃i (ε ) the parallel
transport from ti (0) to the deformed configuration, ti (ε ), i.e., the
rotation that satisfies P̃i (0) = Id and
Figure 5: Asymmetry of twist: anisotropy of the cross-sections
and natural curvature of the centerline “conspire” to produce non- P̃i (ε ) ti (0) = ti (ε ) and P̃i (ε ) ti (0) × ti (ε ) = ti (0) × ti (ε ) .
uniform twist distribution. From top to bottom: reference configu-
ration, moderate twist, large twist. Now consider the concatenation of parallel transports given by
T T
Ri−1 (ε ) = P̃i−1 (ε ) ◦ Pi (ε ) ◦ P̃i (ε ) ◦ Pi (0) , (8)
frames, which requires both the gradient and Hessian of the energy
with respect to the θ j variables. The gradient is given by which we depict by the following mnemonic diagram, where arrows
represent parallel transport:
!
∂ E(Γ)
=
∂
W j +W j+1 + 2β
m j m j+1
− , (7) ti−1 (ε ) - ti (ε )
∂θ j ∂θ j lj l j+1
6 6
∂ 1 j j j j ψi (ε )
where Wi = (ω i )T JB (ω i − ω i ) .
∂θ j li
39
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
by requirement adapted to the curve, we are interested in the angle boundary conditions, the sum is zero. For clamped boundaries, only
that the frame is rotated by about the tangent. This situation is again one component of this sum could be non-zero, allowing us to write
depicted in the following diagram: the force as
0- 0 - 0- ∂E ∂E ∂θn
F0 (ε ) F1 (ε ) · · · F j−1 (ε ) F j (ε ) − − .
∂ xi ∂ θ n ∂ xi
6 6 6 6 To evaluate ∂ θ n /∂ xi , recall from §6.1 that varying the centerline
0 ψ1 (ε ) ψ2 (ε ) ψ j (ε ) Ψj rotates the Bishop frame at edge en by angle Ψn about the tangent
tn . Therefore, to keep the material frame aligned to the boundary
- F1 (0) - · · · F j−1 (0) - F j (0) condition, we must subtract this angle from θ n to obtain
F0 (0)
0 0 0 n
∂E ∂E ∂ψj
Fi {ti , ui , vi }
− +
∂ xi ∂ θ n ∑ .
Here, the Bishop frames = are displayed in place of j=1 ∂ xi
the tangents to show that we are parallel-transporting these frames
from one edge to the next. Additionally, each labeled arrow indi- For clamped boundaries, we give the components required to eval-
cates the angle needed to align the result of parallel transporting the uate this force for both the special and general case.
frame at the tail of the arrow with the frame at the head. Thus, the
horizontal arrows are labeled with 0 to indicate that no twist is re- Special case For naturally straight, isotropic rods, the forces on
quired to align Pi (Fi−1 ) to Fi ; the first vertical arrow is also labeled vertex xi are given by up to three contributions:
with 0 because we ensure that F0 is always updated via parallel
transport (see §4.2.2). We are interested in the angle of rotation, 2α T β (θ n − θ 0 )
− ∇i (κ b) j (κ b) j + ∇i ψ j i−1 ≤ j ≤ i+1 ,
Ψ j , required to align P̃ j (ε ) F j (0) to F j (ε ).
lj L
Since parallel transport commutes with twist and holonomy is ad- with the gradient of holonomy given by (9) and the gradient of the
ditive under concatenation of loops, it follows from traversing curvature binormal given by
this diagram in counter-clockwise order that the resulting angle is
j
Ψ j = ∑i=1 ψi . For computing forces, we require the gradient of this 2[ei ] + (κ bi )(ei )T
∇i−1 (κ b)i = ,
angle with respect to vertex positions, which is given by |ei−1 ||ei | + ei−1 · ei
j 2[ei−1 ] − (κ bi )(ei−1 )T
∇i Ψ j = ∇i+1 (κ b)i = ,
∑ ∇i ψk . (10) |ei−1 ||ei | + ei−1 · ei
k=1
∇i (κ b)i = − (∇i−1 + ∇i+1 ) (κ b)i .
By (9), this sum will have at most three non-zero terms.
Here [e] is a skew-symmetric 3 × 3 matrix acting on 3-vectors x
by [e] · x = e × x. In deriving these gradients we have used the
Discussion In hindsight, we view the relation of holonomy to assumption of inextensibility of the rod’s edges.
the profile of the centerline as an extension of the celebrated
Călugăreanu-White-Fuller theorem [1971] for discrete curves.
Fuller [1978] noted that this theorem is applicable to the equilibria General case For anisotropic rods with a curved rest shape, the
of closed elastic rods with isotropic cross-sections. Our develop- required expressions for the forces are given by:
ment extends to the general case of open boundaries and even to ∂E 1 2β mn
n
anisotropic cross-sections. = (ω nn )T JB (ω nn − ω nn ) + and
∂θn ln ln
n
7 Equations of motion ∂E 1 k j T j
j j
=∑ ∑ ∇i ω k B ω k − ω k ,
∂ xi k=1 l k j=k−1
We are now ready to write the equations governing the time-
evolution of the rod’s centerline. Since the material frames depend j
where the gradient of the material-frame curvature ω k is given by
on the rod’s centerline and are not independent degrees of freedom !
(see §5), we must consider this dependence as well when comput- j
j
(m2 )T j
ing the centerline forces. ∇iω k = j ∇i (κ b)k − Jω k (∇i Ψ j )T . (11)
−(m1 )T
7.1 Forces on centerline This last result is readily apparent from the definition of material-
frame curvature in (2) and the variation of the Bishop frame in §6.1.
In deriving the forces on the rod’s centerline, we must consider how
the energy depends on the xi variables—both directly and indirectly 7.2 Integrating the centerline
by considering the effect that moving a vertex has on the rod’s ma-
terial frame. The force acting on vertex xi is therefore given by Since the material frame is always updated to be in quasistatic equi-
dE(Γ) ∂ E(Γ) ∂ E(Γ) n
∂θ j librium (see §5.1), we only need to update the centerline based on
− =− −∑ j ∂x
. the forces derived above. The equations of motion are
dxi ∂ xi j=0 ∂ θ i
dE(Γ)
Here, the total derivative dE/dxi takes into account the implicit M ẍ = − ,
dx
dependence of potential energy on centerline positions, whereas the
partial derivative only takes into account explicit dependence. where M is a 3(n + 2) × 3(n + 2) (diagonal) mass matrix associ-
ated to centerline positions. We discretize this equation using the
Recall from (4) that ∂ E/∂ θ j vanishes for all edges for which θ j symplectic Euler method [Hairer et al. 2006]. We use a manifold-
is not prescribed by a boundary condition. Therefore, for stressfree projection method to enforce the inextensibility constraint.
40
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
41
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
through the clamps, ϕ (s) = cos−1 (t·ex ) the angular deviation of the
tangent away from this axis, and ϕ0 = maxs ϕ (s) the maximal devi-
ation at the center of the
pattern. The envelope of the helix is given
by f (ϕ (s)) = tanh2 ss∗ , where s/s∗ is the dimensionless arc length
q
given by s/s∗ = β2αm 1−cos ϕ0
1+cos ϕ0 s, which simplifies to f (ϕ ) =
cos ϕ −cos ϕ0
1−cos ϕ0 (see e.g. [van der Heijden and Thompson 2000]). With
Figure 6: Torque transducer: two rigid-bodies coupled by a rod. a fixed loading geometry, we obtain convergence towards this ana-
The total energy, broken up into contributions from the bodies and lytical solution under refinement (see Fig. 7).
the rod, is plotted.
(rad)
work performed by the body on the rod equates to the change in the 25
rod’s stored energy: |τ |δ θ 0 = (dE/dθ 0 )δ θ 0 . Since this holds for
20
any δ θ 0 , it follows that |τ | = dE/dθ 0 . In the isotropic case, this
yields |τ | = β (θ n − θ 0 )/L. In the anisotropic case, we expand the 15
full derivative as dE/dθ 0 = ∑i (∂ E/∂ θ i )(∂ θ i /∂ θ 0 ). By the qua-
sistatic assumption, most terms in this summation are zero, leading 10
to |τ | = ∂ E/∂ θ 0 , which can be evaluated using (7).
5
9 Validation 0
0.4 0.6 0.8 1.0 1.2
The interaction between twisting and bending modes produces sur-
prising instability phenomena, such as spontaneous buckling of Figure 8: Michell’s buckling instability of an elastic ring with
rods. These instabilities are important for a variety of applications, imposed internal twist θ n . Left: above a critical value of θ n , the
such as for modeling DNA. When applied to some of these phe- planar, circular shape loses stability and buckles to a non-planar
nomena, our model not only reproduces the correct behavior quali- shape. Right: domain of stability of the circular shape with radius
tatively, but in fact shows good convergence to analytical solutions R = 1: simulations (dots) compared to theoretical threshold (black
(for those models where an analytical treatment is available in the curve). Each dot corresponds to a simulation run with particular
literature). In the following we describe several example problems; values of β and θ n (α = 1 and n = 50 are fixed), initialized with
refer to Table 1 for corresponding performance measurements. a slightly perturbed circular shape; dots are colored in light blue
when the amplitude of the perturbation decreases in time (stable)
and in purple when it increases (unstable).
9.1 Convergence
42
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
different (see Fig. 1). This fascinating behavior will be studied in occurs with the semi-circular shape, but it is less marked. In either
detail in a future paper [Audoly et al. 2008]—it can be easily repro- case, the twist concentrates near the end that is rotated, although the
duced using a small tube of an elastic material (a silicone wire in rod properties are uniform along its length; this symmetry-breaking
our experiments), and we encourage the reader to try it! points to the fact that that the equations governing the quasi-static
twist are nonlinear.
The coupling of twisting and bending modes of naturally curved or 9.4 Rigid-body coupling
anisotropic rods is fairly more complex than in the isotropic case,
as demonstrated by in following experiments. When coupling rods with rigid-bodies, the transfer of energy be-
tween these systems results in complex motions—in particular,
through the interplay between bending and (non-uniform) twisting
Asymmetry of twist The combination of anisotropy and non-
of the rod and the translational and rotational moment of the at-
zero rest curvature can result in a non-uniform distribution of twist
tached mass. In order to validate our model, we have in particular
along the rod. In Figure 5, we show this effect for a rod with
tested its ability to faithfully reproduce real-world experiments.
anisotropic cross section, whose centerline is either V-shaped or
semi-circular in the reference configuration. We clamp one end
of each of these rods and twist the other. In the V-shaped case, Wilberforce pendulum This experiment reveals fascinating as-
we observe that twist is first confined on one half of the rod—it pects of how bending and twisting interact and thereby affect the
takes a significant amount of twist before twist manages to “jump motion of an attached rigid-body. Consider a helicoidal spring (an
over” the kink in the middle of the rod. A similar phenomenon isotropic rod whose reference state is a helix) whose upper end is
43
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
fig. no. verts. time-step forces contact quas. update fast proj. total
1 60 4.0 0.026 0.05 0.021 0.21 0.31
5 49 1.0 0.025 0.018 0.021 0.12 0.18
6 200 2.0 0.072 0.09 0.064 0.81 1.0
9 275 1.0 0.13 0.19 0.17 0.42 0.92
7 75 2.0 0.043 0.1 0.2 0.34
8 67 50.0 0.039 0.096 0.28 0.42
10 31 1.0 0.016 0.13 0.13 0.2
11 20 1.0 0.0036 0.0043 0.019 0.027
12 2158 0.1 0.87 0.64 21.0 22.0
fixed, and attach a rigid-body to its lower end. The weight of the simulating tree-like one-dimensional configurations with several T-
body stretches the spring when the whole system is at rest. Mov- junctions. In Figure 12, we show an example of such coupling,
ing the mass slightly upwards from this equilibrium and releas- where we additionally used external forces (wind and gravity) to
ing it, first leads to vertical oscillations. Progressively, the system increase the dramatic effect. Here the mass of the rigid-bodies (but
switches to twist oscillations and the vertical ones are extinguished; not necessarily their spatial extension) can be tuned to achieve a
later, the twist oscillations start to decrease and the vertical ones variety of dramatic effects. This example shows the power of cou-
reappear, and so on (see Fig. 11). The nonlinear behavior of the pling rods with rigid-bodies, indicating the attractiveness of this
spring, which is captured accurately by our model, is responsible approach to be used in a wide range of graphics applications, such
for this energy transfer between the two modes [Sommerfeld 1964]: as for simulating plant motion, or the skeletal dynamics of rigged
stretching a spring affects its eigenmodes. Note the presence of sta- characters.
tionary waves in the spring, which are also clearly visible in our
simulation movie. 10 Conclusion
Torque transducer Rods can be used to couple rigid-bodies, Limitations and future work Our use of the Fast Projection
with the rod effectively acting as a “torque transducer” between algorithm leads to energy being dissipated during the constraint-
them. In Figure 6, we plot the kinetic and potential energy of the enforcement step. In many applications, the energy behavior of the
two rigid-bodies and the rod (one of which has much higher mass system is of interest, so we would like to explore alternate meth-
than the other), observing the energy transfer among the stored po- ods for enforcing constraints that are both efficient and have good
tential energy of the rod and the rotational energy of the two rigid energy behavior.
bodies.
The formulation of discrete rods allows us to impose boundary con-
ditions on the material frame at any edge along the rod. We have
presented boundary conditions that arise due to explicitly clamping
certain edges or coupling them to rigid-bodies. We are currently
considering the effect of frictional contact on the material frame
and would like to have an implementation that also allows contact
constraints to dictate boundary conditions for the material frame.
We are also interested in employing adaptivity in our current model
and believe that the ideas of Spillmann and Teschner [2008] pave
the way for this. In addition, an interesting related topic would
be in providing higher-order methods for simulating elastic rods.
The main issues involved would be in defining convergent discrete
operators, such as parallel transport and curvature, on higher-order
elements, and in ensuring the resulting order of accuracy.
44
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
45
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Chapter 7:
Discrete Differential Forms for Computational Modeling
Mathieu Desbrun Eva Kanso∗ Yiying Tong†
Applied Geometry Lab
Caltech‡
46
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
the rich developments of its differential counterpart. In particu- 1.6 Advantages of Discrete Differential Modeling
lar, it is striking that the calculus of differential forms has not yet
had an impact on the mainstream computational fields, despite ex- The reader will have most probably understood our bias by now:
cellent initial results in E&M [Bossavit 1998] or Lagrangian me- we believe that the systematic construction, inspired by Exterior
chanics [Marsden and West 2001]. It should also be noticed that Calculus, of differential, yet readily discretizable computational
some basic tools necessary for the definition of a discrete calculus foundations is a crucial ingredient for numerical fidelity. Because
already exist, probably initiated by Poincaré when he defined his many of the standard tools used in differential geometry have dis-
cell decomposition of smooth manifolds. The study of the struc- crete combinatorial analogs, the discrete versions of forms or man-
ture of ordered sets or simplices now belongs to the well-studied ifolds will be formally identical to (and should partake of the same
branch of mathematics known as Combinatorial Differential Topol- properties as) the continuum models. Additionally, such an ap-
ogy and Geometry, which is still an active area of research (see, proach should clearly maintain the separation of the topological
e.g., [Forman 2003] and [Björner and Welker 1995] and references (metric-independent) and geometrical (metric-dependent) compo-
therein). nents of the quantities involved, keeping the geometric picture (i.e.,
intrinsic structure) intact.
1.4 Calculus ex Geometrica A discrete differential modeling approach to computations will also
be often much simpler to define and develop than its continuous
Given the overwhelming geometric nature of the most fundamental counterpart. For example, the discrete notion of a differential form
and successful calculus of these last few centuries, it seems relevant will be implemented simply as values on mesh elements. Likewise,
to approach computations from a geometric standpoint. the discrete notion of orientation will be more straightforward than
its continuous counterpart: while the differential definition of ori-
One of the key insights that percolated down from the theory of entation uses the notion of equivalence class of atlases determined
differential forms is rather simple and intuitive: one needs to recog- by the sign of the Jacobian, the orientation of a mesh edge will be
nize that different physical quantities have different properties, and one of two directions; a triangle will be oriented clockwise or coun-
must be treated accordingly. Fluid mechanics or electromagnetism, terclockwise; a volume will have a direction as a right-handed helix
for instance, make heavy use of line integrals, as well as surface or a left-handed one; no notion of atlas (a collection of consistent
and volume integrals; even physical measurements are performed coordinate charts on a manifold) will be required.
as specific local integrations or averages (think flux for magnetic
field, or current for electricity, or pressure for atoms’ collisions).
Pointwise evaluations or approximations for such quantities are not
the appropriate discrete analogs, since the defining geometric prop-
erties of their physical meaning cannot be enforced naturally. In-
stead, one should store and manipulate those quantities at their
geometrically-meaningful location: in other words, we should con-
sider values on vertices, edges, faces, and tetrahedra as proper dis-
crete versions of respectively pointwise functions, line integrals,
surface integrals, and volume integrals: only then will we be able to
manipulate those values without violating the symmetries that the
differential modeling tried to exploit for predictive purposes.
Figure 1: Typical 2D and 3D meshes: although the David head appears
1.5 Similar Endeavors smooth, its surface is made of a triangle mesh; tetrahedral meshes (such
as this mechanical part, with a cutaway view) are some typical examples of
irregular meshes on which computations are performed. David’s head mesh
The need for improved numerics have recently sprung a (still lim- is courtesy of Marc Levoy, Stanford.
ited) number of interesting related developments in various fields.
Although we will not try to be exhaustive, we wish to point the 1.7 Goal of This Chapter
reader to a few of the most successful investigations with the same
“flavor” as our discrete geometry-based calculus, albeit their ap- Given these premises, this chapter was written with several pur-
proaches are rarely similar to ours. First, the field of Mimetic Dis- poses in mind. First, we wish to demonstrate that the foundations
cretizations of Continuum Mechanics, led by Shashkov, Steinberg, on which powerful methods of computations can be built are quite
and Hyman [Hyman and Shashkov 1997], started on the premise approachable—and are not as abstract as the reader may fear: the
that spurious solutions obtained from finite element or finite differ- ideas involved are very intuitive as a side effect of the simplicity of
ence methods often originate from inconsistent discretizations of the underlying geometric principles.
the operators div, curl, and grad, and that addressing this incon- Second, we wish to help bridge the gap between applied fields and
sistency pays off numerically. Similarly, Computational Electro- theoretical fields: we have tried to render the theoretical bases of
magnetism has also identified the issue of field discretization as the our exposition accessible to computer scientists, and the concrete
main reason for spurious modes in numerical results. An excel- implementation insights understandable by non-specialists. For this
lent treatment of the discretization of the Maxwell’s equations re- very reason, the reader should not consider this introductory expo-
sulted [Bossavit 1998], with a clear relationship to the differential sition as a definite source of knowledge: it should instead be con-
case. Finally, recent developments in Discrete Lagrangian Mechan- sidered as a portal to better, more focused work on related subjects.
ics have demonstrated the efficacy of a proper discretization of the We only hope that we will ease our readers into foundational con-
Lagrangian of a dynamical system, rather than the discretization of cepts that can be undoubtedly and fruitfully applied to all sorts of
its derived Euler-Lagrange equations: with a discrete Lagrangian, computations—be it for graphics or simulation.
one can ensure that the integration scheme satisfies an exact discrete
least-action principle, preserving all the momenta directly for arbi- With these goals in mind, we will describe the background needed
trary orders of accuracy [Marsden and West 2001]. Respecting the to develop a principled, geometry-based approach to computational
defining geometric properties of both the fields and the governing modeling that gets around the apparent mismatch between differen-
equations is a common link between all these recent approaches. tial and discrete modeling.
47
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
2 Relevance of Forms for Integration This last equation is known as the Newton-Leibnitz formula, or
the first fundamental theorem of calculus. The integrand f (x)dx
The evaluation of differential quantities on a discrete space (mesh) is called a 1-form, because it can only be integrated over any 1-
is a nontrivial problem. For instance, consider a piecewise-linear dimensional (1D) real interval. Similarly, for a function G(x, y, z),
2-dimensional surface embedded in a three-dimensional Euclidean we have:
space, i.e., a triangle mesh. Celebrated quantities such as the Gaus- ∂G ∂G ∂G
dG = dx + dy + dz ,
sian and mean curvatures are delicate to define on it. More pre- ∂x ∂y ∂z
cisely, the Gaussian curvature can be easily proven to be zero
everywhere except on vertices, where it is a Dirac delta func- which can be integrated over any 1D curve in R3 , and is also a 1-
tion. Likewise, the mean curvature can only be defined in the form. More generally, a k-form can be described as an entity ready
distributional sense, as a Dirac delta function on edges. How- (or designed, if you prefer) to be integrated on a kD (sub)region.
ever, through local integrations, one can easily manipulate these Note that forms are valued zero on (sub)regions that are of higher
quantities numerically: if a careful choice of non-overlapping re- or lower order dimension than the original space; for example, 4-
gions is made, the delta functions can be properly integrated, ren- forms are zero on R3 . These differential forms are extensively used
dering the computations relatively simple as shown, for example, in mathematics, physics and engineering, as we already
in [Meyer et al. 2002; Hildebrandt and Polthier 2004]. Note that hinted at the fact in Section 1.4 that most of our mea-
the process of integration to suppress discontinuity is, in spirit, surements of the world are of integral nature: even dig-
equivalent to the idea of weak form used in the Finite Element ital pictures are made out of local area integrals of the
method. incident light over each of the sensors of a camera to
provide a set of values at each pixel on the final image
This idea of integrated value has predated in some cases the equiva- (see inset). The importance of this notion of forms in science is
lent differential statements: for instance, it was long known that the also evidenced by the fact that operations like gradient, divergence,
genus of a surface can be calculated through a cell decomposition and curl can all be expressed in terms of forms only, as well as
of the surface via the Euler characteristic. The actual Gauss-Bonnet fundamental theorems like Green’s or Stokes.
theorem was, however, derived later on. Now, if one tries to dis-
cretize the Gaussian curvature of a piecewise-linear surface in an 2.1.2 A Formal Definition
arbitrary way, it is not likely that its integral over the surface equals
the desired Euler characteristic, while its discrete version, defined
on vertices (or, more precisely, on the dual of each vertex), naturally For concreteness, consider the n-dimensional Euclidean space Rn ,
preserves this topological invariant. n ∈ N and let M be an open region M ⊂ Rn ; M is also called
an n-manifold. The vector space Tx M consists of all the (tangent)
vectors at a point x ∈ M and can be identified with Rn itself. A
2.1 From Integration to Differential Forms
k-form ω k is a rank-k, anti-symmetric, tensor field over M. That
is, at each point x ∈ M, it is a multi-linear map that takes k tangent
Integration is obviously a linear operation, since for any disjoint
vectors as input and returns a real number:
sets A and B, Z Z Z
= + . ω k : Tx M . . . × Tx M −→ R
A∪B A B
Moreover, the integration of a smooth function over a subset of which changes sign for odd permutations of the variables (hence
measure zero is always zero; for example, an area integral of (a the term antisymmetric). Any k-form naturally induces a k-form on
lower dimensional object such as) a curve or a point is equal to zero. a submanifold, through restriction of the linear map to the domain
Finally, integration is objective (i.e., relevant) only if its evaluation that is the product of tangent spaces of the submanifold.
is invariant under change of coordinate systems. These three prop-
erties combined directly imply that the integrand (i.e., the whole Comments on the Notion of Pseudo-forms There is a
expression after the integral sign) has to be antisymmetric. That is, closely related concept named pseudo-form. Pseudo-forms change
the basic building blocks of any type of integration are differential sign when we change the orientation of coordinate systems, just like
forms. Chances are, the reader is already very well acquainted with pseudo-vectors. As a result, the integration of a pseudo-form does
forms, maybe without even knowing it. not change sign when the orientation of the manifold is changed.
Unlike k-forms, a pseudo-k-form induces a pseudo-k-form on a
2.1.1 An Intuitive Definition submanifold only if a transverse direction is given. For example,
fluid flux is sometimes called a pseudo-2-form: indeed, given a
A differential form (also denoted as exterior1 differential form) is, transverse direction, we know how much flux is going through a
informally, anR integrand, i.e., a quantityRRthat can be integrated. It piece of surface; it does not depend on the orientation of the sur-
is the dx in dx and the dx dy in dx dy. More precisely, face itself. Vorticity is, however, a true 2-form: given an orientation
consider a smooth function F (x) over an interval in R. Now, define of the surface, the integration gives us the circulation around that
f (x) to be its derivative, that is, surface boundary induced by the surface orientation. It does not
depend on the transverse direction of the surface. But if we have
dF an orientation of the ambient space, we can always associate trans-
f (x) = ,
dx verse direction with internal orientation of the submanifold. Thus,
in our case, we may treat pseudo-forms simply as forms because we
Rewriting this last equation (using slightly abusive notations for
can consistently choose a representative from the equivalence class.
simplicity) yields dF = f (x)dx, which leads to:
Z b Z b 2.2 The Differential Structure
dF = f (x)dx = F (b) − F (a). (1)
a a
Differential forms are the building blocks of a whole calculus. To
1 Theword “exterior” is used as the exterior algebra is basically built out manipulate these basic blocks, Exterior Calculus defines seven op-
of an outer product. erators:
48
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
¦ d: the exterior derivative, that extends the notion of the differ- 3.1 Simplicial Complexes and Discrete Manifolds
ential of a function to differential forms;
¦ ?: the Hodge star, that transforms k-forms into (n-k)-forms; For the interested reader, the notions we introduce in this section
¦ ∧: the wedge product, that extends the notion of exterior prod- are defined formally in much more details (for the general case
uct to forms; of k-dimensional spaces) in references such as [Munkres 1984] or
¦ ] and [: the sharp and flat operators, that, given a metric, trans- [Hatcher 2004].
form a 1-form into a vector and vice-versa;
¦ iX : the interior product with respect to a vector field X (also
called contraction operator), a concept dual to the exterior prod-
uct;
¦ LX : the Lie derivative with respect to a vector field X, that
Figure 2: A 1-simplex is a line segment, the convex hull of two points. A
extends the notion of directional derivative.
2-simplex is a triangle, i.e., the convex hull of three distinct points. A 3-
In this chapter, we will restrict our discussions to the first three op- simplex is a tetrahedron, as it is the convex hull of four points.
erators, to provide the most basic tools necessary in computational
modeling. 3.1.1 Notion of Simplex
2.3 A Taste of Exterior Calculus in R3 A k-simplex is the generic term to describe the simplest mesh el-
ement of dimension k—hence the name. By way of motivation,
To give the reader a taste of the relative simplicity of Exterior Cal- consider a three-dimensional mesh in space. This mesh is made of
culus, we provide a list of equivalences (in the continuous world!) a series of adjacent tetrahedra (denoted tets for simplicity through-
between traditional operations and their Exterior Calculus counter- out). The vertices of the tets are said to form a 0-simplex. Similarly,
part in the special case of R3 . We will suppose that we have the the line segments or edges form a 1-simplex, the triangles or faces
usual Euclidean metric. Then, forms are actually quite simple to form a 2-simplex, and the tets a 3-simplex. Note that we can define
conceive: these simplices in a top-down manner too: faces (2-simplex) can be
thought of as boundaries of tets (3-simplices), edges (1-simplices)
0-form ⇔ scalar field as boundaries of faces, and vertices (0-simplices) as boundaries of
1-form ⇔ vector field edges.
2-form ⇔ vector field
3-form ⇔ scalar field The definition of a simplex can be made more abstract as a series
of k-tuples (referring to the vertices they are built upon). However,
To be clear, we will add a superscript on the forms to indicate their for the type of applications that we are targeting in this chapter, we
rank. Then applying forms to vector fields amounts to: will often not make any distinction between an abstract simplex and
1-form: u1 (v) ⇔ u · v. its topological realization (connectivity) or geometrical realization
2-form: u2 (v, w) ⇔ u · (v × w). (positions in space) .
3-form: f 3 (u, v, w) ⇔ f u · (v × w). Formally, a k-simplex σk is the non-degenerate convex hull of
Furthermore, the usual operations like gradient, curl, divergence k+1 geometrically distinct points v0 , . . . vk ∈ Rn with n ≥ k.
and cross product can all be expressed in terms of the basic exterior In other words, it is the intersection of all convex sets containing
calculus operators. For example: (v0 , . . . vk ); namely:
d0 f = ∇f , d1 u = ∇ × u, d2 u = ∇ · u; k
X k
X
?0 f = f, ?1 u = u, ?2 u = u, ?3 f = f ; σk = {x ∈ Rn |x = αi vi with αi ≥ 0 and αi = 1}.
?0 d2 ?1 u1 = ∇ · u, ?1 d1 ?2 u2 = ∇ × u, ?2 d0 ?3 f = ∇f ; i=0 i=0
f 0 ∧ u = f u, u1 ∧ v 1 = u × v, u1 ∧ v 2 = u2 ∧ v 1 = u · v;
iv u1 = u · v, iv u2 = u × v, iv f 3 = f v. The entities v0 , . . . vk are called the vertices and k is called the
Now that we have established the relevance of differential forms dimension of the k-simplex., which we will denote as:
even in the most basic vector operations, time has come to turn our
attention to make this concept of forms readily usable for computa- σk = {v0 v1 ...vk } .
tional purposes.
3.1.2 Orientation of a Simplex
3 Discrete Differential Forms
Note that all orderings of the k + 1 vertices of a k-simplex can
Finding a discrete counterpart to the notion of differential forms is be divided into two equivalent classes, i.e., two orderings differ-
a delicate matter. If one was to represent differential forms using ing by an even permutation. Such a class of orderings is called an
their coordinate values and approximate the exterior derivative us- orientation. In the present work, we always assume that local ori-
ing finite differences, basic theorems such as Stokes theorem would entations are given for each simplex; that is, each element of the
not hold numerically. The main objective of this section is there- mesh has been given a particular orientation. For example, an edge
fore to present a proper discretization of the forms on what is known σ1 = {v0 v1 } in Figure 2 has an arrow indicating its default ori-
as simplicial complexes. We will show how this discrete geomet- entation. If the opposite orientation is needed, we will denote it as
ric structure, well suited for computational purposes, is designed to {v1 v0 }, or, equivalently, by −{v0 v1 }. For more details and exam-
preserve all the fundamental differential properties. For simplicity, ples, the reader is referred to [Munkres 1984; Hirani 2003].
we restrict the discussion to forms on 2D surfaces or 3D regions
embedded in R3 , but the construction is applicable to general man- 3.1.3 Boundary of a Simplex
ifolds in arbitrary spaces. In fact, the only necessary assumption is
that the embedding space must be a vector space, a natural condi- Any (k-1)-simplex spanned by a subset of {v0 , . . . vk } is called a
tion in practice. (k-1)-face of σk . That is, a (k-1)-face is simply a (k-1)-simplex
49
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
whose k vertices are all from the k+1 vertices of the k-simplex. 3.1.5 Discrete Manifolds
The union of the (k-1)-faces is what is called the boundary of the
k-simplex. One should be careful here: because of the default ori- An n-dimensional discrete manifold M is an n-dimensional sim-
entation of the simplices, the formal signed sum of the (k-1)-faces plicial complex that satisfies the following condition: for each
defines the boundary of the k-simplex. Therefore, the boundary simplex, the union of all the incident n-simplices forms an n-
operator takes a k-simplex and gives the sum of all its (k-1)-faces dimensional ball (i.e., a disk in 2D, a ball in 3D, etc), or half a
with 1 or −1 as coefficients depending on whether their respective ball if the simplex is on the boundary. As a consequence, each (n-
orientations match or not, see Figure 4. 1)-simplex has exactly two adjacent n-simplices—or only one if it
is on a boundary.
Basically, the notion of discrete manifold corresponds to the usual
Computer Graphics acceptation of “manifold mesh”. For example
in 2D, discrete manifolds cannot have isolated edges (also called
sticks or hanging edges) or isolated vertices, and each of their edges
Figure 3: The boundary operator ∂ applied to a triangle (a 2-simplex) is is adjacent to 2 triangles (except for the boundary; in that case, the
equal to the signed sum of the edges (i.e., the 1-faces of the 2-simplex). edge is adjacent to only one triangle). A surface mesh in 3D cannot
have a “fin”, i.e., an edge with more than two adjacent triangles. To
To remove possible mistakes in orientation, we can define the
put it differently, infinitesimally-small, imaginary inhabitants of a
boundary operator as follows:
n-dimensional discrete manifolds would consider themselves living
k in Rn as any small neighborhood of this manifold is isomorphic to
X
∂{v0 v1 ...vk } = (−1)j {v0 , ..., vbj , ..., vk }, (2) Rn .
j=0
where vbj indicates that vj is missing from the sequence, see Fig-
ure 3. Clearly, each k-simplex has k+1 (k-1)-faces. For this state-
ment to be valid even for k = 0, the empty set ∅ is usually defined
as a (−1)-simplex face of every 0-simplex. The reader is invited to
verify this definition on the triangle {v0 , v1 , v2 } in Figure 3:
Figure 4: Boundary operator applied to a triangle (left), and a tetrahedron We have already encountered the notion of chain, without mention-
(right). Orientations of the simplices are indicated with arrows. ing it. Recall that the boundary operator takes each k-simplex and
gives the signed sum of all its (k-1)-faces. We say that the boundary
3.1.4 Simplicial Complex of a k-simplex produces a (k-1)-chain. The following definition is
more precise and general.
A simplicial complex is a collection K of simplices, which satisfies
the following two simple conditions: 3.2.1 Definition
¦ every face of each simplex in K is in K; A k-chain of an oriented simplicial complex K is a set of values,
¦ the intersection of any two simplices in K is either empty, or an one for each k-simplex of K. That is, a k-chain c can then be
entire common face. thought of as a linear combination of all the k-simplices in K:
X
c = c(σ) · σ, (3)
σ∈K
50
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
1, or −1. Therefore, it should not be surprising that we can extend Now, remember that ω operates on c to give a scalar in R. The
the notion of boundary to act also on k-chains, simply by linearity: linear operation ω(c) translates into an inner product ω k · ck . More
X X specifically, one may continue to think of ck as a column vector so
∂ ck σk = ck ∂σk . that the R-valued linear mapping ω can be represented by a row
k k vector (ω k )t , and ω(c) becomes simply the matrix multiplication
of the row vector (ω k )t with the column vector ck . The evaluation
That is, from one set of values assigned to all simplices of a com- of a cochain is therefore trivial to implement.
The attentive reader will have noticed by now: k-cochains are dis-
crete analogs to differential forms. Indeed, a continuous k-form
was defined as a linear mapping from k-dimensional sets to R, as
we can only integrate a k-form on a k-(sub)manifold. Note now
Figure 6: (a) An example of 1-chain being the boundary of a face (2- that a kD set, when one has only a mesh to work with, is simply
simplex); (b) a second example of 1-chain with 4 non-zero coefficients. a chain. And a linear mapping from a chain to a real number is
what we called a cochain: a cochain is therefore a natural discrete
plex, one can deduce another set of values derived by weighting the counterpart of a form.
boundaries of each simplex by the original value stored on it. This
operation is very natural, and can thus be implemented easily as For instance a 0-form can be evaluated at each point, a 1-form can
explained next. be evaluated on each curve, a 2-form can be evaluated on each sur-
face, etc. Now if we restrict integration to take place only on the
3.2.4 Implementation of the Boundary Operator k-submanifold which is the sum of the k-simplices in the triangu-
lation, we get a k-cochain; thus k-cochains are a discretization of
Since the boundary operator is a linear mapping from the space of k-forms. One can further map a continuous k-form to a k-cochain.
k-simplices to the space of (k-1)-simplices, it can simply be rep- To do this, first integrate the k-form on each k-simplex and assign
resented by a matrix of dimension |Kk−1 | × |Kk |. The reader can the resulting value to that simplex to obtain a k-cochain on the k-
convince herself that this matrix is sparse, as only immediate neigh- simplicial complex. This k-cochain is a discrete representation of
bors are involved in the boundary operator. Similarly, this matrix the original k-form.
contains only the values 0, 1, and −1. Notice than in 3D, there are
three non-trivial boundary operators ∂k (∂1 is the boundary oper- 3.4.1 Evaluation of a Form on a Chain
ator on edges, ∂2 on triangles, ∂3 on tets). However, the operator
needed for a particular operation is obvious from the type of the We can now naturally extend the notion of evaluation of a differen-
argument: if the boundary of a tet is needed, the operator ∂3 is the tial form ω on an arbitrary chain simply by linearity:
only one that makes sense to apply; in other words, the boundary of Z X Z
a k-simplex σk is found by invoking ∂k σk . Thanks to this context- P ω= ci ω. (5)
dependence, we can simplify the notation and remove the subscript i ci σi i σi
when there is no ambiguity.
As mentioned above, the integration of ω on each k-simplex σk
3.3 Notion of Cochains provides a discretization of ω or, in other words, a mapping from
the k-form ω to a k-cochain represented by:
A k-cochain ω is the dual of a k-chain, that is to say, ω is a linear Z
mapping that takes k-chains to R. One writes: ω[i] = ω.
σi
ω: Ck → R
c → ω(c), (4) However convenient this chain/cochain standpoint is, in practical
applications, one often needs a point-wise value for a k-form or to
which reads as: a k-cochain ω operates on a k-chain c to give a evaluate the integration on a particular k-submanifold. How do we
scalar in R. Since a chain is a linear combination of simplices, a get these values from a k-cochain? We will cover this issue of form
cochain returns a linear combination of the values of that cochain interpolation in Section 6.
on each simplex involved.
4 Operations on Chains and Cochains
Clearly, a co-chain also corresponds to one value per simplex (since
all the k-simplices form a basis for the vector space Ck , and we
4.1 Discrete Exterior Derivative
only need to know the mapping of vectors in this basis to determine
a linear mapping), and hence the notion of duality of chains and
co-chains is appropriate. But contrary to a chain, a k-cochain is In the present discrete setting where the discrete differential forms
evaluated on each simplex of the dimension k. In other words, a are defined as cochains, defining a discrete exterior derivative can
k-cochain can be thought of as a field that can be evaluated on each be done very elegantly: Stokes’ theorem, mentioned early on in
k-simplex of an oriented simplicial complex K. Section 2, can be used to define the exterior derivative d. Tra-
ditionally, this theorem states a vector identity equivalent to the
well-known curl, divergence, Green’s, and Ostrogradsky’s theo-
3.3.1 Implementation of Cochains
rems. Written in terms of forms, the identity becomes quite sim-
ple: it states that d applied to an arbitrary form ω is evaluated on an
The numerical representation of cochains follows from that of arbitrary simplex σ as follows:
chains by duality. Recall that a k-chain can be represented as a
Z Z
vector ck of length equal to the number of k-simplices in M. Sim-
ilarly, one may represent ω by a vector ω k of the same size as ck . dω = ω. (6)
σ ∂σ
51
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
You surely recognize the usual property that an integral over a k- than one matrix for the exterior derivative operator: there is one per
dimensional set is turned into a boundary integral (i.e., over a set of simplex dimension. But again, the context is sufficient to actually
dimension k-1). With this simple equation relating the evaluation know which matrix is needed. A brute force approach that gets rid
of dω on a simplex σ to the evaluation of ω on the boundary of this of these multiple matrices is to use a notion of super-chain, i.e., a
simplex, the exterior derivative is readily defined: each time you vector storing all simplices, ordered from dimension 0 to the di-
encounter an exterior derivative of a form, replace any evaluation mension of the space: in this case, the exterior derivative can be
over a simplex σ by a direct evaluation of the form itself over the defined as a single, large sparse matrix that contains these previ-
boundary of σ. Obviously, Stokes’ theorem will be enforced by ous matrices as blocks along the diagonal. We will not use this
construction! approach, as it makes the exposition less intuitive in general.
The operator d is called the adjoint of the boundary operator ∂: if A k-form ω is called exact if there is a (k-1)-form α such that ω =
we
R denote the integral sign as a pairing, i.e., with the convention that dα, and it is called closed if dω = 0.
σ
ω = [ω, σ], then applying d on the left hand side of this operator
is equivalent to applying ∂ on the right hand: [dω, σ] = [ω, ∂σ].
For this very reason, d is sometimes called the coboundary operator.
Finally, by linearity of integration, we can write a more general
expression of Stokes’ theorem, now extended to arbitrary chains as
follows:
Z Z Z X Z
dω = ω= ω= ci ω
P ¡P ¢ P i ∂σ Figure 8: (a) The 2-form on the oriented shaded triangles defined by the
i ci σi i ci σi i ci ∂σi
∂ i
exterior derivative d of the 1-form on the oriented edges is called an exact 2-
form; (b) The 1-form on the oriented edges whose derivative d is identically
Consider the example shown in Figure 7. The discrete exterior zero is called a closed 1-form.
derivative of the 1-form, defined as numbers on edges, is a 2-
It is worth noting here that every exact form is closed, as will be
form represented by numbers on oriented faces. The orientation
seen in Section 4.3. Moreover, it is well-known in the continuous
of the 1-forms may be opposite to that induced on the edges by
setting that a closed form on a smooth contractible (sub)-manifold
the orientation of the faces. In this case, the values on the edges
is locally exact (to be more accurate: exact over any disc-like re-
change sign. For instance, the 2-form associated with the d of the
gion). This result is called the Poincaré lemma. The discrete ana-
1-forms surrounding the oriented shaded triangle takes the value
logue to this lemma can be stated as follows: given a closed k-
ω = 2 − 1 − 0.75 = 0.25.
cochain ω on a star-shaped complex, that is to say, dω = 0, there
exits a (k-1)-cochain α such that ω = dα. For a formal statement
and proof of this discrete version, see [Desbrun et al. 2004].
The boundary of a boundary is the empty set. That is, the boundary
operator applied twice to a k-simplex is zero. Indeed, it is easy to
verify that ∂ ∂σk = 0, since each (k-2)-simplex will appear exactly
twice in this chain with different signs and, hence, cancel out (try
Figure 7: Given a 1-form as numbers on oriented edges, its discrete exte- it at home!). From the linearity of ∂, one can readily conclude that
rior derivative is a 2-form. In particular, this 2-form is valued 0.25 on the the property ∂ ∂ = 0 is true for all k-chains since the k-simplices
oriented shaded triangle. form a basis. Similarly, one has that the discrete exterior derivative
satisfies d d = ∂ t ∂ t = (∂ ∂)t = 0, analogously to the exterior
4.1.2 Implementation of Exterior Derivative derivative of differential forms (notice that this last equality corre-
sponds to the equality of mixed partial derivatives, which in turn is
Since we use vectors of dimension |Kk | to represent a k-cochain, responsible for identities like ∇ × ∇ = 0 and ∇ · ∇× = 0 in R3 ).
the operator d can be represented by a matrix of dimension
|Kk+1 | × |Kk |. Furthermore, this matrix has a trivial expression. 0 0
Indeed, using the matrix notation introduced earlier, we have:
Figure 9: The chain complex of a tetrahedron with the boundary operator:
Z Z from the tet, to its triangles, to their edges, and to their vertices.
t t t t
ω = ω (∂c) = (ω ∂)c = (∂ ω) c = dω.
∂c c 4.3.1 Chain Complex
t
Thus, the matrix d is simply equal to ∂ . This should not come as a In general, a chain complex is a sequence of linear spaces, con-
surprise, since we previously discussed that d is simply the adjoint nected with a linear operator D that satisfies the property D D = 0.
of ∂. Note that care should be used when boundaries are present. Hence, the boundary operator ∂ (resp., the coboundary operator d)
However, and without digging too much into the details, it turns makes the spaces of chains (resp., cochains) into a chain complex,
out that even for discrete manifolds with boundaries, the previous as shown in Figures 9 and 13.
statement is valid. Implementing the exterior derivative while pre-
serving Stokes’ theorem is therefore a trivial matter in practice. No- When the spaces involved are the spaces of differential forms, and
tice that just like for the boundary operator, there is actually more the operator is the exterior derivative d, this chain complex is called
52
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
the deRham complex. By analogy, the chain complex for the spaces 4.4.1 Simplicial Homology
of discrete forms and for the coboundary operator is called the dis-
crete deRham complex (or sometimes, the cochain complex). A fundamental problem in topology is that of determining, for two
spaces, whether they are topologically equivalent. That is, we wish
4.3.2 Examples to know if one space can be morphed into the other without having
to puncture it. For instance, a sphere-shaped tet mesh is not topo-
Consider the 2D simplicial complex in Figure 10(a) and choose the logically equivalent to a torus-shaped tet mesh as one cannot alter
oriented basis of the i-dimensional simplices (i = 0 for vertices, the sphere-shaped mesh (i.e., deform, refine, or coarsen it locally)
i = 1 for edges and i = 2 for the face) as suggested by the ordering to make it look like a torus.
in the figure.
The key idea of homology is to define invariants (i.e., quantities
that cannot change by continuous deformation) that characterize
topological spaces. The simplest invariant is the number of con-
nected components that a simplicial complex has: obviously, two
simplicial complexes with different numbers of pieces cannot be
continuously deformed into each other! Roughly speaking, ho-
mology groups are an extension of this idea to define more sub-
tle invariants than the number of connected components. In gen-
Figure 10: Three examples of simplicial complexes. The first one is not eral, one can say that homology is a way to define the notion of
manifold. The two others are. holes/voids/tunnels/components of an object in any dimension.
One gets ∂(f0 ) = e0 − e4 − e3 , which can be identified with the
vector (1, 0, 0, −1, −1) representing the coefficient in front of each Cycles and their Equivalence Classes Generalizing the
simplex. By repeating similar calculations for all simplices, one can previous example to other invariants is elegantly done using the no-
readily conclude that the boundary operator ∂ is given by: tion of cycles. A cycle is simply a closed k-chain; that is, a linear
à 1 ! à −1 0 0 −1 0 ! combination of k-simplices so that the boundary of this chain (see
0 1 −1 0 0 1 Section 3.2) is the empty set. Any set of vertices is a closed chain;
∂2 = 0 , ∂1 = 0 1 1 0 0 ,
−1 0 0 −1 1 −1 any set of 1D loops are too; etc. Equivalently, a k-cycle is any
−1 0 0 0 0 0
k-chain that belongs to Ker ∂k , by definition.
That is, the chain complex under the boundary operator ∂ can be
written as: On this set of all k-cycles, one can define equivalence classes. We
∂2 ∂1 will say that a k-cycle is homologous to another k-cycle (i.e., in
0 −→ C2 −→ C1 −→ C0 −→ 0 the same equivalence class than the other) when these two chains
where Ci , i = 0, 1, 2, denote the spaces of i-chains. differ by a boundary of a (k+1)-chain (i.e., by an exact chain). No-
tice that this exact chain is, by definition (see Section 4.2), in the
Consider now the domain to be the mesh shown in Figure 10(b). image of ∂k+1 , i.e., Im ∂k+1 . To get a better understanding of
The exterior derivative operator, or the coboundary operator, can be this notion of equivalence class, the reader is invited to look at Fig-
expressed as: ure 11: the 1-chains L1 and L3 are part of the same equivalence
à −1 1 0 0 ! class as their difference is indeed the boundary of a well-defined
0 0 −1 1 0 ¡ ¢
d = 0 0 −1 1 , d1 = 10 01 01 10 −1
1
. 2D chain—a rubber-band shape in this case. Notice that as a conse-
1 0 0 −1
0 −1 0 1 quence, L1 can be deformed into L3 without having to tear the loop
apart. However, L2 is not of this class, and thus cannot be deformed
It is worth noting that, since d is adjoint to ∂ by definition, the into L3 ; there’s no 2-chain that corresponds to their difference.
coboundary operator d induces a cochain complex:
d1 d0 4.4.2 Homology Groups
0 ←− C 2 ←− C 1 ←− C 0 ←− 0
where C i , i = 0, 1, 2, denote the spaces of i-cochains. Let us now use these definition on the simple case of the 0th ho-
mology group H0 .
Finally, suppose the domain is the tetrahedron in Figure 10(c), then
the exterior derivative operators are: Homology Group H0 The boundary of any vertex is ∅. Thus,
−1 1 0 0 any linear combination of vertices is a 0-cycle by definition. Now
0 −1 1 0 µ 1 1 −1 0 0 0 ¶
¡ ¢ if two vertices v0 and v1 are connected by an edge, v1 − v0 (i.e.,
d0 = −1 0 1 0
1 0 0 −1 , d1 = 10 01 00 10 −1 0
, d2 = −1 1 1 −1 .
0 1 0 −1 0 0 1 1 0 1
1 1 the difference of two cycles) is the boundary of this edge. Thus, by
0 0 −1 1 our previous definition, two vertices linked by an edge are homolo-
gous as their difference is the boundary of this edge. By the same
4.4 Notion of Homology and Cohomology reasoning, any two vertices taken from the same connected compo-
nent are, also, homologous, since there exists a chain of edges in
Homology is a concept dating back to Poincaré that focuses on between. Consequently, we can pick only one vertex per connected
studying the topological properties of a space. Loosely speaking, component to form a basis of this homology group. Its dimension,
homology does so by counting the number of holes. In our case, β0 , is therefore simply the number of connected components. The
since we assume that our space is a simplicial complex (i.e., triangu- basis elements of that group are called generators, since they gen-
lated), we will only deal with simplicial homology, a simpler, more erate the whole homology group.
straightforward type of homology that can be seen as a discrete ver-
sion of the continuous definition (in other words, it is equivalent to Homology Group H1 Let us proceed similarly for the 1st ho-
the continuous one if the domain is triangulated). As we are about mology class: we now have to consider 1-cycles (linear combina-
to see, the notion of discrete forms is intimately linked with these tions of 1D loops). Again, one can easily conceive that there are
topological notions. In fact, we will see that (co)homology is the different types of such cycles, and it is therefore possible to separate
study of the relationship between closed and exact (co)chains. all possible cycles into different equivalence classes. For instance,
53
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
the loop L1 in Figure 11 is topologically distinct from the curve 4.4.4 Calculation of the Cohomology Basis
L2 : one is around a hole and the other is not, so the difference be-
tween the two is not the boundary of a 2-chain. Conversely, L1 is in One usual way to calculate a cohomology basis is to calculate a
the same class as curve L3 since they differ by one connected area. Smith Normal Form to obtain the homology basis first (possibly
Thus, in this figure, the 1st homology group is a 1-dimensional using progressive meshes [Gu and Yau 2003]), with a worst case
group, and L1 (or L3 , equivalently) is its unique generator. The complexity of O(n3 ), and then find the corresponding cohomology
reader is invited to apply this simple idea on the triangulated torus, basis derived from this homology basis. We provide an alternative
to find two loops as generators of H1 . method here with worst case complexity also equal to O(n3 ). The
advantage of our method is that it directly calculates the cohomol-
ogy basis.
Formal Definition of Homology Groups We are now ready 1. Transform dk (size |Kk+1 | × |Kk |) in the following manner:
to generalize this construction to all homology groups. Remember
that we have a series of k-chain spaces:
// For each column of dk
∂n ∂2 ∂1 for(i = 0; i < |Kk |; i++)
Cn −→ Cn−1 . . . −→ C1 −→ C0 // Reduce column i
repeat
with the property that ∂ ∂ is the empty set. This directly implies p ← row#(dk [i])
that the image of Cj is always in the kernel of ∂j−1 —such a series find j < i such as p==row#(dk [j])
is called a chain complex. Now, the homology groups {Hk }k=0..n make dk [i][p] zero by adding to dk [i] a multiple of dk [j]
of a chain complex based on ∂ are defined as the following quotient until j not found or column i is all zeros
spaces:
Hk = Ker ∂k /Im ∂k+1 . In the end of this procedure, we get Dk = dk N k , whose non-
zero column vectors are linearly independent of each other
The reader is invited to check that this definition is exactly what we
and with different row#(.), and N k is a non-singular upper
did for the 0th and 1st homology groups—and it is now valid for
triangular matrix.
any order: indeed, we use the fact that closed chains (belonging to
Ker ∂) are homologous iff their difference is in Im ∂, and this is 2. Construct K k = {Nik | Dik = 0} (where Nik and Dik are
exactly what this quotient vector space is.
column vectors of matrices N k and Dk respectively).
K k is a basis for kernel of dk .
Example Consider the example in Figure 10(a). Geometrically,
H0 is nontrivial because the simplicial complex σ is disconnected 3. Construct I k = {Nik |∃j such that i = row#(Dj
(k−1)
)}
(it is easy to see {v0 , v4 } form a basis for H0 ), while H1 is nontriv-
ial since the cycle (e1 − e2 + e4 ) is not the boundary of any 2-chain
4. Construct P k = K k − I k
of σ ({(e1 − e2 + e4 )} is indeed a basis for this 1D space H1 ).
P k is a basis of the cohomology.
Link to Betti Numbers The dimension of the k-th cohomology Short proof of correctness: First, notice that the Nik ’s are all lin-
group is called k-th Betti number; βk = dimHk . For a 3D simpli- early independent because N k is nonsingular. For any non-zero
cial complex embedded in R3 , these numbers have very straightfor- linear combination of vectors in P k , row#(.) of it (say i) equals
ward meanings. β0 is the number of connected components, β1 is the max of row#(.) of vectors with non-zero coefficients. But i
the number of tunnels, β2 is the number of voids, while β3 is the (k−1)
is not row#(.) of any Di (and thus any linear combination of
number of 4D holes,
P which is 0 in the Euclidean (flat 3D) case. Fi- k
nally, note that k=0..n (−1)k βk , where βk is the k-th Betti num- them) by definition of P . Therefore, we know that the linear com-
ber, gives us the well-known Euler characteristic. bination is not in the image space of dk−1 (since the range of dk−1
is the same as Dk−1 , by construction). Thus, P k spans a subspace
of Ker(dk )/Im(dk−1 ) of dimension Card(P k ).
4.4.3 Cohomology Groups
One can also prove that I k is a subset of K k . Pick such an Nik with
The definition of homology groups is much more general than what (k−1) (k−1)
we just reviewed. In fact, the reader can take the formal definition i = row#(Dj ). We have: dk Dj = 0 (since dk ◦ dk−1 =
k −1 (k−1)
in the previous section, replace all occurrences of chain by cochain, 0). Now row#(τ ≡ (N ) d j ) = i (the inverse of an up-
of ∂ by d, and reverse the direction of the operator between spaces per triangular matrix is also an upper triangular matrix). So conse-
(see Section 4.3.2): this will also define equivalence classes. Be- quently, 0 = dk d(k−1) j = Dk (N k )−1 d(k−1) j = Dk τ means
cause cochains are dual of chains, and d is the adjoint of ∂, these that Dik = 0 because the columns of Dk are linearly indepen-
equivalence classes define what are actually denoted as cohomol- dent or 0. Therefore, Card(P k ) = Card(K k ) − Card(I k ) =
ogy groups: the cohomology groups of the deRham complex for the dim(Ker(dk )) − dim(Im(d(k−1) )), and we conclude that, P k
coboundary operator are simply the quotient spaces Ker d/Im d.
spans Ker(dk )/Im(dk−1 ) as expected.
Finally, note that the homology and cohomology groups are not
only dual notions, but they are also isomorphic; therefore, the car-
dinalities of their bases are equal. 2 Thanks to David Cohen-Steiner for pointing us to the similarities
54
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
4.4.5 Example a boundary operator on the dual cell complex and, consequently, a
discrete exterior derivative! The reader is invited to verify that this
Consider the 2D simplicial complex in Figure 10(a) again. We will exterior derivative on the dual mesh can be simply written as the
show an example of running the same procedure described above opposite of a primal one transposed:
to compute a homology basis. The only difference with the previ-
ous algorithm is that we use ∂ instead of d, since we compute the dn−k k k−1 t
Dual = (−1) (dP rimal ) . (7)
homology basis instead of the cohomology basis.
The added negative sign appears as the orientation on the dual is
1. Compute the DK = ∂k N k ’s and N k ’s: D2 is trivial, as it is induced from the primal orientation, and must therefore be properly
the same as ∂2 . accounted for. Once again, an implementation can overload the
à −1 0 0 0 0 ! à 1 0 0 −1 0 ! definition of this operator d when used on dual forms using this
1 −1 0 0 0 0 1 0 −1 1 previous equation. In the remainder of our chapter, we will be using
D1 = 0 1 1 0 0 , N1 = 0 0 1 1 −1 ,
0 0 −1 0 0 0 0 0 1 0 d as a contextual operator to keep the notations a simple as possible.
0 0 0 0 0 0 0 0 0 1
Because we have defined a proper exterior derivative on the dual
mesh (still satisfying d ◦ d = 0), this dual cell complex also carries
2. Contruct the K’s: the structure of a chain complex. The structure on the dual complex
Ã1! Ã0! Ã0! Ã0! Ã0! may be linked to that of the primal complex using the Hodge star (a
0
K ={
0
0 ,
1
0 ,
0
1 ,
0
0 ,
0
0 } metric-dependent operator), as we will discuss in Section 5.
0 0 0 1 0
0 0 0 0 1
= {v0 , v1 , v2 , v3 , v4 }
0
(N is the identity)
à −1 !à 0 !
−1 1
K1 = { 1 , −1 } = {(−e0 −e1 +e2 +e3 ), (e1 −e2 +e4 )}
1 0
0 1
55
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
1-form γ with the 2-form ω = α ∧ β is a 3-form µ = γ ∧ ω (also these different notions of sizes depending on dimension will be de-
called volume-form) on R which is analogous to the scalar triple noted “intrinsic volumes” for generality). We therefore do not have
product of three vectors. a full-blown notion of a metric, only a discrete metric. Obviously,
if one were to use a finer mesh, more information on the metric
A discrete treatment of the wedge operator can be found would be available: having more values of length, area, and vol-
in [Hirani 2003]. Here, we only need to introduce the no- ume in a neighborhood provides a better approximation of the real,
tion of a discrete primal-dual wedge product: given a pri- continuous metric.
mal k-cochain γ and a dual (n-k)-cochain ω, the discrete
wedge product γ ∧ ω is an n-form (or a volume-form).
5.3 The Differential Hodge Star
For instance, in the example depicted in the inset,
the wedge product of the primal 1-cochain with
the dual 1-cochain is a 2-form associated with the Let us go back for a minute to the differential case to explain a new
diamond region defined by the convex hull of the concept. Recall that the metric defines an inner product for vectors.
union between the primal and dual edge (see in- This notion also extends to forms: given a metric, one can define the
set). product of two k-forms ∈ Ωk (M) which will measure, in a way,
the projection of one onto the other. A formal definition can be
found in [Abraham et al. 1988]. Given this inner product denoted
h , i, we can introduce an operator ?, called the Hodge star, that
5 Metric-Dependent Operators on Forms maps a k-form to a complementary (n-k)-form:
Notice that up to now, we did not assume that a metric was avail- ? : Ωk (M) → Ωn−k (M),
able, i.e., we never required anything to be measured. However,
such a metric is necessary for many purposes. For instance, sim- and is defined to satisfy the following equality:
ulating the behavior of objects around us requires measurements
of various parameters in order to be able to model laws of motion, α ∧ ?β = hα, βi µn
and compare the numerical results of simulations. Consequently, a
certain number of operations on forms can only be defined once a for any pair of k-forms α and β (recall that µn is the volume form
metric is known, as we shall see in this section. induced by the metric g). However, notice that the wedge product
is very special here: it is the product of k-form and a (n-k)-form,
5.1 Notion of Metric and Inner Product two complementary forms. This fact will drastically simplify the
discrete counterpart of the Hodge star, as we now cover.
A metric is, roughly speaking, a nonnegative function that describes 0-forms (vertices) 1-forms (edges) 2-forms (faces) 3-forms (tets)
the “distance” between neighboring points of a given space. For
example, the Euclidean metric assigns to any two points in the Eu-
clidean space R3 , say X = (x1 , x2 , x3 ) and Y = (y1 , y2 , y3 ), the
d d d
number:
p
d(X, Y) = kX − Yk2 = (x1 −y1 )2 + (x2 −y2 )2 + (x3 −y3 )2
1 0 0 Figure 13: On the first line, the ‘primal’ chain complex is depicted and on
g Euclid = 0 1 0. the second line we see the dual chain complex (i.e., cells, faces, edges and
0 0 1 vertices of the Voronoi cells of each vertex of the primal mesh).
Indeed, the reader can readily verify that this matrix g satisfies: 5.4 Discrete Hodge Star
d2 (X, Y) = (X − Y)t g(X − Y). Notice also that this metric
induces an inner product of vectors. Indeed, for two vectors u and In the discrete setting, the Hodge star becomes easier: we only
v, we can use the matrix g to define: need to define how to go from a primal k-cochain to a dual (n-k)-
cochain, and vice-versa. By definition of the dual mesh, k-chains
u · v = ut g v. and dual (n-k)-chains are represented by vectors of the same di-
mension. Similarly to the discrete exterior derivative (coboundary)
Once again, the reader is invited to verify that this equality does operator, we may use a matrix (this time of size |Kk | × |Kk |) to
correspond to the traditional dot product when g is the Euclidean represent the Hodge star. Now the question is: what should the
metric. Notice that on a non-flat manifold, subtraction of two coefficients of this matrix be?
points is only possible for points infinitesimally close to each other,
thus the metric is actually defined pointwise for the tangent space For numerical purposes we want it to be symmetric, positive def-
at each point: it does not have to be constant. Finally, notice inite, and sometimes, even diagonal for faster computations. One
that a pvolume form can be induced from a metric by defining such diagonal Hodge star can be defined with the diagonal elements
µn = det(g)dx1 ∧ . . . ∧ dxn . as the ratio of intrinsic volumes of a k-simplex and its dual (n-k)-
simplex. In other words, we can define the discrete Hodge star
through the following simple rule:
5.2 Discrete Metric
Z Z
In the discrete setting presented in this paper, we only need to mea- 1 1
ω= ?ω (8)
sure length, area, and volume of the simplices and dual cells (note |σk | σk | ∗ σk | ∗σk
56
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Therefore, any primal value of a k-form can be easily transferred Equation 7 should be used. Once this is well understood, it is quite
to the dual mesh through proper scaling—and vice-versa; to be pre- straightforward to verify the following series of equalities:
cise, we have: Eq. (10)
?k ?n−k = (−1)k(n−k) Id, (9) hdα, βi = (dα)t ? β = αt dt ? β
Eq. (9) w/ k↔k−1
which means that ? on the dual mesh is the inverse of the ? on = αt (−1)(k−1)(n−(k−1)) ? ?dt ? β
the primal up to a sign (the result of antisymmetry of the wedge = αt (−1)n(k−1)+1 ? ?(−1)k dt ? β
product, which happens to be positive for any k-form when n = 3). Eq. (11)
= hα, δβi
So we must use the inverse of the Hodge star to go from a dual
(n-k)-cochain to a k-cochain. We will, however, use ? to indistin- holds on our discrete manifold. So indeed, the discrete d and δ are
guishably mean either the star or its inverse, as there is no ambiguity also adjoint, in a similar fashion in the discrete setting as they were
once we know whether the operator is applied to a primal or a dual in the continuous sense. For this reason, δ is called the codifferen-
form: this is also a context-dependent operator. tial operator.
Beware that we use the notation d to mean the context-dependent Therefore, these interpolating functions represent a basis of 0-
exterior derivative. If you apply δ to a primal k-form, then the cochains, that exactly corresponds to the dual of the natural basis of
exterior derivative will be applied to a dual (n − k)-form, and thus, 0-chains.
57
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
6.2 Interpolating 1-forms Basis of Forms The integration of the Whitney form ϕσk as-
sociated with the k-simplex σk will be 1 on that particular simplex,
We would like to be able to extend the previous interpolation tech- and 0 on all others. Indeed, it is a simple exercise to see that the
nique to 1-forms now. Fortunately, there is an existing method to integration of ϕσk is 0 on a different k-simplex, because there is
do just that: the Whitney 1-form (used first in [Whitney 1957]) as- at least one vertex of this simplex vj that does not belong to σk ,
sociated with an edge σij between vi and vj is defined as: so its hat function ϕj is valued 0 everywhere on σk . Since ϕj or
dϕj appears in every term, the integral of ϕσk is 0. To see that
the integral is 1 on the simplex itself, we can use Stokes’ theorem
ϕσij = ϕi dϕj − ϕj dϕi . (as our discrete forms satisfy it exactly on simplices): first, suppose
k < n, and pick a k + 1-simplex, such that the k-simplex σk is a
face of it. Since it is 0 on other faces, the integral of the Whitney
A direct computation can verify that: form is equal to the integral of dϕσk = (k + 1)!dϕi0 ∧ ... ∧ ϕik
on the k + 1-simplex,
R if we use ϕij as a local reference frame for
Z
1 if i = k and j = l, the integration, σk+1 dϕi0 ∧ ... ∧ ϕik is simply the volume of a
ϕσij = −1 if i = l and j = k, 1
standard simplex, which is (k+1)! , thus the integral is 1. The case
σkl
0 otherwise. when k = n is essentially the same as k = n − 1.
This means that these Whitney forms are forming a basis of their
Indeed, it is easy to see that the integral is 0 when we are not inte- respective form spaces. In a way, these bases are an extension of
grating it on edge eij , because at least one of the vertices (say, i) is the Finite Element bases defined on nodes, or of the Finite Volume
not on the edge, thus, ϕi = 0 and dϕi = 0 on the edge. However, elements that are constant per tet.
along the edge σij , we have ϕi + ϕj = 1, therefore: Note finally that the Whitney forms are not continuous; however,
they are continuous along the direction of the k-simplex (i.e., tan-
Z ϕZi =0 ϕZi =0
gential continuity for 1-forms, and normal continuity for 2-forms);
ϕσij = (ϕi d(1−ϕi )−(1−ϕi )dϕi ) = (−dϕi ) = 1. this is the only condition needed to make the integration well de-
σij
ϕi =1 ϕi =1
fined. In a way, this property is the least we can ask them to be. We
would lose generality if we were to add any other condition! The
interested reader is referred to [Bossavit 1998] for a more thorough
We thus have defined a correct basis for 1-cochains. discussion on these Whitney bases and their relations to the notion
of weak form used in the Finite Element Method.
6.3 Interpolating with Whitney k-Forms
7 Application to Hodge Decomposition
One can extend these 1-form basis functions to arbitrary k-
simplices. In fact, Whitney k-forms are defined similarly: We now go through a first application of the discrete exterior calcu-
X lus we have defined up to now. As we will see, the discrete case is
ϕσi0 ,i1 ,...,ik = k! d
(−1)j ϕij dϕi0 ∧ ... ∧ dϕ ij ... ∧ dϕik
often much simpler than its continuous counterpart; yet it captures
j=0...k the same properties.
ω k = dαk−1 + δβ k+1 + hk .
Here, we use the term harmonic to mean that hk satisfies the equa-
tion ∆hk = 0, where ∆ is the Laplacian operator defined as
∆ = dδ + δd. The proof of this theorem is mathematically in-
volved and requires the use of elliptic operator theory and similar
Figure 14: ∇ϕ for the vertex on top tools, as well as a careful study of the boundary conditions to en-
58
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
sure uniqueness. The discrete analog that we propose has a very Implementation of the Discrete Hodge Decomposition
simple and straightforward proof as shown below. Before we discuss how to numerically implement the discrete
Hodge decomposition, we prove a useful result (that has a continu-
7.2 Discrete Hodge Decomposition ous analog).
Lemma 7.2 In the discrete setting, one can find exactly one har-
In the discrete setting, the discrete operators such as the exterior monic cochain from each cohomology equivalence class.
derivative and the codifferential can be expressed using matrix rep-
resentation. This allows one to easily manipulate these operators Proof It is can be readily shown that the bases of harmonic
using tools from linear algebra. In particular, the discrete version cochains and the cohomology groups both have the dimension
of the Hodge decomposition theorem becomes a simple exercise in equal to dim(Ker dk ) − dim(Im dk−1 ). To this end, recall that a
linear algebra. Note that we will assume a boundaryless domain for cohomology basis is defined as is Ker(dk )/Im(dk−1 ) and has di-
simplicity (the generalization to domains with boundary is concep- mension dim(Ker dk ) − dim(Im dk−1 ). Now, in order to see that
tually as simple). the space of harmonic cochains has this same dimension, simply
note that: Ker(dk ) = dΩk−1 ⊕ Hk .
Theorem 7.1 Let K be a discrete manifold and let Ωk (K) be Now, the equation δ(ω + df ) = 0 has a solution for each ω in one
the space of discrete Whitney k-forms on K. Consider the lin- cohomology equivalence class. We know that the cochains forming
ear operator dk : Ωk (K) → Ωk+1 (K), such that dk+1 ◦dk = different cohomology groups are linearly independent, hence, we
0, and a discrete Hodge star which is represented as a sym- conclude that these harmonic cochains span Hk .
metric, positive definite matrix. Furthermore, define the codif-
ferential (the adjoint of the operator d) as done in Section 5.5; By virtue of the above lemma, the implementation of the Hodge
namely, let δ k+1 = (−1)n(k−1)+1 (?k )−1 (dk )t ?k+1 . In this decomposition is simply recursive in the rank of the form (i.e.,
case, the following orthogonal decomposition holds for all k: cochain). The case of 0-forms is trivial: fix one vertex to a con-
stant, and solve the Poisson equation for 0-forms. Now suppose
Ωk (K) = dΩk−1 (K) ⊕ δΩk+1 (K) ⊕ Hk (K) that we have a decomposition working for (k − 1)-forms, and we
look for the decomposition of k-forms. Our approach is to get the
where ⊕ means orthogonal sum, and Hk (K) is the space of harmonic component hk first, so that we only need to solve a Pois-
son equation for the rest:
harmonic k-forms on K, that is, Hk (K) = {h | ∆k h = 0}.
∆ω k = f k − hk (12)
Proof For notational convenience, we will omit the superscript of
the operators when the rank is obvious. We first prove that the three
component spaces are orthogonal. Clearly, using the facts that the One is left with the problem of finding a basis of harmonic forms.
Laplacian operator ∆ is equal to dδ+δd and that d and δ are adjoint Since we are given a Hodge star operator, we will use it to define
operators, one has that ∀h ∈ Hk : the metric on the space of cochains. This metric allows us to define
a basis for harmonic k-form (the dimension of this harmonic space
h∆h, hi = 0 ⇒ hdδh, hi + hδdh, hi = hdh, dhi + hδh, δhi = 0 is generally small, since it is the k-th Betti number βk ). First, one
needs to calculate the cohomology basis {Pi } based on the algo-
⇒ dh = 0 and δh = 0
rithm in Section 4.4.4. Once we have {Pi }, we solve one special
decomposition of (k-1)-forms by first computing the forms fi sat-
Also, for all α ∈ Ωk−1 (K) and β ∈ Ωk+1 (K), one has: isfying:
∆fi = −δPi (13)
hdα, δβi = hddα, βi = 0
Now H k = Pi + dfi gives us the forms in basis for harmonic k-
and form space. After normalization, we have the basis to calculate the
projection hk = HH t f k , where we assemble all H k into a matrix
hdα, hi = hα, δhi = 0 hh, δβi = hdh, βi = 0 H. This completes the procedure of calculating the decomposition.
A non-singular matrix is often preferable when it comes to solve
k−1 a linear system efficiently; we can change the Laplacian matrix
Now, any k-form that is perpendicular to dΩ (K) and slightly to make the Poisson equation satisfy this requirement. First,
δΩk+1 (K) must be in Hk (K), because this means dh = 0 and we can get an orthonormal basis for harmonic form space (the di-
δh = 0, so ∆h = dδh + δdh = 0. mension is β k ). Now for basis ej (column vector with j-th element
equal to 1, and 0 everywhere else), take the distance of ej to the har-
Alternatively, we can prove that:
monic space |ej − HH t ej |; notice that this can be done in constant
time. Now take out the j-th column and j-th row of ∆ if ej has the
Ωk (K) = ∆Ωk (K) ⊕ Hk (K). smallest distance from harmonic space, and repeat the step for β k
times. We are left with a non-singular matrix, and the solution to
By analogy to the previous argument, it is easy to show that ∆Ωk is the new linear system is a solution to the original Poisson equation.
orthogonal to Hk . Additionally, the dimension of these two spaces
sum up to the dimension of Ωk , which means the decomposition is
8 Others Applications
complete.
Note that the reader can find a similar proof given in Appendix B 8.1 Form-based Proof of Tutte’s Theorem
of [Frankel 2004], where it is used for Kirchhoff’s Circuit Laws.
There, Frankel does not mention that we can actually use cochains The notion of forms as convenient, intrinsic substitutes for vector
as the discretization of forms, and his operations using a “metric” fields has been used to provide a concise proof of the celebrated
of cochains can be interpreted as a Hodge star. Tutte’s Embedding Theorem. This important result in graph theory
59
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
states that if one fixes the boundary of a 3-connected graph (i.e., a a test charge q, and is equal to the electromotive force experienced
typical polygonal mesh) to a convex domain in the plane and en- by that charge. The electric displacement L as well as the current
sures that every non-boundary vertex is a strict convex combination density J are represented by 2-forms. The charge distribution ρ is
of its neighbors, then one obtains a planar straight-line embedding a 3-form. The magnetic field B is represented by a 2-form since it
of the graph. In other words, this embedding procedure will not is measured as a flux. whereas the magnetic field intensity H is a
result in fold-overs. A significantly shorter alternative to the orig- 1-form.
inal proof of this theorem was proposed by Gortler, Gotsman, and
Thurston [Gortler et al. 2006], using discrete 1-forms on edges. We With these conventions, Maxwell’s equations can be rewritten as
now present a sketch of their approach, using a formulation more in follows:
line with the terms we used in this paper.
∂t B + dE = 0, −∂t L + dH = J, dL = ρ, (14)
A Tutte embedding assigns to each vertex vi of a graph G some 2D
coordinates X(vi ) = (x(vi ), y(vi )). By definition, each interior subject to the constitutive equations:
vertex vi satisfies
P a linear condition on its coordinates of the form:
L = ²E, H = µB, (15)
X(vi ) = vj ∈N (i) wij X(vj ), where N (i) is the set of 1-ring
neighbors of vertex vi . These coefficients wij are all non-negative where ² is the permittivity, and µ is the permeability. The consti-
due to the condition of strict convex combination mentioned above. tutive relations (15) are very similar to the Hodge star operator that
Now, for a given Tutte embedding, one can construct a 0-form transforms a k-form to an (n-k)-form. Here, ² operates on the elec-
z(v) = αx(v)+βy(v) for any pair of positive coefficients α and β. tric field E (1-form) to yield the electric displacement L (2-form)
Notice that this 0-form
P satisfies the same convex combination con- while µ transforms the magnetic field B (2-form) into the magnetic
dition: z(vi ) = vj ∈N (i) wij z(vj ). As they are non negative, field intensity H (1-form). To this end, one may think of both ²
one can identify these coefficients wij with the diagonal Hodge and µ as Hodge star operators induced from appropriately chosen
star of primal 1-forms (see Section P 7) defined by a particular met- metrics. Note that the balance laws in (14) are metric-independent.
ric. Therefore, the relationship 0 = vj ∈N (i) wij (z(vj ) − z(vi ))
As the reader can guess, one can readily discretize this representa-
is equivalent to: d ? dz = 0. There are two immediate conclu- tion of the physical quantities E, L, . . . and the associated system of
sions: equations (14-15) using the tools presented in this chapter. The re-
¦ the 1-form ω = dz is closed (since it is the exterior derivative sulting numerical algorithms preserve exactly the geometric struc-
of a 0-form), and ture of the system [Bossavit 1998], even in the presence of charge
¦ it is also co-closed since δω = (?d?)dz = ?(d ? dz) = 0. and/or for irregular meshes [Stern et al. 2008].
To use the previously defined 1-form ω to prove Tutte’s theorem, 8.3 Fluids
Gortler et al. then invoke the usual definition of index of vector
fields, i.e., the number of revolutions that the direction of the vector The geometric structure of Fluid Mechanics, specifically Eu-
fields does along any small curve around this vertex. This concept is ler’s equations for inviscid fluids, has been investigated
one of the oldest in Algebraic Topology, initially stated by Poincaré (see [Marsden and Weinstein 1983] and references therein). In this
and then developed by Hopf and Morse in the continuous case. Its geometric framework, vorticity is represented as a two-form (an
discrete counterpart was first proposed by Banchoff, and used for area-form) and Euler’s equations can be written as vorticity advec-
instance in [Lazarus and Verroust 1999]. A discrete Poincare-Hopf tion. Roughly speaking, vorticity measures the rotation of a fluid
index theorem also holds, stating that the sum of all indices must parcel; we say the fluid parcel has vorticity when it spins as it moves
be equal to 2 for a genus-0 patch. The final argument uses the link along its path. Vorticity advection means that the vorticity (as a
between (co)closed forms and their indices. Indeed, because we two-form) moves dynamically as if it is pushed forward by the fluid
found a closed and coclosed form ω, it can be easily shown that flow. The integral of the vorticity on a given bounded domain is
these two properties induce that the index of each face must be less equal, by Stokes’ theorem, to the circulation around the loop en-
or equal to zero, as well as the index of each vertex. Because the closing the domain. This quantity, as the loop is advected by the
boundary of the patch is convex, only two vertices on the boundary fluid, is conserved in the absence of external forcing, as well as the
have index 1. Since all the indices must sum to 2 and each interior total energy of the fluid. Inspired by this geometric viewpoint and
index must be less than zero, we can conclude that each interior in light of the present development of Discrete Exterior Calculus,
index is zero. Because this argument is valid for every positive pair one can develop a discrete differential approach to fluid mechanics
(α, β), one can easily deduce that each interior face is convex and and an integration scheme that satisfy conservation of circulation,
each vertex is a “wheel”; thus, injectivity can be guaranteed. see [Elcott et al. 2007] for further details.
This rather elegant proof demonstrates how discrete forms and their 8.4 Developments in Geometry Processing
obvious links to Algebraic Topology can be quite powerful in a va-
riety of applications. We also point the interested reader to other Discrete forms, with their geometric nature we described up to
papers, such as [Mercat 2001; Gu and Yau 2003], for which special now, lend themselves naturally to geometric applications. From
discrete Hodge stars are defined to satisfy a discrete definition of the design of barycentric coordinates over arbitrary polytopes (see,
conformality: there are also very interesting research on this partic- e.g., [Warren et al. 2007]) usable as dual form basis, to the de-
ular topic, once again using the calculus of exterior forms. sign of smooth, higher-order Whitney forms [Wang et al. 2006],
discrete forms have been shown particularly relevant in several
8.2 Electromagnetism with Forms geometry processing tasks. Recent applications include point
set reconstruction [Alliez et al. 2007], Eulerian treatment of inter-
Electromagnetism can be formulated very elegantly using dif- faces [Mullen et al. 2007], as well as conformal parameterization
ferential forms. For a detailed exposition of the geomet- and its use for quadrangle meshing [Tong et al. 2006]—note the re-
ric structure in E&M, we refer the reader to [Bossavit 1998] cent non-linear version that offers a complete notion of conformal
and [Warnick et al. 1997]. In this approach, the electric field E is equivalence for triangle meshes [Springborn et al. 2008], including
represented by a 1-form as the integral of E along a path traced by a discrete metric.
60
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
B OBENKO , A., AND S EILER , R., Eds. 1999. Discrete Integrable H ILDEBRANDT, K., AND P OLTHIER , K. 2004. Anisotropic filter-
Geometry and Physics. Clarendon Press. ing of non-linear surface features. In Computer Graphics Forum,
M.-P. Cani and M. Slater, Eds., vol. 23. Proc. Eurographics 2004.
B OCHEV, P. B., AND H YMAN , J. M. 2005. Principles of mimetic
discretizations of differential operators. Preprint: LA-UR-05- H IRANI , A. N. 2003. Discrete Exterior Calculus. PhD thesis,
4244. Caltech.
B OSSAVIT, A. 1998. Computational Electromagnetism. Academic H YMAN , J. M., AND S HASHKOV, M. 1997. Natural Discretiza-
Press, Boston. tions for the Divergence, Gradient, and Curl. International Jour-
nal of Computers and Mathematics with Applications 33.
B URKE , W. L. 1985. Applied Differential Geometry. Cambridge
University Press. K ANSO , E., A RROYO , M., T ONG , Y., YAVARI , A., M ARSDEN ,
J. E., AND D ESBRUN , M. 2007. On the Geometric Character
C ARROLL , S. 2003. Spacetime and Geometry: An Introduction to of Continuum Mechanics. Z. angew. Math Phys. 58.
General Relativity. Pearson Education.
L AZARUS , F., AND V ERROUST, A. 1999. Level Set Diagrams of
C ARTAN , É. 1945. Les Systèmes Differentiels Exterieurs et leurs Polyhedral Objects. In Proceedings of the 5th ACM Symposium
Applications Géometriques. Hermann, Paris. on Solid Modeling and Applications, 130–140.
61
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
62
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Chapter 8:
Building Your Own DEC at Home
Sharif Elcott Peter Schröder
Caltech Caltech
1 Overview
face
menting them should note that the algorithms presume the exis-
tence of a suitable simplicial complex data structure. Such a data
structure needs to support local traversal of elements, adjacency in-
formation for all dimensions of simplices, a notion of a dual mesh,
and all simplices must be oriented. Unfortunately, most publicly
available tetrahedral mesh libraries provide only unoriented rep-
resentations with little more than vertex-tet adjacency information
(while we need vertex-edge, edge-triangle, edge-tet, etc.). For those
eager to implement and build on the algorithms presented in this
course without having to worry about these details, we provide an
implementation of a DEC-friendly tetrahedral mesh data structure
in C++. This chapter documents the ideas behind the implementa-
tion.
63
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
vertices. All our simplicial complexes will be proper three or two Note that all permutations of a given tuple refer to the same sim-
manifolds, possibly with boundary and may be of arbitrary topol- plex. For example, (i, j, k) and ( j, i, k) are different aliases for the
ogy (e.g., containing voids and tunnels). same triangle. In order to remove ambiguities, we must designate
one representative alias as the representation of the simplex in our
data structures. We do this by using the sorted permutation of the
Manifold The DEC operators that we build on are defined only tuple. Thus each simplex (tuple) is stored in our data structures as
on meshes which represent manifolds. Practically speaking this its canonical (sorted) representative. Then if we, for example, need
means that in a 3D simplicial complex all triangles must have two to check whether two simplices are in fact the same we only need
incident tets only (for a boundary triangle there is only one incident to compare their representatives element by element.
tet). Every edge must have a set of tets incident on it which form All this information is stored in lists we designate V, E, F, and T.
a single “ring” which is either open (at the boundary) or closed (in They contain one representative for every vertex, edge, triangle, and
the interior). Finally for vertices it must be true that all incident tets tet, respectively, in the mesh.
form a topological sphere (or hemisphere at the boundary). These
properties should be asserted upon reading the input. For example,
for triangles which bound tets one must assert that each such tri- 3.1 Forms
angle occurs in at most two tets. For an edge the “ring” property
of incident tets can be checked as follows. Start with one incident The objects of computation in an algorithm using DEC are forms.
tet and jump across a shared triangle to the next tet incident on the Formally, a differential k-form is a quantity that can be integrated
edge. If this walk leads back to the original tet and all tets incident over a k dimensional domain. For example, consider the expression
on the edge can thusly be visited, the edge passes the test. (For !
f (x)dx (x being a scalar). The integrand f (x)dx is called a 1-
boundary edges such a walk starts at one boundary tet and ends form, because it can!be! integrated over any 1-dimensional interval.
at another.) The test for vertices is more complex. Consider all Similarly, the dA in dA would be a 2-form.
tets incident on the given vertex. Using the tet/tet adjacency across
shared triangles one can build the adjacency graph of all such tets. Discrete differential forms are dealt with by storing the results of
This graph must be a topological sphere (or hemisphere if the vertex the integrals themselves, instead of the integrands. That is, discrete
is on the boundary). k-forms associate one value with each k-simplex, representing the
integral of the form over that simplex. With this representation we
Since we need everything to be properly oriented we will only allow can recover the integral over any k-dimensional chain (the union of
orientable manifolds (i.e., no Möbius strips or Klein bottles). some number of k-simplices) by summing the value on each sim-
plex (using the linearity of the integral).
Since all we have to do is to associate one value with each simplex,
Regularity To make life easier on ourselves we also require the
for our purposes forms are simply vectors of real numbers where
simplicial complex to be strongly regular. This means that sim-
the size of the vector is determined by the number of simplices of
plices must not have identifications on their boundaries. For ex-
the appropriate dimension. 0-forms are vectors of size |V|, 1-forms
ample, edges are not allowed to begin and end in the same vertex.
are vectors of size |E|, 2-forms are vectors of size |F|, and 3-forms
Similarly, the edges bounding a triangle must not be identified nor
are vectors of size |T|. Such a vector representation requires that we
do we allow edges or triangles bounding a tet to be identified. In
assign an index to each simplex. We use the position of a simplex in
practice this is rarely an issue since the underlying geometry would
its respective list (V, E, F, or T) as its index into the form vectors.
need to be quite contorted for this to occur. Strictly speaking though
such identifications are possible in more general, abstract settings
without violating the manifold property. 3.2 Orientation
64
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Hence every tuple must be given a sign indicating whether it agrees and they map simplices to their cofaces—neighbor simplices of one
(+) or disagrees (−) with the intrinsic orientation of the simplex. higher dimension. For example, (∂ 2 )T maps an edge to the “pin-
Given a set of integers representing a simplex, there are two equiv- wheel” of triangles incident on that edge.
alence classes of orderings of the given tuple: the even and odd
permutations of the integers in question. These two equivalence
classes correspond to the two possible orientations of the simplex
(see Fig. 2).
Note that assigning a sign to any one alias (i.e., the representative)
implicitly assigns a sign to all other aliases. Let us assume for a
moment that the sign of all representatives is known. Then the sign Figure 3: The boundary operator identifies the faces of a simplex
S of an arbitrary tuple t, with representative r, is as well as their relative orientations. In this illustration, arrows
" indicate intrinsic orientations and signs indicate the relative orien-
S(r) if t is in the same equivalence class as r tation of a face to a parent.
S(t) =
−S(r) if t is in the opposite equivalence class.
More formally, let P be the permutation that permutes t into r (i.e., These matrices allow us to iterate over the faces or cofaces of any
r = P(t)). Then simplex, by walking down the columns or across the rows, respec-
S(t) = S(P)S(P(t)). tively. In order to traverse neighbors that are more than one dimen-
sion removed (i.e., the tets adjacent to an edge or the faces adjacent
(Here S(P) denotes the sign of the permutation P with +1 for even to a vertex) we simply concatenate the appropriate matrices, but
and −1 for odd permutations.) without the signs. (If we kept the signs in the matrix multiplication
any such consecutive product would simply return the zero matrix
All that remains, then, is to choose an intrinsic orientation for each
reflecting the fact that the boundary of a boundary is always empty.)
simplex and set the sign of the representative alias accordingly. In
general the assignment of orientations is arbitrary, as long as it is
consistent. For all subsimplices we choose the representative to be 5 Construction
positively oriented, so that the right-hand-side of the above expres-
sion reduces to S(P). For top-level simplices (tets in 3D, triangles Although we still need a few auxiliary wrapper and iterator data
in 2D), we use the convention that a positive volume corresponds to structures to provide an interface to the mesh elements, the simplex
a positively oriented simplex. We therefore require a volume form lists and boundary matrices contain the entirety of the topological
which, together with an assignment of points to vertices, will allow data of the mesh. All that remains, then, is to fill in this data.
us to orient all tets. Recall that a volume form accepts three (for 3D;
two for 2D) vectors and returns either a positive or negative num- We read in our mesh as a list of (x, y, z) vertex positions and a list of
ber (assuming the vectors are linearly independent). So the sign of 4-tuples specifying the tets. Reading the mesh in this format elimi-
a 4-tuple is: nates the possibility of many non-manifold scenarios; for example,
there cannot be an isolated edge that does not belong to a tet. We
S(i0 , i1 , i2 , i3 ) = S(Vol(pi1 − pi0 , pi2 − pi0 , pi3 − pi0 )). assume that all integers in the range [0, n) appear at least once in
the tet list (this eliminates isolated vertices), and no integer outside
4 The Boundary Operator of this range is present.
The faces of a k-simplex are the (k − 1)-simplices that are incident
on it, i.e., the subset of one lower dimension. Every k-simplex has Once T is read in, building E and F is trivial; for each tuple in T,
k + 1 faces. Each face corresponds to removing one integer from append all subsets of size 2 and 3 to E and F respectively. We must
the tuple, and the relative orientation of the face is (−1)i where i is be sure to avoid duplicates, either by using a unique associative
the index of the integer that was removed. To clarify: container, or by sorting the list afterward and removing duplicates.
Then the boundary operator matrices are constructed as follows:
• The faces of a tet +(t0 ,t1 ,t2 ,t3 ) are −(t0 ,t1 ,t2 ), +(t0 ,t1 ,t3 ),
−(t0 ,t2 ,t3 ), and +(t1 ,t2 ,t3 ).
• The faces of a triangle +( f0 , f1 , f2 ) are +( f0 , f1 ), −( f0 , f2 ), and for each simplex s
+( f1 , f2 ). construct a tuple for each face f of s
as described in Section 4
• The faces of an edge +(e0 , e1 ) are −(e0 ) and +(e1 ). determine the index i of f by locating
We can now define the boundary operator ∂ which maps simplices its representative
to their their faces. Given the set of tets T we define ∂ 3 : T → F4 as set the entry of the appropriate matrix
at row i, column s to S( f )
∂ 3 (+(i0 , i1 , i2 , i3 )) = {−(i0 , i1 , i2 ), +(i0 , i1 , i3 ),
−(i0 , i2 , i3 ), +(i1 , i2 , i3 )}. Figure 4 shows a complete example of a mesh and its associated
data structure.
Similarly for ∂ 2 : F → E3 (which maps each triangle to its three
edges) and ∂ 1 : E → V2 (which maps each edge to its two vertices).
We represent these operators as sparse adjacency matrices (or, 6 DEC Operators
equivalently, signed adjacency lists), containing elements of type
+1 and −1 only. So ∂ 3 is implemented as a matrix of size |F| × |T|
with 4 non-zero elements per column, ∂ 2 an |E| × |F| matrix with Now we discuss the implementation of the two most commonly
3 non-zero elements per column, and ∂ 1 a |V| × |E| matrix with 2 used DEC operators: the exterior derivative and the Hodge star.
non-zero elements per column (one +1 and one −1). The trans- As we will see, in the end these also amount to nothing more than
poses of these matrices are known as the coboundary operators, sparse matrices that can be applied to our form vectors.
65
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
2
We can restate the general form of the theorem for our discrete
1 6 7
2 6 forms as
2
dωσ = ∑ ωs
3 4
3 0
0 4 8
3 1 5 s∈∂ σ
4
0 5
1 Written this way, it is easy to see that this can be implemented as
V E F T the multiplication of a form vector by the coboundary matrix ∂ T .
[0] [0, 1] [0, 1, 2] [0, 1, 2, 3]
[1] [0, 2] [0, 1, 3] [1, 2, 3, 4]
−1
1 [2] [0, 3] [0, 2, 3] 6.2 The Dual Mesh and the Hodge Star
[3] [1, 2] [1, 2, 3]
−1
3
∂ = 1
−1 [4] [1, 3] [1, 2, 4] Every complex has a dual. The dual of a simplicial complex is a cell
1 [1, 4] [1, 3, 4] complex where primal k-simplices correspond to dual (n − k)-cells.
−1 [2, 3] [2, 3, 4] So in our case there are |V| dual polyhedra, |E| dual polygons, |F|
1 [2, 4] dual edges, and |T| dual vertices, corresponding to primal vertices,
[3, 4] edges, triangles, and tetrahedra, respectively (see Fig. 5). Note that,
since every dual cell is co-located with a primal simplex and the
1 1
−1 1 cardinality is the same, in the code there is no explicit representa-
−1 −1 tion for the dual mesh. Where appropriate, dual cells are queried
1
1 1
through the corresponding primal simplex index.
∂2 =
1 −1 1
−1 −1
1 1 1
1 −1
1 1
−1 −1 −1
1 −1 −1 −1
∂1 = 1 1 −1 −1
1 1 1 −1
1 1 1
Figure 4: A simple mesh and all associated data structures. Figure 5: There is one dual polyhedron for every primal vertex, one
6.1 Exterior Derivative dual polygon for every primal edge, one dual edge for every primal
triangle, and one dual vertex for every primal tetrahedron.
As we have seen earlier in the course, the discrete exterior derivative The operator that transforms a primal k-form into a dual (n − k)-
is defined using Stokes’ theorem such that form is known as the Hodge star. There are many different kinds
) ) of Hodge stars, the simplest of which is the diagonal Hodge star.
dω = ω
σ ∂σ We again attempt to motivate the definition with some intuition.
where ω is a k-form, and σ is a (k + 1)-simplex. In words, this When transferring a quantity from a primal simplex to a dual cell,
equation states that the evaluation of dω on a simplex is equal to the quantities must “agree” somehow. Since these are integral val-
the evaluation of ω on the boundary of that simplex. ues, simply setting the value on the dual to be equal to the value
on the primal does not make sense, as the domain of integration is
Let us try to understand this theorem with a few examples. Consider unrelated. Instead, we require that the integral density be equal. So,
a 0-form f , i.e., a function giving values at vertices. With that, d f is if ω denotes the evaluation of a form on a primal k-simplex σ , then
a 1-form which can be integrated along an edge (say with endpoints !ω is the value on the dual (n − k)-cell σ̃ such that
denoted a and b) and Stokes’ theorem states the well known fact
) ω !ω
=
d f = f (b) − f (a). Vol(σ ) Vol(σ̃ )
[a,b]
The right hand side is simply the evaluation of the 0-form f on the allowing us to define ! as
boundary of the edge (i.e., its endpoints), with appropriate signs
indicating the orientation of the edge. Vol(dual)
!= .
Vol(primal)
What about triangles? If f is a 1-form (one value per edge), then
d f is a 2-form that can be evaluated on a triangle abc as In effect the diagonal Hodge star requires that the averages of the
) ) integrand over the respective domains agree.
df = f
∆abc ∂ (∆abc) This is represented as a diagonal matrix so that, again, applica-
) ) )
tion of the operator becomes a simple matrix-vector multiplication.
= f+ f+ f
[a,b] [b,c] [c,a] Note that when transforming quantities from the dual to the primal,
= fab + fbc + fca the inverse of this matrix is used. Since the matrix is diagonal we
only store the diagonal entries. There are as many of these as there
using the subscript notation from Section 3.2. Again, the right hand are simplices of the appropriate dimension. Consequently the diag-
side is simply the evaluation of the 1-form f on the boundary of the onal Hodge star can be represented with vectors of length |V|, |E|,
triangle—its three edges. |F|, and |T| respectively.
66
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
// Dual polygons
for each primal edge e
for each primal triangle fe incident on e
b ← fe .dualVolume
h ← ||C(e) −C( fe )||
e.dualVolume ← e.dualVolume + 21 bh
// Dual polyhedra
for each primal vertex v
for each primal edge ev incident on v
b ← ev .dualVolume
h ← ||C(v) −C(ev )||
v.dualVolume ← v.dualVolume + 13 bh
Note that, even when dealing with the geometry of the mesh, this
part of the implementation still generalizes trivially to arbitrary di-
mension.
1 Circumcentric duals may only be used if the mesh satisfies the Delau-
nay criterion. If it does not, a barycentric dual mesh may be used. However,
care must be taken if a barycentric dual mesh is used, as dual edges are no
longer straight lines (they are piecewise linear), dual faces are no longer
planar, and dual cells are no longer necessarily convex.
67
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Chapter 9:
Stable, Circulation-Preserving, Simplicial Fluids
Sharif Elcott, Yiying Tong∗, Eva Kanso†, Peter Schröder, Mathieu Desbrun
Caltech
Figure 1: Discrete Fluids: we present a novel geometric integration scheme for fluids applicable to tetrahedral meshes of arbitrary domains.
Aside from resolving the boundaries precisely, our approach also provides an accurate treatment of vorticity through a discrete preservation
of Kelvin’s circulation theorem. Here, a hot smoke cloud rises inside a bunny shaped domain of 7K vertices (32K tetrahedra—equivalent
complexity of a 193 regular grid), significantly reducing the computational cost of the simulation for such an intricate boundary compared to
regular grid-based techniques (0.47s/frame on a Pentium 4, 3GHz).
68
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
69
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
70
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
faces, reminiscent of Finite Volume methods (see also [Nicolaides the velocity field. The fundamental idea of our geometric integra-
and Wu 1997] for a similar setup for Div-Curl equations). tion algorithm is thus to ensure that Kelvin’s theorem holds in the
discrete setting: the circulation around any loop in the fluid remains
Velocity as Discrete Flux To encode a coordinate free (intrinsic) constant as the loop is advected. This can be achieved by backtrack-
representation of velocity on the mesh we use flux, i.e., the mass of ing loops: for any given loop at the current time, determine its back-
fluid transported across a given surface area per unit time. Note that tracked image in the velocity field (“where did it come from?”) and
this makes flux an integrated, not pointwise, quantity. On the dis- compute the circulation around the backtracked loop. This value
crete mesh, fluxes are associated with the triangles of the tet mesh. is then assigned as the circulation around the original loop at the
Thus fluid velocity u is treated as a 2-form and represented as a present time, i.e., circulation is properly advected by construction
vector U of scalar values on faces (size |F|). This coordinate-free (see Figure 5 for a depiction of this loop advection idea).
point of view, also used in [Feldman et al. 2005], is reminiscent of
the staggered grid method used in [Fedkiw et al. 2001] and other Since we store vorticity on primal edges, a natural choice for these
non-collocated grid techniques (see [Goktekin et al. 2004]). In the loops are the bounding loops of the dual faces associated to each
staggered grid approach one does not store the x, y, z components of primal edge (see Figure 3). Notice that these loops are polylines
a vector at nodes but rather associates them with the corresponding formed by sequences of dual vertices around a given primal edge.
grid faces. We may therefore think of the idea of storing fluxes on Consequently an efficient implementation of this idea requires only
the triangles of our tet mesh as a way of extending the idea of stag- that we backtrack dual vertices in the velocity field (the same
gered grids to the more general simplical mesh setting. This was way primal vertices are backtracked in the traditional Stable Flu-
previously exploited in [Bossavit and Kettunen 1999] in the context ids method). Once these positions are known all backtracked dual
of E&M computations. It also makes the usual no-transfer bound- loops associated to primal edges are known. These Voronoi loops
ary conditions easy to encode: boundary faces experience no flux can indeed generate any discrete, dual loop: the sum of adjacent
across them. Encoding this boundary condition for velocity vectors loops is a larger, outer loop as the interior edges cancel out due to
stored at vertices is far more cumbersome. opposite orientation as sketched in Fig. 5(right). The evaluation of
circulation around these backtracked loops will be quite straight-
Divergence as Net Flux on Tets Given the incompressibility of the forward. Invoking Stokes’ theorem, the integral of vorticity over
fluid, the velocity field must be divergence-free (∇ · u = 0). In the a dual face equals the circulation around its boundary. With this
discrete setting, the integral of the divergence over a tet becomes observation we can achieve our goal of updating vorticities and, by
particularly simple. According to the generalized Stokes’ theorem design, ensured a discrete version of Kelvin’s theorem. The algo-
this integral equals the sum of the fluxes on all four faces: the dis- rithmic details of this simple geometric approach to time integration
crete notion of divergence is therefore simply the net flux for each of the equations of motion for fluids will be given in Section 4.
tet. Divergence can therefore be stored as a 3-form, i.e., as a value
associated to each tet (a vector of cardinality |T |). The notion of
incompressibility becomes particularly intuitive: whatever gets in
each tet must be compensated by whatever comes out (see Fig. 4).
Figure 4: Discrete Physical Quantities: in our geometric discretiza- Figure 5: Kelvin’s Theorem: (left) in the continuous setting, the cir-
tion, fluid flux lives on faces (left), divergence lives on tets (middle), culation on any loop being advected by the flow is constant. (mid-
and vorticity lives on edges (right). dle) our discrete integration scheme enforces this property on each
Voronoi loop, (right) thus on any discrete loop.
Vorticity as Flux Spin Finally we need to define vorticity on the
mesh. To see the physical intuition behind our definition, consider 3 Computational Machinery
an edge in the mesh. It has a number of faces incident on it, akin to a Now that we have described our choices of spatial and physical dis-
paddle wheel (see Figure 4, right). The flux on each face contributes cretizations, along with a way to use them to integrate the fluid’s
a torque to the edge. The sum of all these, when going around an motion, we must manipulate the numerics involved in a principled
edge, is the net torque that would “spin” the edge. We can thus give manner to guarantee proper physical behavior. In this section, we
a physical definition of vorticity as a weighted sum of fluxes on all point out that the intuitive definition of our physical quantities liv-
faces incident to a given edge. This quantity is now associated with ing at the different simplices of a mesh can be made precise through
primal edges—or, equivalently, dual faces—and is thus represented the definition of a discrete differential structure. Consequently, the
by a vector Ω of size |E|. Note that we will talk about discrete basic operators to go from fluxes to the divergence, curl, or Lapla-
vorticity from now on to mean “area integral of the vorticity vector cian of the velocity field can be formally defined through the use of
field”, or equivalently, “integral of the vorticity seen as a 2-form”. discrete differential forms. We will mostly focus on presenting the
practical implementation of the few operators we need; more im-
In Section 3, we will see that these physical intuitions can be for- portantly, we will show that this implementation reduces to simple
mally derived from simple algebraic relationships. linear algebra with very sparse matrices.
2.3 Geometric Integration of Fluid Motion 3.1 Discrete Differential Structure
Since we are using the vorticity formulation of the fluid equations Integrals and Forms In Section 2.2, we have opted for manip-
(Eqs. (2) or (5)) the time integration algorithm must update the dis- ulating the physical quantities in the form of a line, surface, and
crete vorticity variables which are stored on each primal edge. We volume integral computed directly on our meshed domain to ren-
have seen that the fluid equations state that vorticity is advected by der the setup entirely intrinsic, i.e., with no need for vector fields
71
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
to be stored with respect to arbitrary coordinate frames. Such an −1 for the end points of the given edge (and zero otherwise). The
integral represents the evaluation of a mathematical entity called sign is determined from the orientation of the edge. Similarly, the
a differential form. In the continuous three-dimensional setting, a second matrix d1 is the transpose of the incidence matrix of edges
0-form is simply a function on that 3D space. A 1-form, or line- and faces (|E| rows and |F| columns), with appropriate +1 and −1
form, is a quantity that can be evaluated through integration over a entries according to the orientation of edges as one moves around a
curve. Thus a 1-form can be thought of as a proxy for a vector field, face. More generally dk is the transpose of the incidence matrix of
and its integral over a curve becomes the circulation of this vector k-cells on k + 1-cells. A simple debugging sanity check (necessary
field. A 2-form, or area-form, is to be integrated over a surface, but not sufficient) is to compute consecutive products: d0 followed
that is, it can be viewed as a proxy for a vector perpendicular to by d1 must be a matrix of zeros; d1 followed by d2 must similarly
that surface (and its evaluation becomes the flux of that vector field give a zero matrix. This reflects the fact that the boundary of any
through the surface); finally, a 3-form, or volume-form, is to be in- boundary is the empty set. It also corresponds to the calculus prop-
tegrated over a volume and can be viewed as a proxy for a function. erty that curl of grad is zero as is divergence of curl (see [Desbrun
Classic calculus and vector calculus can then be substituted with et al. 2006]).
a special calculus involving only differential forms, called exterior
calculus—the basis of Hodge theory and modern differential geom- Hodge Star The second operator we need will allow us to transfer
etry (for a comprehensive discussion, see, for example, [Abraham quantities back and forth between the primal and dual mesh. We can
et al. 1988]). project a primal k-form to a conceptually-equivalent dual (3 − k)-
form with the Hodge star. We will denote ?0 (resp., ?1 , ?2 , ?3 ) the
Discrete Forms and Their Representation However, in our Hodge star taking a 0-form (resp., 1-form, 2-form, and 3-form)
framework, the continuous domain is replaced (or approximated) to a dual 3-form (resp., dual 2-form, dual 1-form, dual 0-form).
by a mesh, the only structure we can work with. Therefore, the In this paper we will use what is known as the diagonal Hodge
integrated physical values we store on the mesh corresponds to dis- star [Bossavit 1998] as it offers an acceptable approximation at
crete differential k-forms [Desbrun et al. 2006]. A discrete differ- very little computational cost. This operator simply scales what-
ential k-form, k = 0, 1, 2, or 3, is the evaluation (i.e., the integral) ever quantity that is stored on mesh cells by the volumes of the
of the differential k-form on all k-cells, or k-simplices. In practice, corresponding dual and primal cells: let vol(.) denote the volume
discrete k-forms can simply be considered as vectors of numbers as- of a cell (i.e., 1 for vertices, length for edges, area for triangles, and
sociated to the simplices they live on: 0-forms live on vertices, and volume for tetrahedra), then
are expressed as a vector of length |V |; correspondingly, 1-forms
live on edges (length |E|), 2-forms live on faces (length |F|), and (?k )ii = vol(σ̃i )/ vol(σi )
3-forms live on tetrahedra (length |T |). Dual forms, i.e., forms that
we will evaluate on the dual mesh, are treated similarly. The reader
where σi is any primal k-simplex, and σ̃i is its dual (all other terms,
should now realize that in our discretization of physical quantities,
off the diagonal, are zero). These linear operators, describing the lo-
the notion of flux that we described is thus a primal 2-form (inte-
cal metric, are diagonal and can be stored as vectors. Conveniently,
grated over faces), while its vorticity is a dual 2-form (integrated
the inverse matrices going from dual to primal quantities are trivial
over dual faces), and its divergence becomes a primal 3-form (inte-
to compute for this diagonal Hodge star.
grated over tetrahedra).
Discrete Differential Calculus on Simplicial Meshes These dis- Overloading Operators Note that both the dk and the ?k operators
crete forms can now be used to build the tools of calculus through are typed: the subscript k is implicitly determined by the cardinal-
Discrete Exterior Calculus (DEC), a coherent calculus mimicking ity of the argument. For example, the velocity field u is a 2-form
the continuous setting that only uses discrete combinatorial and ge- stored as a vector U of cardinality |F|. Consequently the expression
ometric operations [Munkres 1984; Hirani 2003]. At the core of its dU implies use of the |T | × |F|-sized matrix d2 . In the implemen-
construction is the definition of a discrete d operator (analog of the tation this is accomplished with operator overloading (in the sense
continuous exterior derivative), and a discrete Hodge star, which of C++). We will take advantage of this in the paper from now on
will allow us to move values from the primal mesh to the dual mesh and drop the dimension subscripts.
and vice-versa. For a more comprehensive introduction to DEC and
the use of discrete differential forms, we refer the interested reader 3.3 Offline Matrix Setup
to [Desbrun et al. 2006] and [Bochev and Hyman 2006].
With these overloads of d and ? in place, we can now set up the only
3.2 Two Basic Operators two matrices (C and L) that will be used during simulation. They
respectively represent the discrete analogs of the curl and Laplace
The computations involved in our approach only require the defi- operators [Desbrun et al. 2006].
nition of two basic operators: one is the exterior derivative d, nec-
essary to compute derivatives, like gradients, divergences, or curls; Curl Since we store fluxes on faces and gather them in a vector
the other is the Hodge star, to transfer values from primal simplices U, the circulation of the vector field u can be derived as values
to dual simplices. on dual edges through ?U. Vorticity, typically thought of as a 2-
form in fluid mechanics [Marsden and Wenstein 1983], is easily
Exterior Derivative d Given an oriented mesh, we implement our computed by then summing this circulation along the dual edges
first operator by simply assembling the incidence matrices of the that form the boundary of a dual face. In other words, ω = ∇ × u
mesh. These will act on the vectors of our discrete forms and im- becomes, in terms of our discrete operators, simply Ω = d T ?U. We
plement the discrete exterior derivative operator d as explained in therefore create a matrix C = d T ? offline, i.e., the composition of
more details in Appendix A. For our 3D implementation, there are an incidence matrix with a diagonal matrix.
three sparse matrices involved, which contain only entries of type
0, +1, and −1. Care is required in assembling these incidence ma- Laplacian The last matrix we need to define (to handle viscous
trices, as the orientation must be taken into account in a consistent fluids) is the discrete Laplacian. The discrete analog of ∆φφ = (∇∇·
manner [Elcott and Schröder 2006]. The first one is d0 , the trans- − ∇×∇×)φφ = ω is simply (?d?−1 d T ?+d T ?d) Φ = Ω as explained
pose of the incidence matrix of vertices and edges (|V | rows and in Appendix B. This last matrix, a direct composition of incidence
|E| columns). Each row of the transpose contains a single +1 and and diagonal matrices, is precomputed and stored as L for later use.
72
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
4 Implementation each face, we can directly add the forces to the domain by incre-
menting Ω by the circulation of F over the time step h, i.e.:
To facilitate a direct implementation of our integration scheme, we
provide pseudocode in Figure 6. A series of implementation details Ω ← Ω + h C F.
follow, providing comments on specific steps and how these relate
to the machinery developed in earlier sections.
4.3 Adding Diffusion
//Load mesh and build incidence matrices
C ← dT ? If we desire to simulate a viscous fluid, we must add the diffusion
L ← ?d?−1 d T ? +d T ? d term present in Eq. (5). Note that previous methods were sometimes
omitting this term because their numerical dissipation was already
//Time stepping h
creating (uncontrolled) diffusion. In our case, however, this diffu-
loop
//Advect Vorticities
sion needs to be properly handled if viscosity is desired. This is eas-
for each dual vertex (tet circumcenter) ci ily done through an unconditionally-stable implicit integration as
ĉi ← PathTraceBackwards(ci ); done in Stable Fluids (i.e., we also use a fractional step approach).
vi ← InterpolateVelocityField(ĉi ); Using the discrete Laplacian (given in Appendix B, Eq. (8)) and the
for each dual face f current vorticity Ω, we simply solve for the diffused vorticity Ω0
Ωf ← 0 using the following linear system:
for each dual edge (i, j) on the boundary of f
Ω f ← Ω f + 21 (vi + v j ) · (ĉi − ĉ j ); (? − νhL) ?−1 Ω0 = Ω.
//Add forces
Ω ← Ω+hC F 4.4 Interpolation of Velocity
//Add diffusion for Navier-Stockes In order to perform the backtracking of dual vertices we must first
Ψ ← SolveCG( (? − ν h L)Ψ = Ω ); define a velocity field over the entire domain using the data we have
Ω←?Ψ on primal faces (fluxes). This can be done by computing a unique
velocity vector for each dual vertex and then using barycentric in-
//Convert vorticities back to fluxes
terpolation of these vectors over each dual Voronoi cell [Warren
Φ ← SolveCG( L Φ = Ω );
U ← dΦ;
et al. 2007], defining a continuous velocity field over the entire do-
main. This velocity field can be used to backtrack dual vertices as
well as transport particles or dyes (e.g., for visualization purposes)
Figure 6: Pseudocode of our fluid motion integrator (SolveCG calls with standard methods.
a linear solver, typically based on the Conjugate Gradient method).
To see that such a vector, one for each dual vertex, is well defined
4.1 Converting Vorticities back to Fluxes consider the following argument. The flux on a face corresponds
under duality (via the Hodge star) to a circulation along the dual
After we update the vorticity on each dual Voronoi face of the do- edge of this face. Now, there is a linear relation between fluxes per
main through semi-Lagrangian backtracing and resampling via in- tetrahedra due to the incompressibility condition (fluxes must sum
tegration, the resulting vorticity field needs to be converted back to to zero). This translates directly to a linear condition on the four
a velocity field that the next time step will utilize to backtrack vor- circulations at each tetrahedra too. Thus, there is a unique vector
ticity once again. Since the vorticities Ω are related to the fluxes (with three components) at the dual vertex whose projection along
U through Ω = d T ? U, we can directly solve for the fluxes via a the dual edges is consistent with the observed circulations.
Poisson equation as explained in detail in Appendix B. The linear
system involved being sparse and symmetric, a Conjugate Gradient Relation to k-form Basis Functions The standard method to in-
is recommended for efficiency. Note that a thresholding of the vor- terpolate k-form data in a piecewise linear fashion over simplicial
ticity values stored on each dual face can be also performed during complexes is based on Whitney forms [Bossavit 1998]. In the case
this step to offer a simple way to control any excessive amount of of primal 2-forms (fluxes) this results in a piecewise constant (per
vorticity in the flow (due to exaggerated user-added external forces, tetrahedra) velocity field. Our argument above, using a Voronoi cell
for instance). based generalized barycentric interpolation of dual 1-forms (circu-
lation), in fact extends the Whitney form machinery to the dual set-
4.2 External Body Forces ting. This is a novel contribution, recently exploited in [Klingner
et al. 2006], which may be useful as well in other computational ap-
The use of external body forces, like buoyancy, gravity, or stirring, plications of discrete forms. We note that the generalized barycen-
is common practice to create interesting motions. Incorporating tric coordinates have linear accuracy [Warren et al. 2007], an im-
external forces into Eq. (4) is straightforward, resulting in: portant requirement in many settings.
∂u 4.5 Handling Boundaries
+ u · ∇u = −∇p + ν∆u + f .
∂t
The algorithm as described above does not constrain the bound-
Again, taking the curl of this equation allows us to recast this equa- aries, thus achieving “open” boundary conditions. No-transfer
tion in terms of vorticity: boundary conditions are easily imposed by setting the fluxes
through the boundary triangles to zero. Non-zero flux boundary
ω
∂ω conditions (i.e., forced fluxes through the boundary as in the case of
+ Luω = ν∆ω
ω +∇×f . (6) Fig. 7) are more subtle. First, remark that all these boundary fluxes
∂t
must sum to zero; otherwise, we would have little chance of getting
Thus, we note that an external force influences the vorticity only a divergence-free fluid in the domain. Since the total divergence
through the force’s curl (the ∇ · f term is compensated for by the is zero, there exists a harmonic velocity field satisfying exactly
pressure term keeping the fluid divergence-free). Thus, if we ex- these conditions. This is a consequence of the Helmholtz-Hodge
press our forces through the vector F of their resulting fluxes in decomposition theorem with normal boundary conditions [Chorin
73
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
and Marsden 1979]. Thus, this harmonic part h can be computed obstacle in a fluid flow at high Reynolds number (Re= 15, 000),
once and for all through a Poisson equation using the same setup as shows good numerical agreement with high-resolution simulations
described in Appendix B. This precomputed velocity field allows us obtained in [Shiels and Leonard 2001] using millions of vortex par-
to deal very elegantly with these boundary conditions: we simply ticles.
perform the same algorithm as we described by setting all boundary
conditions to zero (with the exception of backtracking which takes The behavior of vortex interactions observed in existing experimen-
the precomputed velocity into account), and reinject the harmonic tal results was also compared to numerical results based on our
part at the end of each time step (i.e., add h to the current velocity novel model and those obtained from the semi-Lagrangian advec-
field). tion method. It is known from theory that two like-signed vortices
with a finite vorticity core will merge when their distance of sepa-
Viscous Fluids near Boundaries The Voronoi cells at the bound- ration is smaller than some critical value. This behavior is captured
aries are slightly different from the usual, interior ones, since by the experimental data and shown in the first series of snapshots
boundary vertices do not have a full 1-ring of tetrahedra. In the of Fig. 9. As the next row of snapshots indicates, the numerical
case of NS equations, this has no significant consequence: we set results that our model generated present striking similarities to the
the velocity on the boundary to zero, resulting also in a zero circu- experimental data. In the last row, we see that a traditional semi-
lation on the dual edges on the boundary. The rest of the algorithm Lagrangian advection followed by re-projection misses most of the
can be used as is. fine structures of this phenomenon. This can be attributed to the
loss of total integral vorticity as evidenced in the graph on the side;
Inviscid Fluids near Boundaries For Euler equations, however, in comparison our technique preserves this integral exactly.
the tangential velocity at the boundary is not explicitly stored any-
where. Consequently, the boundary Voronoi faces need an addi- (a)
tional variable to remedy this lack of information. We store in these
dual faces the current integral vorticity. From this additional infor-
mation given at time t = 0, we can deduce at each later time step the
missing circulation on the boundary: since the circulation over the
inside dual edges is known, and since the total integral must sum to
the vorticity (Stokes’ theorem), a simple substraction is all that is (b)
needed to update this missing circulation.
2.0
on it to compute the harmonic part; this purely harmonic part of 1.8
the velocity field is then systematically added back to the velocity 1.6
1.4
field computed by our algorithm. This procedure serves two pur-
1.2
poses: first, we now automatically enforce the discrete equivalent 1.0
of Kelvin’s theorem on any (shrinkable or non-shrinkable) loop; 0.8 (c)
second, arbitrary topologies are accurately and efficiently handled. 0.6
0.4
If external forces f are added, the purely harmonic part of the veloc- 0 20 40 60 80 100
ity field may change. We thus need to project these external forces time (seconds)
onto the comology bases once again to extract the harmonic part: Figure 9: Two Merging Vortices: (left) discrete fluid
this part of the forces (times dt) is then added to the purely har- simulations are compared with a real life experiment
monic vector field, to be reinjected to the velocity field at each time (courtesy of Dr. Trieling, Eindhoven University; see
step as usual. http://www.fluid.tue.nl/WDY/vort/index.html) where
two vortices (colored in red and green) merge slowly due to their
5 Results and Discussion interaction (a); while our method faithfully captures the merging
We have tested our method on some of the usual “obstacle courses” phenomenon (b), a traditional semi-lagrangian scheme does not
in CFD. We start with the widely studied example of a flow past a capture the correct motion because of vorticity damping (even with
disk (see Fig. 7). If initiated with zero vorticity, it is well known smaller time steps, because the more bactracking steps, the larger
that in the case of an inviscid fluid, the flow remains irrotational for the energy loss) (c). (right) the integral vorticity of both simulation
all times. By construction, our method does respect this physical techniques are shown on a graph.
behavior since circulation is preserved for the Euler equations. We We have also considered the flow on curved surfaces in 3D with
then increase the viscosity of the fluid incrementally, and observe complex topology, as depicted in Fig. 11. We were able to easily
the formation of a vortex wake behind the obstacle, in agreement extend our implementation of two-dimensional flows to this curved
with physical experiments. As evidenced by the vorticity plots, case thanks to the intrinsic nature of our approach.
vortices are shed from the boundary layer as a result of the ad-
herence of the fluid to the obstacle, thanks to our proper treatment We also consider a smoke cloud surrounded by air, filling the body
of the boundary conditions. A second test, now with a rotating of a bunny as an example of flow in a domain with complex bound-
74
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Figure 7: Obstacle Course 1: in the usual experiment of a flow (going left to right) passing around a disk, the viscosity as well as the velocity
can significantly affect the flow appearance; (top) our simulation results for increasing viscosity and same left-border boundary flux; the
vorticity magnitude (shown in false colors) is shown; (bottom) same frames, where color dye has been passively advected with the flow for
visualization purposes. Notice the usual irrotational flow (leftmost) for zero viscosity, and the von Karman vortex street when viscosity is
introduced.
Figure 8: Obstacle Course 2: Comparison with a very-high resolution viscous vortex particle method for the flow over an oscillating
cylinder at high Reynolds number (Re= 15, 000). The top row of images are color vorticity plots from [Shiels and Leonard 2001] (used with
permission), while the bottom row shows our results at the exact same times.
ary. The buoyancy drives the air flow which, in turn, advects ous simulation results. We have carefully discretized the physics
the smoke cloud in the three-dimensional domain bounded by the of flows to respect the most fundamental geometric structures that
bunny mesh as shown in Fig. 1. Note that this domain is made characterize their behavior. Among the several specific benefits that
out of 7K vertices, which is the equivalent complexity (in terms of we demonstrated, the most important is the circulation preservation
the number of degrees of freedom) of a regular grid of size 193 . property of the integration scheme, as evidenced by our numerical
Consequently, it took less than half a second per frame to com- examples. The discrete quantities we used are intrinsic, allowing
pute, exemplifying the advantage of using tet meshes to resolve fine us to go to curved manifolds with no additional complication. Fi-
boundaries since the equivalent low-resolution regular grid would nally, the machinery employed in our approach can be used on any
not nearly be able to capture the complex geometry of the bunny simplicial complex. However, the same methodology also applies
mesh. directly to more general spatial partitions, and in particular, to reg-
ular grids and hybrid meshes [Feldman et al. 2005]—rendering our
In the last simulation, we use a snow globe with a bunny inside approach widely applicable to existing fluid simulators.
(see Fig. 10). We emulate a flow due to an initial spin of the globe
using a swirl described as a vorticity field. The snow particles are For future work, a rigorous comparison of the current method with
(passively) transported by the flow as they fall down under the effect standard approaches should be undertaken. Using Bjerknes’ circu-
of gravity. Here again, each frame is generated in less than half a lation theorem for compressible flows may also be an interesting
second. avenue. Additionally, we limited ourselves to the investigation of
our scheme without focusing on the separate issue of order of ac-
curacy. Coming up with an integration scheme that is higher-order
accurate will be the object of further investigation, as it requires a
better (denser) Hodge star; in particular, it could reduce the diffu-
sion of vorticity introduced during the vorticity backtracking step.
Note also that our geometric approach bears interesting similari-
ties with the work of Chang et al. [2002], in which they propose a
purely algebraic approach to remedy the shortcomings of the tra-
ditional fractional step approach; using their numerical analysis on
Figure 11: Weather System on Planet Funky: the intrinsic nature our approach may provide a simple way to study the accuracy of our
of the variables used in our algorithm makes it amenable to the scheme. Finally, mixing our method with the Lagrangian treatment
simulation of flows on arbitrary curved surfaces. of vortex rings as in [Weißmann 2006] could allow for intuitive
control of the fluid motion.
75
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Figure 10: Bunny Snow Globe: the snow in the globe is advected by the inner fluid, initially stirred by a vortex to simulate a spin of the globe.
0133983, CMMI-0757106), the DOE (DE-FG02-04ER25657, W- E LCOTT, S., AND S CHR ÖDER , P. 2006. Building your own
7405-ENG-48/B341492), the Center for Integrative Multiscale dec at home. In Discrete Differential Geometry, E. Grinspun,
Modeling and Simulation at Caltech, the Okawa Foundation, the P. Schröder, and M. Desbrun, Eds., Course Notes. ACM SIG-
Irvine Foundation, the Center for the Mathematics of Information, GRAPH.
Autodesk, and Pixar Animation Studios.
F EDKIW, R., S TAM , J., AND J ENSEN , H. W. 2001. Visual simu-
References lation of smoke. In Proceedings of ACM SIGGRAPH, Computer
Graphics Proceedings, Annual Conference Series, 15–22.
A BRAHAM , R., M ARSDEN , J., AND R ATIU , T., Eds. 1988. Man-
ifolds, Tensor Analysis, and Applications, vol. 75 of Applied F ELDMAN , B. E., O’B RIEN , J. F., AND K LINGNER , B. M. 2005.
Mathematical Sciences. Springer. Animating gases with hybrid meshes. ACM Transactions on
Graphics 24, 3, 904–909.
A LLIEZ , P., C OHEN -S TEINER , D., Y VINEC , M., AND D ESBRUN ,
M. 2005. Variational tetrahedral meshing. ACM Transactions F OSTER , N., AND F EDKIW, R. 2001. Practical animation of liq-
on Graphics 24, 3, 617–625. uids. In Proceedings of ACM SIGGRAPH, Computer Graphics
Proceedings, Annual Conference Series, 23–30.
A NGELIDIS , A., N EYRET, F., S CHPOK , J., DWYER , W. T., AND
E BERT, D. S. 2005. Modeling and animating gases with simu- F OSTER , N., AND M ETAXAS , D. 1997. Modeling the motion of
lation features. In ACM/Eurographics Symposium on Computer a hot, turbulent gas. In Proceedings of SIGGRAPH, Computer
Animation, 97–106. Graphics Proceedings, Annual Conference Series, 181–188.
A NGELIDIS , A., N EYRET, F., S INGH , K., AND G AMITO , M. N., L OPES , P. F., AND G OMES , M. R. 1995. Two-
N OWROUZEZAHRAI , D. 2006. A controllable, fast and dimensional simulation of gaseous phenomena using vortex par-
stable basis for vortex based smoke simulation. In ACM/EG ticles. In Proceedings of the 6th Eurographics Workshop on
Symposium on Computer Animation, 25–32. Computer Animation and Simulation, 3–15.
B OCHEV, P. B., AND H YMAN , J. M. 2006. Principles of mimetic G OKTEKIN , T. G., BARGTEIL , A. W., AND O’B RIEN , J. F. 2004.
discretizations of differential operators. Compatible Spatial Dis- A method for animating viscoelastic fluids. ACM Transactions
cretization Series /IMA Vol. 142 in Mathematics and Applica- on Graphics 23, 3 (Aug.), 463–468.
tions, 89–120.
G UENDELMAN , E., S ELLE , A., L OSASSO , F., AND F EDKIW, R.
B OSSAVIT, A., AND K ETTUNEN , L. 1999. Yee-like schemes on a 2005. Coupling water and smoke to thin deformable and rigid
tetrahedral mesh. Int. J. Num. Modelling: Electr. Networks, Dev. shell. ACM Transactions on Graphics 24, 3, 973–981.
and Fields 12 (July), 129–142.
H IRANI , A. 2003. Discrete Exterior Calculus. PhD thesis, Cali-
B OSSAVIT, A. 1998. Computational Electromagnetism. Academic
fornia Institute of Technology.
Press, Boston.
C HANG , W., G IRALDO , F., AND P EROT, B. 2002. Analysis of an K LINGNER , B. M., F ELDMAN , B. E., C HENTANEZ , N., AND
exact fractional step method. Journal of Computational Physics O’B RIEN , J. F. 2006. Fluid animation with dynamic meshes.
180, 3 (Nov.), 183–199. ACM Transactions on Graphics (SIGGRAPH) (Aug.).
C HORIN , A., AND M ARSDEN , J. 1979. A Mathematical Introduc- L ANGTANGEN , H.-P., M ARDAL , K.-A., AND W INTER , R. 2002.
tion to Fluid Mechanics, 3rd edition ed. Springer-Verlag. Numerical methods for incompressible viscous flow. Advances
in Water Resources 25, 8-12 (Aug-Dec), 1125–1146.
D ESBRUN , M., K ANSO , E., AND T ONG , Y. 2006. Discrete dif-
ferential forms for computational sciences. In Discrete Differen- L OSASSO , F., G IBOU , F., AND F EDKIW, R. 2004. Simulating Wa-
tial Geometry, E. Grinspun, P. Schröder, and M. Desbrun, Eds., ter and Smoke with an Octree Data Structure. ACM Transactions
Course Notes. ACM SIGGRAPH. on Graphics 23, 3 (Aug.), 457–462.
E, W., AND L IU , J.-G. 1996. Finite difference schemes for im- M ARSDEN , J. E., AND W ENSTEIN , A. 1983. Coadjoint orbits,
compressible flows in vorticity formulations. 181–195. vortices and Clebsch variables for incompressible fluids. Physica
D 7, 305–323.
E, W., AND L IU , J.-G. 1996. Vorticity boundary condition and
related issues for finite difference schemes. J. Comput. Phys. M ARSDEN , J. E., AND W EST, M. 2001. Discrete mechanics and
124, 2, 368–382. variational integrators. Acta Numerica 10, 357–515.
76
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
M C NAMARA , A., T REUILLE , A., P OPOVIC , Z., AND S TAM , J. YAEGER , L., U PSON , C., AND M YERS , R. 1986. Combining
2004. Fluid control using the adjoint method. ACM Transactions physical and visual simulation - creation of the planet jupiter for
on Graphics 23, 3 (Aug.), 449–456. the film 2010. Computer Graphics (Proceedings of ACM SIG-
GRAPH) 20, 4, 85–93.
M UNKRES , J. R. 1984. Elements of Algebraic Topology. Addison-
Wesley. A Discrete Exterior Derivative
N ICOLAIDES , R. A., AND W U , X. 1997. Covolume solutions of A thorough explanation of the discrete exterior derivative of dis-
three-dimensional div-curl equations. 2195–2203. crete forms is out of the scope of this paper, and we refer the
reader to existing tutorials [Desbrun et al. 2006; Bochev and Hy-
PARK , S. I., AND K IM , M. J. 2005. Vortex Fluid for Gaseous
man 2006]. However, the reader should be aware that this operator
Phenomena. In ACM/EG Symposium on Computer Animation,
is simply implemented via the use of incidence matrices. Indeed, a
261–270.
key ingredient to defining the discrete version of the exterior deriva-
P IGHIN , F., C OHEN , J. M., AND S HAH , M. 2004. Modeling and tive d is Stokes’ theorem:
Editing Flows using Advected Radial Basis Functions. In ACM Z Z
SIGGRAPH/Eurographics Symposium on Computer Animation, dα = α,
σ ∂σ
223–232.
where σ denotes a (k + 1)-cell and α is a k-form. Stokes’ theorem
S ELLE , A., R ASMUSSEN , N., AND F EDKIW, R. 2005. A vortex states that the integral of dα (a (k + 1)-form) over a (k + 1)-cell
particle method for smoke, water and explosions. ACM Trans- equals the integral of the k-form α over the boundary of the (k + 1)-
actions on Graphics 24, 3 (Aug.), 910–914. cell (i.e., a sum of k-cells). Stokes’ theorem can thus be used as
a way to define the d operator in terms of the boundary operator
S HI , L., AND Y U , Y. 2004. Inviscid and Incompressible Fluid
∂ . Or, said differently, once we have the boundary operator, the
Simulation on Triangle Meshes. Journal of Computer Animation
operator d follows immediately if we wish Stokes’ theorem to hold
and Virtual Worlds 15, 3-4 (June), 173–181.
on the simplicial complex.
S HI , L., AND Y U , Y. 2005. Controllable smoke animation with To use a very simple example, consider a 0-form f , i.e., a function
guiding objects. ACM Transactions on Graphics 24, 1, 140–164. giving values at vertices. With that, d f is a 1-form which can be
S HIELS , D., AND L EONARD , A. 2001. Investigation of a drag integrated along an edge (say with end points denoted a and b) and
reduction on a circular cylinder in rotary oscillation. J. of Fluid Stokes’ theorem states the well known fact:
Mech. 431 (Mar.), 297–322.
Z
d f = f (b) − f (a).
[a,b]
S TAM , J. 1999. Stable fluids. In Proceedings of ACM SIG-
GRAPH, Computer Graphics Proceedings, Annual Conference The right hand side is simply the evaluation of the 0-form f on
Series, 121–128. the boundary of the edge, i.e., its endpoints (with appropriate signs
indicating the orientation of the edge). Actually, one can define a
S TAM , J. 2001. A simple fluid solver based on the fft. Journal of
hierarchy of these operators that mimic the operators given in the
Graphics Tools 6, 2, 43–52.
continuous setting (up to an application of the Hodge star) by the
S TAM , J. 2003. Flows on surfaces of arbitrary topology. ACM gradient (∇), curl (∇×), and divergence (∇·), namely,
Transactions on Graphics 22, 3 (July), 724–731. • d0 : maps 0-forms to 1-forms and corresponds to the Gradi-
S TEINHOFF , J., AND U NDERHILL , D. 1994. Modification of the ent;
euler equations for Vorticity Confinement: Applications to the • d1 : maps 1-forms (values on edges) to 2-forms (values on
computation of interacting vortex rings. Physics of Fluids 6, 8 faces). The value on a given face is simply the sum (by lin-
(Aug.), 2738–2744. earity of the integral) of the 1-form values on the boundary
(edges) of the face with the signs chosen according to the lo-
T ONG , Y., L OMBEYDA , S., H IRANI , A. N., AND D ESBRUN , M. cal orientation. d1 corresponds to the Curl;
2003. Discrete multiscale vector field decomposition. ACM • d2 : maps 2-forms to 3-forms and corresponds to the Diver-
Transactions on Graphics 22, 3, 445–452. gence.
T ONG , Y., A LLIEZ , P., C OHEN -S TEINER , D., AND D ESBRUN , Since the boundary of any mesh element can be directly read from
M. 2006. Designing Quadrangulations with Discrete Harmonic the incidence matrices of the mesh, the exterior derivative is trivial
Forms. In ACM/EG Symposium on Geometry Processing, 201– to implement once the mesh is known as it depends only on its
210. connectivity [Elcott and Schröder 2006].
T REUILLE , A., M C NAMARA , A., P OPOVI Ć , Z., AND S TAM , J. B Recovery of Velocity
2003. Keyframe control of smoke simulations. ACM Transac-
tions on Graphics 22, 3 (July), 716–723. We have seen in Section 4 how the vorticity ω can be derived di-
rectly from the set of all face fluxes as d T ?U = ω. However, dur-
WARREN , J., S CHAEFER , S., H IRANI , A., AND D ESBRUN , M. ing the simulation, we will also need to recover flux from vorticity.
2007. Barycentric coordinates for convex sets. Advances in For this we employ the Helmholtz-Hodge decomposition theorem,
Computational Mathematics (to appear). stating that any vector field u can be decomposed into three com-
ponents (given appropriate boundary conditions)
W EISSMANN , S. 2006. Real Time Simulation of Fluid Flow. Mas-
ter’s thesis, Technische Universität Berlin. u = ∇ ×φφ + ∇ψ + h.
W ENDT, J., BAXTER , W., O GUZ , I., AND L IN , M. 2005. Finite When represented in terms of discrete forms this reads as:
Volume Flow Simulations on Arbitrary Domains. Tech. Rep.
TR05-019, UNC-CH Computer Science, Sept. U = dΦ + ?−1 d T ? Ψ + H (7)
77
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
U = dΦ + H.
Ω = d T ? dΦ,
?−1 Ω = ∆Φ
78
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Chapter 10:
Conformal Equivalence of Triangle Meshes
Boris Springborn Peter Schröder Ulrich Pinkall
TU Berlin Caltech TU Berlin
Abstract
We present a new algorithm for conformal mesh parameteriza-
tion. It is based on a precise notion of discrete conformal equiva-
lence for triangle meshes which mimics the notion of conformal
equivalence for smooth surfaces. The problem of finding a flat
mesh that is discretely conformally equivalent to a given mesh
can be solved efficiently by minimizing a convex energy function,
whose Hessian turns out to be the well known cot-Laplace oper-
ator. This method can also be used to map a surface mesh to a
parameter domain which is flat except for isolated cone singulari-
ties, and we show how these can be placed automatically in order
to reduce the distortion of the parameterization. We present the
salient features of the theory and elaborate the algorithms with
a number of examples.
1 Introduction
In this paper we present a definition for discrete conformal equiv-
alence of triangle meshes and apply it to the problem of confor-
mal mesh parameterization. Our approach arises from two basic
premises.
First, the discrete setting should parallel the smooth setting.
There the problem of finding a conformal parameterization for a
smooth surface in space is equivalent to finding a flat metric on
the surface that is conformally equivalent to the metric induced
by the embedding. Hence, we cast the parameterization problem
as one of finding conformally equivalent flat metrics for a given
metric.
Second, we treat the parameterization problem for triangle
meshes in the spirit of Discrete Differential Geometry [Bobenko
and Suris 2005]: instead of viewing discretization as a means of
making the smooth problem amenable to numerical methods, we
Figure 1: Customers who visited our Tattoo parlor, where repeating
seek to develop on the discrete level a geometric theory that is
patterns can be applied seamlessly and length distortion is kept low
as rich as the analogous theory for the smooth problem. The aim
through cone singularities. (Insets show texture tiles.)
is to discretize the whole theory, not just the equations.
Instead of asking for an approximation of the smooth problem, cross ratios. This discrete notion of conformality comes with
we are thus guided by questions like: What corresponds to a a comprehensive theory carrying many of the hallmarks of the
Riemannian metric and Gaussian curvature in an analogous the- smooth setting. Most importantly for graphics applications, we
ory for triangle meshes? When should two triangle meshes be present effective computational procedures based on minimizing
considered conformally equivalent? We answer the first question a convex energy. The triangulated surfaces may be of arbitrary
in the obvious way: the edge lengths and the angle defects at topology with or without boundary and no a priori cutting is
vertices. The answer that we give to the second question is also required to deal with higher genus, for example. Flexible bound-
straightforward and intuitive. The striking point is that once we ary conditions support a range of options from full control over
have thus fixed the fundamental definitions of the discrete theory, boundary curvature to full control over length distortion, includ-
there is an efficient algorithm to solve the discrete conformal ing isometrically mapped boundaries. The theory and algorithms
parameterization problem. also admit cone singularities, which may be placed by the user
or automatically to reduce length distortion and flatten higher
Contributions In this paper we present the first algorithm for genus meshes. Last but not least, our discretely conformal param-
mesh parameterization which is based on a definition of discrete eterizations admit a piecewise projective interpolation scheme
conformal equivalence between triangle meshes which is satisfac- for texture coordinates, which yields improved interpolation at
tory in the sense that (a) it depends only on the geometry of the no additional cost.
meshes and (b) defines an equivalence relation. Meshes in a con-
formal equivalence class are characterized by length scale factors
associated to the vertices and by conserved quantities: the length
79
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
2 Conformal Equivalence Proof. In one direction, the implication is obvious: if the meshes
are discretely conformally equivalent, then their length cross
Our definitions are based on a fairly direct “translation” of classic
ratios are equal because the scale factors eu/2 cancel. To see the
notions to the discrete setting of meshes. In smooth differential
converse, consider two discrete metrics l and l̃. We have to show
geometry two Riemannian metrics g and g̃ on a differentiable
that if their length cross ratios c and c̃ are equal, then we can
2-manifold M are said to be conformally equivalent if
associate numbers ui to the vertices vi satisfying Eqs. (2) (one
g̃ = e2u g (1) equation for each edge). In general, this system of equations
for the ui is overdetermined. For each triangle t i jk the three
for some smooth function u : M → R, which gives the logarithm equations corresponding to its edges already determine values
of length change between g and g̃. for u at its vertices:
In the discrete setting M becomes an abstract surface triangu-
lation consisting of vertices, edges, and triangles, M = (V, E, T ). eui = l̃ i j /l i j · l̃ ki /l ki · l jk /l̃ jk . (5)
We do not restrict its topology or whether it possesses a bound-
Considering the neighboring triangle t jim one obtains the same
ary. While the combinatorics of a mesh are encoded in such an
value for eui precisely if ci j = c̃i j . Hence, if l and l̃ have identical
abstract triangulation, its intrinsic geometry is encoded in the
length cross ratios, values for u at the vertices are consistently
edge lengths. Thus we define:
determined by Eqs. (2).
Definition 2.1. A discrete metric on M is a function l on the set
of edges E, assigning to each edge ei j a positive number l i j so
that the triangle inequalities are satisfied for all triangles t i jk ∈ T . The discrete theory we have set up now informs our consequent
approach. Given a mesh M and a discrete metric l on it, we
The smooth function u becomes a function on the set of vertices consider the equivalence class of conformally equivalent metrics.
and we define discrete conformal equivalence as: In this class we look for a metric l̃ which is flat. Only in a
Definition 2.2. Two discrete metrics l and l̃ on M are (discretely) subsequent step (Section 3.3) do we construct vertex coordinates
conformally equivalent if, for some assignment of numbers ui to which realize this flat metric. To find the desired flat metric we
the vertices vi , the metrics are related by need the relation between length and curvature.
80
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Luckily, if a solution to this set of non-linear equations exists, it Two such meshes are considered conformally equivalent, if the
can be found as the unique minimizer of a convex energy in u intersection angles of the circles—or inversive distances for non-
X X intersecting circles—are equal in both meshes.
f (λ̃i j , λ̃ jk , λ̃ki ) − π2 (ui +u j +uk ) + 21
E(u) = Θ
b i ui (7)
These methods require the solution of non-linear equations, us-
t i jk ∈T vi ∈V
ing a convex variational principle, a specially tailored relaxation
where procedure, or a flow.
This approach to discrete conformality is also not fully satisfactory.
f (λ̃i j , λ̃ jk , λ̃ki ) = In the case of Kharevych et al., the intersection angles determine
1
j
j the curvature of the mesh. Consequently, they must change when
α̃ijk λ̃ jk + α̃ki λ̃ki + α̃kij λ̃i j + L(α̃ijk ) + L(α̃ki ) + L(α̃kij ), (8)
2 the mesh is flattened. For the other circle methods, the notion
of discrete conformality either depends on an arbitrary choice
with λ̃ as in Eq. (3); L(.) denoting Milnor’s Lobachevsky function of circles, or it is defined only if the edge-lengths satisfy some
(see Appendix A); and both λ̃ and α̃ depending on u. further conditions, or both.
Indeed, the partial derivatives of this energy are
Curvature Flow Consider u as a function of time and evolving
∂ui E = 12 Θ t i jk 3vi α̃ jk ,
P i
bi − (9) under the negative gradient of E
so that grad E(u) = 0 iff u solves the problem. The Hessian of the ∂ t u = −2 grad E = (K e) .
b−K
energy turns out to be one half of the well-known cot-Laplace
operator: (For simplicity, assume that M has no boundary.) We may then
think of u∗ = argminu E(u)—which we compute using Newton’s
(Hess E · δu)i = 12 (∆δu)i = 14 ei j 3vi w i j (δui − δu j ),
P
(10) method—as the steady state solution of this curvature flow with
given target curvatures. Using ∂ t Ke = ∂u K
e · ∂ t u together with
with w i j = cot α̃kij + cot α̃li j for interior edges and only one cot Eq. (10) we also find that the evolution of the curvature is gov-
term for boundary edges. (We adopt the sign convention for erned by the equation
the Laplace operator which renders it positive semi-definite. See
Appendix B and C for proofs of Eqs. (9) and (10).) ∂t K
e = ∆(
e K e)
b−K
The Hessian is therefore positive semi-definite with only the con- with ∆e denoting the (positive semi-definite) cot-Laplace operator
stant functions in its null-space. This corresponds to the fact that of the discrete metric induced by u(t).
the energy E(u) is scale invariant, i.e., its value does not change b = 0, this flow was considered by Luo [2004]
In the case where K
if the same number is added to all ui .
as a discrete version of Yamabe flow. He proves that the flow
2.2 Relation to Other Approaches is variational, but he gives no formula for the energy and does
not seem to be aware that the cot-Laplace operator appears in
There are many algorithms for mesh parameterization in the the evolution equation for Ke . A different discrete curvature flow
literature and we will not attempt a comprehensive review here forms the foundation of the approach of Jin et al. [2007] who
(the interested reader is referred to [Floater and Hormann 2005] use Chow and Luo’s definition of discrete Ricci flow [2003]. (For
and [Sheffer et al. 2006]). Instead we focus on approaches which 2-dimensional Riemannian manifolds, Yamabe flow is the same
are based on discretized or discrete notions of harmonicity and as Ricci flow.) Our explicitly variational formulation provides a
conformality. new approach to discrete Ricci flow for surfaces.
Discrete Harmonicity Discrete versions of the theory of harmonic
Angle Based Flattening Smooth conformal maps preserve an-
and analytic functions were developed as early as the 1940s and gles exactly. Enforcing this property as-best-as-possible in the
’50s [Duffin 1956], based on simple difference equations analo- discrete setting forms the foundation for Angle Based Flattening
gous to Laplace’s equation and the Cauchy-Riemann equations. (ABF) [Sheffer et al. 2005]. The resulting optimization problem
Indeed, the discovery of the cot-Laplace operator heralds from for the angles of the flat mesh is non-linear with non-convex
this time [Duffin 1959], and these ideas still inform contempo- non-linear constraints. It requires sophisticated numerical meth-
rary notions of discrete conformality and harmonicity that are ods [Sheffer et al. 2005] (for some recent progress see [Zayer
based on linear conditions on the vertex coordinates. Examples et al. 2007]), and is not solved to high enough accuracy to actu-
of theory and applications include [Pinkall and Polthier 1993; ally produce a flat metric. Thus a further approximation step is
Mercat 2001; Desbrun et al. 2002; Lévy et al. 2002; Gu and Yau necessary to produce the final coordinate functions.
2003; Tong et al. 2007].
The linear theory of discrete harmonicity is interesting and rich, Metric Scaling There is one very recent approach that is closely
attractive computationally, and enormously useful in applications. related to ours [Ben-Chen et al. 2008]. Just as we do, they first
But the implied notion of a discretely conformal map as a pair of compute a metric for the image mesh and only then a set of
conjugate discretely harmonic functions is deficient because the vertex positions. They start with the following well known rela-
inverse of such a map, and the composition of two such maps, are tion. Given a smooth 2-manifold and two metrics g, g̃—related
no longer discretely conformal. Thus, this notion of a discretely through the conformal factor e2u as in Eq. (1)—the curvatures K,
conformal map does not define a notion of discrete conformal e satisfy:
K
equivalence. e = K + ∆u,
e2u K (11)
where ∆ is the—positive semi-definite—Laplace-Beltrami opera-
Circle Patterns Going back to an unpublished idea of Thurston e = 0), if u solves the Poisson equation
tor. The metric g̃ is flat (K
(see [Stephenson 2003] for an eyewitness account), discrete
conformality can be approached through circle patterns. Here ∆u = −K. (12)
meshes are considered together with a system of circles associ-
ated to faces [Kharevych et al. 2006] or vertices [Bowers and To flatten a mesh, Ben-Chen et al. proceed by solving the dis-
Hurdal 2003; Stephenson 2005; Jin et al. 2007; Yang et al. 2008]. cretized Poisson equation with ∆ the cot-Laplace operator in the
81
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
original metric and Ki the angle defect at a vertex. This is pre- method.
cisely the first Newton step when minimizing our energy E(u).
(Their definition of length change induced by the ui is different 3.1 Convex Optimization
from Eq. (2) but this is immaterial to the present argument.) As
Ben-Chen et al. point out, this does not in general yield a flat So far we have a convex energy, but we do not yet have a convex
metric. They address this by solving a cot-Laplace layout problem optimization problem since the domain, i.e., the set of u resulting
in the new metric to find flat vertex positions which approximate in new edge lengths satisfying the triangle inequalities, is not
the desired metric. In contrast we solve for a (numerically) flat convex. The inset figure below illustrates the legal range (yellow)
metric and require no further approximation to recover the actual of u values for an example triangle. We get around this difficulty
vertex positions. by extending the domain of E(u) to all of Rn :
In their method, target curvatures at the boundary as well as for j
cone singularities are computed based on a diffusion problem and if l̃ jk l̃ ki + l̃ i j then α̃ijk = π and α̃ki = α̃kij = 0.
its associated Green’s functions—one each per boundary vertex
and interior cone vertex. Incidentally, this computational burden Now Eqs. (7) and (8) define E(u) for all u3
could be removed by using our natural boundary conditions and values of u. This simple way of extending
free cone angles (Sections 4.2 and 5.1). E(u) is C 1 . The gradient of the extended
2.2.1 Discussion energy is still given by Eq. (9), and the u2
Hessian is given by Eq. (10), where, how-
In contrast to all other approaches, ours is based on a proper ever, the terms cot α̃kij in the equation for
notion of discrete conformal equivalence for triangle meshes. the weights must be replaced by 0 when- u1 +u2 +u3 =0
This notion depends on the meshes alone without any arbitrary ever α̃kij = 0 or π. The figure on the right λ12 =λ23 =λ31 =0
choices, and it is adhered to not approximately but precisely. indicates the iso-contours of the extended
We have an explicit expression for the energy—as do Kharevych energy.
et al. but not Jin et al.—which facilitates the use of standard,
globally convergent, Newton trust region methods. We can also We now have a standard unconstrained convex optimization prob-
accommodate cone singularities—as introduced by Kharevych lem with explicit formulæ for the target function, its gradient,
et al. and recently demonstrated for discrete harmonic ap- and Hessian. The Hessian is positive semi-definite with only the
proaches [Tong et al. 2007; Kälberer et al. 2007]—and do not constant vector in its null-space, reflecting the fact that E(u) re-
require a priori cutting for higher genus surfaces—as is done mains invariant if a constant vector is added to u. To find the
in ABF. Boundary conditions include constraints on angles or argmin of the extended energy we use the globally convergent
lengths and—novel among all approaches—we support isometri- Newton-Steihaug trust region method [Steihaug 1983] as imple-
cally mapped boundaries. Incidentally, the latter also “pick out” mented in PETSc/TAO [Balay et al. 2007; Benson et al. 2007].
the unique least distorted mapping in a given equivalence class
(more on these aspects in Section 4). 3.2 Violation of the Triangle Inequality
Comparing our method with ABF illustrates how choosing the When minimizing the extended energy it is possible that the
“right” discrete notions can lead to concrete practical benefits. global minimum is achieved for a u∗ giving l̃ which violate the tri-
ABF preserves triangle angles as much as possible. Our approach angle inequality. Figure 2 shows a sampling of such cases which
preserves the discrete conformal structure of the mesh precisely. are representative of our experience. In all the cases we have
As it happens, this leads to a mathematically simpler optimization observed we found that the triangulation near the bad edge was
problem. highly degenerate. In almost all cases this was due to a triangle
After this discussion of related approaches in computer graph- with one angle close to π. In others, multiple triangles were
ics, we want to acknowledge at least briefly some mathematical “folded over” one another (see the second and third example in
work we have built upon. Troyanov [1986] treated the problem the top row and first example in the bottom row of Figure 2).
of finding a conformally equivalent flat metric with prescribed Unless the mesh has regions full of such degenerate situations,
cone singularities in the smooth setting and proved existence and the problem is simply fixed by flipping or alternatively subdivid-
uniqueness of the solution. The construction of our energy relied ing the edges opposite the straight angles. Our worst example
heavily on previous work on variational principles for circle pat- was the Gargoyle which required flips for 55 out of 74964 edges.
terns [Colin de Verdière 1991; Rivin 1994; Leibon 2002; Bobenko (Edge flipping was also considered by Luo [2004], albeit during
and Springborn 2004]. There is a fruitful connection between his curvature flow.)
all of these circle pattern energies and our energy E(u) on the
one side and hyperbolic geometry on the other side. A reader fa-
miliar with hyperbolic geometry will realize that the appearance
of Milnor’s Lobachevsky function is a hint that our energy E(u)
has something to do with the volumes of ideal hyperbolic tetrahe-
dra, and she may recognize the logarithmic edge lengths λi j and
length cross ratios ci j as Penner coordinates and Thurston-Fock
shear coordinates for the Teichmüller spaces T g,n of genus g Rie-
mann surfaces with n punctures. In fact, minimizing E(u) also
solves the problem of finding polyhedral realizations for com-
plete hyperbolic surfaces. But this side of the story is beyond the
scope of the present paper.
Figure 2: A sampling of “ripped” edges. In all cases the local
3 Discretely Conformal Parameterization geometry was near singular and edge flipping (alternatively, edge
Now that the theoretical foundations are laid down we pro- subdivision) remedied the trouble.
ceed with a discussion of our basic conformal parameterization
82
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
83
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
for all other vertices. The resulting planar layout is projected Aiming to align iso-parameter lines (roughly) with principal cur-
stereographically to the sphere and the knocked out vertex re- vature directions, these approaches all placed cone singularities
inserted at the north pole (Figure 4). Subsequent Möbius normal- at numerically estimated umbilic points.
izations can be applied to ensure, for example, that the center of
Our method supports free and fixed cone angles (Figure 5) and
mass of all vertices is at the origin [Springborn 2005]—a notion
we are interested in placing cone singularities in a manner which
of “equidistribution” of points. A simple calculation shows that
reduces length distortion, i.e., reduces the variation of u, and to
the resulting mesh is discretely conformally equivalent, even at
do so automatically.
the knocked out vertex.
5.1 Automatic Cone Singularities
Where should the zero curvature assumption be relaxed so as to
reduce distortion? Considering Eq. (12) for the smooth setting,
we see that a local change in K leads to a localized change in
u, since adding a Dirac to the right hand side has the effect of
adding a Green’s function to the solution u. Thus, we choose
the vertex with the worst distortion, vi = argmax vi |ui |, as the
location for a cone singularity. (If a boundary is present we
assume natural boundary conditions, otherwise we set ui = 0.)
P
84
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Cones are now placed far more symmetrically: at the top of the
head, on each ear and on the nose. Typically it takes two or three
rounds for the cone positions to “settle.” To save effort during
the Gauss-Seidel stage, we do not solve for u to high accuracy
(only one Newton step is used). The final u-function is solved
to high precision. Figure 8 shows another where this procedure
was applied with a total of 18 cones. Figure 9: A layout for the Venus with four cones of π each. These
map to corners of a parallelogram (left side). Using a checker board
texture leads to artifacts (inset). These can be removed by rectifying
the layout with an additional transformation (right side).
85
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
color) corresponding to a different meta-edge. The two sides Now assume the vertices of the meta-polygon are numbered so
of a cut path fit together: a Euclidean motion moves one to the that p0 is a cone vertex and translate it toPthe origin. Then all
k−1
other, and the same motion aligns the corresponding meta-edges. cone vertices have integer coordinates if i=0 d̄i ∈ Z2 for all k
As Figure 10 suggests, the rotation angles of these motions are such that pk is a cone vertex. This can be written as
multiples of π/2. This is true in general due to the quantized B d̄ ∈ (Z2 )l
cone angles, but only if the original mesh is simply connected—
hence the topological restriction to disks and spheres. where B is a matrix with m columns and l rows (one less than
there are cone vertices). Finally, the columns of BNA—all entries
Suppose for a moment that the special vertices of type (1), the are complex integers—span a complex subspace which has non-
cone vertices, have integer coordinates. Then a checkerboard empty intersection with the lattice (Z2 )l . From this subset lattice
pattern with these vertices in the centers of the squares would fit we wish to select the nearest (in some norm) lattice point to
seamlessly on the mesh, because the Euclidean motions aligning the cone positions in the given (non-integer) layout. This is
corresponding meta-edges would be symmetries of the pattern. an instance of the classic closest lattice vector (CLV) problem.
In reality, the coordinates are not integer. (Figure 11 shows an Optimal solutions to this problem are computationally hard. For
example with eight optimized and quantized cones, which are the examples in this paper we proceeded by computing the row
not on integers; note the apparent “rip” in the texture on the far rank of BNA, fixed as many (l − 1) of the cones to the nearest
end of the right wing.) How close they are to being integer, and point in Z2 and solved for the remaining (l th ) cone location.
hence how much distortion is needed to make them so, depends Given a solution d̄ the implied deformation must now be interpo-
on rotation and scaling: the larger the scale, the finer the integer lated across the layout. We do this by performing a cot-Laplace
grid is relative to the layout size. Suppose such a rotated and layout as explained in the next section.
scaled layout is given. The idea now is to deform the meta-
polygon so that all cone vertices become complex integers, Z2 := 6.2 Generalized Laplace Layout
Z + IZ ∈ C, and adapt the layout accordingly. The result will no In Section 3.3 we described our breadth first layout procedure to
longer be exactly discretely conformal, but only approximately turn metric data into coordinate functions. Another way to turn
so: Seamless alignment can only be achieved by relaxing the metric data into coordinate functions is through the use of the
conformality requirement. cot-Laplace operator.
For a flat metric the cot-Laplace operator—as a map Cn → Cn .
(n = |V |) and using natural boundary conditions [Desbrun et al.
2002; Lévy et al. 2002]—has a two dimensional (complex) null
space consisting of the constant and linear functions on the ver-
tices. The layout procedure produces the unique—up to scale and
a rigid motion—null space vector orthogonal to the constant vec-
tor. We now turn this prescription around: Given a cot-Laplace
operator due to a flat metric, produce the null space vector with
zero mean. Because of the presence of cone singularities this
cot-Laplace operator must incorporate the edge identifications
via rigid motions encoded in the meta-polygon. This is done in
the same manner as [Tong et al. 2007]. (Their method accom-
modates general rotations with no problem including the fact
that only a single complex variable is needed for each vertex.)
Cone singularities enter as Dirichlet data with positions. The
Figure 11: The Gargoyle—a topological sphere—with eight op- cot-Laplace operator now has only one remaining vector in its
timized and subsequently quantized cones. On the top right the null space: the original layout (this is true even for general cone
optimized cone domain and in the center the result of quantizing angles).
the cones. Since the cones do not have integer locations the checker-
board texture has seams.
86
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
If the meta-polygon is deformed and we use the new cone lo- 2006] (denoted kqck1 in the table), i.e., the ratio of larger to
cations as Dirichlet data the cot-Laplace operator will generally smaller singular value of the surface to parameter plane tangent
not have a null space anymore and we return the vector of least map. A value of one indicates no angle distortion at all. While it
Dirichlet energy. Figure 12 shows the rectified domain and corre- is difficult to compare these numbers across papers ours appear
sponding iso-lines on the model of Max Planck; see also Figure 10 generally somewhat worse than what was reported by Ben-Chen
for the rectified Lion head, and Figure 13 for the rectified Torso et al. and Kharevych et al., for example. Given that we effectively
parameterization. enforce more structure than Ben-Chen and co-workers, and do
not allow any approximation of the original data as Kharevych
and co-workers do, this is perhaps not surprising. The last column
in the table indicates the boundary conditions (free, rectangle,
sphere) or the number of optimized (o) free cones, whether they
were subsequently quantized (q), and/or rectified (r).
Model |V | Iter. kukmax kqck1 cones
Face 1042 16 1.164 1.0702 rectangle
Stamp 4100 6 0.431 1.0541 free
Stamp 4100 6 0.742 1.0625 rectangle
Lion 8356 6 1.089 1.0282 5 (oqr)
Olivier 24795 6 1.188 1.0087 18 (o)
Max Planck 25445 11 0.908 1.0097 4 (oqr)
Figure 13: Visualization of the parameterization on the Torso with Gargoyle 24990 56 1.849 1.0509 8 (oq)
14 optimized, quantized, and subsequently rectified cones (each ear, Hygeia 140654 5 0.650 1.0120 sphere
each nostril, either side of back of neck, on Adam’s apple, three on Torso 142348 12 1.957 1.0048 4 (o)
each arm stump and one cone on the torso bottom. Torso 142348 21 1.091 1.0036 14 (oqr)
Dragon 152803 5 3.759 1.0277 sphere
7 Numerical Results Julius 209083 5 1.173 1.0027 free
87
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
0504358v1. To appear in Graduate Studies in Mathematics of Rivin, I. 1994. Euclidean Structures on Simplicial Surfaces and
the AMS. Hyperbolic Volume. Ann. of Math. (2) 139, 553–580.
Bowers, P. L., and Hurdal, M. K. 2003. Planar Conformal Map- Sheffer, A., and Hart, J. C. 2002. Seamster: Inconspicuous
pings of Piecewise Flat Surfaces. In Vis. and Math. III. Springer, Low-Distortion Texture Seam Layout. In Proc. IEEE Vis., IEEE
3–34. Comp. Soc., 291–298.
Chow, B., and Luo, F. 2003. Combinatorial Ricci Flows on Sur- Sheffer, A., Lévy, B., Mogilnitsky, M., and Bogomyakov, A. 2005.
faces. J. Diff. Geom. 63, 1, 97–129. ABF++: Fast and Robust Angle Based Flattening. ACM Trans.
Graph. 24, 2, 311–330.
Colin de Verdière, Y. 1991. Un Principe Variationnel pour les
Empilements de Cercles. Invent. Math. 104, 655–669. Sheffer, A., Praun, E., and Rose, K. 2006. Mesh Parameterization
Methods and their Applications. Found. Trends Comput. Graph.
Desbrun, M., Meyer, M., and Alliez, P. 2002. Intrinsic Param- Vis. 2, 2, 105–171.
eterizations of Surface Meshes. Comp. Graph. Forum 21, 3,
209–218. Springborn, B. 2005. A Unique Representation of Polyhedral
Types. Centering via Möbius Transformations. Math. Z. 249,
Duffin, R. J. 1956. Basic Properties of Discrete Analytic Func- 513–517.
tions. Duke Math. J. 23, 335–363.
Steihaug, T. 1983. The Conjugate Gradient Method and Trust
Duffin, R. 1959. Distributed and Lumped Networks. J. Math. Regions in Large Scale Optimization. SIAM J. Numer. Anal. 20,
Mech. [continued as Indiana Univ. Math. J.] 8, 793–826. 3, 626–637.
Erickson, J., and Whittlesey, K. 2005. Greedy Optimal Homo- Stephenson, K. 2003. Circle Packing: A Mathematical Tale.
topy and Homology Generators. In Proc. ACM/SIAM Symp. on Notices Amer. Math. Soc. 50, 11, 1376–1388.
Disc. Alg., SIAM, 1038–1046. Stephenson, K. 2005. Introduction to Circle Packing. Cambridge
Floater, M. S., and Hormann, K. 2005. Surface Parameteriza- University Press.
tion: a Tutorial and Survey. In Advances in Multiresolution for Tong, Y., Alliez, P., Cohen-Steiner, D., and Desbrun, M. 2007.
Geometric Modelling, Mathematics and Visualization. Springer, Designing Quadrangulations with Discrete Harmonic Forms.
157–186. In Proc. Symp. Geom. Proc., Eurographics, 201–210.
Gu, X., and Yau, S.-T. 2003. Global Conformal Surface Parameter- Troyanov, M. 1986. Les Surfaces Euclidiennes à Singularités
ization. In Proc. Symp. Geom. Proc., Eurographics, 127–137. Coniques. Enseign. Math. (2) 32, 79–94.
Gu, X., Gortler, S. J., and Hoppe, H. 2002. Geometry Images. Yang, Y., Kim, J., Luo, F., Hu, S., and Gu, D. 2008. Optimal Surface
ACM Trans. Graph. 21, 3, 355–361. Parameterization Using Inverse Curvature Map. IEEE Trans.
Jin, M., Kim, J., and Gu, X. D. 2007. Discrete Surface Ricci Flow: Vis. Comp. Graph. (to appear).
Theory and Applications. In Mathematics of Surfaces 2007, Zayer, R., Lévy, B., and Seidel, H.-P. 2007. Linear Angle Based
R. Martin, M. Sabin, and J. Winkler, Eds., Vol. 4647 of Lecture Parameterization. In Proc. Symp. Geom. Proc., Eurographics,
Notes in Computer Science. Springer, 209–232. 135–141.
Kälberer, F., Nieser, M., and Polthier, K. 2007. QuadCover— A Milnor’s Lobachevsky Function
Surface Parameterization using Branched Coverings. Comp.
Graph. Forum 26, 3, 375–384. Milnor’s Lobachevsky function [Milnor 1982] is defined by
Rx
Kharevych, L., Springborn, B., and Schröder, P. 2006. Discrete L(x) = − 0 log |2 sin t| dt.
Conformal Mappings via Circle Patterns. ACM Trans. Graph.
25, 2, 412–438. Up to scale it agrees with Clausen’s integral Cl2 (x) =
Leibon, G. 2002. Characterizing the Delaunay Decompositions 2L(x/2) [Lewin 1981]. The function L(x) is π-periodic, con-
of Compact Hyperbolic Surfaces. Geom. Topol. 6, 361–391. tinuous, and odd. It is smooth except at integer multiples of π
where its graph has a vertical tangent. For our purposes note that
Lévy, B., Petitjean, S., Ray, N., and Maillot, J. 2002. Least
Squares Conformal Maps for Automatic Texture Atlas Genera- L0 (x) = − log |2 sin x| and L00 (x) = − cot x.
tion. ACM Trans. Graph. 21, 3, 362–371.
(For us the absolute value signs are irrelevant because we only
Lewin, L. 1981. Polylogarithms and Associated Functions. North consider L(α) for 0 ≤ α ≤ π.) Numerical evaluation can be per-
Holland. formed very efficiently and with high accuracy [Macleod 1996].
Luo, F. 2004. Combinatorial Yamabe Flow on Surfaces. Commun.
Contemp. Math. 6, 765–780. B Gradient of E
Macleod, A. J. 1996. Algorithm 757: MISCFUN, a Software To show Eq. (9) for the partial derivatives of the energy E, we
Package to Compute Uncommon Special Functions. ACM Trans. show first that
Math. Softw. 22, 3, 288–301. ∂λ̃ jk f (λ̃i j , λ̃ jk , λ̃ki ) = 21 α̃ijk . (13)
Mercat, C. 2001. Discrete Riemann Surfaces and the Ising Model.
Comm. in Math. Physics 218, 1, 177–216. From Eq. (8) one obtains
Milnor, J. 1982. Hyperbolic Geometry: The First 150 Years. Bul. ∂λ̃ jk f (λ̃i j , λ̃ jk , λ̃ki ) = 21 α̃ijk + 12 λ̃ jk − log(2 sin α̃ijk ) ∂λ̃ jkα̃ijk
Amer. Math. Soc. 6, 1, 9–24.
j j
+ 12 λ̃ki − log(2 sin α̃ki ) ∂λ̃ jkα̃ki + 21 λ̃i j − log(2 sin α̃kij ) ∂λ̃ jkα̃kij
Pinkall, U., and Polthier, K. 1993. Computing Discrete Minimal
l̃ l̃
Surfaces and Their Conjugates. Experiment. Math. 2, 1, 15–36. l̃ j
= 21 α̃ijk+ log 2 sinjkα̃i ∂λ̃ jkα̃ijk+ log ki j ∂λ̃ jkα̃ki+ log 2 sini jα̃k ∂λ̃ jkα̃kij .
jk 2 sin α̃ki ij
Ray, N., Li, W. C., Lévy, B., Sheffer, A., and Alliez, P. 2006.
j
Periodic Global Parameterization. ACM Trans. Graph. 25, 4, Since l̃ jk /(2 sin α̃ijk )
= l̃ ki /(2 sin α̃ki )
= l̃ i j /(2 sin α̃kij )
= R̃ (the cir-
1460–1485. cumcircle radius for a triangle with sides l̃ i j , l̃ jk , and l̃ ki ) and
88
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
j
∂λ̃ jk (α̃ijk + α̃ki + α̃kij ) = 0 (the angle sum is π), Eq. (13) follows. Proof. In homogeneous coordinates w = (x, y, z), the circumcir-
One finds also (in view of Eq. (3)) ∂ui f (λ̃i j , λ̃ jk , λ̃ki ) = ∂λ̃i j + cle of 4 is described by the equation q(w) = 0 where q(w) is the
j
∂λ̃ki f (λ̃i j , λ̃ jk , λ̃ki ) = (α̃kij + α̃ki )/2, and hence quadratic form q(w) = x 2 + y 2 + 2c xz + 2d yz + ez 2 with c, d, e
determined by the conditions q(w i ) = 0. Similarly, let q̃(w̃) be
∂ui f (λ̃i j , λ̃ jk , λ̃ki ) − π2 (ui + u j + uk ) = − 12 α̃ijk .
the quadratic form describing the circumcircle of 4̃. The circum-
circle of 4 is mapped to the cirumcircle of 4̃ if q(w) is up to some
Using this, it is straightforward to derive Eq. (9) from Eq. (7). constant factor µ identical to q̃( f (w)), i.e. q(w) = µ· q̃( f (w)),
or equivalently, if the corresponding symmetric bilinear forms
C Hessian of E b(w, w 0 ), b̃(w̃, w̃ 0 ) satisfy b(w, w 0 ) = µ· b̃( f (w), f (w 0 )). This is
the case iff b(w i , w j ) = µ· b̃(ai w̃ i , a j w̃ j ), because the w i form a
To show Eq. (10) for the Hessian of E, note that (Hess E · δu)i is
basis for R3 . But since
the derivative of the ith component of grad E in the direction δu.
Since l i2j = q(w i − w j ) = q(w i ) − 2b(w i , w j ) + q(w j ) = −2b(w i , w j )
bi − 1
(grad E)i = 12 Θ t i jk 3vi α̃ jk ,
P i
2 and similarly l̃ 2i j = −2 b̃(w i , w j ), this is equivalent to l i2j =
µ ai a j l̃ 2i j , and, using (2), to ai = µ−1/2 e−ui .
and Θ b i is constant, we are done once we have shown that the
first-order change in α̃ijk is
E Minimal Distortion
1 j
δα̃ijk = 2
cot α̃ki (δuk − δui ) + 12 cot α̃kij (δu j − δui ). (14) Let M be a smooth connected oriented 2-manifold with boundary,
equipped with a Riemannian metric g. If g̃ is a conformally
To derive this relation between δα̃ and δu, we start with the
j equivalent metric as in Eq. (1), then the Gaussian curvatures
sine theorem: l̃ i j /l̃ ki = sin α̃kij / sin α̃ki . (Alternatively one could e of g and g̃ are related by Eq. (11). Thus, the metric g̃ is flat
K, K
start with the cosine theorem, compare [Ben-Chen et al. 2008],
if u is a solution of the Poisson equation (12).
App. A.) Take the logarithm on both sides to get
Now how can one measure the distortion caused by a conformal
j
(λ̃i j − λ̃ki )/2 = log sin α̃kij − log sin α̃ki change of metric? If u is constant, the new metric differs from
the old one only by a global change of scale, which we do not
and, for the first-order changes, consider as distortion. A reasonable measure for the distortion is
therefore the Dirichlet energy of u
j j
(δλ̃i j − δλ̃ki )/2 = cot α̃kij δα̃kij − cot α̃ki δα̃ki . R R
D(u) = 12 M du ∧ ∗du = 12 M g(grad u, grad u) dA
Since δλ̃i j = δui + δu j and δλ̃ki = δuk + δui , one obtains which measures “how much u changes.”
j j
Theorem. Among all conformally equivalent flat metrics g̃, the
(δu j − δuk )/2 = cot α̃kij δα̃kij − cot α̃ki δα̃ki , ones with least distortion are obtained if u is a solution for the
Poisson equation (12) with u|∂ M = const.
and two other such equations through cyclic permutation of
j
i jk. These three linear equations for δα̃kij , δα̃ijk , δα̃ki , are lin- Note that this measure of distortion is symmetric: Interchanging
early dependent (they sum to zero). Two of them together with g and g̃ does not change the distortion. Note also that different
j
δα̃ijk + δα̃ki + δα̃kij = 0 form a linear system of equations which choices for the constant boundary value change the solution
determines δα̃: g̃ only by a global scale factor, so one might as well choose
u|∂ M = 0.
δα̃i j
!
jkj 1 δu j −δui
cot α̃ijk − cot α̃ki 0 To prove the theorem, we proceed as usual in the calculus of
A · δα̃ki = 2 δui −δuk , A = − cot α̃i 0 cot α̃kij . variations. Suppose g̃ is flat and consider a variation of g̃ within
jk
δα̃kij 0
1 1 1 the space of conformally equivalent flat metrics, i.e., a variation
u̇ of u with ∆u̇ = 0. Then the variation of the Dirichlet energy is
Using the addition theorems for sine and cosine one shows R R
det A = −1. Applying Cramer’s rule then yields Ḋ = M g(grad u, grad u̇) dA = ∂ M u · g(grad u̇, N ) ds,
89
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Chapter 11:
Discrete Laplace operators: No free lunch
Abstract
Discrete Laplace operators are ubiquitous in applications spanning geometric modeling to simulation. For robust-
ness and efficiency, many applications require discrete operators that retain key structural properties inherent to
the continuous setting. Building on the smooth setting, we present a set of natural properties for discrete Laplace
operators for triangular surface meshes. We prove an important theoretical limitation: discrete Laplacians can-
not satisfy all natural properties; retroactively, this explains the diversity of existing discrete Laplace operators.
Finally, we present a family of operators that includes and extends well-known and widely-used operators.
Discrete Laplace operators on triangular surface meshes Consider a smooth surface S, possibly with boundary,
span the entire spectrum of geometry processing appli- equipped with a Riemannian metric, i.e., an intrinsic no-
cations, including mesh filtering, parameterization, pose tion of distance. Let the intrinsic L2 inner product of func-
transfer, segmentation, reconstruction, re-meshing, com- tions u and v on S be denoted by (u, v)L2 = S uv dA, and let
pression, simulation, and interpolation via barycentric coor- Δ = −div grad denote the intrinsic smooth Laplace-Beltrami
dinates [Tau00, Zha04, FH05, Sor05]. operator [Ros97]. We list salient properties of this operator:
(N ULL ) Δu = 0 whenever u is constant.
In applications one often requires certain structural prop-
erties of discrete Laplacians—such as symmetry, sparsity, (S YM ) Symmetry: (Δu, v)L2 = (u, Δv)L2 whenever u and v
linear precision, positivity, and convergence—requirements are sufficiently smooth and vanish along the boundary of S.
that are motivated by an attempt to keep properties of the (L OC ) Local support: for any pair p = q of points, Δu(p) is
continuous case, leading to a large and diverse pool of dis- independent of u(q). Altering the function value at a distant
crete versions. What is missing is a characterization of this point will not affect the action of the Laplacian locally.
vast pool by means of a unified conceptual treatment.
(L IN) Linear precision: Δu = 0 whenever S is part of the
As a step toward such a unified treatment, we describe a Euclidean plane, and u = ax + by + c is a linear function on
set of natural properties for discrete Laplace operators on tri- the plane.
angular surface meshes (§2). Building on a century-old theo- (M AX ) Maximum principle: harmonic functions (those for
rem by Maxwell and Cremona [Max64, Cre90], we prove an which Δu = 0 in the interior of S) have no local maxima (or
important theoretical limitation: not all the natural proper- minima) at interior points.
ties can be satisfied simultaneously, i.e., a ‘perfect’ discrete
(P SD ) Positive semi-definiteness: the Dirichlet energy,
Laplacian does not exist (§3). This result imposes a taxon-
ED (u) = S grad u2 dA, is non-negative. By our choice of
omy on all discrete Laplacians, by considering those proper-
sign for Δ, we obtain ED (u) = (Δu, u)L2 ≥ 0 whenever u is
ties that they fail to respect. Retroactively, this explains the
sufficiently smooth and vanishes along the boundary of S.
diversity of existing Laplacians proposed in the literature,
as different applications are bound to choose different op- In applications, one often requires a discrete Laplacian
erators. We complement this analysis with a framework for having properties corresponding to (some subset of) the
constructing sparse symmetric discrete Laplacians (§4). properties listed above.
90
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Wardetzky, Mathur, Kälberer, and Grinspun / Discrete Laplace operators: No free lunch
2. Discrete Laplacians least one vertex j such that ωi j > 0. Motivation: (i) (P OS)
is a sufficient condition for a discrete maximum principle
Discrete Laplacians defined Consider a triangular surface
(recall (M AX ) from the smooth case). (ii) Physically, in dif-
mesh Γ, with vertex set V , edge set E, and face set F. We
fusion problems corresponding to ut = −Δu, (P OS) assures
define a discrete Laplace operator on Γ by its linear action
that flow travels from regions of higher to regions of lower
on vertex-based functions,
potential, not vice-versa. (iii) (P OS) establishes a connection
(Lu)i = ∑ ωi j (ui − u j ) , (1) to barycentric coordinates by setting
j
ωi j
where i and j refer to vertex labels. Note that (1) automat- λi j =
∑ j=i ωi j
so that ∑ λi j = 1 .
j=i
ically implies that L satisfies (N ULL). Vice-versa, any lin-
ear operator on function values at vertices, (Lu)i = ∑ j li j u j , Indeed, u is discrete harmonic ((Lu)i = 0 at all inte-
which vanishes on constants, satisfies 0 = ∑ j li j , and can rior vertices) if and only if ui is a convex combination
hence be written as in (1) by setting ωi j = −li j . The proper- of its neighbors (ui = ∑ j=i λi j u j ). (iv) The combination
ties of L are encoded by the coefficient matrix, (ωi j ). (L OC)+(L IN)+(P OS) is related to Tutte’s embedding theo-
rem for planar graphs [Tut63, GGT06]: positive weights as-
Desired properties for discrete Laplacians We describe a sociated to edges yield a straight-line embedding of an ab-
set of natural properties for discrete Laplacians. Each prop- stract planar graph. For fixed boundary vertices, this embed-
erty is primarily motivated by a core structural property of ding is unique, and it satisfies (L IN) by construction.
the smooth Laplacian, but where possible we attempt to pro-
vide additional geometric and physical intuition. P OSITIVE SEMI - DEFINITENESS (P SD ): L is symmetric
positive semi-definite with respect to the standard inner
S YMMETRY (S YM ): ωi j = ω ji . Motivation: Real sym-
product and has a one-dimensional kernel. Motivation: The
metric matrices exhibit real eigenvalues and orthogonal
non-negative discrete Dirichlet energy is given by ED (u) =
eigenvectors.
∑i, j ωi j (ui − u j )2 . Note that (S YM) and (P OS) imply (P SD),
L OCALITY (L OC ): Weights are associated to mesh edges but (P SD) does not imply (P OS).
(1-ring support), so that ωi j = 0 if i and j do not share an
C ONVERGENCE (C ON ): Ln → Δ, in the sense that solu-
edge in Γ. Changing the function value u j will not alter the
tions to the discrete Dirichlet problem, involving Ln , con-
Laplacian’s action (Lu)i , if i and j do not share an edge. Mo-
verge to the solution of the smooth Dirichlet problem, in-
tivation: Smooth Laplacians govern diffusion processes via
volving Δ, under appropriate refinement conditions and in
ut = −Δu. When discretized via random walks on graphs,
appropriate norms [HPW06]. Motivation: (C ON) is indis-
(ωi j ) are transition probabilities along edges of Γ.
pensable when seeking to approximate solutions to PDEs.
L INEAR PRECISION (L IN ): (Lu)i = 0 at each interior ver-
tex whenever Γ is straight-line embedded into the plane and
Examples We briefly survey several Laplacians used
u is a linear function on the plane, point-sampled at the ver-
in computer graphics. Purely combinatorial Lapla-
tices of Γ. This is equivalent to requiring that
cians [Zha04], such as the umbrella operator (ωi j = 1
0 = (Lx)i = ∑ ωi j (xi − x j ) (2) iff vertex i and j share edge) and the Tutte Laplacian,
j (ωi j = 1/di , where di denotes the valence of vertex i) fail
to be geometric, i.e., they violate (L IN). Floater’s mean
for all interior vertex labels i, where x ∈ R2|V | denotes the
value weights and the Wachspress coordinates are widely
vector of positions of the |V | vertices of Γ in the plane† .
used for mesh parameterization [FH05], but violate (S YM)
Motivation: In graphics applications, (2) is desirable for
and (C ON). The ubiquitous cotan weights [PP93] and their
(i) de-noising, where one expects to remove normal noise
variants, commonly used for mesh de-noising, violate (P OS)
only but not to introduce tangential vertex drift [DMSB99],
on general meshes.
(ii) parameterization, where one expects planar regions to
remain invariant under parameterization [FH05], and (iii) To resolve cotan’s violation of (P OS), [BS05] uses the in-
plate bending energies, which must vanish for flat config- trinsic Delaunay triangulation of the polyhedral surface, at
urations [WBH∗ 07]. the cost of violating (L OC). One could alter the definition of
P OSITIVE WEIGHTS (P OS ): ωi j ≥ 0 whenever i = j. Ad- (L OC) so that it refers to the intrinsic Delaunay triangulation
ditionally we require that for each vertex i there exists at instead of the input mesh, Γ (in general these two triangu-
lations have differing edges). Even so, an extended notion
of locality would be violated: there is no universal (input-
† The equivalence follows from observing that (2) implies that L independent) integer k, such that the Delaunay edges inci-
vanishes on two linear functions, the x− and y−coordinates. Since dent to i can be computed from the knowledge only of a
L vanishes on constants by definition, it follows that it vanishes on k-neighborhood of i in Γ. We refer to §3.3 for further dis-
all linear functions. cussion, and summarize the situation:
91
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Wardetzky, Mathur, Kälberer, and Grinspun / Discrete Laplace operators: No free lunch
i Dij Eij
j i
Figure 1: Left: Primal graph (solid lines) and orthogonal dual (dashed lines), with edge ei j and its dual highlighted. The dark shaded region
defines the dual cell, i. Middle: Mean value weights correspond to dual edges tangent to the unit circle around the center vertex. Right: The
projection of the Schönhardt polytope is not regular, so it does not allow for a discrete Laplacian satisfying (S YM)+(L OC)+(L IN)+(P OS).
92
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Wardetzky, Mathur, Kälberer, and Grinspun / Discrete Laplace operators: No free lunch
lies before f2 . The sign is negative otherwise. With this sign modifies the input (Γ) mesh combinatorics to ensure regular-
convention, one readily checks that (3) implies (2). We there- ity. One might then modify the definition of (L OC) to refer to
fore obtain a Laplacian satisfying (S YM)+(L OC)+(L IN). the intrinsic triangulation rather than Γ. We discuss this pos-
sibility and conjecture that this route violates another notion
Examples Discrete Laplacians derived from orthogonal du- of locality of the Laplacian, which we call (L OC 2): the exis-
als on arbitrary (including non-planar) triangular surfaces tence of a universal (mesh-independent) integer k such that
were recently introduced in [Gli05], however, without not- the weights ωi j can be computed from the k-neighborhood
ing the equivalence to (S YM)+(L OC)+(L IN) in the planar of i in the original triangulation Γ.
case. A prominent example of orthogonal duals are the cotan
weights [PP93], which (as noted in [DHLM05]) arise from As in the planar picture, one can turn any (non-flat) tri-
assigning dual vertices to circumcenters of primal triangles. angular mesh into a regular one without changing its in-
trinsic structure by intrinsic edge flips [Gli05, FSBS]. Af-
If we drop (S YM) from the previous discussion, we still ter regularity has been restored via intrinsic edge flips,
obtain an orthogonal dual face per primal vertex, although one could redefine (L OC) with respect to the intrinsic tri-
these dual faces no longer fit into a consistent dual graph. angulation, rather than Γ, to obtain Laplacians satisfying
When the dual edges all have positive length, we obtain (S YM)+(L OC)+(L IN)+(P OS). Unfortunately, for the spe-
an operator satisfying (L OC)+(L IN)+(P OS) but not (S YM). cific case of an intrinsic Delaunay re-triangulation of Γ, we
[FHK06] explored a subspace of this case: a one-parameter observed in §2 that (L OC 2) would still be violated.
family of linear precision barycentric coordinates, includ-
ing mean value and Wachspress coordinates (see Figure 1- We conjecture that any approach that intrinsically re-
middle). [LBS06] showed that each member of this family stores regularity must violate (L OC 2). Our belief stems from
corresponds to a specific choice of orthogonal dual face per the link between regularity and weighted Delaunay trian-
primal vertex. gulation [Ede01]: given a weighted Delaunay triangulation,
when a vertex (arbitrarily far away from a given vertex i)
3.2. Positive Laplacians and regular triangulations is moved, the restoration of the weighted-Delaunay invari-
ants can require re-tessellation or re-assignment of weights
We now show the central obstruction: A triangulation locally around i.
of the plane allows for discrete Laplacians which satisfy
(S YM)+(L OC)+(L IN)+(P OS) if and only if the triangula-
3.4. Taxonomy of the literature
tion is regular.
In hindsight, our result explains the diversity of discrete
While there are various equivalent definitions of regu- Laplacians considered in graphics, each application choos-
larity [Ede01], the above obstruction immediately follows ing the subset of properties closest tailored to their needs:
when combining the previous discussion with an observa- dropping (L OC) yields intrinsic (weighted) Delaunay (or
tion of Aurenhammer [Aur87]: a straight-line triangulation meshless) Laplacians, dropping (S YM) gives rise to barycen-
of the plane is regular if and only if it allows for a positive tric coordinates, dropping (L IN) yields combinatorial Lapla-
orthogonal dual, i.e., a dual with positive weights, ωi j . Un- cians, and dropping (P OS) gives rise to cotan weights and
fortunately, an arbitrary input mesh, Γ, is not guaranteed to their generalization (3).
be regular, see Figure 1-right. This completes the proof of
our main result: there are no ’perfect’ discrete Laplacians
4. General construction for discrete Laplacians
for general meshes.
In this final section, we offer a framework for construct-
3.3. Discussion ing discrete Laplacians using adjoint operators and L2 inner
products. We show that (S YM) and (L OC) arise from choos-
Extended notion of locality To encompass additional pos- ing diagonal inner products, (L OC 2) holds if inner products
sibilities for discrete operators, one could consider extend- depend only on local k-neighborhoods of Γ, (P OS) corre-
ing (L OC) from 1-rings to k-rings for some fixed k > 1, i.e., sponds to inner products with positive entries, (P SD) arises
where ωi j is allowed to be non-zero if i and j are no more from positive semi-definite inner products, and (L IN) corre-
than k edges apart. Such an extension would accommodate, sponds to a geometric choice.
e.g., methods using higher-order basis functions. The Lapla-
cians provided in [Xu04], based on Loop subdivision bases, Construction It is known from the continuous setting that
use k = 2, but they break (S YM) and (P OS). We conjecture, the Laplacian on functions can be written as Δ = δdu, where
but do not prove, that extending (L OC) to k > 1 does not d denotes the usual metric-free derivative taking 0-forms
remove the fundamental obstruction to a perfect Laplacian. (functions) to 1-forms, and δ is the adjoint operator, taking
1-forms to 0-forms. Using L2 inner products, δ is defined by
Regularity-restoring approaches Motivated by [BS05], the identity (du, α)L2 = (u, δα)L2 , where u is a function and
1 0
one could attempt to circumvent the central obstruction to α is a 1-form. Notice that d is defined independent of any
perfect Laplacians by considering an algorithm that first metric, whereas δ cannot be defined without a metric. For
93
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Wardetzky, Mathur, Kälberer, and Grinspun / Discrete Laplace operators: No free lunch
94
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Chapter 12:
Discrete Geometric Mechanics for Variational Time Integrators
Ari Stern Mathieu Desbrun
Caltech
95
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
but is broad enough to encompass areas ranging to E&M and quan- into N equal steps of length h, so that we no longer have a continu-
tum mechanics. ous notion of time, but have instead a discrete set of times tk = kh.
Then, finding an approximation to the differential equation on our
new discrete time domain is tantamount to solving for the values of
Discrete Structure-Preserving Integrators Geometric in- the angles at the various times, i.e., finding the values qk = q(tk )
tegrators are a class of numerical time-stepping methods that ex- for k = 1, . . . , N .
ploit this geometric structure of mechanical systems [Hairer et al.
2002]. Of particular interest within this class, variational integra- Given this setup, how can we compute the qk ’s? There are actu-
tors [Marsden and West 2001] discretize the variational formulation ally many choices, and the important point to realize is, not all of
of mechanics we mentioned above, providing a solution for most them perform equally well.
ordinary and partial differential equations that arise in mechanics.
While the idea of discretizing variational formulations of mechan-
ics is standard for elliptic problems using Galerkin Finite Element 3.2 Three Numerical Schemes
methods for instance, only recently has it been used to derive vari-
ational time-stepping algorithms for mechanical systems. This ap- Assuming that the time step h is small enough with respect to all
proach allows the construction of integrators with any order of ac- other derivatives of q, we could leverage the well-known Taylor
curacy [West 2003; Lew 2003], and can handle constraints as well expansion:
as external forcing. Results have been shown to be equal or supe- q(t + h) = q(t) + hq̇(t) + O(h) .
rior to all other types of integrators for simulations of a large range Using this first order approximation, one can easily derive the fol-
of physical phenomena [Kane et al. 2000], making this discrete- lowing, straightforward update rules by applying Taylor expansion
geometric framework both versatile and powerful. to both q and v:
Of particular interest in computer animation, the simplest varia-
qk+1 = qk + h vk
(
tional integrator can be implemented by taking two consecutive po-
sitions q0 = q(t0 ) and q1 = q(t0 +dt) of the system to compute the g
vk+1 = vk − h sin qk
next position q2 = q(t0 + 2dt). Repeating this process calculates L
an entire discrete (in time) trajectory. In this chapter, we describe Given the previous values qk , vk , this method gives us an explicit
the foundations necessary to derive such variational schemes based formula to compute the next values in time qk+1 , vk+1 ; this specific
on geometric arguments. time integrator is called the explicit Euler method. Repeating this
procedure by setting k := k + 1 provides a way to compute the
whole motion.
3 A Motivating Example: The Pendulum Alternatively, we could change the time integration procedure by
evaluating the right hand sides of the former rules at the next time
Before we delve into the details of what variational integrators are, step, through:
let us first look at a simple example to exemplify how slight varia-
tions in the design of time integrators can result in widely different qk+1 = qk + h vk+1
(
behaviors. g
vk+1 = vk − h sin qk+1
L
3.1 Setup and Conventions This method is no longer explicit, but implicit: one needs to use
a (non-linear) solver to find the pair qk+1 , vk+1 that satisfy these
Consider a simple pendulum of mass m and length L, swinging equations, given the current values qk and vk . This time integrator
under the influence of the gravitational acceleration g. Let q(t) is traditionally called the implicit Euler method.
represents the pendulum’s angle with the vertical at time t. As this Finally, one could use a seemingly strange mix of the two, by
angle is the only degree of freedom for this simple example, we can first updating vk+1 explicitly, then qk+1 using the new value vk+1
express the equations of motion for this system based solely on q (thus, still explicitly):
and its derivatives: g
q̈ = − sin q, (1) ( g
L vk+1 = vk − h sin qk
L
where we use the “dot” notation to represent derivatives with re- qk+1 = qk + h vk+1
spect to time, i.e.:
Notice that the difference with the first scheme is rather minimal.
dq d2 q However, this particular time integrator is known as the symplectic
q̇ := , and q̈ := 2 .
dt dt Euler method.
We can rewrite this equation as a system of two coupled first-order These three methods are called finite difference methods, since
equations in the variables q and v: they approximate the left-hand side derivatives of Eqs. (2-3) by tak-
ing the difference between consecutive values. Notice in particular
q̇ = v (2) that, while the implicit method is more computationally expensive,
g the two others involve the exact same amount of operations. Thus,
v̇ = − sin q (3) their behavior should not be very different, right?
L
If the initial conditions q(0) and q̇(0) are given, then we could theo-
retically solve this differential equation for q. Assume for a moment 3.3 Comparing Integrators
that we don’t have access to the analytical solution to this problem
(in fact, as in many cases, no such solution is known). We can only Numerical tests of these three integrators reveal obvious differences
hope to approximate the solution using an integrator. To achieve in practice (to avoid going too much into sordid details of numer-
this goal, we first discretize the problem. That is, we break up time ical analysis, we will stick to a fixed time step h = 0.01 for all
96
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Figure 1: Three integrators in phase space (q, p): (left) explicit, (middle) implicit, (right) symplectic. Six initial conditions are shown, with their respective
trajectories; only the symplectic integrator captures the periodic nature of the pendulum. The bold trajectories correspond to the exact same initial condition.
experiments). First, one quickly realizes that the explicit Euler suf- 4 Geometric Mechanics
fers from stability problems: the motion of the pendulum amplifies
over time! An obvious consequence is that the pendulum’s energy In the familiar Newtonian view of mechanics, we begin by adding
increases over time, rather than being conserved. Thus, in prac- up the forces F on a body and writing the equations of motion using
tice, the solution often “blows up” and becomes unstable as time the famous second law,
progresses—not a great quality for a time integrator. Fortunately,
the implicit Euler is stable: the amplitude of the pendulum’s os- F = ma, (4)
cillations actually decreases over time, avoiding any chance of nu-
merical divergence (see Fig. 2). However, this stability comes at where a represents the acceleration of the body. With geomet-
a cost: the pendulum loses energy, causing the pendulum to slow ric mechanics, however, we consider mechanics from a variational
down towards a stop, even if our original equations do not include point of view. In this section, we review the basic foundations of
any damping forces. Effectively, we resolved the stability issue Lagrangian mechanics, one of the two main flavors of geometric
through the introduction of numerical dissipation—but we induced mechanics (we will only point to some connections with Hamilto-
the opposite problem instead. The symplectic method, on the other nian mechanics).
hand, both is stable and oscillates with constant amplitudes. This
is obviously a superior method for physical simulation, given that
no additional numerical operations were needed to get the correct 4.1 Lagrangian Mechanics
qualitative behavior!
Consider a finite-dimensional dynamical system parameterized by
the state variable q, i.e., the vector containing all degrees of free-
dom of the system. In mechanics, a function of a position q and
a velocity q̇ called the Lagrangian function L is defined as the ki-
netic energy K (usually, only function of the velocity) minus the
potential energy U of the system (usually, only function of the state
variable):
L(q, q̇) = K(q̇) − U (q).
97
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
that its critical points exist where the derivative ∇f (x) = 0. Since Since the integral equals 0 for any variation δq, the first term
q is a path, we cannot simply take a “derivative” with respect to inside the integral must equal 0. Therefore, the Euler-Lagrange
q; instead, we take something called a variation. A variation of equations become:
the path q is written δq, and can be thought of as an infinitesimal M q̈ = −M g,
perturbation to the path at each point, with the important property
that the perturbation is null at the endpoints of the path. Computing which are precisely the Newtonian equation of motion F = ma .
variations of the action induced by variations δq of the path q(t)
results in:
Z T Z T 4.3 Symmetries and Invariants
∂L ∂L
δS(q) = δ L(q(t), q̇(t)) dt = · δq + · δ q̇ dt
0 0 ∂q ∂ q̇ Finally, we arrive at a crucial question: why exactly do physical
Z T T systems conserve certain quantities? If we can answer this ques-
∂L d ∂L ∂L tion and mimic the continuous dynamics in our discrete imple-
= − δq dt + · δq ,
0 ∂q dt ∂ q̇ ∂ q̇ 0 mentations, only then can we hope to get good numerical prop-
erties for our time integrators. This question is partially answered
where integration by parts is used in the last equality. When the by Noether’s theorem, an extremely powerful theorem in physics
endpoints of q(t) are held fixed with respect to all variations δq(t) which states that each symmetry of a system leads to a physical
(i.e., δq(0) = δq(T ) = 0), the rightmost term in the above equa- invariant (i.e., a conserved quantity). For example, take the dynam-
tion vanishes. Therefore, the condition of stationary action for ar- ics of an elastic object in the void. The Lagrangian can easily be
bitrary variations δq with fixed endpoints stated in Hamilton’s prin- shown to be translation invariant: translating all the mass particles
ciple directly indicates that the remaining integrand in the previous of the elastic object would not change the value of the Lagrangian.
equation must be zero for all time t, yielding what is known as the Similarly, the Lagrangian is rotation-invariant as moving all the par-
Euler-Lagrange equations: ticles of the object by a global rotation has no reason to affect the
Lagrangian either. This means that the system has a translational
∂L d ∂L
− = 0. (5) and rotational symmetry. Noether’s theorem then states that the
∂q dt ∂ q̇ linear and angular momenta are preserved. These symmetries, if
respected in the discrete setting, will provide equivalent discrete in-
For a given Lagrangian, this formula will give the equations of mo-
variants in time integrators! In fact, we will see that these invariants
tion of the system.
can be preserved in time integrators at no extra computational cost
by simply respecting the geometric, variational nature of dynamics.
Forced Systems To account for non-conservative forces or dis-
sipation F , the least action principle is modified as follows:
4.4 Phase Space and Symplecticity
Z T Z T
δ L(q(t), q̇(t)) dt + F (q(t), q̇(t)) · δq dt = 0 . To visualize a dynamical system, we often plot its trajectories in
0 0
phase space. In its simplest version as in the one-dimensional pen-
This is known as the Lagrange-d’Alembert principle. dulum case, it is in fact a phase plane where one axis represents the
position q and the other axis represents either velocity q̇ or, more
usually, momentum p = mq̇. Note that for higher dimensional sys-
Lagrangian vs. Hamiltonian Mechanics. Hamiltonian me- tems, there is an additional axis corresponding to each additional
chanics provides an alternative formulation, which is closely related position component q i and its corresponding velocity q̇ i (or mo-
to the Lagrangian. The reader may consult any book on mechanics mentum pi ). The graphs that result from plotting the trajectories in
for the relationships between the two descriptions. We simply point phase space are called phase portraits.
out here (as it will be useful later) that in the Hamiltonian formu-
lation, the dynamics are described in phase space, i.e, the current Going back to our motivating example of the pendulum, we can
state of a dynamical system is given as a pair (q, p), where q is the now more clearly see the qualities/flaws of the time integrators by
state variable, while p is the momentum, defined by p = ∂L/∂ q̇. looking at their respective phase portraits in Fig. 1. While the
pendulum’s phase portrait has a characteristic structure of nested,
energy-preserving orbits (since the oscillations are periodic), this
4.2 Example was not true for the two first discrete approximations: the trajec-
tories of explicit Euler spiraled outwards (dramatically increasing
Let make the previous definitions more concrete by detailing a par- magnitude of oscillations, thus energy), while those of implicit Eu-
ticularly simple example. Given a particle with mass M in a grav- ler spiraled inwards. Why did some of the phase portraits look bet-
itational field, i.e., in a potential field V = M g · q, the Lagrangian ter than others? How can we preserve the closedness of the orbits
is written: without making the time integrator more complicated?
1
L(q, q̇) = q̇ T M q̇ − M g · q. One of the key features of Lagrangian flows (i.e., motions) is that
2 they are symplectic. Formally, this means that the flow preserves
Taking the variation of the action, one gets: the canonical two-form Ω = dq i ∧ dpi . In the two-dimensional
Z b Z b phase plane, this directly implies that the area of any phase-space
1 T region is preserved under the flow (see Liouville’s theorem in clas-
δ q̇ M q̇ − M g q dt = (M q̇ · δ q̇ − M g · δq) dt. sical mechanics). For example, let us take a given region of initial
a 2 a
conditions in phase-space. If we advance all these states simulta-
Next, we integrate the δ q̇ term by parts; the boundary terms disap- neously, the regions deforms under the flow in a way that preserves
pear, since δq = 0 at the endpoints. the original area as shown in Fig. 3 a cat-head shaped region: this
phenomenon is called symplecticity. However, as seen on this same
Z b
figure, explicit and implicit Euler both fail the test of symplectic-
= (−M q̈ − M g) · δq dt = 0. ity. Because orbits spiral outward under explicit Euler, a region
a
98
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
will expand, and its area will increase. Conversely, implicit Eu- Discrete Stationary Action Principle Given the discrete La-
ler decreases the area inside the evolving region. Preserving this grangian, the discrete action functional becomes simply a sum:
property of the flow in phase space for our time integrators (that
is, having them be symplectic in a discrete sense) is key to ensure N
X −1 Z b
globally correct behavior! Sd := Sd ({qi }i=0..N ) = Ld (qk , qk+1 ) ≈ L(q, q̇) dt =S(q).
k=0 a
99
Discrete Differential Geometry: An Applied Introduction (Desbrun, Grinspun, Schröder, Wardetzky) SIGGRAPH Asia 2008
Figure 3: Symplecticity [reproduced from [Hairer et al. 2002]]: while a continuous Lagrangian system is symplectic (that is to say, in this simple case, an area
in phase space evolves along the flow without changing its area), discrete time integrators rarely share this property. From our three time integrators compared
in Section 3, only the last one is symplectic. In the background, the reader will recognize the shape of the orbits obtained in Fig. 1(right).
5.4 Adding Dissipation Aknowledgements The authors are most grateful to Yiying
Tong, Jerrold E. Marsden, Eva Kanso, Lily Kharevych, and Patrick
In case of forcing and/or dissipation, the discrete action can be mod- Mullen for their constant help.
ified by adding the non-conservative force term and using the dis-
crete Lagrange-d’Alembert principle [Marsden and West 2001]:
N
References
X
Fd−(qk , qk+1 ) Fd+(qk , qk+1 )
δSd + · δqk + · δqk+1 = 0.
BARZEL , R., H UGHES , J., AND W OOD , D. N. 1996. Plausi-
k=0
ble motion simulation for computer graphics animation. In EG
where Fd− (qk , qk+1 ) and Fd+ (qk , qk+1 ) are discrete external forces Workshop on Computer Animation and Simulation, 183–197.
acting respectively on the right of qk and on the left of qk+1 . H AIRER , E., L UBICH , C., AND WANNER , G. 2002. Geomet-
In other words, Fd− (qk , qk+1 ) · δqk + Fd+ (qk , qk+1 ) · δqk+1 can ric Numerical Integration: Structure-Preserving Algorithms for
be seen as a two-point quadrature of the continuous forcing term
R tk+1 Ordinary Differential Equations. Springer.
tk
F · δq dt. The forced discrete Euler-Lagrange equations can
be expressed in a convenient, position-momentum form as follows: H AUTH , M., E TZMUSS , O., AND S TRASSER , W. 2003. Analysis
of Numerical Methods for the Simulation of Deformable Mod-
pk = −D1 Ld (qk , qk+1 ) − Fd− (qk , qk+1 ) , els. The Visual Computer 19, 7-8, 581–600.
pk+1 = D2 Ld (qk , qk+1 ) + Fd+ (qk , qk+1 ). K ANE , C., M ARSDEN , J. E., O RTIZ , M., AND W EST, M. 2000.
Variational Integrators and the Newmark Algorithm for Conser-
This variational treatment of energy decay, despite its simplicity, vative and Dissipative Mechanical Systems. Int. J. Numer. Meth-
has also been proven superior to the usual time integration schemes ods Engrg. 49, 1295–1325.
that often add numerical viscosity to get stability [West 2003].
K HAREVYCH , L., W EIWEI , T ONG , Y., K ANSO , E., M ARSDEN ,
J. E., S CHR ÖDER , P., AND D ESBRUN , M. 2006. Geomet-
5.5 Last Words ric, variational integrators for computer animation. In ACM/EG
Symposium on Computer animation, 43–51.
Variational integrators often perform better than their non-
variational counterparts because they preserve the underlying ge- L EW, A. 2003. Variational Time Integrators in Computational
ometry of the physical system. This has two important conse- Solid Mechanics. Phd thesis, California Institute of Technology.
quences. First, the integrators are guaranteed to be symplectic, M ARSDEN , J. E., AND W EST, M. 2001. Discrete Mechanics and
which in practice will result in excellent energy behavior, rather Variational Integrators. Acta Numerica, 357–515.
than perpetual damping or blowing up. Second, they are also guar-
anteed to preserve discrete momenta of the system (via a discrete PARENT, R. 2001. Computer Animation: Algorithms and Tech-
version of Noether’s theorem). As a consequence, simulations and niques. Series in Computer Graphics. Morgan Kaufmann.
animations using these integrators usually have great physical and
visual fidelity with low computational cost, even for dissipative P RESS , W. H., F LANNERY, B. P., T EUKOLSKY, S. A., AND V ET-
systems (see [Kharevych et al. 2006] for a discussion on damp- TERLING , W. T. 1992. Numerical Recipes in C: The Art of
ing in animation). To build upon this short introduction, the reader Scientific Computing, 2nd ed. Cambridge University Press.
is invited to investigate recent developments in variational integra-
tors, such as Lie group integrators, Hamilton-Pontryagin integra- W EST, M. 2003. Variational Integrators. PhD thesis, California
tors, asynchronous variational updates (where timesteps are differ- Institute of Technology.
ent for each mesh element), and stochastic variational integrators.
Caveat: The reader may be misled into thinking that ex-
plicit variational schemes does not require the typical Courant-
Friedrichs-Levy (CFL) condition (or equivalent) on the time step
size. This is, of course, untrue: the same usual theoretical lim-
itations of explicit schemes are still valid for symplectic explicit
schemes. However, we can easily design symplectic implicit
schemes that do not share this particular limitation, generally al-
lowing for much larger time steps. Finally, we can make them of ar-
bitrarily higher order by simply improving the quadrature rule used
to convert the continuous Lagrangian into a discrete Lagrangian.
100