Lecture 22: Laplacian Mesh Editing COMPSCI/MATH 290-04 Chris - - PowerPoint PPT Presentation

lecture 22 laplacian mesh editing
SMART_READER_LITE
LIVE PREVIEW

Lecture 22: Laplacian Mesh Editing COMPSCI/MATH 290-04 Chris - - PowerPoint PPT Presentation

Lecture 22: Laplacian Mesh Editing COMPSCI/MATH 290-04 Chris Tralie, Duke University 4/5/2016 COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing Announcements First project milestone Monday 4/11/2016 First milestone 20% Group


slide-1
SLIDE 1

Lecture 22: Laplacian Mesh Editing

COMPSCI/MATH 290-04

Chris Tralie, Duke University

4/5/2016

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-2
SLIDE 2

Announcements

⊲ First project milestone Monday 4/11/2016 ⊲ First milestone 20% ⊲ Group Assignment 3 Out This Week

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-3
SLIDE 3

Table of Contents

◮ Mesh Editing Overview / Discrete Curvature ⊲ Laplacian Mesh Editing

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-4
SLIDE 4

Mesh Editing Overview

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-5
SLIDE 5

Mesh Editing Overview

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-6
SLIDE 6

Mesh Editing Overview

This is not what we want!

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-7
SLIDE 7

Mesh Editing Overview

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-8
SLIDE 8

Mesh Editing Overview

This is much better! Preserve relative information about points to neighbors

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-9
SLIDE 9

Parameterized Curves / Curvature

Curvature κ is 1

r , where r is radius of osculating circle

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-10
SLIDE 10

Parameterized Curves / Curvature

Curvature κ is 1

r , where r is radius of osculating circle

Curvature can also be considered as a vector κ n

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-11
SLIDE 11

Parameterized Curves / Curvature

γ(t) = (x(t), y(t)) Velocity γ′(t) = dx(t) dt , dy(t) dt

  • COMPSCI/MATH 290-04

Lecture 22: Laplacian Mesh Editing

slide-12
SLIDE 12

Parameterized Curves / Curvature

γ(t) = (x(t), y(t)) Velocity γ′(t) = dx(t) dt , dy(t) dt

  • Assume parameterized by arc length; that is, curve moving at a

unit speed. In other words γ′(t) · γ′(t) = 1

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-13
SLIDE 13

Parameterized Curves / Curvature

γ(t) = (x(t), y(t)) Velocity γ′(t) = dx(t) dt , dy(t) dt

  • Assume parameterized by arc length; that is, curve moving at a

unit speed. In other words γ′(t) · γ′(t) = 1 Differentiate both sides with respect to t, use product rule, end up with 2γ′′(t) · γ′(t) = 0 = ⇒ γ′′(t) ⊥ γ′(t) γ′′(t) = κ n(t) is the curvature vector

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-14
SLIDE 14

Discrete Curvature

i i-1 i+1

vi

Derivative at point i (velocity vector) is approximately

  • vi =

xi − xi−1

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-15
SLIDE 15

Discrete Curvature

i i-1 i+1

ni

Derivative at point i (velocity vector) is approximately

  • vi =

xi − xi−1 Second derivative (curvature vector) is approximately

  • ni =
  • vi+1 −

vi =

  • xi+1 −

xi − ( xi − xi−1) = −2 xi + xi−1 + xi+1

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-16
SLIDE 16

Curvature of Surfaces

Cut surface with plane, look at curvature of curve going through point

Courtesy of Keenan Crane, Discrete Differential Geometry: An Applied Introduction

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-17
SLIDE 17

Discrete Mean Curvature Approximation

Still just a difference of a point with its neighbors! Convention is negative the curvature vector: −H(vi) ni, where H(vi) is the mean curvature Example with curvature Example with flat (more details in a moment)

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-18
SLIDE 18

Table of Contents

⊲ Mesh Editing Overview / Discrete Curvature ◮ Laplacian Mesh Editing

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-19
SLIDE 19

Laplacian Mesh Matrix

Sorkine05 Lij =    −1 edge connecting i and j degree(i) i = j

  • therwise

  

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-20
SLIDE 20

Graph Laplacian

More generally, L = D − A ⊲ A: “Adjacency matrix” Aij 1 edge connecting i and j

  • therwise
  • ⊲ D: “Degree matrix”

Dij =

  • degree(i) = N

j=1 Aij

i = j

  • therwise
  • L is symmetric and sparse. Number of nonzero entries is O(N)

for meshes of constant genus

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-21
SLIDE 21

Laplacian Mesh Editing

δi =

  • j∈N(i)

(vi−vj) = divi−

  • j∈N(i)

vj Can be written as Lv = δ. Each vector is along a row now

L

v1x v2x v3x . . . vNx v1y v2y v3y . . . vNy v1z v2z v3z . . . vNz

=

δ1x δ2x δ2x . . . δ2x δ1y δ2y δ2y . . . δ2y δ1z δ2z δ2z . . . δ2z

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-22
SLIDE 22

Laplacian Mesh Editing

δi =

  • j∈N(i)

(vi − vj) Can we reconstruct v from δ?

L

v1x v2x v3x . . . vNx v1y v2y v3y . . . vNy v1z v2z v3z . . . vNz

=

δ1x δ2x δ2x . . . δ2x δ1y δ2y δ2y . . . δ2y δ1z δ2z δ2z . . . δ2z

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-23
SLIDE 23

