66
Dynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

  • Upload
    others

  • View
    4

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Dynamic Mesh Refinement

Benoît Hudson

Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Page 2: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Why Mesh?

• Geometry is continuous

• Computers are discrete

• Mesh for any geometric processing:

• Graphics

• Scientific Computing

• Vision, AI, ...

2

Page 3: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Scientific computing: historically

CAD

MeshWeak form

Ax = b

Numbers

Once per project

Once per timestep

3

Once per career

Page 4: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

4

Page 5: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Scientific computing: historically

CAD

MeshWeak form

Ax = b

Numbers

Once per project Once per career

Once per timestep

5

Page 6: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Scientific computing: modern

CAD

MeshWeak form

Ax = b

Numbers

Once per timestep Once per career

Once per timestep

6

Page 7: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Claims of the Thesis

• The fastest static meshing code

• A framework with lots of explicit freedom for point placement

• The first dynamic meshing algorithm

7

Page 8: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Outline in four parts

• What makes a good mesh?

• Experimental results

• General conceptual algorithm

• Sub-linear dynamic mesh refinement

8

Goal of the talk:Enough pictures to understand main pointsEnough main points to understand thesis

Page 9: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Input Description

9

Page 10: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Input Description

10

Page 11: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Output

11

Page 12: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Output

12

Page 13: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

e

Quality measure: radius/edge

rÁ > ®r/e < ½

Á

r/e = 1/2sin(Á)

13

Page 14: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Voronoi aspect ratio

r

NN(v)

if r/NN(v) < ½then r/e < ½

14

Page 15: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

3d: Slivers

15

Page 16: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

3d: Slivers0o anglesr/e = 1/√2

Edelsbrunner et al 00Cheng et al 00

Chew 97 / Li-Teng 01Labelle, Shewchuk 06/07

16

Page 17: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Simulation Runtime

