Meshing: A (Biased) Crash Course - Michigan State …ytong/DDG/meshing.pdf · Meshing: A (Biased)...

24
1 Meshing: A (Biased) Crash Course Meshing: A (Biased) Crash Course Discrete Differential Geometry DDG Course 2012 2 The Big Picture Meshing, an essential preprocessing step For surface representation complex geometry with a few basic geometric primitives For simulation of physical phenomena realistic/accurate animation of fluid, deformable solids, electromagnetism often modeled as PDE domain discretization Then FEM/FVM to integrate PDE in space (& time)

Transcript of Meshing: A (Biased) Crash Course - Michigan State …ytong/DDG/meshing.pdf · Meshing: A (Biased)...

Page 1: Meshing: A (Biased) Crash Course - Michigan State …ytong/DDG/meshing.pdf · Meshing: A (Biased) Crash Course ... Structured/Unstructured Mesh: ... Unstructured meshing Structured

1

Meshing: A (Biased) Crash Course

Meshing: A (Biased) Crash Course

Discrete Differential Geometry

DDG Course 2012

2

The Big PictureMeshing, an essential preprocessing step For surface representation

complex geometry

with a few basic geometric primitives

For simulation of physical phenomena realistic/accurate animation of fluid,

deformable solids, electromagnetism often modeled as PDE

domain discretization Then FEM/FVM to integrate PDE in space (& time)

Page 2: Meshing: A (Biased) Crash Course - Michigan State …ytong/DDG/meshing.pdf · Meshing: A (Biased) Crash Course ... Structured/Unstructured Mesh: ... Unstructured meshing Structured

2

DDG Course 2012

3

The Big PictureMeshing, an essential preprocessing step For surface representation

complex geometry

with a few basic geometric primitives

For simulation of physical phenomena realistic/accurate animation of fluid,

deformable solids, electromagnetism often modeled as PDE

domain discretization Then FEM/FVM to integrate PDE in space (& time)

DDG Course 2012

4

Meshing, an essential preprocessing step For surface representation

complex geometry

with a few basic geometric primitives

For simulation of physical phenomena realistic/accurate animation of fluid,

deformable solids, electromagnetism often modeled as PDE

domain discretization Then FEM/FVM to integrate PDE in space (& time)

The Big Picture

Page 3: Meshing: A (Biased) Crash Course - Michigan State …ytong/DDG/meshing.pdf · Meshing: A (Biased) Crash Course ... Structured/Unstructured Mesh: ... Unstructured meshing Structured

3

DDG Course 2012

5

The Big PictureMeshing, an essential preprocessing step For surface representation

complex geometry

with a few basic geometric primitives

For simulation of physical phenomena realistic/accurate animation of fluid,

deformable solids, electromagnetism often modeled as PDE

domain discretization Then FEM/FVM to integrate PDE in space (& time)

DDG Course 2012

6

What is Meshing?General Idea: breaking up a physical domain

2D domain in 2D, or in 3D, or 3D domain,…

into simpler subdomains—the elements simplices (triangles, tetrahedra)

or not (quads, polygons, hexahedra, polyhedra)

“flat” 2D “flat” 3D

Page 4: Meshing: A (Biased) Crash Course - Michigan State …ytong/DDG/meshing.pdf · Meshing: A (Biased) Crash Course ... Structured/Unstructured Mesh: ... Unstructured meshing Structured

4

DDG Course 2012

7

Brief Glossary

Node, element:

Structured/Unstructured Mesh: regular valence and degree

Isotropic/Anisotropic Mesh: without/with stretched elements

Graded Mesh: w/ elements varying in size (fct of

position)

DDG Course 2012

8

Brief Glossary

Node, element:

Structured/Unstructured Mesh: regular valence and degree

Isotropic/Anisotropic Mesh: without/with stretched elements

Graded Mesh: w/ elements varying in size (fct of

position)

