• Aucun résultat trouvé

Mesh Generation

N/A
N/A
Protected

Academic year: 2022

Partager "Mesh Generation"

Copied!
133
0
0

Texte intégral

(1)

Mesh Generation

Pierre Alliez

INRIA Sophia Antipolis - Mediterranee

(2)

Definitions

 Mesh: Cellular complex partitioning an input domain into elementary cells.

Elementary cell: Admits a bounded description.

Cellular complex: Two cells are disjoint or share a lower dimensional face.

(3)

Variety

Domains: 2D, 3D, nD, surfaces, manifolds, periodic vs non-periodic, etc.

(4)

Variety

Elements: simplices (triangles, tetrahedra), quadrangles, polygons, hexahedra, arbitrary cells.

(5)

Variety

Structured mesh: All interior nodes have an equal number of adjacent elements.

Unstructured mesh: Any number of elements can meet at a single vertex.

(6)

Variety

Anisotropic vs Isotropic

(7)

Variety

Element distribution: Uniform vs adapted

(8)

Variety

Grading: Smooth vs fast

(9)

Required Properties

control/optimization over:

 #elements

 shape

 orientation

 size

 grading

 … (application dependent)

(10)

Mesh Generation

Input:

Domain boundary + internal constraints

Constraints

Sizing

Grading

Shape

Topology

(11)

2D Delaunay Refinement

(12)

2D Triangle Mesh Generation

Input:

PSLG C (planar straight line graph)

Domain  bounded by edges of C

Output:

triangle mesh T of  such that

vertices of C are vertices of T

edges of C are union of edges in T

triangles of T inside  have controlled size and quality

(13)

Key Idea

 Break bad elements by inserting circumcenters (Voronoi vertices) [Chew, Ruppert,

Shewchuk,...]

“bad” in terms of size or shape

(14)

Basic Notions

C: PSLG describing the constraints T: Triangulation to be refined

Respect of the PSLG

Edges a C are split until constrained subedges are edges of T

Constrained subedges are required to be Gabriel edges

An edge of a triangulation is a Gabriel edge if its smallest circumcirle encloses no vertex of T

An edge e is encroached by point p if the smallest circumcirle of e encloses p.

(15)

Refinement Algorithm

C: PSLG bounding the domain to be meshed.

T: Delaunay triangulation of the current set of vertices T|: T  

Constrained subedges: subedges of edges of C

Initialise with T = Delaunay triangulation of vertices of C Refine until no rule apply

Rule 1

if there is an encroached constrained subedge e insert c = midpoint(e) in T (refine-edge)

Rule 2

if there is a bad facet f in T|

c = circumcenter(f)

if c encroaches a constrained subedge e refine-edge(e).

else

insert(c) in T

(16)

2D Delaunay Refinement

PSLG

(17)

Background

(18)

Constrained Delaunay Triangulation

(19)

Pseudo-dual: Bounded Voronoi Diagram

constrained Bounded Voronoi diagram

“blind” triangles

(20)

Delaunay Edge

An edge is said to be a Delaunay edge, if it is inscribed in an empty circle

(21)

Gabriel Edge

An edge is said to be a Gabriel edge, if its diametral circle is empty

(22)

Conforming Delaunay Triangulation

A constrained Delaunay triangulation is a conforming Delaunay triangulation, if every constrained edge is a Delaunay edge

non conforming conforming

(23)

Conforming Gabriel Triangulation

A constrained Delaunay triangulation is a conforming Gabriel triangulation, if every constrained edge is a Gabriel edge

non conforming conforming Gabriel

(24)

Steiner Vertices

Any constrained Delaunay triangulation can be refined into a conforming Delaunay or Gabriel triangulation by adding Steiner vertices.

non conforming conforming Gabriel

(25)

Delaunay Refinement

Rule #1: break bad elements by inserting circumcenters (Voronoi vertices)‏

“bad” in terms of size or shape (too big or skinny)‏

Picture taken from [Shewchuk]

(26)

Delaunay Refinement

Rule #2: Midpoint vertex insertion

A constrained segment is said to be encroached, if there is a vertex inside its diametral circle

Picture taken from [Shewchuk]

(27)

Delaunay Refinement

Encroached subsegments have priority over skinny triangles