Laplacian Mesh Editing

δi =

  • j∈N(i)

(vi − vj) Can we reconstruct v from δ? No: L is rank N − 1 for a connected mesh

L

v1x v2x v3x . . . vNx v1y v2y v3y . . . vNy v1z v2z v3z . . . vNz

=

δ1x δ2x δ2x . . . δ2x δ1y δ2y δ2y . . . δ2y δ1z δ2z δ2z . . . δ2z

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-24
SLIDE 24

Laplacian Mesh Editing: Anchors

fix

δi =

  • j∈N(i)

(vi − vj) Delta coordinates define ge-

  • metry up to a translation.

Fix a point va, fix translation

L

v1x v2x v3x . . vNx v1y v2y v3y . . . vNy v1z v2z v3z . . vNz

=

δ1x δ2x δ2x . . . δ2x δ1y δ2y δ2y . . . δ2y δ1z δ2z δ2z . . . δ2z

000 .... w .... 000 va

a xa

w

a(

)

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-25
SLIDE 25

Laplacian Mesh Editing: Anchors

fix xa edit x

b

Can add more anchors, but may not be a solution

L

v1x v2x v3x . . . . vNx v1y v2y v3y . . . . . vNy v1z v2z v3z . . . . vNz

=

δ1x δ2x δ2x . . . . . δ2x δ1y δ2y δ2y . . . . . δ2y δ1z δ2z δ2z . . . . . δ2z

vb 00...w ........ 0000 va 000 .... w .... 000

a xa

w

a

( )

xb

w

b

) (

b

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-26
SLIDE 26

Laplacian Mesh Editing: Anchors

fix xa edit x

b

Can add more anchors, but may not be a solution Solve in the least squares sense

  • v = argminv||Lv−δ||2

2+ k

  • s=1

ws||vs−xs||2

2

L

v1x v2x v3x . . . . vNx v1y v2y v3y . . . . . vNy v1z v2z v3z . . . . vNz

=

δ1x δ2x δ2x . . . . . δ2x δ1y δ2y δ2y . . . . . δ2y δ1z δ2z δ2z . . . . . δ2z

vb 00...w ........ 0000 va 000 .... w .... 000

a xa

w

a

( )

xb

w

b

) (

b

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-27
SLIDE 27

Laplacian Mesh Editing: Anchors: Another Example

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-28
SLIDE 28

Laplacian Mesh Editing: Anchors

  • v = argminv||Lx − δ||2

2 + k

  • s=1

ws||xs − vs||2

2

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-29
SLIDE 29

Laplacian Mesh Editing: Anchors

  • v = argminv||Lx − δ||2

2 + k

  • s=1

ws||xs − vs||2

2

⊲ Let L be L augmented with the anchor rows ⊲ Let δ be δ augmented with the weighted anchor coordinates Can all be written in matrix form Squared Error: ǫ(v) = ||Lv − δ||2

2

Least Squares Solution: v∗ = (L

TL)−1L Tδ

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-30
SLIDE 30

Laplacian Mesh Editing: Examples

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-31
SLIDE 31

Laplacian Mesh Editing: Examples

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-32
SLIDE 32

Laplacian Mesh Editing: Examples

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-33
SLIDE 33

Laplacian Mesh Editing: Examples

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-34
SLIDE 34

What About Irregular Meshes?

Homer’s upper arm

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-35
SLIDE 35

Cotangent Weights

β i j α

ij ij

δi =

  • j∈N(i)

wij(vi − vj) wij = 1 2(cot(βij) + cot(αij))

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-36
SLIDE 36

Cotangent Weights

β i j α

ij ij

δi =

  • j∈N(i)

wij(vi − vj) wij = 1 2(cot(βij) + cot(αij))

Figure: Nealen2006, umbrella vs cotangent

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-37
SLIDE 37

Cotangent Weights: Mean Curvature

Mean curvature is approximated by 1 2

  • j∈N(i)

(cot(βij) + cot(αij))|| vi − vj||2

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-38
SLIDE 38

Laplacian Mesh Editing: Umbrella vs Cotangent

Figure: umbrella

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-39
SLIDE 39

Laplacian Mesh Editing: Umbrella vs Cotangent

Figure: umbrella Figure: cotangent

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-40
SLIDE 40

Laplacian Mesh Editing: Umbrella vs Cotangent

Figure: umbrella

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-41
SLIDE 41

Laplacian Mesh Editing: Umbrella vs Cotangent

Figure: umbrella Figure: cotangent

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-42
SLIDE 42

Applications: Function Interpolation

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-43
SLIDE 43

Applications: Function Interpolation

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-44
SLIDE 44

Applications: Detail Transfer / Mesh Mixing

Sorkine 05

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-45
SLIDE 45

Applications: Detail Transfer / Mesh Mixing

Sorkine 05

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-46
SLIDE 46

Applications

More surprises in group assignment 3 and the following lectures!

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-47
SLIDE 47

A Note About Rotation Invariance

Lx = δ ⊲ δ is a vector. ||δ|| ∝ κ, but it has a direction

Figure: Sorkine05

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-48
SLIDE 48

As Rigid As Possible Surface Editing

Sorkine2007

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-49
SLIDE 49

As Rigid As Possible Surface Editing

Sorkine2007

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing

slide-50
SLIDE 50

A Note On Sparse Matrices

Sparse matrices in numpy

COMPSCI/MATH 290-04 Lecture 22: Laplacian Mesh Editing