Page 5: Meshing: A (Biased) Crash Course - Michigan State …ytong/DDG/meshing.pdf · Meshing: A (Biased) Crash Course ... Structured/Unstructured Mesh: ... Unstructured meshing Structured

5

DDG Course 2012

9

Why (Un)Structured?Structure brings: simpler data structure

better compression

reuse of DSP algos

smoothing

wavelets

Unstructuredmeshing Structured

meshing

DDG Course 2012

10

Brief Glossary

Node, element:

Structured/Unstructured Mesh: regular valence and degree

Isotropic/Anisotropic Mesh: without/with stretched elements

Graded Mesh: w/ elements varying in size (fct of

position)

Page 6: Meshing: A (Biased) Crash Course - Michigan State …ytong/DDG/meshing.pdf · Meshing: A (Biased) Crash Course ... Structured/Unstructured Mesh: ... Unstructured meshing Structured

6

DDG Course 2012

11

Why Anisotropy?

#V #FIsotropicmeshing

Anisotropicmeshing

#V #F

Anisotropicquad meshing

#V #F

DDG Course 2012

12

Brief Glossary

Node, element:

Structured/Unstructured Mesh: regular valence and degree

Isotropic/Anisotropic Mesh: without/with stretched elements

Graded Mesh: w/ elements varying in size (fct of

position)

Page 7: Meshing: A (Biased) Crash Course - Michigan State …ytong/DDG/meshing.pdf · Meshing: A (Biased) Crash Course ... Structured/Unstructured Mesh: ... Unstructured meshing Structured

7

DDG Course 2012

13

Why Gradation?

Allows for

better capture

of details for same vertex budget

DDG Course 2012

14

Goals in Mesh Generation

Control over shape of elements mass matrix conditioning

shape often induced by PDE good bet: regular shape

Control over sizing often dictated by simulation … &

boundary

Control over total size low number of elements is preferred

Tetrahedrus Commonus

Page 8: Meshing: A (Biased) Crash Course - Michigan State …ytong/DDG/meshing.pdf · Meshing: A (Biased) Crash Course ... Structured/Unstructured Mesh: ... Unstructured meshing Structured

8

DDG Course 2012

15

How to Mesh a Domain?

Usually, "bottom-up" approach vertices are first placed (point sampling)

then connected by edges, triangles, etc…

But not always… remeshing thru simplification (top-down)

placement of edges first [Alliez et al. 2003]

as strokes along important directions

placement of elements first [Alliez et al. 2004]

to best approximate local shape, based on normal field

DDG Course 2012

16

How to Mesh a Domain?

Usually, "bottom-up" approach vertices are first placed (point sampling)

then connected by edges, triangles, etc…

But not always… remeshing thru simplification (top-down)

placement of edges first [Alliez et al. 2003]

as strokes along important directions

placement of elements first [Alliez et al. 2004]

to best approximate local shape, based on normal field

Page 9: Meshing: A (Biased) Crash Course - Michigan State …ytong/DDG/meshing.pdf · Meshing: A (Biased) Crash Course ... Structured/Unstructured Mesh: ... Unstructured meshing Structured

9

DDG Course 2012

17

How to Mesh a Domain?

Usually, "bottom-up" approach vertices are first placed (point sampling)

then connected by edges, triangles, etc…

But not always… remeshing thru simplification (top-down)

placement of edges first [Alliez et al. 2003]

as strokes along important directions

placement of elements first [Alliez et al. 2004]

to best approximate local shape, based on normal field

DDG Course 2012

18

What We Won’t Mention [Much]Meshing of curved manifolds often, can be flattened thru

parameterizationsee STAR report aim@shape, Alliez et al. 2004

Meshing of non manifold objects

Polygonal Meshing

Surface Approximation vertices can be off the original surface

see [Nadler ‘86, Simpson ’94, Heckbert-Garland ‘99]

