Mesh Generation
Jean-Daniel Boissonnat Geometrica, INRIA
http://www-sop.inria.fr/geometrica
Winter School, University of Nice Sophia Antipolis January 26-30, 2015
Meshing surfaces and 3D domains
visualization and graphics applications CAD and reverse engineering
geometric modelling in medecine, geology, biology etc.
autonomous exploration and mapping (SLAM) scientific computing : meshes for FEM
P d
dO
Ω
O o
Winter School 4 Mesh generation Sophia Antipolis 2 / 23
Mesh generation : from art to science
Grid methods
Lorensen & Cline [87] : marching cube Lopez & Brodlie [03] : topological consistency
Plantiga & Vegter [04] : certified topology using interval arithmetic
Morse theory
Stander & Hart [97]
B., Cohen-Steiner & Vegter [04] : certified topology
Delaunay refinement
Hermeline [84]
Ruppert [95]
Shewchuk [02]
Chew [93]
B. & Oudot [03,04]
Cheng et al. [04]
Main issues
Sampling
How do we choose points in the domain ?
What information do we need to know/measure about the domain ?
Meshing
How do we connect the points ?
Under what sampling conditions can we compute a good approximation of the domain ?
Winter School 4 Mesh generation Sophia Antipolis 4 / 23
Restricted Delaunay triangulation
[Chew 93]Definition
Therestricted Delaunay triangulationDelX(P)to X⊂Rd is the nerve of Vor(P)∩X
If P is anε-sample, any ball centered onXthat circumscribes a facet ofDelX(P) has a radius≤εrch(M)
Restricted Delaunay triangulation
[Chew 93]Definition
Therestricted Delaunay triangulationDelX(P)to X⊂Rd is the nerve of Vor(P)∩X
If P is anε-sample, any ball centered onXthat circumscribes a facet ofDelX(P) has a radius≤εrch(M)
Winter School 4 Mesh generation Sophia Antipolis 5 / 23
Restricted Delaunay triangulation
[Chew 93]Definition
Therestricted Delaunay triangulationDelX(P)to X⊂Rd is the nerve of Vor(P)∩X
If P is anε-sample, any ball centered onXthat circumscribes a facet ofDelX(P) has a radius≤εrch(M)
Restricted Delaunay triangulation
[Chew 93]Definition
Therestricted Delaunay triangulationDelX(P)to X⊂Rd is the nerve of Vor(P)∩X
Winter School 4 Mesh generation Sophia Antipolis 6 / 23
A variant of the nerve theorem
[Edelsbrunner & Shah 1997]LetMbe a compact manifold without boundary. If, for any face f ∈Vor(P) s.t. f ∩M6=∅,
1 f intersectsMtransversally
2 f ∩M=∅or is a topological ball thenDelM(P)≈M
A variant of the nerve theorem
[Edelsbrunner & Shah 1997]LetMbe a compact manifold without boundary. If, for any face f ∈Vor(P) s.t. f ∩M6=∅,
1 f intersectsMtransversally
2 f ∩M=∅or is a topological ball thenDelM(P)≈M
Winter School 4 Mesh generation Sophia Antipolis 7 / 23
Proof of the closed ball property
Barycentric subdivision
ofVor(P)∩M ofDelM(P)
Good sampling, scale and dimension
Winter School 4 Mesh generation Sophia Antipolis 9 / 23
Sampling conditions
[Federer 1958], [Amenta & Bern 1998]Medial axis ofM: axis(M)
set of points with at least two closest points onM
Reach
∀x∈M, rch(x)=infimum of the radii of the medial balls tangent toMatx rch(M)=infx∈Mrch(x)
(, η)-net ofM
1.P ⊂M,∀x∈M: d(x,P)≤rch(x)
Sampling conditions
[Federer 1958], [Amenta & Bern 1998]Medial axis ofM: axis(M)
set of points with at least two closest points onM
Reach
∀x∈M, rch(x)=infimum of the radii of the medial balls tangent toMatx rch(M)=infx∈Mrch(x)
(, η)-net ofM
1.P ⊂M,∀x∈M: d(x,P)≤rch(x)
2.∀p,q∈ P, kp−qk ≥η min(rch(p),rch(q))
Winter School 4 Mesh generation Sophia Antipolis 10 / 23
Restricted Delaunay triang. of ( ε, η )-nets
[Amenta et al. 1998-], [B. & Oudot 2005]
If
S ⊂R3 is a compact surface of positive reach without boundary
P is an(ε, η)-net withε/η≤ξ0andε small enough
then
Del|S(S)provides good estimates of normals
There exists ahomeomorphism φ:Del|S(P)→ S
supx(kφ(x)−xk) =O(ε2)
Surface mesh generation by Delaunay refinement
[Chew 1993, B. & Oudot 2003]
φ:S→R= Lipschitz function
∀x∈S, 0< φmin≤φ(x)< εrch(x)
ORACLE: For a facetf ofDel|S(P), returncf,rf andφ(cf) A facetf isbadifrf > φ(cf)
Context and Motivation
Delaunay refinement meshing engine
The algorithms refines:
Bad facets: f ∈Del|S(P) – oversized (sizing field)
– badly shaped (min angle bound) – inaccurate (distance bound) Bad Tetrahedra : t∈Del|O(P) – oversized (sizing field)
– badly-shaped (radius-egde ratio) Required oracle on domain to be meshed
• point location in domain and subdomains
• intersection detection/computation between boundary surfaces and segments (Delaunay edges)
PA-MY (INRIA Geometrica) CGALmesh ARC-ADT-AE-2010 9 / 36
Algorithm
INIT compute an initial (small) sampleP0⊂S REPEAT IFf is a bad facet
insert in Del3D(cf), updatePandDel|S(P) UNTIL all facets are good
Winter School 4 Mesh generation Sophia Antipolis 12 / 23
Surface mesh generation by Delaunay refinement
[Chew 1993, B. & Oudot 2003]
φ:S→R= Lipschitz function
∀x∈S, 0< φmin≤φ(x)< εrch(x)
ORACLE: For a facetf ofDel|S(P), returncf,rf andφ(cf) A facetf isbadifrf > φ(cf)
Context and Motivation
Delaunay refinement meshing engine
The algorithms refines:
Bad facets: f ∈Del|S(P) – oversized (sizing field)
– badly shaped (min angle bound) – inaccurate (distance bound) Bad Tetrahedra : t∈Del|O(P) – oversized (sizing field)
– badly-shaped (radius-egde ratio) Required oracle on domain to be meshed
• point location in domain and subdomains
• intersection detection/computation between boundary surfaces and segments (Delaunay edges)
PA-MY (INRIA Geometrica) CGALmesh ARC-ADT-AE-2010 9 / 36
Algorithm
INIT compute an initial (small) sampleP0⊂S REPEAT IFf is a bad facet
insert in Del3D(cf), updatePandDel|S(P) UNTIL all facets are good
The meshing algorithm in action
Winter School 4 Mesh generation Sophia Antipolis 13 / 23
The algorithm outputs a good sample
The output sampleP is sparse
∀p∈ P,d(p,P \ {p}) =kp−qk
≥min(φ(p), φ(q))
≥φ(p)− kp−qk
⇒ kp−qk ≥ 12φ(p)≥ 12φ0 >0 the algorithm terminates
P is a looseε-sample ofS
I Each facet has aS-radiusrf ≤φ(cf)< εrch(S)
I Del|S(P)has a vertex on each cc ofS (INIT)
Size of the sample = Θ R
S dx φ2(x)
Upper bound
Bp=B(p,φ(p)2 ),p∈ P R
S dx φ2(x) ≥P
p
R
(Bp∩S) dx
φ2(x) (theBpare disjoint)
≥49P
p
area(Bp∩S)
φ2(p) φ(x)≤φ(p) +kp−xk
≤ 32 φ(p))
≥P
pC = C|P|
reach(S)
p φ(p)2
Lower bound
Use a covering instead of a packing
Winter School 4 Mesh generation Sophia Antipolis 15 / 23
Size of the sample = Θ R
S dx φ2(x)
Upper bound
Bp=B(p,φ(p)2 ),p∈ P R
S dx φ2(x) ≥P
p
R
(Bp∩S) dx
φ2(x) (theBpare disjoint)
≥49P
p
area(Bp∩S)
φ2(p) φ(x)≤φ(p) +kp−xk
≤ 32 φ(p))
≥P
pC = C|P|
reach(S)
p φ(p)2
Lower bound
Use a covering instead of a packing
The full result
The Delaunay refinement algorithm produces a good (dense and sparse) sample a triangulated surfaceˆS
I homeomorphic toS
I close toS (Hausdorff/Fr ´echet distance, approximation of normals)
Winter School 4 Mesh generation Sophia Antipolis 16 / 23
Applications
Implicit surfacesf(x,y,z) =0
Isosurfaces in a 3d image (Medical images) Triangulated surfaces (Remeshing)
Point sets (Surface reconstruction)
see cgal.org, CGALmesh project
Results on smooth implicit surfaces
Winter School 4 Mesh generation Sophia Antipolis 18 / 23
CGALmesh Achievements
Meshing 3D domains
Input from segmented 3D medical images
[INSERM] [SIEMENS]
Comparison with the Marching Cube algorithm
Delaunay refinement Marching cube
Winter School 4 Mesh generation Sophia Antipolis 20 / 23
CGALmesh Achievements
Meshing with sharp features
A polyhedral example
CGALmesh Achievements
Meshing 3D multi-domains
Input from segmented 3D medical images [IRCAD]
PA-MY (INRIA Geometrica) CGALmesh ARC-ADT-AE-2010 21 / 36
Winter School 4 Mesh generation Sophia Antipolis 22 / 23