Surface Mesh Generation

Similar documents
Preferred directions for resolving the non-uniqueness of Delaunay triangulations

Chapter 8. Voronoi Diagrams. 8.1 Post Oce Problem

Computational Geometry

CAD & Computational Geometry Course plan

Delaunay Triangulations

Outline of the presentation

CS 532: 3D Computer Vision 14 th Set of Notes

Voronoi Diagram. Xiao-Ming Fu

Planar Graphs. 1 Graphs and maps. 1.1 Planarity and duality

Voronoi diagram and Delaunay triangulation

Delaunay Triangulations. Presented by Glenn Eguchi Computational Geometry October 11, 2001

13.472J/1.128J/2.158J/16.940J COMPUTATIONAL GEOMETRY

Voronoi Diagrams and Delaunay Triangulations. O Rourke, Chapter 5

Lecture 2 Unstructured Mesh Generation

High-Dimensional Computational Geometry. Jingbo Shang University of Illinois at Urbana-Champaign Mar 5, 2018

Voronoi Diagrams in the Plane. Chapter 5 of O Rourke text Chapter 7 and 9 of course text

Lecture 16: Voronoi Diagrams and Fortune s Algorithm

7. The Gauss-Bonnet theorem

Course Number: Course Title: Geometry

The goal is the definition of points with numbers and primitives with equations or functions. The definition of points with numbers requires a

Computational Geometry

EXTREME POINTS AND AFFINE EQUIVALENCE

We have set up our axioms to deal with the geometry of space but have not yet developed these ideas much. Let s redress that imbalance.

Shape Modeling and Geometry Processing

Constrained Delaunay Triangulations (CDT)

Tutorial 3 Comparing Biological Shapes Patrice Koehl and Joel Hass

Optimal Compression of a Polyline with Segments and Arcs

CS133 Computational Geometry

PS Computational Geometry Homework Assignment Sheet I (Due 16-March-2018)

CURVILINEAR MESH GENERATION IN 3D

6.854J / J Advanced Algorithms Fall 2008

Week 8 Voronoi Diagrams

Notes in Computational Geometry Voronoi Diagrams

Definitions. Topology/Geometry of Geodesics. Joseph D. Clinton. SNEC June Magnus J. Wenninger

Approximating Polygonal Objects by Deformable Smooth Surfaces

Hyperbolic structures and triangulations

Flavor of Computational Geometry. Convex Hull in 2D. Shireen Y. Elhabian Aly A. Farag University of Louisville

Elementary Planar Geometry

In what follows, we will focus on Voronoi diagrams in Euclidean space. Later, we will generalize to other distance spaces.

Möbius Transformations in Scientific Computing. David Eppstein

CS S Lecture February 13, 2017

Geometric Modeling. Bing-Yu Chen National Taiwan University The University of Tokyo

Central issues in modelling

Line Arrangement. Chapter 6

Other Voronoi/Delaunay Structures

Voronoi Diagrams and Delaunay Triangulation slides by Andy Mirzaian (a subset of the original slides are used here)

Aspect-Ratio Voronoi Diagram with Applications

Differential Geometry: Circle Patterns (Part 1) [Discrete Conformal Mappinngs via Circle Patterns. Kharevych, Springborn and Schröder]

1. CONVEX POLYGONS. Definition. A shape D in the plane is convex if every line drawn between two points in D is entirely inside D.

Voronoi diagrams Delaunay Triangulations. Pierre Alliez Inria

VORONOI DIAGRAM PETR FELKEL. FEL CTU PRAGUE Based on [Berg] and [Mount]

COMPUTING CONSTRAINED DELAUNAY

Lecture 25: Bezier Subdivision. And he took unto him all these, and divided them in the midst, and laid each piece one against another: Genesis 15:10

Geometric Modeling Mortenson Chapter 11. Complex Model Construction

The Farthest Point Delaunay Triangulation Minimizes Angles

3. Voronoi Diagrams. 3.1 Definitions & Basic Properties. Examples :

Pi at School. Arindama Singh Department of Mathematics Indian Institute of Technology Madras Chennai , India

Intro to Modeling Modeling in 3D

Computational Geometry Lecture Delaunay Triangulation