Page 10: Meshing: A (Biased) Crash Course - Michigan State …ytong/DDG/meshing.pdf · Meshing: A (Biased) Crash Course ... Structured/Unstructured Mesh: ... Unstructured meshing Structured

10

DDG Course 2012

19

So How do I Mesh a Domain?Seemingly, vertex placement is crucial we must “sample” the domain appropriately

well-spaced point sets? spread nodes in the (flat or curved) domain

spread them evenly

using an attraction/repulsion simulation for instance

and we are done, right? most papers in graphics use this approach

good news: sufficient in 2D

DDG Course 2012

20

So How do I Mesh a Domain?

An example from the sea…

Page 11: Meshing: A (Biased) Crash Course - Michigan State …ytong/DDG/meshing.pdf · Meshing: A (Biased) Crash Course ... Structured/Unstructured Mesh: ... Unstructured meshing Structured

11

DDG Course 2012

21

Intro to Delaunay Triang.‘Canonical’ triangulation of a point set with numerous optimal properties

see: Eppstein, Meshing Roundtable 2001Shewchuck, his UC Berkeley’s websiteLots of robust, existing codes (Triangle, CGAL, …)

“territories” = Voronoi diagram

“dual” = Delaunay triangulation (DT)

In 3DIn 2D

DDG Course 2012

22

Moving on to 3DEverything breaks… the regular tet does NOT tile space

perfectly shaped tets everywhere not attainable

DT based on well-spaced points have slivers

Page 12: Meshing: A (Biased) Crash Course - Michigan State …ytong/DDG/meshing.pdf · Meshing: A (Biased) Crash Course ... Structured/Unstructured Mesh: ... Unstructured meshing Structured

12

DDG Course 2012

23

Scrutinizing the Beast

Four (well-spaced) vertices near the equatorial plane of their circumsphere

DDG Course 2012

24

Taming the Beast?

Recipes to get rid of slivers local jiggling of faulty vertices

through optimization of shape’s “quality” for example, penalize small dihedral angles

often, non-linear and slow

no guarantee of success—in fact, may be worse

locally altering the Delaunay triangulation called “sliver exudation”

no longer Delaunay, obviously

guarantees, but no practical bounds

Page 13: Meshing: A (Biased) Crash Course - Michigan State …ytong/DDG/meshing.pdf · Meshing: A (Biased) Crash Course ... Structured/Unstructured Mesh: ... Unstructured meshing Structured

13

DDG Course 2012

25

Popular 3D Meshing MethodsDelaunay-based refinement

sphere packing

specific subdivision octree

regular lattice

advancing front

spring energy Laplacian (bad!)

non-zero rest length

aspect / radius ratios

dihedral / solid angles

max-min/min-max volumes, lengths

sphere radii

sliver exudation

Local Node OptimizationsGlobal Node Placement

DDG Course 2012

26

An Interesting Alternative Emergence of variational approaches Centroidal Voronoi Tesselation

Optimal Delaunay Triangulation

Idea: position of vertices also optimal in some way

often based on lifting transformation

Page 14: Meshing: A (Biased) Crash Course - Michigan State …ytong/DDG/meshing.pdf · Meshing: A (Biased) Crash Course ... Structured/Unstructured Mesh: ... Unstructured meshing Structured

14

DDG Course 2012

27

Lifting Transformation (nD)Lift points (x, y) to paraboloid (x, y, x2 + y2) placement of origin irrelevant

Delaunay triang. = convex hull of 3D points

DDG Course 2012

28

Lifting Transformation (nD)Lift points (x, y) to paraboloid (x, y, x2 + y2) placement of origin irrelevant

Voronoi Diagram = proj. of upper enveloppe

Before…

Page 15: Meshing: A (Biased) Crash Course - Michigan State …ytong/DDG/meshing.pdf · Meshing: A (Biased) Crash Course ... Structured/Unstructured Mesh: ... Unstructured meshing Structured

15

DDG Course 2012

29