Picture taken from [Shewchuk]

(28)

Surface Mesh Generation

(29)

Mesh Generation

Key concepts:

 Voronoi/Delaunay filtering

 Delaunay refinement

(30)

Voronoi Filtering

 The Voronoi diagram restricted to a curve S, Vor|S(E), is the set of edges of Vor(E) that

intersect S.

S

(31)

Delaunay Filtering

The restricted Delaunay triangulation restricted to a curve S is the set of edges of the Delaunay triangulation whose dual edges intersect S.

(2D)

(32)

Delaunay Filtering

Dual Voronoi edge

Delaunay triangulation

restricted to surface S

facet

Voronoi edge  surface S

(33)

Delaunay Refinement

Steiner point

Bad facet = big or

badly shaped or

large approximation error

(34)

Surface Mesh Generation Algorithm

repeat {

pick bad facet f

insert furthest (dual(f)  S) in Delaunay triangulation update Delaunay triangulation restricted to S

}

until all facets are good

(35)

Surface Meshing at Work

(36)

Isosurface from 3D Grey Level Image

input

(37)

Output Mesh Properties

Termination Parsimony

Output mesh properties:

Well shaped triangles

Lower bound on triangle angles

Homeomorphic to input surface

Manifold

not only combinatorially, i.e., no self-intersection

Faithful Approximation of input surface

Hausdorff distance

Normals

(38)

Delaunay Refinement vs Marching Cubes

Delaunay refinement Marching cubes in octree

(39)

Guarantees

(40)

Volume Mesh Generation

(41)

Volume Meshing

 Couple the latter algorithm with 3D Delaunay refinement

(insert circumcenters of “bad” tetrahedra)

 Remove slivers at post-processing with sliver exudation

(42)

More Delaunay Filtering

Delaunay triangulation

restricted to domain

Dual Voronoi vertex inside domain

(“oracle”)‏

(43)

Delaunay Filtering

domain boundary

restricted Delaunay triangulation

(44)

3D Restricted Delaunay Triangulation

(45)

Delaunay Refinement

Steiner point

(46)

Volume Mesh Generation Algorithm

repeat {

pick bad simplex

if(Steiner point encroaches a facet)‏

refine facet else

refine simplex

update Delaunay triangulation restricted to domain

}

until all simplices are good Exude slivers

(47)

Delaunay Refinement

(48)

Example

(49)

Example

(50)

Multi-Domain Volume Mesh

(51)

Tetrahedron Zoo

(52)

Sliver

4 well-spaced vertices near the equator of their circumsphere

(53)

Slivers

(54)

Sliver Exudation

[Edelsbrunner-Guoy]

 Delaunay triangulation turned into a regular triangulation with null weights.

 Small increase of weights triggers edge-facets flips to remove slivers.

(55)

Sliver Exudation Process

 Try improving all tetrahedra with an aspect ratio lower than a given bound

 Never flips a boundary facet

distribution of aspect ratios

(56)

Example Sliver Exudation

(57)

Piecewise Smooth Surfaces

(58)

Input: Piecewise smooth complex

(59)

More Delaunay Filtering

primitive dual of test against

Voronoi vertex tetrahedron inside domain

Voronoi edge facet intersect domain boundary Voronoi face edge intersect crease

(60)

Delaunay Refinement

 Steiner points

(61)

Enrich Set of Rules…

(62)

Example

init 5 20

50 end slivers

(63)

Summary

 Meshes

Definition, variety

Background

Voronoi

Delaunay

constrained Delaunay

restricted Delaunay

Generation

2D, 3D, Delaunay refinement

(64)

Mesh Optimization

Pierre Alliez

INRIA Sophia Antipolis - Mediterranee

(65)

Goals

 3D simplicial mesh generation

 optimize shape of elements

for matrix conditioning

isotropic

 control over sizing

dictated by simulation

constrained by boundary

low number of elements desired

more elements = slower solution time

(66)

Popular Meshing Approaches

advancing front

specific subdivision

octree

lattice (e.g. body centered cubic)

Delaunay

refinement

sphere packing

spring energy

Laplacian

non-zero rest length

aspect / radius ratios

dihedral / solid angles

max-min/min-max

volumes

edge lengths

containing sphere radii [Freitag Amenta Bern Eppstein]

