subdivision and smoothing of surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · heat...

38
Subdivision and Smoothing of Surfaces

Upload: others

Post on 27-Jun-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

Subdivision and Smoothing of Surfaces

Page 2: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

Subdivision

• Connectivity• Coordinates

Page 3: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

Subdivision

Page 4: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

Subdivision

Page 5: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

Subdivision

Page 6: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

Subdivision

Page 7: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

Subdivision

Page 8: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

Subdivision

Page 9: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

Does Subdivision Change Surface Topology?

• V’=?• F’=?• E’=?• V’-E’+F’=?

Page 10: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

Does Subdivision Change Surface Topology?

• V’=V+E• F’=4*F• E’=2*E+3*F• V’-E’+F’=?

Page 11: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

Subdivision

• Why do we need it?– More samples inside a triangle– Smoother surfaces by using different weights:

A

B

C DP

Page 12: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

Subdivision

• Subdivision with Loop’s masks:– New vertex

A

B

C DP

)(81)(

83 DCBAP

Page 13: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

Subdivision

• Subdivision with Loop’s masks:– Old vertex

))2cos41

83(

85(1 2

nn

A1

A3A4

A5A

A2

A6

n

j jAAnA1

)1('

Page 14: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

Subdivision

• Note:– The position of a new vertex is the weighted sum of the

positions of the old vertices in its neighborhood. The total weights sum to one.

– The same can be said about an old vertex.

))2cos41

83(

85(1 2

nn

n

j jAAnA1

)1('

)(81)(

83 DCBAP

Page 15: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

More on subdivision later.

Page 16: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

Irregular Subdivision

Page 17: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

Irregular Subdivision

Page 18: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

Image Blurring

original 1 time: 4 pixels

1 time: 64 pixels

1 time: 250 pixels

Page 19: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

Surface Fairing

Image credit: Desbrun et al.

Page 20: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

Heat Diffusion

Page 21: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

Vector Field Visualization

Image credit: Diewald et al.

Page 22: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

Curvature Estimation

Image credit: Alliez et al.

Page 23: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

• They need to solve Laplace’s equations.

What Do These Application Have In Common?

Page 24: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

Smoothing

• Of surfaces

• On surfaces

Page 25: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

Surface Smoothing

• Solving Laplace:– Given a function:– The gradient is:

– And the Laplace is:

),,( zyxf

zf

yf

xfzyxf ),,(

2

2

2

2

2

2

),,(zf

yf

xffzyxf

Page 26: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

Heat Diffusion

• Heat conduction equation:

– where T is temperate and t is time.– and controls the speed of diffusion– Boundary conditions:

• Heat sources:• Walls

– When is balance achieved?

),,( zyxTtT

Page 27: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

Heat Diffusion in 1D

• 1D heat conduction equation:

– Reaches balance when – This happens

• either:• or

2

2

)(xTxT

tT

02

2

xT

CT

baxT

Page 28: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

• Discrete Laplace:

– Reaches balance when

– Maximum and minimum can only occur on the boundaries

– Update rule:

Heat Diffusion in 1D

)22

()( 112

2nnnn TTTT

dxTdxT

tT

211

nnn

TTT nn-1 n+1

2)()( 111 nnnnmm TTTTTT

Page 29: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

• Discrete Laplace:

• Why does it shrink?

Curve Evolution

)()(

21)(

xNjij TTiT

tT

Image credit: Delphine Nain

Page 30: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

• Reverse shrinkage:– maintain area

Curve Evolution

Image credit: Delphine Nain

Page 31: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

• Directions of changes:– Normal (is what we need)– Tangential (does not change shape but change

the position of points)

Curve Evolution

Page 32: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

• Similar to curve evolution except now we have a surface:– Normal (is what we need)– Tangential (does not change shape but change

the position of points)

Surface Evolution

Page 33: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

• Consider the weighting functions:

– such that

– rewrite

Surface Evolution

)(

111 ))()(()()(iNj

im

jm

ijim

im vTvTwtvTvT

)(

1iNj

ijw

)(iNjij

ijij e

ew

Page 34: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

– Uniform:

• No geometry info

– Cord:

• Uses geometry info• Not directly related to normal and curvature

Weighting Functions

1ije

ijij l

e 1

Page 35: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

– Mean curvature:• Curvature flow• In ideal situations the vertex only moves in the

normal direction• Could be negative

– Mean value:

• Always non-negative

Weighting Functions

2)cot(cot 21

ije

jv

iv

21 1 2

2))2/tan()2/(tan( 21

ije

Page 36: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

– Explicit• Unstable• Requires small step-size

– Implicit:• Stable• Large step-size• Requires solving a system of equations

– Gauss-Seidel• Stable• Large step-size• Iterative

Update Scheme

)(

111 ))()(()()(iNj

im

jm

ijim

im vTvTwtvTvT

)(

1 ))()(()()(iNj

im

jm

ijim

im vTvTwtvTvT

)(

11 ))()(()()(iNj

im

jcurrent

ijim

im vTvTwtvTvT

Page 37: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

Smoothing on Surfaces

Page 38: Subdivision and Smoothing of Surfacesclasses.engr.oregonstate.edu/eecs/fall2017/cs554/... · Heat Diffusion • Heat conduction equation: – where T is temperate and t is time. –

Any questions?