A new algorithm to compute intersections between meshes, using arbitrary-precision numbers, constrained Delaunay triangulation and auxiliary combinatorial data structures.
27. Lévy, Li, Borgese On Mesh Intersection
27/∞
1. Finding all the pairs of intersecting triangles
28. Lévy, Li, Borgese On Mesh Intersection
28/∞
Node 1, sequence [b1, e1)
1. Finding all the pairs of intersecting triangles
29. 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)
30. 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:
31. 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
32. Lévy, Li, Borgese On Mesh Intersection
32/∞
1. Finding all the pairs of intersecting triangles
33. Lévy, Li, Borgese On Mesh Intersection
33/∞
1. Finding all the pairs of intersecting triangles
Early pruning
34. Lévy, Li, Borgese On Mesh Intersection
34/∞
1. Finding all the pairs of intersecting triangles
Leaves with 1 triangle
35. 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
36. Lévy, Li, Borgese On Mesh Intersection
36/∞
1. Finding all the pairs of intersecting triangles
Axis Aligned
Bounding Box
Tree
37. 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
48. Lévy, Li, Borgese On Mesh Intersection
48/∞
Lévy, Li, Borgese On Mesh Intersection
48/∞
2. Triangle-triangle intersection
49. Lévy, Li, Borgese On Mesh Intersection
49/∞
Lévy, Li, Borgese On Mesh Intersection
49/∞
2. Triangle-triangle intersection
Floating point
coordinates
50. 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
51. 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 !
52. Lévy, Li, Borgese On Mesh Intersection
52/∞
Lévy, Li, Borgese On Mesh Intersection
52/∞
2. Triangle-triangle intersection
53. Lévy, Li, Borgese On Mesh Intersection
53/∞
Lévy, Li, Borgese On Mesh Intersection
53/∞
2. Triangle-triangle intersection
56. Lévy, Li, Borgese On Mesh Intersection
56/∞
2. Triangle-triangle intersection
Triangle
Intersection
Candidate triangle
Intersections (from AABB)
Intersection segments
in symbolic form
57. 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
58. 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
59. Lévy, Li, Borgese On Mesh Intersection
59/∞
3. Re-triangulating the triangles
60. Lévy, Li, Borgese On Mesh Intersection
60/∞
3. Re-triangulating the triangles
Constrained
Delaunay 2d
61. Lévy, Li, Borgese On Mesh Intersection
61/∞
3. Re-triangulating the triangles
62. Lévy, Li, Borgese On Mesh Intersection
62/∞
3. Re-triangulating the triangles
63. Lévy, Li, Borgese On Mesh Intersection
63/∞
3. Re-triangulating the triangles
64. Lévy, Li, Borgese On Mesh Intersection
64/∞
3. Re-triangulating the triangles
[Sloan 1992]
65. Lévy, Li, Borgese On Mesh Intersection
65/∞
3. Re-triangulating the triangles
[Sloan 1992]
66. 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
67. 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
68. 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 !
69. 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);
};
70. 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);
};
71. 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 ]
72. 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 ]
73. 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
74. 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 ?
75. 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
76. Lévy, Li, Borgese On Mesh Intersection
76/∞
3. Re-triangulating the triangles
Thingy10K, thing # 996816 “The Nemesis”
77. Lévy, Li, Borgese On Mesh Intersection
77/∞
3. Re-triangulating the triangles
Thingy10K, thing # 996816 “The Nemesis”
Some triangles
with 5000 intersections !
78. Lévy, Li, Borgese On Mesh Intersection
78/∞
3. Re-triangulating the triangles
79. Lévy, Li, Borgese On Mesh Intersection
79/∞
3. Re-triangulating the triangles
80. Lévy, Li, Borgese On Mesh Intersection
80/∞
3. Re-triangulating the triangles
81. 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
82. Lévy, Li, Borgese On Mesh Intersection
82/∞
4. Building the Weiler model
AABB
Cnstr.
Delaunay
83. Lévy, Li, Borgese On Mesh Intersection
83/∞
4. Building the Weiler model
Weiler
AABB
Cnstr.
Delaunay
84. Lévy, Li, Borgese On Mesh Intersection
84/∞
4. Building the Weiler model
Radial edges
85. Lévy, Li, Borgese On Mesh Intersection
85/∞
4. Building the Weiler model
Radial edges
86. Lévy, Li, Borgese On Mesh Intersection
86/∞
4. Building the Weiler model
Radial edges
87. Lévy, Li, Borgese On Mesh Intersection
87/∞
4. Building the Weiler model
Radial edges
88. Lévy, Li, Borgese On Mesh Intersection
88/∞
4. Building the Weiler model
Radial edges
89. 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)
90. Lévy, Li, Borgese On Mesh Intersection
90/∞
4. Building the Weiler model
Regions
91. 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
96. Lévy, Li, Borgese On Mesh Intersection
96/∞
5. Examples
Tessael HexDom for CCUS coupled flow-geomechanics sim with GEOS,
Cooperation with Total Energies
99. Lévy, Li, Borgese On Mesh Intersection
99/∞
5. Examples
Tessael ClipHex hybrid element meshing optimized for
IFP Energies Nouvelles Temis flow simulator.
100. Lévy, Li, Borgese On Mesh Intersection
100/∞
5. Examples
Model courtesy RING Consortium
101. Lévy, Li, Borgese On Mesh Intersection
101/∞
5. Examples
Model courtesy RING Consortium
102. 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