DISCRETE DIFFERENTIAL

66
DISCRETE DIFFERENTIAL GEOMETRY: AN APPLIED INTRODUCTION Keenan Crane • CMU 15-458/858B • Fall 2017

Transcript of DISCRETE DIFFERENTIAL

Page 1: DISCRETE DIFFERENTIAL

DISCRETE DIFFERENTIAL GEOMETRY:

AN APPLIED INTRODUCTIONKeenan Crane • CMU 15-458/858B • Fall 2017

Page 2: DISCRETE DIFFERENTIAL

Keenan Crane • CMU 15-458/858B • Fall 2017

DISCRETE DIFFERENTIAL GEOMETRY:

AN APPLIED INTRODUCTION

LECTURE 5: EXTERIOR CALCULUS IN Rn

Page 3: DISCRETE DIFFERENTIAL

a

a(u)

u

1-form 3-form differential 2-form

• Today: exterior calculus

•how do k-forms change?

•how do we integrate k-forms?

Exterior Calculus—Overview• Previously:

•1-form—linear measurement of a vector

•k-form—multilinear measurement of volume

•differential k-form—k-form at each point

Page 4: DISCRETE DIFFERENTIAL

Integration and Differentiation•Two big ideas in calculus:

•differentiation

•integration

•linked by fundamental theorem of calculus

•Exterior calculus generalizes these ideas

•differentiation of k-forms (exterior derivative)

•integration of k-forms (measure volume)

•linked by Stokes’ theorem

•Goal: integrate differential forms over meshes to get discrete exterior calculus (DEC)

Page 5: DISCRETE DIFFERENTIAL

Exterior Derivative

Page 6: DISCRETE DIFFERENTIAL

Derivative—Many Interpretations…

“pushforward”

“slope of the graph”/“rise over run”

“best linear approximation”

“difference in the limit”

Page 7: DISCRETE DIFFERENTIAL

Vector Derivatives—Visualized

grad f div X

f X Y

curl Y

Page 8: DISCRETE DIFFERENTIAL

Review—Vector Derivatives in CoordinatesHow do we express grad, div, and curl in coordinates?

grad div curl

Page 9: DISCRETE DIFFERENTIAL

Exterior Derivative

exactness

differential

Where do these rules come from?(What’s the geometric motivation?)

product rule

Page 10: DISCRETE DIFFERENTIAL

Exterior Derivative—Differential

Page 11: DISCRETE DIFFERENTIAL

Review: Directional Derivative•The directional derivative of a scalar function at a point p

with respect to a vector X is the rate at which that function increases as we walk away from p with velocity X.

•More precisely: p

X

•Alternatively, suppose that X is a vector field, rather than just a vector at a single point. Then we can write just:

•The result is a scalar function, whose value at each point p is the directional derivative along the vector X(p).

Page 12: DISCRETE DIFFERENTIAL

Review: Gradient

I.e., at each point the gradient is the unique vector* such that taking the inner product ⟨・,・⟩ with a given vector X yields the directional derivative along X.

*Assuming it exists! I.e., assuming the function is differentiable.

Page 13: DISCRETE DIFFERENTIAL

Differential of a Function•Recall that differential 0-forms are just ordinary scalar functions

•Change in a scalar function can be measured via the differential

•Two ways to define differential:

1. As unique 1-form such that applying to any vector field gives directional derivative along those directions:

2. In coordinates:

…but wait, isn’t this just the same as the gradient?

Page 14: DISCRETE DIFFERENTIAL

Gradient vs. Differential•Superficially, gradient and differential look quite similar (but not identical!):

•Especially in Rn:

•So what’s the difference?•For one thing, one is a vector field; the other is a differential 1-form•More importantly, gradient depends on inner product; differential doesn’t

Makes a big difference when it comes to curved geometry, numerical optimization, …

Page 15: DISCRETE DIFFERENTIAL

Exterior Derivative—Product Rule

Page 16: DISCRETE DIFFERENTIAL

Exterior Derivative

exactness

differential

product rule

Page 17: DISCRETE DIFFERENTIAL

Product Rule—Derivative

Q: Why? What’s the geometric interpretation?

Page 18: DISCRETE DIFFERENTIAL

Product Rule—Exterior Derivative

Q: Geometric intuition?

(Does this cartoon depict the exterior derivative? Or a directional derivative?)

Page 19: DISCRETE DIFFERENTIAL

Product Rule—“Recursive Evaluation”

Page 20: DISCRETE DIFFERENTIAL

Exterior Derivative—Examples

Page 21: DISCRETE DIFFERENTIAL