• Runtime: O(# triangles) or O(# triangles3/2)

• Don’t create too many elements

• Timestep length: O(shortest edge)

• Don’t create tiny elements

17

Page 18: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

local feature size

lfs(x)

x

18

Page 19: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

lfs and mesh size

• NN(v) ∈ Ω(lfs(v)) at every vertex v:

• Then #vertices ∈ O( ∫ lfs-d(x)dx )

• Any no-small-angle mesh is Ω( ∫ lfs-d(x)dx )

Size-conforming

19

Page 20: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Requirements

• Quality: no bad radius/edge output

• Respect: the input appears in the output

• Size-conforming: spacing in output ~ in input

Fast

20

Page 21: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Outline in four parts

• What makes a good mesh?

• Experimental results

• General conceptual algorithm

• Sub-linear dynamic mesh refinement

21

Page 22: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Ruppert’s algorithm

22

Page 23: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Pathology: Line & Circle

n/2 points on linen/2 points on circle

n2 Delaunay triangles!

23

Page 24: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

SVR

24

Page 25: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

SVR

25

Page 26: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

SVR

26

Page 27: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

SVR

27

Page 28: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

SVR

28

Page 29: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

SVR

29

Page 30: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

SVR

30

Provably O(n log (L/s) + m)

L

s

Page 31: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Comparative Results: Line & Circle

seconds #output points (x1000)

#input points (x1000)

0

100

200

300

400

500

600

0 10 20 30 40 50 60 70 80 90

PyramidSVR

0

5

10

15

20

25

30

0 10 20 30 40 50 60 70 80 90

PyramidSVR

31

Page 32: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Comparative Results: 27 Stanford Bunnies

seconds #output points (x1000)

0

10

20

30

40

50

60

70

80

0 50 100 150 200 250 300

PyramidSVR

0

100

200

300

400

500

600

700

0 50 100 150 200 250 300

PyramidSVR

#input points (x1000)

32

Page 33: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

How much to shrink?

seconds #output points (x1000)

shrink to shrink to

0.9

0

20

40

60

80

100

0.2 0.4 0.6 0.8 1 0

1

2

3

4

5

6

0.2 0.4 0.6 0.8 1

33

Page 34: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Query Structure

34

Page 35: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Query Structure

By simplex:+ easy, traditional+ cheap query- expensive update- non-robust

By Voronoi:+ easy+ fast update+ robust- bigger query

35

Page 36: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Speeding up queries

36

Page 37: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

37

Page 38: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

38

Page 39: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Outline in four parts

• What makes a good mesh?

• Experimental results

• General conceptual algorithm

• Sub-linear dynamic mesh refinement

39

Page 40: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

What makes a good Steiner point?

• Helps achieve Quality

• Helps achieve Respect

• Doesn’t violate Size-conforming

40

Page 41: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Helps improve Quality

vu

r > ½ ||uv||

x

41

Page 42: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Helps improve Respect

v

x

u?

42

Page 43: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Without violating size-conforming

vu r > ½ ||uv||

xy

43

Page 44: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Without violating size-conforming

vu r > ½ ||uv||

x

y NN(y) << lfs(y)

44

Page 45: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Without violating size-conforming

vu r > ½ ||uv||

xy

45

Page 46: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

`

Without violating size-conforming

vu

NN(x) > ½ ||uv||

NN(y) > ½ ||uv||/2

yx

46

zNN(z) > ½ ||uv||/4

Page 47: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

`

Related workRuppert, SVR:

Biggest possibleUngor:

Just-right

v

u `

v

u

r À ½ ||vu||

r’ = ½ ||vu||

r ¼ √2 ½ ||vu||

47

Page 48: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Completing a mesh

48

Page 49: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

A complete mesh is good

49

Page 50: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Outline in four parts

• What makes a good mesh?

• Experimental results

• General conceptual algorithm

• Sub-linear dynamic mesh refinement

50

Page 51: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Efficient Queries

v

How do I know thisdisc is empty?

51

Idea credit: Har-Peled, Ungor

Page 52: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Efficient Algorithm

1. Build the quadtree

2. Add every p to Q, with key NN(p)

3. While Q is not empty

1. v ← Delete-min(Q)

2. Complete(v)

3. Add neighbours of v to Q

52

Not strictly in order:bucket by [l, ½l)

Page 53: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Efficient Queries

v

Lemma 3.3.3:when processing bucket b,empty ball of radius r ~ bintersects O(1) squares

53

Proof sketch:To intersect many, mustintersect small squares.

But small squares are in small buckets ) contain points.

Page 54: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Total runtime

1. Build the quadtree

2. Add every p to Q

3. While Q is not empty

1. v ← Delete-min(Q)

2. Complete(v)

3. Add neighbours to Q

O(n log L/s + m)

O(n)

m iterations

O(1) [bucketing]

O(1) [fast queries]

O(1)

Size-conformingQuality

RespectingO(n log L/s + m) runtime

Page 55: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Remeshing

• Change ) Reinterpolation ) Error

• No change ) Why recompute it?

Page 56: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Dependence graph

5652

Page 57: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

5752

Dependence graph

v

Q: how many pointsblame v?

Page 58: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Steiner points grow

vu

r > ½ ||uv||

x

58

NN(x) = r

Page 59: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Dynamic stability

v

59

Q: how many pointsblame v?

Yellow: distance ~ ½, NN ~ ½Purple: distance ~ ½2, NN ~ ½2

Cyan: distance ~ ½3, NN ~ ½3

Page 60: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Packing Purple Points

v

||vpi|| · k’½2NN(pi) ¸ k½2

# purple points is||vpi||d / NN(pi)d

2 O(1)

Page 61: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Dynamic stability

v

61

Yellow: O(1)Purple: O(1)Cyan: O(1)

...O(log½ L/s) total

Proves: adding or removingone point from input

modifies O(lg L/s) in output

Page 62: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Dynamic Algorithm

62

1. Build the quadtree

2. Add every p to Q

3. While Q is not empty

1. v ← Delete-min(Q)

2. Complete(v)

3. Add neighbours to Q

On update, simulatererunning from

scratch.

Use Self-adjusting computation: pay only

for the changes.

Update time: O(log L/s)!

Page 63: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Outline in four parts

• What makes a good mesh?

• Experimental results

• General conceptual algorithm

• Sub-linear dynamic mesh refinement

63

Page 64: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Handling features

• Details in the document

• Static runtime is O(n log L/s + m)

• Dynamic: if we need k points to respect, update time is O(k £ log L/s)

• Future: prove O(k + log L/s)

• Probably “just” a proof

Page 65: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Moving meshes

• Dynamic update: add or remove

• Kinetic update: move

• Self-adjusting framework can do kinetic

• I have no proofs ... yet

Page 66: Dynamic Mesh Refinement - University of Chicagobhudson/talks/uchicago-2007-10.pdfDynamic Mesh Refinement Benoît Hudson Joint work with Umut A. Acar, Gary Miller, Todd Phillips

Claims of the Thesis

• The fastest static meshing code

• And the first without pathologies

• A framework with lots of explicit freedom for point placement

• The first dynamic meshing algorithm

• A few more minor results

66