Lévy, Li, Borgese On Mesh Intersection
1/∞
Bruno Lévy
Inria Saclay – Laboratoire de Mathématiques d’Orsay
Wan-Chiu Li, Cédric Borgese
Tessael
ON MESH INTERSECTION
ROBUSTNESS AND EFFICIENCY
Lévy, Li, Borgese On Mesh Intersection
2/∞
Lévy, Li, Borgese On Mesh Intersection
2/∞
Introduction
IFP Energies Nouvelles
Lévy, Li, Borgese On Mesh Intersection
3/∞
Lévy, Li, Borgese On Mesh Intersection
3/∞
Introduction
Lévy, Li, Borgese On Mesh Intersection
4/∞
Lévy, Li, Borgese On Mesh Intersection
4/∞
Introduction
Gocad’s “cut” functionality :
[Sword 1996]
[Caumon, Sword, Mallet 2003]
[Legentil et.al. 2022]
[Mallet 2002]
A stream of articles :
[Cherchi, Livesu, Attene
2020-2022]
Lévy, Li, Borgese On Mesh Intersection
5/∞
Lévy, Li, Borgese On Mesh Intersection
5/∞
Introduction
Lévy, Li, Borgese On Mesh Intersection
6/∞
Lévy, Li, Borgese On Mesh Intersection
6/∞
Introduction
Lévy, Li, Borgese On Mesh Intersection
7/∞
Lévy, Li, Borgese On Mesh Intersection
7/∞
Introduction
Lévy, Li, Borgese On Mesh Intersection
8/∞
Lévy, Li, Borgese On Mesh Intersection
8/∞
Introduction
Lévy, Li, Borgese On Mesh Intersection
9/∞
Lévy, Li, Borgese On Mesh Intersection
9/∞
Introduction
Lévy, Li, Borgese On Mesh Intersection
10/∞
The algorithm
Find
candidate Δ Δ
intersections
Compute
Δ Δ
intersections
Retriangulate
the Δ’s
Find the
regions
1 2
3
4
Lévy, Li, Borgese On Mesh Intersection
11/∞
Find
candidate Δ Δ
intersections
Δ Δ intersect
Constrained
Delaunay 2d
Radial
Sort
1 2
3
4
1. Finding all the pairs of intersecting triangles
Lévy, Li, Borgese On Mesh Intersection
12/∞
1. Finding all the pairs of intersecting triangles
NVidia
Lévy, Li, Borgese On Mesh Intersection
13/∞
NVidia
N1 N2 N3 N4 N5 N6 N7 01 02 03 04 05 06 07 08
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1. Finding all the pairs of intersecting triangles
Lévy, Li, Borgese On Mesh Intersection
14/∞
NVidia
N1 N2 N3 N4 N5 N6 N7 01 02 03 04 05 06 07 08
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1. Finding all the pairs of intersecting triangles
Lévy, Li, Borgese On Mesh Intersection
15/∞
NVidia
N1 N2 N3 N4 N5 N6 N7 01 02 03 04 05 06 07 08
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
left(n) = 2*n
right(n) = 2*n+1
1. Finding all the pairs of intersecting triangles
Lévy, Li, Borgese On Mesh Intersection
16/∞
NVidia
Triangles array
1. Finding all the pairs of intersecting triangles
Lévy, Li, Borgese On Mesh Intersection
17/∞
NVidia
Triangles array
1. Finding all the pairs of intersecting triangles
Lévy, Li, Borgese On Mesh Intersection
18/∞
NVidia
Triangles array
1. Finding all the pairs of intersecting triangles
Lévy, Li, Borgese On Mesh Intersection
19/∞
NVidia
Triangles array
1. Finding all the pairs of intersecting triangles
Lévy, Li, Borgese On Mesh Intersection
20/∞
NVidia
Triangles array
3. Finding all the pairs of intersecting triangles
Lévy, Li, Borgese On Mesh Intersection
21/∞
NVidia
Triangles array
1. Finding all the pairs of intersecting triangles
Lévy, Li, Borgese On Mesh Intersection
22/∞
NVidia
Triangles array
1. Finding all the pairs of intersecting triangles
Lévy, Li, Borgese On Mesh Intersection
23/∞
N1 N2 N3 N4 N5 N6 N7 01 02 03 04 05 06 07 08
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1. Finding all the pairs of intersecting triangles
Lévy, Li, Borgese On Mesh Intersection
24/∞
N1 N2 N3 N4 N5 N6 N7 01 02 03 04 05 06 07 08
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1. Finding all the pairs of intersecting triangles
Lévy, Li, Borgese On Mesh Intersection
25/∞
N1 N2 N3 N4 N5 N6 N7 01 02 03 04 05 06 07 08
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1. Finding all the pairs of intersecting triangles
Lévy, Li, Borgese On Mesh Intersection
26/∞
N1 N2 N3 N4 N5 N6 N7 01 02 03 04 05 06 07 08
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Delage Devillers
Spatial sort in CGAL
std::nth_element()
1. Finding all the pairs of intersecting triangles
Lévy, Li, Borgese On Mesh Intersection
27/∞
1. Finding all the pairs of intersecting triangles
Lévy, Li, Borgese On Mesh Intersection
28/∞
Node 1, sequence [b1, e1)
1. Finding all the pairs of intersecting triangles
Lévy, Li, Borgese On Mesh Intersection
29/∞
Node 1, sequence [b1, e1)
1. Finding all the pairs of intersecting triangles
Node 2, sequence [b2, e2)
Lévy, Li, Borgese On Mesh Intersection
30/∞
Node 1, sequence [b1, e1)
1. Finding all the pairs of intersecting triangles
Node 2, sequence [b2, e2)
intersect(1, 0, N, 1, 0, N)
Find all intersections:
Lévy, Li, Borgese On Mesh Intersection
31/∞
Node 1, sequence [b1, e1)
1. Finding all the pairs of intersecting triangles
Node 2, sequence [b2, e2)
intersect(1, 0, N, 1, 0, N)
Find all intersections:
Whole tree Whole tree
Lévy, Li, Borgese On Mesh Intersection
32/∞
1. Finding all the pairs of intersecting triangles
Lévy, Li, Borgese On Mesh Intersection
33/∞
1. Finding all the pairs of intersecting triangles
Early pruning
Lévy, Li, Borgese On Mesh Intersection
34/∞
1. Finding all the pairs of intersecting triangles
Leaves with 1 triangle
Lévy, Li, Borgese On Mesh Intersection
35/∞
1. Finding all the pairs of intersecting triangles
Recursive descent
along the child
af the larges node
Lévy, Li, Borgese On Mesh Intersection
36/∞
1. Finding all the pairs of intersecting triangles
Axis Aligned
Bounding Box
Tree
Lévy, Li, Borgese On Mesh Intersection
37/∞
1. Finding all the pairs of intersecting triangles
Axis Aligned
Bounding Box
Tree
Stream of candidate
triangle intersections
Lévy, Li, Borgese On Mesh Intersection
38/∞
Axis Aligned
Bounding Box
Tree
Δ Δ intersect
Constrained
Delaunay 2d
Radial
Sort
1 2
3
4
2. Triangle-triangle intersection
Lévy, Li, Borgese On Mesh Intersection
39/∞
2. Triangle-triangle intersection
Generic configuration
Lévy, Li, Borgese On Mesh Intersection
40/∞
2. Triangle-triangle intersection
Degenerate configurations
Lévy, Li, Borgese On Mesh Intersection
41/∞
2. Triangle-triangle intersection
Degenerate configurations
Lévy, Li, Borgese On Mesh Intersection
42/∞
2. Triangle-triangle intersection
Degenerate configurations
Lévy, Li, Borgese On Mesh Intersection
43/∞
2. Triangle-triangle intersection
Degenerate configurations
Lévy, Li, Borgese On Mesh Intersection
44/∞
2. Triangle-triangle intersection
v1
v2
v3 e1
e2 e3
T
Σt = { v1, v2, v3, e1, e2, e3, T }
Lévy, Li, Borgese On Mesh Intersection
45/∞
2. Triangle-triangle intersection
v1
v2
v3 e1
e2 e3
T
v’1
v’2
v’3 e’1
e’2 e’3
T’
(Naïve algorithm)
Lévy, Li, Borgese On Mesh Intersection
46/∞
2. Triangle-triangle intersection
Lévy, Li, Borgese On Mesh Intersection
47/∞
2. Triangle-triangle intersection
Lévy, Li, Borgese On Mesh Intersection
48/∞
Lévy, Li, Borgese On Mesh Intersection
48/∞
2. Triangle-triangle intersection
Lévy, Li, Borgese On Mesh Intersection
49/∞
Lévy, Li, Borgese On Mesh Intersection
49/∞
2. Triangle-triangle intersection
Floating point
coordinates
Lévy, Li, Borgese On Mesh Intersection
50/∞
Lévy, Li, Borgese On Mesh Intersection
50/∞
2. Triangle-triangle intersection
Intersection is
not on the grid
Lévy, Li, Borgese On Mesh Intersection
51/∞
Lévy, Li, Borgese On Mesh Intersection
51/∞
2. Triangle-triangle intersection
Computed
intersection
moves a bit !
Lévy, Li, Borgese On Mesh Intersection
52/∞
Lévy, Li, Borgese On Mesh Intersection
52/∞
2. Triangle-triangle intersection
Lévy, Li, Borgese On Mesh Intersection
53/∞
Lévy, Li, Borgese On Mesh Intersection
53/∞
2. Triangle-triangle intersection
Lévy, Li, Borgese On Mesh Intersection
54/∞
2. Triangle-triangle intersection
computed exactly
[Shewchuk 96,97]
Lévy, Li, Borgese On Mesh Intersection
55/∞
2. Triangle-triangle intersection
Triangle
Intersection
Candidate triangle
Intersections (from AABB)
Lévy, Li, Borgese On Mesh Intersection
56/∞
2. Triangle-triangle intersection
Triangle
Intersection
Candidate triangle
Intersections (from AABB)
Intersection segments
in symbolic form
Lévy, Li, Borgese On Mesh Intersection
57/∞
2. Triangle-triangle intersection
Triangle
Intersection
Candidate triangle
Intersections (from AABB)
Intersection segments
in symbolic form
V1.E1 ∩V2.T
V1.T ∩ V2.E3
Lévy, Li, Borgese On Mesh Intersection
58/∞
Axis Aligned
Bounding Box
Tree
Δ Δ intersect
Constrained
Delaunay 2d
Radial
Sort
1 2
3
4
3. Re-triangulating the triangles
Lévy, Li, Borgese On Mesh Intersection
59/∞
3. Re-triangulating the triangles
Lévy, Li, Borgese On Mesh Intersection
60/∞
3. Re-triangulating the triangles
Constrained
Delaunay 2d
Lévy, Li, Borgese On Mesh Intersection
61/∞
3. Re-triangulating the triangles
Lévy, Li, Borgese On Mesh Intersection
62/∞
3. Re-triangulating the triangles
Lévy, Li, Borgese On Mesh Intersection
63/∞
3. Re-triangulating the triangles
Lévy, Li, Borgese On Mesh Intersection
64/∞
3. Re-triangulating the triangles
[Sloan 1992]
Lévy, Li, Borgese On Mesh Intersection
65/∞
3. Re-triangulating the triangles
[Sloan 1992]
Lévy, Li, Borgese On Mesh Intersection
66/∞
3. Re-triangulating the triangles
Constrained
Delaunay 2d
• Orient2d(p1,p2,p3)
• InCircle(p1,p2,p3,p4)
• CreateIntersection(p1,p2,p3,p4) → p
Lévy, Li, Borgese On Mesh Intersection
67/∞
3. Re-triangulating the triangles
Constrained
Delaunay 2d
• Orient2d(p1,p2,p3)
• InCircle(p1,p2,p3,p4)
• CreateIntersection(p1,p2,p3,p4) → p
Our points are intersections
Lévy, Li, Borgese On Mesh Intersection
68/∞
3. Re-triangulating the triangles
Constrained
Delaunay 2d
• Orient2d(p1,p2,p3)
• InCircle(p1,p2,p3,p4)
• CreateIntersection(p1,p2,p3,p4) → p
Our points are intersections
Let’s compute them exactly !
Lévy, Li, Borgese On Mesh Intersection
69/∞
3. Re-triangulating the triangles
• Orient2d(p1,p2,p3)
• InCircle(p1,p2,p3,p4)
• CreateIntersection(p1,p2,p3,p4) → p
Our points are intersections
Let’s compute them exactly !
Arithmetic expansions (like in Shewchuk’s predicates)
class expansion_nt {
expansion_nt(double x);
expansion_nt operator+(const expansion_nt& rhs);
expansion_nt operator-(const expansion_nt& rhs);
expansion_nt operator*(const expansion_nt& rhs);
};
Lévy, Li, Borgese On Mesh Intersection
70/∞
3. Re-triangulating the triangles
• Orient2d(p1,p2,p3)
• InCircle(p1,p2,p3,p4)
• CreateIntersection(p1,p2,p3,p4) → p
Our points are intersections
Let’s compute them exactly !
Arithmetic expansions (like in Shewchuk’s predicates)
class expansion_nt {
expansion_nt(double x);
expansion_nt operator+(const expansion_nt& rhs);
expansion_nt operator-(const expansion_nt& rhs);
expansion_nt operator*(const expansion_nt& rhs);
};
Lévy, Li, Borgese On Mesh Intersection
71/∞
3. Re-triangulating the triangles
• Orient2d(p1,p2,p3)
• InCircle(p1,p2,p3,p4)
• CreateIntersection(p1,p2,p3,p4) → p
Our points are intersections
Let’s compute them exactly !
Arithmetic expansions (like in Shewchuk’s predicates)
class expansion_nt {
expansion_nt(double x);
expansion_nt operator+(const expansion_nt& rhs);
expansion_nt operator-(const expansion_nt& rhs);
expansion_nt operator*(const expansion_nt& rhs);
};
How to divide ?
Homogeneous coordinates !
(like in OpenGL)
[x y z w]
↕
[ x/w y/w z/w ]
Lévy, Li, Borgese On Mesh Intersection
72/∞
3. Re-triangulating the triangles
• Orient2d(p1,p2,p3)
• InCircle(p1,p2,p3,p4)
• CreateIntersection(p1,p2,p3,p4) → p
How to make it faster ?
Arithmetic expansions (like in Shewchuk’s predicates)
class expansion_nt {
expansion_nt(double x);
expansion_nt operator+(const expansion_nt& rhs);
expansion_nt operator-(const expansion_nt& rhs);
expansion_nt operator*(const expansion_nt& rhs);
};
How to divide ?
Homogeneous coordinates !
(like in OpenGL)
[x y z w]
↕
[ x/w y/w z/w ]
Lévy, Li, Borgese On Mesh Intersection
73/∞
3. Re-triangulating the triangles
• Orient2d(p1,p2,p3)
• InCircle(p1,p2,p3,p4)
• CreateIntersection(p1,p2,p3,p4) → p
How to make it faster ?
Arithmetic expansions (like in Shewchuk’s predicates)
class expansion_nt {
expansion_nt(double x);
expansion_nt operator+(const expansion_nt& rhs);
expansion_nt operator-(const expansion_nt& rhs);
expansion_nt operator*(const expansion_nt& rhs);
};
How to divide ?
Homogeneous coordinates !
(like in OpenGL)
[x y z w]
↕
[ x/w y/w z/w ]
class interval_nt
filter
Lévy, Li, Borgese On Mesh Intersection
74/∞
3. Re-triangulating the triangles
• Orient2d(p1,p2,p3)
• InCircle(p1,p2,p3,p4)
• CreateIntersection(p1,p2,p3,p4) → p
How to make it faster ?
Arithmetic expansions (like in Shewchuk’s predicates)
class expansion_nt {
expansion_nt(double x);
expansion_nt operator+(const expansion_nt& rhs);
expansion_nt operator-(const expansion_nt& rhs);
expansion_nt operator*(const expansion_nt& rhs);
};
How to divide ?
Homogeneous coordinates !
(like in OpenGL)
[x y z w]
↕
[ x/w y/w z/w ]
class interval_nt
filter
Does it always work ?
What about
overflows / underflows ?
Lévy, Li, Borgese On Mesh Intersection
75/∞
3. Re-triangulating the triangles
• Orient2d(p1,p2,p3)
• InCircle(p1,p2,p3,p4)
• CreateIntersection(p1,p2,p3,p4) → p
How to make it faster ?
Arithmetic expansions (like in Shewchuk’s predicates)
class expansion_nt {
expansion_nt(double x);
expansion_nt operator+(const expansion_nt& rhs);
expansion_nt operator-(const expansion_nt& rhs);
expansion_nt operator*(const expansion_nt& rhs);
};
How to divide ?
Homogeneous coordinates !
(like in OpenGL)
[x y z w]
↕
[ x/w y/w z/w ]
class interval_nt
filter
Does it always work ?
What about
overflows / underflows ?
multiprecision
class exact_nt
Lévy, Li, Borgese On Mesh Intersection
76/∞
3. Re-triangulating the triangles
Thingy10K, thing # 996816 “The Nemesis”
Lévy, Li, Borgese On Mesh Intersection
77/∞
3. Re-triangulating the triangles
Thingy10K, thing # 996816 “The Nemesis”
Some triangles
with 5000 intersections !
Lévy, Li, Borgese On Mesh Intersection
78/∞
3. Re-triangulating the triangles
Lévy, Li, Borgese On Mesh Intersection
79/∞
3. Re-triangulating the triangles
Lévy, Li, Borgese On Mesh Intersection
80/∞
3. Re-triangulating the triangles
Lévy, Li, Borgese On Mesh Intersection
81/∞
Axis Aligned
Bounding Box
Tree
Δ Δ intersect
Constrained
Delaunay 2d
Radial
Sort
1 2
3
4
4. Building the Weiler model
Lévy, Li, Borgese On Mesh Intersection
82/∞
4. Building the Weiler model
AABB
Cnstr.
Delaunay
Lévy, Li, Borgese On Mesh Intersection
83/∞
4. Building the Weiler model
Weiler
AABB
Cnstr.
Delaunay
Lévy, Li, Borgese On Mesh Intersection
84/∞
4. Building the Weiler model
Radial edges
Lévy, Li, Borgese On Mesh Intersection
85/∞
4. Building the Weiler model
Radial edges
Lévy, Li, Borgese On Mesh Intersection
86/∞
4. Building the Weiler model
Radial edges
Lévy, Li, Borgese On Mesh Intersection
87/∞
4. Building the Weiler model
Radial edges
Lévy, Li, Borgese On Mesh Intersection
88/∞
4. Building the Weiler model
Radial edges
Lévy, Li, Borgese On Mesh Intersection
89/∞
4. Building the Weiler model
Radial edges
Radial sorting
(no arccos/arctan, everything with dot and cross product)
Lévy, Li, Borgese On Mesh Intersection
90/∞
4. Building the Weiler model
Regions
Lévy, Li, Borgese On Mesh Intersection
91/∞
Find
candidate Δ Δ
intersections
Compute
Δ Δ
intersections
Retriangulate
the Δ’s
Find the
regions
1 2
3
4
5. Examples
Results,
Examples
5
Lévy, Li, Borgese On Mesh Intersection
92/∞
5. Examples
Lévy, Li, Borgese On Mesh Intersection
93/∞
5. Examples
Lévy, Li, Borgese On Mesh Intersection
94/∞
5. Examples
Lévy, Li, Borgese On Mesh Intersection
95/∞
5. Examples
Mandaros (ELF)
Lévy, Li, Borgese On Mesh Intersection
96/∞
5. Examples
Tessael HexDom for CCUS coupled flow-geomechanics sim with GEOS,
Cooperation with Total Energies
Lévy, Li, Borgese On Mesh Intersection
97/∞
5. Examples
IFP Energies Nouvelles
Lévy, Li, Borgese On Mesh Intersection
98/∞
5. Examples
IFP Energies Nouvelles
Lévy, Li, Borgese On Mesh Intersection
99/∞
5. Examples
Tessael ClipHex hybrid element meshing optimized for
IFP Energies Nouvelles Temis flow simulator.
Lévy, Li, Borgese On Mesh Intersection
100/∞
5. Examples
Model courtesy RING Consortium
Lévy, Li, Borgese On Mesh Intersection
101/∞
5. Examples
Model courtesy RING Consortium
Lévy, Li, Borgese On Mesh Intersection
102/∞
When there’s something strange
In the (non-manifold) neighborhood,
Who you gonna call ?
GEOGRAM + GeO2 https://github.com/BrunoLevy/geogram