sliver exudation

[Edelsbrunner Goy]

combined with local optimizations

(67)

Variational?

 Design one energy function such that good

solutions correspond to low energy ones (global minimum in general a mirage).

 Solutions found by optimization techniques.

(68)

Example Energy in 2D

 

k

j x R

j

j

dx x

x E

..

1

||

2

||

(69)

Lloyd Iteration

demo

(70)

2D Optimized Triangle Meshing

(71)

2D Optimized Triangle Meshing

(72)

Delaunay refinement

Termination

shape criterion: radius-edge ratio

in 2D: max 2 (implies min 20.7º)

in 3D: max 2 (nothing similar on dihedral angles)

[Chew, Ruppert, Shewchuk, ...]

(73)

Delaunay refinement

+ greedy (fast)

+ easy incorporation of sizing field + allows boundary conforming

possibly with Steiner points

even for sharp angles on boundary [Teng]

+ guaranteed bounds on radius-edge ratio - blind to slivers

- and experimentally...produces slivers

(74)

Background

(75)

Delaunay Triangulation

Duality on the paraboloid: Delaunay

triangulation obtained by projecting the lower part of the convex hull.

(76)

Delaunay Triangulation

Project the 2D point set

onto the 3D paraboloid

z=x2+y2

Compute the 3D

lower convex hull

z=x2+y2

Project the 3D facets

back to the plane.

z=x2+y2

(77)

Proof

The intersection of a plane with the paraboloid is an ellipse

whose projection to the plane is a circle.

s lies within the circumcircle of p, q, r iff s’ lies on the lower side of the plane passing through p’, q’, r’.

p, q, r  S form a Delaunay

triangle iff p’, q’, r’ form a face of the convex hull of S’.

q p

r r’

q’ p’

s s’

(78)

Voronoi Diagram

Given a set S of points in the plane, associate with each point p=(a,b)S the plane

tangent to the paraboloid at p:

z = 2ax+2by-(a2+b2).

VD(S) is the projection to the (x,y) plane of the 1-skeleton of the convex polyhedron formed from the intersection of the halfspaces above these planes.

q p q’ p’

(79)

First Idea: Lloyd Algorithm

(after Lloyd relaxation)

...back to primal ?

(80)

Centroidal Voronoi Tessellation

distribution of radius ratios

1 0

Occurrences

220 “slivers”‏(tets‏with‏radius‏ratio‏<‏0.2)

5K sites 30K tets

(81)

Tetrahedra Zoo

well-spaced points generate only round or sliver tetrahedra

(82)

Key Idea

 adopt the "function approximation" point of view [Chen 04] Optimal Delaunay Triangulation

 1D: f(x)=x2 centered at any vertex

 minimize the L1 norm between f and PWL interpolation

(83)

Key Idea

 3D: x2 (graph in IR4)

 approximation theory:

linear interpolation: optimal shape of the element related to the Hessian of f [Shewchuk]

 Hessian(x2) = Id

regular tetrahedron best

 note: FE ~ mesh that best interpolates a function + matrix conditioning

(84)

Key Question

 which mesh best approximates the paraboloid?

(PWL interpolates)

 Answers:

for fixed point locations

Delaunay (lifts to lower facets of convex hull)

for fixed connectivity

quadratic energy

closed form for local optimum

(85)

Function Approximation

 Given:

triangulation 

bounded domain  in IRn

 Consider function approximation error:

 ||

,

||

,

) ,

,

(

p

T L

f

I

f p

f T Q

linear interpolation

(86)

Function Approximation

Theorem [Chen 04]:

[d’Azevedo-Simpson 89] in IR2, p =  [Rippa 92] in IR2, 1  p  

[Melissaratos 93] in IRD, 1  p  

Q T x p p p

x DT

Q

PV

T

( , || || , ), 1 min

) ,

||

||

,

(

2 2

set of all triangulations with a given set V = convex hull of V

Isotropic function

(87)

Function Approximation

Let us V vary Problem:

find triangulation T* such that:

Proof:

existence

necessary condition for p=1

Q T f p p p

f T

Q

PN

T

inf ( , , ), 1 )

,

*, (

set of all triangulations with a at most N vertices

(88)

Function Approximation

Q T x p p p

x DT

Q

PV

T

( , || || , ), 1 min

) ,