APPROXIMATING THE MAXMIN AND MINMAX AREA TRIANGULATIONS USING ANGULAR CONSTRAINTS. J. Mark Keil, Tzvetalin S. Vassilev

MA 323 Geometric Modelling Course Notes: Day 36 Subdivision Surfaces

Advanced Operations Research Techniques IE316. Quiz 1 Review. Dr. Ted Ralphs

Computational Geometry

Restricted-Orientation Convexity in Higher-Dimensional Spaces

Computational Geometry Lecture Duality of Points and Lines

CMSC 425: Lecture 9 Geometric Data Structures for Games: Geometric Graphs Thursday, Feb 21, 2013

Lecture notes: Object modeling

Computational Geometry

Lifting Transform, Voronoi, Delaunay, Convex Hulls

Glossary of dictionary terms in the AP geometry units

Chapter 4 Concepts from Geometry

Veering triangulations admit strict angle structures

CS 372: Computational Geometry Lecture 10 Linear Programming in Fixed Dimension

The Humble Tetrahedron

COMPUTATIONAL GEOMETRY

Fortune s Algorithm. Notes from the book by de Berg, Van Krevald, Overmars, and Schwarzkpf

VoroCrust: Simultaneous Surface Reconstruction and Volume Meshing with Voronoi cells

Convex Hulls in Three Dimensions. Polyhedra

Triangulation and Convex Hull. 8th November 2018

2D Geometry. Pierre Alliez Inria Sophia Antipolis

Collars and Intestines: Practical Conforming Delaunay Refinement

An introduction to mesh generation Part IV : elliptic meshing

Question. Why is the third shape not convex?

Quadrilateral Meshing by Circle Packing

Ice-Creams and Wedge Graphs

Discrete geometry. Lecture 2. Alexander & Michael Bronstein tosca.cs.technion.ac.il/book

Outline. CGAL par l exemplel. Current Partners. The CGAL Project.

GEOMETRY MODELING & GRID GENERATION

Overview of Unstructured Mesh Generation Methods

Dissections of polygons into convex polygons

Linear Programming in Small Dimensions

Divided-and-Conquer for Voronoi Diagrams Revisited. Supervisor: Ben Galehouse Presenter: Xiaoqi Cao

Point Cloud Simplification and Processing for Path-Planning. Master s Thesis in Engineering Mathematics and Computational Science DAVID ERIKSSON

MATH 890 HOMEWORK 2 DAVID MEREDITH

Computational Geometry. Geometry Cross Product Convex Hull Problem Sweep Line Algorithm

The Cut Locus and the Jordan Curve Theorem

Example: The following is an example of a polyhedron. Fill the blanks with the appropriate answer. Vertices:

How many colors are needed to color a map?

Computational Geometry. Algorithm Design (10) Computational Geometry. Convex Hull. Areas in Computational Geometry

Dgp _ lecture 2. Curves

Transcription:

Surface Mesh Generation J.-F. Remacle Université catholique de Louvain September 22, 2011 0

3D Model For the description of the mesh generation process, let us consider the CAD model of a propeller presented in Figure. The model has been created with the OpenCascade solid modeler and has been loaded in Gmsh in its native format (brep). The model contains 101 model vertices, 170 model edges, 76 model faces and one model region. C. Geuzaine and J.-F. Remacle 5 C. Geuzaine and J.-F. Remacle 5 Fig. 4. Fig. CAD 4. CAD model model of aof propeller a propeller (left) and andits its volume volume mesh mesh (right) (right) CAD model of a propeller (left) and its volume mesh (right) There are There various are various ways ways to to define the mesh size field. field. In Gmsh, In Gmsh, the user thecan user can provide provide a mesha mesh size field size field that that is is defined on another mesh mesh (a background (a background mesh) mesh) of of the domain and/or provide mesh sizes associated with model entities or adapt the 1

Mesh Size Field and Quality Measures Let us define the mesh size field δ(x, y, z) as a function that defines, at every point of the domain, a target size for the elements at that point. The present ways of defining such a mesh size field in Gmsh are: 1. mesh sizes prescribed at model vertices and interpolated linearly on model edges; 2. prescribed mesh gradings on model edges (geometrical progressions,...); 3. mesh sizes defined on another mesh (a background mesh) of the domain; 4. mesh sizes that adapt to the principal curvature of model entities. 2