On Mesh Intersection: exact computation and efficiency

  • 1.
    Lévy, Li, BorgeseOn Mesh Intersection 1/∞ Bruno Lévy Inria Saclay – Laboratoire de Mathématiques d’Orsay Wan-Chiu Li, Cédric Borgese Tessael ON MESH INTERSECTION ROBUSTNESS AND EFFICIENCY
  • 2.
    Lévy, Li, BorgeseOn Mesh Intersection 2/∞ Lévy, Li, Borgese On Mesh Intersection 2/∞ Introduction IFP Energies Nouvelles
  • 3.
    Lévy, Li, BorgeseOn Mesh Intersection 3/∞ Lévy, Li, Borgese On Mesh Intersection 3/∞ Introduction
  • 4.
    Lévy, Li, BorgeseOn Mesh Intersection 4/∞ Lévy, Li, Borgese On Mesh Intersection 4/∞ Introduction Gocad’s “cut” functionality : [Sword 1996] [Caumon, Sword, Mallet 2003] [Legentil et.al. 2022] [Mallet 2002] A stream of articles : [Cherchi, Livesu, Attene 2020-2022]
  • 5.
    Lévy, Li, BorgeseOn Mesh Intersection 5/∞ Lévy, Li, Borgese On Mesh Intersection 5/∞ Introduction
  • 6.
    Lévy, Li, BorgeseOn Mesh Intersection 6/∞ Lévy, Li, Borgese On Mesh Intersection 6/∞ Introduction
  • 7.
    Lévy, Li, BorgeseOn Mesh Intersection 7/∞ Lévy, Li, Borgese On Mesh Intersection 7/∞ Introduction
  • 8.
    Lévy, Li, BorgeseOn Mesh Intersection 8/∞ Lévy, Li, Borgese On Mesh Intersection 8/∞ Introduction
  • 9.
    Lévy, Li, BorgeseOn Mesh Intersection 9/∞ Lévy, Li, Borgese On Mesh Intersection 9/∞ Introduction
  • 10.
    Lévy, Li, BorgeseOn Mesh Intersection 10/∞ The algorithm Find candidate Δ Δ intersections Compute Δ Δ intersections Retriangulate the Δ’s Find the regions 1 2 3 4
  • 11.
    Lévy, Li, BorgeseOn Mesh Intersection 11/∞ Find candidate Δ Δ intersections Δ Δ intersect Constrained Delaunay 2d Radial Sort 1 2 3 4 1. Finding all the pairs of intersecting triangles
  • 12.
    Lévy, Li, BorgeseOn Mesh Intersection 12/∞ 1. Finding all the pairs of intersecting triangles NVidia
  • 13.
    Lévy, Li, BorgeseOn Mesh Intersection 13/∞ NVidia N1 N2 N3 N4 N5 N6 N7 01 02 03 04 05 06 07 08 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1. Finding all the pairs of intersecting triangles
  • 14.
    Lévy, Li, BorgeseOn Mesh Intersection 14/∞ NVidia N1 N2 N3 N4 N5 N6 N7 01 02 03 04 05 06 07 08 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1. Finding all the pairs of intersecting triangles
  • 15.
    Lévy, Li, BorgeseOn Mesh Intersection 15/∞ NVidia N1 N2 N3 N4 N5 N6 N7 01 02 03 04 05 06 07 08 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 left(n) = 2*n right(n) = 2*n+1 1. Finding all the pairs of intersecting triangles
  • 16.
    Lévy, Li, BorgeseOn Mesh Intersection 16/∞ NVidia Triangles array 1. Finding all the pairs of intersecting triangles
  • 17.
    Lévy, Li, BorgeseOn Mesh Intersection 17/∞ NVidia Triangles array 1. Finding all the pairs of intersecting triangles
  • 18.
    Lévy, Li, BorgeseOn Mesh Intersection 18/∞ NVidia Triangles array 1. Finding all the pairs of intersecting triangles
  • 19.
    Lévy, Li, BorgeseOn Mesh Intersection 19/∞ NVidia Triangles array 1. Finding all the pairs of intersecting triangles
  • 20.
    Lévy, Li, BorgeseOn Mesh Intersection 20/∞ NVidia Triangles array 3. Finding all the pairs of intersecting triangles
  • 21.
    Lévy, Li, BorgeseOn Mesh Intersection 21/∞ NVidia Triangles array 1. Finding all the pairs of intersecting triangles
  • 22.
    Lévy, Li, BorgeseOn Mesh Intersection 22/∞ NVidia Triangles array 1. Finding all the pairs of intersecting triangles
  • 23.
    Lévy, Li, BorgeseOn Mesh Intersection 23/∞ N1 N2 N3 N4 N5 N6 N7 01 02 03 04 05 06 07 08 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1. Finding all the pairs of intersecting triangles
  • 24.
    Lévy, Li, BorgeseOn Mesh Intersection 24/∞ N1 N2 N3 N4 N5 N6 N7 01 02 03 04 05 06 07 08 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1. Finding all the pairs of intersecting triangles
  • 25.
    Lévy, Li, BorgeseOn Mesh Intersection 25/∞ N1 N2 N3 N4 N5 N6 N7 01 02 03 04 05 06 07 08 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1. Finding all the pairs of intersecting triangles
  • 26.
    Lévy, Li, BorgeseOn Mesh Intersection 26/∞ N1 N2 N3 N4 N5 N6 N7 01 02 03 04 05 06 07 08 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Delage Devillers Spatial sort in CGAL std::nth_element() 1. Finding all the pairs of intersecting triangles
  • 27.
    Lévy, Li, BorgeseOn Mesh Intersection 27/∞ 1. Finding all the pairs of intersecting triangles
  • 28.
    Lévy, Li, BorgeseOn Mesh Intersection 28/∞ Node 1, sequence [b1, e1) 1. Finding all the pairs of intersecting triangles
  • 29.
    Lévy, Li, BorgeseOn Mesh Intersection 29/∞ Node 1, sequence [b1, e1) 1. Finding all the pairs of intersecting triangles Node 2, sequence [b2, e2)
  • 30.
    Lévy, Li, BorgeseOn Mesh Intersection 30/∞ Node 1, sequence [b1, e1) 1. Finding all the pairs of intersecting triangles Node 2, sequence [b2, e2) intersect(1, 0, N, 1, 0, N) Find all intersections:
  • 31.
    Lévy, Li, BorgeseOn Mesh Intersection 31/∞ Node 1, sequence [b1, e1) 1. Finding all the pairs of intersecting triangles Node 2, sequence [b2, e2) intersect(1, 0, N, 1, 0, N) Find all intersections: Whole tree Whole tree
  • 32.
    Lévy, Li, BorgeseOn Mesh Intersection 32/∞ 1. Finding all the pairs of intersecting triangles
  • 33.
    Lévy, Li, BorgeseOn Mesh Intersection 33/∞ 1. Finding all the pairs of intersecting triangles Early pruning
  • 34.
    Lévy, Li, BorgeseOn Mesh Intersection 34/∞ 1. Finding all the pairs of intersecting triangles Leaves with 1 triangle
  • 35.
    Lévy, Li, BorgeseOn Mesh Intersection 35/∞ 1. Finding all the pairs of intersecting triangles Recursive descent along the child af the larges node
  • 36.
    Lévy, Li, BorgeseOn Mesh Intersection 36/∞ 1. Finding all the pairs of intersecting triangles Axis Aligned Bounding Box Tree
  • 37.
    Lévy, Li, BorgeseOn Mesh Intersection 37/∞ 1. Finding all the pairs of intersecting triangles Axis Aligned Bounding Box Tree Stream of candidate triangle intersections
  • 38.
    Lévy, Li, BorgeseOn Mesh Intersection 38/∞ Axis Aligned Bounding Box Tree Δ Δ intersect Constrained Delaunay 2d Radial Sort 1 2 3 4 2. Triangle-triangle intersection
  • 39.
    Lévy, Li, BorgeseOn Mesh Intersection 39/∞ 2. Triangle-triangle intersection Generic configuration
  • 40.
    Lévy, Li, BorgeseOn Mesh Intersection 40/∞ 2. Triangle-triangle intersection Degenerate configurations
  • 41.
    Lévy, Li, BorgeseOn Mesh Intersection 41/∞ 2. Triangle-triangle intersection Degenerate configurations
  • 42.
    Lévy, Li, BorgeseOn Mesh Intersection 42/∞ 2. Triangle-triangle intersection Degenerate configurations
  • 43.
    Lévy, Li, BorgeseOn Mesh Intersection 43/∞ 2. Triangle-triangle intersection Degenerate configurations
  • 44.
    Lévy, Li, BorgeseOn Mesh Intersection 44/∞ 2. Triangle-triangle intersection v1 v2 v3 e1 e2 e3 T Σt = { v1, v2, v3, e1, e2, e3, T }
  • 45.
    Lévy, Li, BorgeseOn Mesh Intersection 45/∞ 2. Triangle-triangle intersection v1 v2 v3 e1 e2 e3 T v’1 v’2 v’3 e’1 e’2 e’3 T’ (Naïve algorithm)
  • 46.
    Lévy, Li, BorgeseOn Mesh Intersection 46/∞ 2. Triangle-triangle intersection
  • 47.
    Lévy, Li, BorgeseOn Mesh Intersection 47/∞ 2. Triangle-triangle intersection
  • 48.
    Lévy, Li, BorgeseOn Mesh Intersection 48/∞ Lévy, Li, Borgese On Mesh Intersection 48/∞ 2. Triangle-triangle intersection
  • 49.
    Lévy, Li, BorgeseOn Mesh Intersection 49/∞ Lévy, Li, Borgese On Mesh Intersection 49/∞ 2. Triangle-triangle intersection Floating point coordinates
  • 50.
    Lévy, Li, BorgeseOn Mesh Intersection 50/∞ Lévy, Li, Borgese On Mesh Intersection 50/∞ 2. Triangle-triangle intersection Intersection is not on the grid
  • 51.
    Lévy, Li, BorgeseOn Mesh Intersection 51/∞ Lévy, Li, Borgese On Mesh Intersection 51/∞ 2. Triangle-triangle intersection Computed intersection moves a bit !
  • 52.
    Lévy, Li, BorgeseOn Mesh Intersection 52/∞ Lévy, Li, Borgese On Mesh Intersection 52/∞ 2. Triangle-triangle intersection
  • 53.
    Lévy, Li, BorgeseOn Mesh Intersection 53/∞ Lévy, Li, Borgese On Mesh Intersection 53/∞ 2. Triangle-triangle intersection
  • 54.
    Lévy, Li, BorgeseOn Mesh Intersection 54/∞ 2. Triangle-triangle intersection computed exactly [Shewchuk 96,97]
  • 55.
    Lévy, Li, BorgeseOn Mesh Intersection 55/∞ 2. Triangle-triangle intersection Triangle Intersection Candidate triangle Intersections (from AABB)
  • 56.
    Lévy, Li, BorgeseOn Mesh Intersection 56/∞ 2. Triangle-triangle intersection Triangle Intersection Candidate triangle Intersections (from AABB) Intersection segments in symbolic form
  • 57.
    Lévy, Li, BorgeseOn Mesh Intersection 57/∞ 2. Triangle-triangle intersection Triangle Intersection Candidate triangle Intersections (from AABB) Intersection segments in symbolic form V1.E1 ∩V2.T V1.T ∩ V2.E3
  • 58.
    Lévy, Li, BorgeseOn Mesh Intersection 58/∞ Axis Aligned Bounding Box Tree Δ Δ intersect Constrained Delaunay 2d Radial Sort 1 2 3 4 3. Re-triangulating the triangles
  • 59.
    Lévy, Li, BorgeseOn Mesh Intersection 59/∞ 3. Re-triangulating the triangles
  • 60.
    Lévy, Li, BorgeseOn Mesh Intersection 60/∞ 3. Re-triangulating the triangles Constrained Delaunay 2d
  • 61.
    Lévy, Li, BorgeseOn Mesh Intersection 61/∞ 3. Re-triangulating the triangles
  • 62.
    Lévy, Li, BorgeseOn Mesh Intersection 62/∞ 3. Re-triangulating the triangles
  • 63.
    Lévy, Li, BorgeseOn Mesh Intersection 63/∞ 3. Re-triangulating the triangles
  • 64.
    Lévy, Li, BorgeseOn Mesh Intersection 64/∞ 3. Re-triangulating the triangles [Sloan 1992]
  • 65.
    Lévy, Li, BorgeseOn Mesh Intersection 65/∞ 3. Re-triangulating the triangles [Sloan 1992]
  • 66.
    Lévy, Li, BorgeseOn Mesh Intersection 66/∞ 3. Re-triangulating the triangles Constrained Delaunay 2d • Orient2d(p1,p2,p3) • InCircle(p1,p2,p3,p4) • CreateIntersection(p1,p2,p3,p4) → p
  • 67.
    Lévy, Li, BorgeseOn Mesh Intersection 67/∞ 3. Re-triangulating the triangles Constrained Delaunay 2d • Orient2d(p1,p2,p3) • InCircle(p1,p2,p3,p4) • CreateIntersection(p1,p2,p3,p4) → p Our points are intersections
  • 68.
    Lévy, Li, BorgeseOn Mesh Intersection 68/∞ 3. Re-triangulating the triangles Constrained Delaunay 2d • Orient2d(p1,p2,p3) • InCircle(p1,p2,p3,p4) • CreateIntersection(p1,p2,p3,p4) → p Our points are intersections Let’s compute them exactly !
  • 69.
    Lévy, Li, BorgeseOn Mesh Intersection 69/∞ 3. Re-triangulating the triangles • Orient2d(p1,p2,p3) • InCircle(p1,p2,p3,p4) • CreateIntersection(p1,p2,p3,p4) → p Our points are intersections Let’s compute them exactly ! Arithmetic expansions (like in Shewchuk’s predicates) class expansion_nt { expansion_nt(double x); expansion_nt operator+(const expansion_nt& rhs); expansion_nt operator-(const expansion_nt& rhs); expansion_nt operator*(const expansion_nt& rhs); };
  • 70.
    Lévy, Li, BorgeseOn Mesh Intersection 70/∞ 3. Re-triangulating the triangles • Orient2d(p1,p2,p3) • InCircle(p1,p2,p3,p4) • CreateIntersection(p1,p2,p3,p4) → p Our points are intersections Let’s compute them exactly ! Arithmetic expansions (like in Shewchuk’s predicates) class expansion_nt { expansion_nt(double x); expansion_nt operator+(const expansion_nt& rhs); expansion_nt operator-(const expansion_nt& rhs); expansion_nt operator*(const expansion_nt& rhs); };
  • 71.
    Lévy, Li, BorgeseOn Mesh Intersection 71/∞ 3. Re-triangulating the triangles • Orient2d(p1,p2,p3) • InCircle(p1,p2,p3,p4) • CreateIntersection(p1,p2,p3,p4) → p Our points are intersections Let’s compute them exactly ! Arithmetic expansions (like in Shewchuk’s predicates) class expansion_nt { expansion_nt(double x); expansion_nt operator+(const expansion_nt& rhs); expansion_nt operator-(const expansion_nt& rhs); expansion_nt operator*(const expansion_nt& rhs); }; How to divide ? Homogeneous coordinates ! (like in OpenGL) [x y z w] ↕ [ x/w y/w z/w ]
  • 72.
    Lévy, Li, BorgeseOn Mesh Intersection 72/∞ 3. Re-triangulating the triangles • Orient2d(p1,p2,p3) • InCircle(p1,p2,p3,p4) • CreateIntersection(p1,p2,p3,p4) → p How to make it faster ? Arithmetic expansions (like in Shewchuk’s predicates) class expansion_nt { expansion_nt(double x); expansion_nt operator+(const expansion_nt& rhs); expansion_nt operator-(const expansion_nt& rhs); expansion_nt operator*(const expansion_nt& rhs); }; How to divide ? Homogeneous coordinates ! (like in OpenGL) [x y z w] ↕ [ x/w y/w z/w ]
  • 73.
    Lévy, Li, BorgeseOn Mesh Intersection 73/∞ 3. Re-triangulating the triangles • Orient2d(p1,p2,p3) • InCircle(p1,p2,p3,p4) • CreateIntersection(p1,p2,p3,p4) → p How to make it faster ? Arithmetic expansions (like in Shewchuk’s predicates) class expansion_nt { expansion_nt(double x); expansion_nt operator+(const expansion_nt& rhs); expansion_nt operator-(const expansion_nt& rhs); expansion_nt operator*(const expansion_nt& rhs); }; How to divide ? Homogeneous coordinates ! (like in OpenGL) [x y z w] ↕ [ x/w y/w z/w ] class interval_nt filter
  • 74.
    Lévy, Li, BorgeseOn Mesh Intersection 74/∞ 3. Re-triangulating the triangles • Orient2d(p1,p2,p3) • InCircle(p1,p2,p3,p4) • CreateIntersection(p1,p2,p3,p4) → p How to make it faster ? Arithmetic expansions (like in Shewchuk’s predicates) class expansion_nt { expansion_nt(double x); expansion_nt operator+(const expansion_nt& rhs); expansion_nt operator-(const expansion_nt& rhs); expansion_nt operator*(const expansion_nt& rhs); }; How to divide ? Homogeneous coordinates ! (like in OpenGL) [x y z w] ↕ [ x/w y/w z/w ] class interval_nt filter Does it always work ? What about overflows / underflows ?
  • 75.
    Lévy, Li, BorgeseOn Mesh Intersection 75/∞ 3. Re-triangulating the triangles • Orient2d(p1,p2,p3) • InCircle(p1,p2,p3,p4) • CreateIntersection(p1,p2,p3,p4) → p How to make it faster ? Arithmetic expansions (like in Shewchuk’s predicates) class expansion_nt { expansion_nt(double x); expansion_nt operator+(const expansion_nt& rhs); expansion_nt operator-(const expansion_nt& rhs); expansion_nt operator*(const expansion_nt& rhs); }; How to divide ? Homogeneous coordinates ! (like in OpenGL) [x y z w] ↕ [ x/w y/w z/w ] class interval_nt filter Does it always work ? What about overflows / underflows ? multiprecision class exact_nt
  • 76.
    Lévy, Li, BorgeseOn Mesh Intersection 76/∞ 3. Re-triangulating the triangles Thingy10K, thing # 996816 “The Nemesis”
  • 77.
    Lévy, Li, BorgeseOn Mesh Intersection 77/∞ 3. Re-triangulating the triangles Thingy10K, thing # 996816 “The Nemesis” Some triangles with 5000 intersections !
  • 78.
    Lévy, Li, BorgeseOn Mesh Intersection 78/∞ 3. Re-triangulating the triangles
  • 79.
    Lévy, Li, BorgeseOn Mesh Intersection 79/∞ 3. Re-triangulating the triangles
  • 80.
    Lévy, Li, BorgeseOn Mesh Intersection 80/∞ 3. Re-triangulating the triangles
  • 81.
    Lévy, Li, BorgeseOn Mesh Intersection 81/∞ Axis Aligned Bounding Box Tree Δ Δ intersect Constrained Delaunay 2d Radial Sort 1 2 3 4 4. Building the Weiler model
  • 82.
    Lévy, Li, BorgeseOn Mesh Intersection 82/∞ 4. Building the Weiler model AABB Cnstr. Delaunay
  • 83.
    Lévy, Li, BorgeseOn Mesh Intersection 83/∞ 4. Building the Weiler model Weiler AABB Cnstr. Delaunay
  • 84.
    Lévy, Li, BorgeseOn Mesh Intersection 84/∞ 4. Building the Weiler model Radial edges
  • 85.
    Lévy, Li, BorgeseOn Mesh Intersection 85/∞ 4. Building the Weiler model Radial edges
  • 86.
    Lévy, Li, BorgeseOn Mesh Intersection 86/∞ 4. Building the Weiler model Radial edges
  • 87.
    Lévy, Li, BorgeseOn Mesh Intersection 87/∞ 4. Building the Weiler model Radial edges
  • 88.
    Lévy, Li, BorgeseOn Mesh Intersection 88/∞ 4. Building the Weiler model Radial edges
  • 89.
    Lévy, Li, BorgeseOn Mesh Intersection 89/∞ 4. Building the Weiler model Radial edges Radial sorting (no arccos/arctan, everything with dot and cross product)
  • 90.
    Lévy, Li, BorgeseOn Mesh Intersection 90/∞ 4. Building the Weiler model Regions
  • 91.
    Lévy, Li, BorgeseOn Mesh Intersection 91/∞ Find candidate Δ Δ intersections Compute Δ Δ intersections Retriangulate the Δ’s Find the regions 1 2 3 4 5. Examples Results, Examples 5
  • 92.
    Lévy, Li, BorgeseOn Mesh Intersection 92/∞ 5. Examples
  • 93.
    Lévy, Li, BorgeseOn Mesh Intersection 93/∞ 5. Examples
  • 94.
    Lévy, Li, BorgeseOn Mesh Intersection 94/∞ 5. Examples
  • 95.
    Lévy, Li, BorgeseOn Mesh Intersection 95/∞ 5. Examples Mandaros (ELF)
  • 96.
    Lévy, Li, BorgeseOn Mesh Intersection 96/∞ 5. Examples Tessael HexDom for CCUS coupled flow-geomechanics sim with GEOS, Cooperation with Total Energies
  • 97.
    Lévy, Li, BorgeseOn Mesh Intersection 97/∞ 5. Examples IFP Energies Nouvelles
  • 98.
    Lévy, Li, BorgeseOn Mesh Intersection 98/∞ 5. Examples IFP Energies Nouvelles
  • 99.
    Lévy, Li, BorgeseOn Mesh Intersection 99/∞ 5. Examples Tessael ClipHex hybrid element meshing optimized for IFP Energies Nouvelles Temis flow simulator.
  • 100.
    Lévy, Li, BorgeseOn Mesh Intersection 100/∞ 5. Examples Model courtesy RING Consortium
  • 101.
    Lévy, Li, BorgeseOn Mesh Intersection 101/∞ 5. Examples Model courtesy RING Consortium
  • 102.
    Lévy, Li, BorgeseOn Mesh Intersection 102/∞ When there’s something strange In the (non-manifold) neighborhood, Who you gonna call ? GEOGRAM + GeO2 https://github.com/BrunoLevy/geogram