||

||

,

(

2 2

set of all triangulations with a given set V = convex hull of V

Isotropic function

(2D)

(89)

Function Approximation

xi: vertex

i: union of simplices incident to xi

|A|: Lebesgue measure of set A in IRn

i

xi

(90)

Function Approximation

 ||

,

||

,

) ,

,

(

p

T L

I

f

f p

f T Q

p p

T

I

x f x dx

f p

f T Q

/ 1

,

( ) ( ) |

| )

, ,

( 

 

 

 

f x f x dx f

T

Q ( , , 1 ) (

I,T

( ) ( ))

 

f x dx f x dx f

T

Q ( , , 1 )

I,T

( ) ( )

f

convex,

f

I,T PWL interpolant

(91)

Function Approximation

 

f x dx f x dx f

T

Q( , ,1) I,T ( ) ( )

 

f x dx f x dx

T

T

I, ( ) ( )

t t

  

f x k f x dx

n T

n

k

) ( )

, (

| 1 |

1 1

t t 1 t

 

f x f x dx

n xi T ( i ) | i | ( ) 1

1

n+1 overlaps

(92)

Function Approximation

 

i i i

dx x

f x

n f f

Q

x

i i

i ( ) | | ( )

1 ) 1

1 , , (

restrict to patch i incident to vertex xi

i xi

  

i i

j k j k i

dx x

f x

n f x

f

n x i

i x

x x

k

j ( ) ( )

1

| ) |

(

| ) ( 1 |

1

t t ,

t

constant

 

i

j k j k i

i i

x x x

k j

ODT x f x f x

E

t t

t ( ) | ( ) | | ( )

|

,

minimize

xk

(93)

Function Approximation

 

i

j k j k i

i i

x x x

k j

ODT x f x f x

E

t t

t ( )| ( )) | | ( ) (|

,

 

i

j xk j xk xi

k i

j i

i x f x

x f

t t

t

,

* | | ( ) ( )

|

| ) 1

(

||2

||

)

(x x

f

if

minimum if EODT 0

 







 

i

j xk j xk xi

k i

j i

i x x

x

t t

t

,

* 2

||

||

) (

|

| |

| 2

1

(94)

Geometric Interpretation

 

i j

j j

i

i

c

x

t

t |

| |

|

*

1

circumcenter

Note: optimal location depends only on the 1- ring neighbors, not on the current location. If all incident vertices lie on a common sphere, optimal location is at sphere center.

demo

(95)

Optimization

 alternate updates of

connectivity

vertex location

 both steps minimize the same energy

as for Lloyd iteration

 for convex fixed boundary

energy monotonically decreases

convergence to a (local) minimum

(96)

Underlaid vs Overlaid Approximant

CVT

partition

approximant

compact Voronoi cells

isotropic sampling

ODT

overlapping decomposition

PWL interpolant

compact simplices

isotropic meshing

(97)

Optimization

Alternate updates of

connectivity (Delaunay triangulation)

vertex locations demo

(98)

Optimal Delaunay Triangulation

distribution of radius ratios 3 “slivers”,‏each‏with‏two‏vertices‏on‏boundary

(99)

Sizing Field

Goal reminder:

shape of elements

boundary approximation

minimize #elements

note: not independent (well-shape elements force K- Lipschitz sizing field [Ruppert, Miller et al.])

Proposal:

size <= lfs (local feature size) on boundary

sizing field = maximal K-Lipschitz

|| || ( )

inf )

( x K x y lfs y

y

 

(100)

Sizing Field

|| || ( )

inf )