Pushing This Analogy FurtherIdea: move vertices to perfect the approximation of the paraboloid roots in function approximation

Hessian(x2) = Id

studied quite a bit in 2D

Lloyd algo: for given points,

DT gives optimal L1 approx

for given conn., find optimal vertex positions

volume btw approximant and paraboloid

DDG Course 2012

30

(after Lloyd relaxation)

Lloyd Algorithm in 3D

Breaks too, unfortunately…

why? dual cells well-shaped

but not sufficient for well-shaped tets!

use of a dual approach, maybe?

Page 16: Meshing: A (Biased) Crash Course - Michigan State …ytong/DDG/meshing.pdf · Meshing: A (Biased) Crash Course ... Structured/Unstructured Mesh: ... Unstructured meshing Structured

16

DDG Course 2012

31

Under/Overlaid Approximant

CVT approximant

compact Voronoi cells

isotropic sampling

DDG Course 2012

32

Under/Overlaid Approximant

CVT approximant compact Voronoi cells

isotropic sampling

ODT [Chen 04]

PWL interpolant compact simplices

isotropic meshing

Page 17: Meshing: A (Biased) Crash Course - Michigan State …ytong/DDG/meshing.pdf · Meshing: A (Biased) Crash Course ... Structured/Unstructured Mesh: ... Unstructured meshing Structured

17

DDG Course 2012

33

Results of Optimization in 2D

DDG Course 2012

34

Optimization: init

Distribution of radius ratios

Page 18: Meshing: A (Biased) Crash Course - Michigan State …ytong/DDG/meshing.pdf · Meshing: A (Biased) Crash Course ... Structured/Unstructured Mesh: ... Unstructured meshing Structured

18

DDG Course 2012

35

Optimization: step 1

Distribution of radius ratios

DDG Course 2012

36

Optimization: step 2

Distribution of radius ratios

Page 19: Meshing: A (Biased) Crash Course - Michigan State …ytong/DDG/meshing.pdf · Meshing: A (Biased) Crash Course ... Structured/Unstructured Mesh: ... Unstructured meshing Structured

19

DDG Course 2012

37

Optimization

Distribution of radius ratios

DDG Course 2012

38

Optimization

Page 20: Meshing: A (Biased) Crash Course - Michigan State …ytong/DDG/meshing.pdf · Meshing: A (Biased) Crash Course ... Structured/Unstructured Mesh: ... Unstructured meshing Structured

20

DDG Course 2012

39

Optimization

DDG Course 2012

40

Input mesh

Page 21: Meshing: A (Biased) Crash Course - Michigan State …ytong/DDG/meshing.pdf · Meshing: A (Biased) Crash Course ... Structured/Unstructured Mesh: ... Unstructured meshing Structured

21

DDG Course 2012

41

Hand: Sizing

DDG Course 2012

42

Hand Remeshed

Page 22: Meshing: A (Biased) Crash Course - Michigan State …ytong/DDG/meshing.pdf · Meshing: A (Biased) Crash Course ... Structured/Unstructured Mesh: ... Unstructured meshing Structured

22

DDG Course 2012

43

Stanford Bunny

DDG Course 2012

44

Stanford Bunny (uniform)

Page 23: Meshing: A (Biased) Crash Course - Michigan State …ytong/DDG/meshing.pdf · Meshing: A (Biased) Crash Course ... Structured/Unstructured Mesh: ... Unstructured meshing Structured

23

DDG Course 2012

45

The Visible Human

DDG Course 2012

46

Fandisk

Page 24: Meshing: A (Biased) Crash Course - Michigan State …ytong/DDG/meshing.pdf · Meshing: A (Biased) Crash Course ... Structured/Unstructured Mesh: ... Unstructured meshing Structured

24

DDG Course 2012

47

Conclusions

Meshing: a fascinating research field needs theoretical guarantees

needs practical results

Please, consider using Delaunay not slow (unlike what you’ve heard)