Mesh Size Field and Quality Measures These size fields can then be acted on by functionals that may depend, for example, on the distance to model entities or on user-prescribed analytical functions; and when several size fields are provided, Gmsh uses the minimum of all fields. Thanks to that mechanism, Gmsh allows for a mesh size field defined on a given model entity to extend in higher dimensional entities. For example, using a distance function, a refinement based on the curvature of a model edge can extend on any surface adjacent to it. Let us now consider an edge e of the mesh. We define the adimensional length of the edge with respect to the size field δ as l e = e 1 dl. (1) δ(x, y, z) 3

Mesh Size Field and Quality Measures The aim of the mesh generation process is twofold: 1. Generate a mesh for which each mesh edge e is of size close to l e = 1, 2. Generate a mesh for which each element K is well shaped. In other words, the aim of the mesh generation procedure is to be able to build a good quality mesh that complies with the mesh size field. 4

Mesh Size Field and Quality Measures To quickly evaluate the adequation between the mesh and the prescribed mesh size field, we defined an efficiency index τ [?] as τ = exp 1 ne ne τ e e=1 (2) with τ e = l e 1 if l e < 1 and τ e = 1 l e 1 if l e 1. The efficiency index ranges in τ [0, 1] and should be as close as possible to τ = 1. 5

Mesh Size Field and Quality Measures For measuring the quality of elements, various element shape measures are available in the literature [?,?]. Here, we choose a measure based on the element radii ratio, i.e. the ratio between the inscribed and the circumcircles. If K is a triangle, we have the following formula sin â sinˆb sin ĉ γ K = 4 sin â + sinˆb + sin ĉ, â, ˆb and ĉ being the three inner angles of the triangle. With this definition, the equilateral triangle has a γ K = 1 and degenerated (zero surface) triangles have a γ K = 0. 6

Mesh Size Field and Quality Measures For a tetrahedron, we have the following formula: γ K = 4 i=1 a(f i ) 6 6 V k max l(e i) i=1,...,6 with V K the volume of K, a(f i ) the area of the i th face of K and l(e i ) the dimensional length of the i th edge of K. This quality measurement lies in the interval [0, 1], an element with γ K = 0 being a sliver (zero volume)., 7

1-D Mesh Generation Let us consider a point p(t)aaaaa on a curve C, t [t 1, t 2 ]. The number of subdivisions N of the curve is its adimensional length: t2 1 t 1 δ(x, y, z) tp(t) dt = N. (3) The N + 1 mesh points on the curve are located at coordinates {T 0,..., T N }, where T i is computed with the following rule: Ti t 1 1 δ(x, y, z) tp(t) dt = i. (4) With this choice, each subdivision of the curve is exactly of adimensional size 1, and the 1-D mesh exactly satisfies the size field δ. In Gmsh, (4) is evaluated with a recursive numerical integration rule. 8

2-D Mesh Generation Curved surface shapes designed by CAD systems are usually defined by parametric surfaces, for example, NURBS [?]. Let us consider a model face G 2 i with its underlying geometry, in this case a surface S R 3 with its parametrization p(u, v) S, where the domain of definition of the parameters (u, v) is defined by a series of boundary curves. An example of such a surface is given in Figure??, which shows one of the 76 model faces of the propeller in the parametric space (left) and in real space (right). 9

2-D Mesh Generation Three features of surface S, common in CAD descriptions, make its meshing non-trivial: 1. S is periodic. The topology of the model face is modified in order to define its closure properly. A seam is present two times in the closure of the model face. These two occurrences are separated by one period in the parametric space. 2. S is trimmed: it contains four holes and one of them is crossed by the seam. 3. One of the model edges of S is degenerated. This is done for accounting of a singular point in the parametrization of the surface. This kind of degeneracy is present in many shapes: spheres, cones and other surfaces of revolution. 10