( x K x y lfs y

y

 

K=1

(101)

Sizing Field: Examples

1 0.5

K=0.1

3 10 100

(102)

Algorithm

 read input boundary 

 setup data structure & preprocessing

 compute sizing field

 generate initial sites inside 

 do

- Delaunay triangulation of {xi}

- move sites to optimal locations {xi*}

until convergence or stopping criterion

 extract interior mesh

(103)

Input Boundary 

 surface triangle mesh

Requirements:

intersection free

closed

restricted Delaunay triangulation of the input

vertices [Oudot-Boissonnat, Cohen-Steiner et al.]

(104)

Input Boundary 

[Oudot-Boissonnat]

(105)

Input Boundary 

(106)

Setup & Preprocessing

 Insertion of input mesh vertices to a 3D Delaunay triangulation

control mesh

used to answer inside/outside queries

?

?

(107)

Sizing Field: Poles

[Amenta-Bern 98]

control mesh

poles

(108)

Sizing Field: lfs

Approximation: distance to set of poles

CGAL orthogonal search in a kD-tree [Tangelder-Fabri]

(109)

Sizing Field: Examples

Approximation: fast marching from boundary Representation: regular grid or balanced octree

(110)

Optimization

 classification boundary/interior vertices by localization of boundary in Voronoi cells

CVT on boundary

ODT inside

(111)

Optimization: init

0

Distribution of radius ratios

(112)

Optimization: step 1

1

(113)

Optimization: step 2

2

(114)

Optimization: step 50

50

(115)

Optimization: step 50

(116)

Optimization: step 50

(117)

Interior Mesh Extraction

 Delaunay triangulation tessellates the convex hull

(118)

Hand: lfs

(119)

Hand: Sizing

(120)

Hand: Sizing

(121)

Hand: Sizing

(122)

Hand: Radius Ratios

(123)

Stanford Bunny

(124)

Stanford Bunny

(125)

Stanford Bunny

(126)

Stanford Bunny (uniform)

(127)

Torso

(128)

Torso

(129)

Torso

(130)

Torso

(131)

Torso

(132)

Joint

(133)

Conclusion

 Meshes

Definition, variety

Background

Voronoi

Delaunay

constrained Delaunay

restricted Delaunay

Generation

2D, 3D, Delaunay refinement

Optimization

2D, 3D

Lloyd iteration, function approximation approach

Références

Documents relatifs

glycolipids that were identified as product D and PGL-tb by TLC and MALDI-TOF analyses (Figure 3 and Figure S2). The presence of product D indicated that the Rv2957 gene carried

ﻥﻴﺘﻴﻵﺍ ﻥﻴﺘﺎﻫ ﻲﻓ ﻰﻨﻌﻤﻟﺍﻭ ّلﻜ ﻪﻤﻠﻌﻴ ﷲﺍ ﻥﻴﺩ ﻥﻤ ﺎﻤﻠﻋ ﻡﺘﻜ ﻥﻤ ، ﻡﻠﻌﻟﺍ ﺀﺍﻭﺴ ﻱﺫﹼﻟﺍ ﻭـﻫ لﻬﺠﻟﺍ ﺩﻀ ﻭﺃ ، ﻤ ﻭﻫ ﺎﻤﻋ لﻴﺩﺒﻟﺍ ﻡﻠﻌﻟﺍ ﺭ ﻓ ﻪـﻨﺍﻭﻟﺃ ﻑـﻠﺘﺨﻤ ﺩﺎﺴﻓ ﻥﻤ ﻊﻗﺍﻭﻟﺍ

We first approximate the non standard semantics by the domain N V c associating to each program point its threads occurrence in the configuration and to each transition label,

left turn at full speed. The objectives of this work were as follows: i) to extend the scope and complexity of the predictions to include more flight conditions, ii) to evaluate

Nevertheless, since different cell types have different microtopography preferences, topography patterning can be used to control cell cultures of more than one cell type..

Activation of the Constitutive Androstane Receptor induces hepatic lipogenesis and regulates Pnpla3 gene expression in a LXR-independent way...

We adopt a very simple economic model with only three agents: households allocate their income between consumption and saving; firms produce consumption and capital goods,

5 ( مﻼﻌﺘﺴﻻا : مﺎظﻨﻝا موﻘﻴ ﺎﻨرﺎﺒﺨﺈﺒ دوﻘﻔﻤ وأ فﻝﺎﺘ رﻴودﺘﻝا ، دﻴﻠﺠﺘﻝا ﻲﻓ ﻪﻨﺄﺒ ددﻋ لﻜ فﻗوﻤﺒ.. 5 - ةددﺤﻤ ﺔﻴﻨﻤز ةدﻤ لﻼﺨ ﺔﻨﻴﻌﻤ تﺎﻴرود ﻲﻓ كارﺘﺸﻻا دﻴدﺠﺘ ﺦﻴراوﺘﺒ رﻴرﻘﺘ