Exterior Derivative—Exactness

Page 22: DISCRETE DIFFERENTIAL

Exterior Derivative

exactness

differential

product rule

Why?

Page 23: DISCRETE DIFFERENTIAL

grad ff curl � grad f

Review: Curl of Gradient

Key idea: exterior derivative should capture a similar idea.

Page 24: DISCRETE DIFFERENTIAL

A:

Q: Does this operation remind you of anything (perhaps from vector calculus)?

Page 25: DISCRETE DIFFERENTIAL

Exterior Derivative and CurlSuppose we have a vector field

Its curl is then

Looks an awful lot like…

Especially if we then apply the Hodge star.

Page 26: DISCRETE DIFFERENTIAL

d � d = 0

f df

Intuition: in Rn, first d behaves just like gradient; second d behaves just like curl.

Page 27: DISCRETE DIFFERENTIAL

Exterior Derivative in 3D (1-forms)

A:

Q: Does this operation remind you of anything (perhaps from vector calculus)?

Page 28: DISCRETE DIFFERENTIAL

Exterior Derivative and Divergence

Its divergence is then

Looks an awful lot like…

Especially if we then apply the Hodge star.

Suppose we have a vector field

Page 29: DISCRETE DIFFERENTIAL

Exterior Derivative - Divergence

( codifferential: )

Page 30: DISCRETE DIFFERENTIAL

Exterior vs. Vector Derivatives—Summary

grad f div X

f X Y

curl Y

Page 31: DISCRETE DIFFERENTIAL

Exterior Derivative

exactness

differential

product rule

Page 32: DISCRETE DIFFERENTIAL

Exterior Calculus

Page 33: DISCRETE DIFFERENTIAL

Exterior Calculus—Diagram View•Taking a step back, we can draw many of the operators seen so far as diagrams:

Page 34: DISCRETE DIFFERENTIAL

Laplacian•Can now compose operators to get other operators

•E.g., Laplacian from vector calculus:

•Can express exact same operator via exterior calculus:

•…except that this expression easily generalizes to curved domains.

•Can also generalize to k-forms:

•Will have much more to say about the Laplacian later on!

Page 35: DISCRETE DIFFERENTIAL

Preview: Exterior Calculus Beyond Rn

•Why study these two very similar viewpoints? (I.e., vector vs. exterior calculus)•Hard to measure change in volumes using basic vector calculus

•Duality clarifies the distinction between different concepts/quantities•Topology: notion of differentiation that does not require metric (e.g., cohomology)

•Geometry: clear language for calculus on curved domains (Riemannian manifolds)

•Physics: clear distinction between physical quantities (e.g., velocity vs. momentum)• Computer Science: Leads directly to discretization/computation!

[DEMO]

Page 36: DISCRETE DIFFERENTIAL

•Exterior derivative d used to differentiate k-forms

•0-form: “gradient”

•1-form: “curl”

•2-form: “divergence” (codifferential δ)

•and more...

•Natural product rule

•d of d is zero

•Analogy: curl of gradient

•More general picture (soon!) via Stokes’ theorem

Exterior Derivative - Summary

Page 37: DISCRETE DIFFERENTIAL

Integration of Differential k-Forms

Page 38: DISCRETE DIFFERENTIAL

Review—Integration of Area

W

Ai

Âi

Ai =)Z

WdA

Page 39: DISCRETE DIFFERENTIAL

Review—Integration of Scalar Functions

W

pi

=)

Page 40: DISCRETE DIFFERENTIAL

W

Integration of a 2-Form

ui

vipi

Âi

wpi (ui, vi) =)Z

Ww

Key idea: integration always involves differential forms!

Page 41: DISCRETE DIFFERENTIAL

Integration of Differential 2-forms—Example•Consider a differential 2-form on the unit square in the plane:

y

�� =

•In this case, no different from usual “double integration” of a scalar function.

Page 42: DISCRETE DIFFERENTIAL

Integration on Curves

g

ti

Z

ga ⇡ Â

iapi (ti)

pi

Page 43: DISCRETE DIFFERENTIAL

= Âi

api (ni)

Integration on Curves

g

ti

ni

pi

⇡ Âi?api (ti)

Z

g?a

Page 44: DISCRETE DIFFERENTIAL

Integration on Curves—Example•Now consider a 1-form in the plane, which we will integrate over the unit circle:

(Why does this result make sense geometrically?)

Page 45: DISCRETE DIFFERENTIAL

Stokes’ Theorem

Page 46: DISCRETE DIFFERENTIAL

Boundary

Page 47: DISCRETE DIFFERENTIAL

Boundary