2-D Mesh Generation Techniques for generating finite element meshes on curved surfaces are of two kind: 1. techniques for which the surface mesh is generated directly in the real 3-D space; 2. techniques for which the surface mesh is generated in the parametric space. The principal advantage of doing the surface mesh in the 3-D space directly is that no interface to the solid modeler is required. Such algorithms have been used for building meshes from STL (stereolithography) data files [?], from medical imaging [?] or to adapt/modify existing meshes [?]. The main drawback of such algorithms is their relative lack of robustness. 11

2-D Mesh Generation The second alternative can be applied only if a parametrization of the surfaces is available. If it is the case, doing the mesh in the parametric space is usually advantageous because all the meshing procedures can be applied in the parametric plane. This allows mesh operators to be highly robust we will detail that argument later. Mesh of a model face drawn in the parametric space (left) and in the real space (right). 12

2-D Mesh Generation Gmsh provides an original surface meshing strategy based on the concept of local mesh modifications [?,?,?]. The algorithm works as follows: 1. Each edge that is too long is split; 2. Each edge that is too short is removed using an edge collapse operator; 3. Edges for which a better configuration is obtained by swapping are swapped; 4. Vertices are re-located optimally. 13

2-D Mesh Generation Fig. 1. Shallow water notations for water depth H with a time-independent bathymetry h. Notice that the relative elevation η is usually several orders of magnitude smaller than the unperturbed depth. e 1 e 3 e 4 e 5 e 6 e 2 y e 1 e 2 e 3 e 4 Fig. 2. Local mesh modifications. Edge split (top), edge collapse (middle) and edge swap (bottom). The zone depicted in bold represents the cavity that is modified by the local mesh modification. Illustration of local mesh modifications. 14

2-D Mesh Generation Edge Splitting: An edge is considered too long when its adimensional length is greater than l e > 1.4. When split, the two new edges will have a minimal size of 0.7. In order to converge to a stable configuration, an edge of size l e = 0.7 should not be considered as a short edge. Edge Collapsing: An edge is considered to be short when its adimensional length is smaller than l e < 0.7. An edge cannot be collapsed if one of the remaining triangles after the collapse is inverted in the parametric space. 15

2-D Mesh Generation Edge Swapping: An edge is swapped if min (γ e1, γ e2 ) < min (γ e3, γ e4 ) (see Figure ), unless 1. it is classified on a model edge; 2. the two adjacent triangles e 1 and e 2 form a concave quadrilateral in the parametric space; 3. the angle between the triangles normals is greater than a threshold, typically 30 degrees. Vertex Re-positioning: Each vertex is moved optimally inside the cavity made of all its surrounding triangles. The optimal position is chosen in order to maximize the worst element quality [?]. 16

2-D Mesh Generation For each of these local mesh modification procedures, the opportunity of doing a mesh modification is evaluated in the real space, i.e., in (x, y, z), while the validity of a mesh modification is evaluated in the parametric space (u, v). Therefore, Gmsh mesh generators always retain both real and parametric coordinates of any mesh vertex. To ensure robustness, all the elementary geometrical predicates make use of robust algorithmics [?]. In practice, this algorithm converges in about 6-8 iterations and produces anisotropic meshes in the parametric space without computing derivatives of the mapping. 17

2-D Mesh Generation Let us illustrate the algorithm on an example. We have meshed the model face of Figure using an analytical size field δ(x, y, z) = δ 0 [1 + cos(π(x + y z)/l)] + ɛ where L is a characteristic size of the domain and ɛ δ 0 < L. Figure?? shows the mesh in the parametric space at different stages of the algorithm. Note that the derivatives of the parametrization of the underlying surface are not defined at the singular point so that any algorithm that requires to compute such derivatives would be in trouble in this case. 18

2-D Mesh Generation initial iter. 1 iter. 3 iter. 5 final 19

The Voronoï diagram Let p 1 and p 2 be two points of R 2. The mediator M(p 1, p 2 ) is the locus of all the points which are equidistant to p 1 and p 2 : M(p 1, p 2 ) = {p R 2, d(p, p 1 ) = d(p, p 2 )} where d(.,.) is the euclidian distance between two points of R 2, i.e. d 2 (p 1, p 2 ) = (p 2 p 1 ) (p 2 p 1 ). (5) The equation of the mediator can be found out using this definition or (p 1 p) (p 1 p) = (p 2 p) (p 2 p) (p 1 p 2 ) p 1 2 (p 1 + p 2 ) = 0 }{{} p m This shows that the mediator is the orthogonal bissector of the straight edge linking the two points. 20

The Voronoï diagram p 2 p m p 1 p M The mediator. 21

The Voronoï diagram The mediator separates the plane into two regions. The first region contains all the points that are closer to p 1, the second one contains the ones that are closer to p 2. Any point of R 2 /M can be associated to one of those two points. Let us consider a set of N points S = {p 1,..., p N }. More specifically, we assume that the points are in general position, by which we mean no four points are cocircular. The Voronoï cell C(p i ) associated to point p i is the locus of points of R 2 that are closer to p i than any other point p j, j = 1,..., N, i j. The Voronoï cell is constructed as follow. Consider all mediators M(p i, p j ). Each of those mediators define a half plane. The Voronoï diagram is the part of the space that is always closer to p i, i.e. that always associate p i to the point p, for all possible mediators.(see Figure ). The set of all Voronoï cells is called the Voronoï diagram of S (see Figure ). 22

The Voronoï diagram p j v I p k p i C(p i ) The Voronoï diagram. The Voronoï cell C(p i ) relative to vertex p i is colored. 23

The Voronoï diagram Let us present some remarkable properties of the Voronoï diagram. Property 1 Voronoï cells are convex polytopes. By definition, each Voronoi region C(p i ) is the intersection of open half planes containing vertex p i. Therefore, C(p i ) is open and convex. Different Voronoï regions are disjoint. Voronoï cells are polygons in 2D, polyhedra in 3D and d-polytopes in dd. Voronoï cells are either closed or open. They can only be open for points that are located on the convex hull of the 2D domain. A point p i of S lies on the convex hull of S if and only if its Voronoï cell C(p i ) is unbounded. 24

The Voronoï diagram Property 2 Voronoï points v I are always located at intersection of 3 mediators. Property 2 is only true if there exist no quadruplets of points in S that are cocircular. If such a set exists, it may happen that a vertex of the Voronoï is at the the intersection of more than 3 mediators. Consider the example of Figure where v i is at the intersecion of C(p i ), C(p j ) and C(p k ). Voronoï point v I is located at the center of the unique circle passing through p i, p j and p k. 25

The Delaunay Triangulation We first define what is a triangulation of S: it is a planar subdivision whose bounded faces are triangles and whose vertices are the points p i of S. Note that all triangulations do not cover the same subset of R 2. In what follows, we consider that the domain to triangulate is the convex hull of S. Even with the same domain to cover, several triangulations are possible (see Figure ). Yet, every triangulation has the same number of triangles and edges! 26

Two triangulations of S, both containing n t = 13 triangles defined by a total of N = 12 points with N h = 9 points that lie on the convex hull of S. Property 3 Let S be a set of N points in the plane, not all collinear, and let N h denote the number of points in S that lie on the convex 26

hull of S. Then any triangulation of S has n t (N, N h ) = 2N 2 N h triangles and n e (N, N h ) = 3N 3 N h edges. Consider first that all the points in S are in the convex hull: N = N h. A triangulation consist simply in triangles t I (p 1, p i, p i+1 ), i = 2,..., N 1. The number of triangle is therefore n t = N 2 which is consistent with the formula. The number of edges in the triangulation is calculated as follows: N h = N edges on the convex hull and N 3 internal edges wich gives n e = N + N 3 = 2N 3 which is again consistent with the proposition. The rest of the proof works using a recurrence argument. Assume that formulas are true for N. Let us now consider one new vertex p N+1 that lies inside the convex hull. This new vertex lies inside one of the existing triangles, say t I (p i, p j, p k ). We remove t I and replace it by three new triangles t J (p i, p j, p N+1 ), t J (p j, p k, p N+1 ), t J (p k, p i, p N+1 ). We have therefore n t (N h, N h ) = N h 2 and n t (N +1, N h ) = n t (N, N h )+ 2 which gives n t (N, N h ) = N h 2 + 2(N N h ) = 2N 2 N h. Similarly, three new edges have been added in the process. Then, n e (N h, N h ) = 26

2N h 3 and n e (N + 1, N h ) = n e (N, N h ) + 3 which gives n e (N, N h ) = 2N h 3 + 3(N N h ) = 3N 3 N h. Consider a triangulation T with n t triangles. This triangulation has 3n t internal angles. Consider the vector of angles A(T ) = (α 1,..., α 3nt ) sorted by increasing values. We can define such a vector for any triangulation of the convex hull of the domain. Each of those vectors has the same length and it is therefore possible to compare them, e.g. lexicographically. We say that one given triangulation T is angle-optimal if A(T ) A(T ), T. According to that criterion, left triangulation of Figure is better than the right one. Angle-optimal triangulations have interesting interpolation properties and it is therefore useful to find methods that allow to construct such triangulations. For a given set of points, the (unique) angle-optimal triangulation is the triangulation that has the highest minimal angle. Let us see now how to build such a triangulation. 26

Consider now the edge e(p 4, p 6 ) of Figure. This edge is surrounded by two triangles t 1 (p 4, p 6, p 1 ) and t 2 (p 4, p 6, p 2 ). An edge swap is a local mesh modification operator that consist in changing locally the triangulation by replacing edge e(p 4, p 6 ) by e (p 1, p 2 ). Triangles t 1 (p 4, p 6, p 1 ) and t 2 (p 4, p 6, p 2 ) are replaced by t 1 (p 1, p 2, p 4 ) and t 2 (p 1, p 2, p 6 ). Figure illustrate the edge swap operation. 26

26

Edge swap. It is indeed possible to use the edge swap operator in order to build angle-optimal triangulation. In that purpose, we can simply decide to swap edge e if min (α 1,..., α 6 ) < min (α 1,..., α 6 ). Such an edge is said invalid. Given a finite set of points, there is a finite number of possible triangulations. When the angle criterion is applied, every edge swap produce a new triangulation that is better than the actual one. Therefore, building the angle-optimal triangulation consist in looping over all the edges of the mesh and swap them until the optimal configuration is attained i.e. when no invalid edges remain in the triangulation. Figure illustrate that procedure. 26

Building an angle-optimal triangulation using swaps. Yet, computing angles is a costly operation and it is possible to use a simpler and cheaper rule to verify the validity of an edge. Property 4 Let C be a circle, l a line intersecting C in points p 4 and p 6 and p 1, and p 2, p 3 and p 5 points lying on the same side of l. Suppose that p 2 and p 3 lie on C, that p 5 lies inside C, and that p 1 lies outside C. Then (see Fig. ): α 1 < α 2 = α 3 < α 5. 26

p 1 p 2 α 1 p 3 p5 α 2 α 3 α 5 l p 4 p 6 Theorem of Thalès C C α p 2 e e p 6 p 1 α C p 4 26

Lawson s criterion Property 5 [Lawson s Criterion] Consider an edge e with its two neighboring triangles t 1 and t 2. Consider the circumcircle C of triangle t 1 and point p that belongs to t 2 but not to t 1. Edge e is invalid if p C. Property 5 has been demonstrated by Sibson in [?]. Consider Figure. The proof consist in demonstrating that α > α if p 1 C. The demonstration make use of property 4 (Thalès s Theorem). Note that, when two neighboring triangles separated by an edge e form a concave quadrilateral, edge e is always valid. Procedure described in Figure allow to build angle-optimal triangulations. Yet, it can be shown that such an algorithm is slow in practice. There exists a much faster manner to build angle optimal triangulations of S that is based on the Voronoï diagram. This triangulation 26

DT (S) is called the Delaunay triangulation and its construction works as follows. First recall that each Voronoï cell C(p i ) is associated to one only point p I of S. Consider a Voronoï point v I that at the meeting point of 3 Voronoï cells C(p i ), C(p j ), C(p k ). Because of the Voronoï property, point v is at the circumcenter of triangle t I (p i, p j, p k ). Triangle t I DT (S) is one of the triangles of the Delaunay triangulation. The resulting figure is a triangulation (see Figure ). 26

The Voronoï diagram and its associated Delaunay triangulation 26

3D Model 27

3D Model 28

3D Model 29

3D Model 30

3D Model 31

3D Model 32