Basic idea: for an n-dimensional set, the boundary points are those not contained in any n-ball strictly inside the domain.

Page 48: DISCRETE DIFFERENTIAL

Boundary of a BoundaryQ: Which points are in the boundary of the boundary?

A: No points! Boundary of a boundary is always empty.

Page 49: DISCRETE DIFFERENTIAL

Boundary of a BoundaryQ: Which points are in the boundary of the boundary?

A: No points! Boundary of a boundary is always empty.

Page 50: DISCRETE DIFFERENTIAL

Review: Fundamental Theorem of Calculus

ba

f(a)

f(b)Z

b

a

∂f

∂x

dx = f(b)� f(a)

Page 51: DISCRETE DIFFERENTIAL

Stokes’ Theorem

Z

Wda =

Z

∂Wa

Analogy: fundamental theorem of calculus

Page 52: DISCRETE DIFFERENTIAL

Example: Divergence TheoremZ

W� · X dA =

Z

∂Wn · X d`

W

∂W

What goes in, must come out!

()

Page 53: DISCRETE DIFFERENTIAL

Stokes’ Theorem

Z

Wda =

Z

∂Wa

W

∂W

“The change we see on the outside ispurely a function of the change within.”

—Zen koan

Page 54: DISCRETE DIFFERENTIAL

Fundamental Theorem of Calculus & Stokes’

ba

f(a)

f(b)

()

Zb

a

∂f

∂x

dx = f(b)� f(a)

Z

[a,b]df =

Z

∂[a,b]f

Page 55: DISCRETE DIFFERENTIAL

Why is d ◦ d = 0?

...for any ! (no matter how small!)

Page 56: DISCRETE DIFFERENTIAL

Why is d ◦ d = 0?

differential

product rule

exactness

“behaves like gradient for functions”

Stokes’ theoremwhat goes in, must come out!

Page 57: DISCRETE DIFFERENTIAL

Wui

vipi

•Integration

•break domain into small pieces

•measure each piece with k-form

•Stokes’ theorem

•convert region integral to boundary integral

•super useful—lets us “skip” a derivative

•special cases: divergence theorem, F.T.C., many more!

•will use over and over again in DEC/geometry processing

Integration & Stokes’ Theorem - Summary

W

∂W

Page 58: DISCRETE DIFFERENTIAL

Inner Product on Differential k-Forms

Page 59: DISCRETE DIFFERENTIAL

Inner Product—Review•Recall that a vector space V is any collection of “arrows” that can be added, scaled, …

•Q: What’s an inner product on a vector space?

•A: Loosely speaking, a way to talk about lengths, angles, etc., in a vector space

•More formally, a symmetric positive-definite bilinear map:

for all vectors u,v,w in V and scalars a. (Geometric interpretation of these rules?)

Page 60: DISCRETE DIFFERENTIAL

Euclidean Inner Product—Review•Most basic inner product: inner product of two vectors in Euclidean Rn

•Just sum up the product of components:

(Does this operation satisfy all the requirements of an inner product?)

Example.

Page 61: DISCRETE DIFFERENTIAL

L2 Inner Product of Functions / 0-forms•Remember that in many situations, functions are also vectors

•What does it mean to measure the inner product between functions?

•Want some notion of how well two functions “line up”

•One idea: mimic what we did for vectors in Rn. E.g.,

•Called the L2 inner product. (Note: f and g must each be square-integrable!)•Does this capture notion of “lining up”? Does it obey rules of inner product?

f g

f g

0 1

0 1

Page 62: DISCRETE DIFFERENTIAL

Inner Product on k-Forms

Q: What happens when k=0?

Q: What’s the degree (k) of the integrand? Why is that important?

A: We just get the usual L2 inner product on functions.

A: Integrand is always an n-form, which is the only thing we can integrate in n-D!

Page 63: DISCRETE DIFFERENTIAL

Inner Product of 1-Forms—Example

Page 64: DISCRETE DIFFERENTIAL

Summary

Page 65: DISCRETE DIFFERENTIAL

Exterior Calculus—Summary•What we’ve seen so far:

•Exterior algebra: language of volumes (k-vectors)

•k-form: measures a k-dimensional volume

•Differential forms: k-form at each point of space

•Exterior calculus: differentiate/integrate forms

•Simplicial complex: mesh made of vertices, edges, triangles…

•Next up:

•Put all this machinery together

•Integrate to get discrete exterior calculus (DEC)

Page 66: DISCRETE DIFFERENTIAL

Thanks!

DISCRETE DIFFERENTIAL GEOMETRYAN APPLIED INTRODUCTION