Constrained Delaunay Triangulations (CDT) Recall: Definition 1 (Constrained triangulation). A triangulation with prespecified edges or breaklines between nodes. Motivation: Geological faults in oil recovery Rivers, roads, lake boundaries in GIT Repr. non-convex boundaries and holes Linear features in CAD models Meshing for FEM (boundaries, interior & exterior) 1
2
Algorithm III from Preliminaries Given a predefined constraint E i,j. Suppose that the endpoints p i and p j are in. 1. For all T i in, If IntT i E ij, remove T i from We get one or more regions R i on each side of E i,j inside simple closed polygond. (More than one if E i,j intersects nodes.) 2. Triangulate each region R i with Algorithm I (Protruding point removal). (a) p i E i,j p j (b) p i E i,j p j May include holes and arbitrary exterior boundary 3
Delaunay Triangulation of a PSLG We will generalize the theory of Delaunay triangulation from P to G where G GP,E c is a PSLG (Planar Straight Line Graph). E c are constrained edges. The endpoints of E c are in P. Recall fom conventional Delaunay triangulations: MaxMin angle criterion Lexicographical ordering of indicator vectors Definition of local- and global optimum The circle criterion (will be redefined) The dual (Voronoi diagram) will not be considered here! (involved and not so useful) DEFINISJON (Visibility). p i and p j are visible to each other if p i p j does not intersect the interior of any edge in E c. 4
DEFINISJON (CDT). A CDT G of a PSLG GP,E c is a triangulation containing the edges E c such that Ct of any triangle t in G contains no point of P in its interior which is visible from all the three nodes of t. DEFINISJON: Modified circle criterion (relaxed) DEFINISJON: Edges in G that are not in E c are called Delaunay edges; triangles in G are called Delaunay triangles. (a) (b) (c) (d) a) GP,E c b) DTP c) CDTG 5
if E c G P and G P, P; a conventional Delaunay triangulation. 6
Generalization of the theory to CDTs (Brief, consult cited papers for details) (a) (b) p 2 θ 1 e e' p 1 θ 2 p 3 θ 2 e' p 4 In (b), e is constrained LEMMA. The modified circle criterion and the MaxMin angle criterion are equivalent for strictly convex quadrilaterals. Recall: indicator vector, lexicographical measure,... LEMMA(*). The indicator vector (of a contrained triangulation) becomes lexicographically larger each time an edge of a strictly convex quadrilateral is swapped according to the Delaunay swapping criteria. Basis for Lawson s LOP Algorithm 7
LOP applied to a G, whereg is a PSLG: 1. Start with an arbitrary G 2. Repeat swapping of edges according to modified circle criterion Does the LOP converge when applied to G? What does it converge to? Do we reach a global optimum? Lemma (*) and the fact that the number of possible triangulations of G is finite guarantees that the algorithm terminates after a finite number of edge swaps. DEFINITION. Locally optimal edge: 1. When the decision is not to swap it in the LOP. 2. Edges in E c and boundary edges are locally optimal by default. DEFINITION. Locally optimal triangulation; accordingly. 8
TEOREM. All interior edges of a triangulation G (G GP,E c ) are locally optimal (if and only if) the modified circle criterion holds for all triangles. Proof. See Exercise in lecture notes. So, LOP yields a CDT in accordance with DEFINITION (CDT). THEOREM. A triangulation G is a CDT in accordance withdefinition (CDT) (if and only if) its indicator vector is lexicographically maximum. Proof. See Exercise with guidelines in lecture notes. (Difficult since a dual construction (Voronoi) cannot be used.) 9
Uniqueness of a CDT can be deduced from the proof (under the usual assumption that no four points of P are cocircular). Unique characterization of Delaunay edge and Delaunay triangle in A CDT (Recall, edges in E c arenot Delaunay edges): THEOREM (Delaunay edge). Edge e ij between points p i and p j of P is Delaunay (if and only if) p i and p j are visible to each other and there exists a circle passing through p i and p j that does not contain any points of P in its interior visible from both p i and p j. Proof. See Exercise in lecture notes. 10
THEOREM (Delaunay triangle). Triangle t with nodes p i, p j and p k is Delaunay (if and only if) Ct contains no point of P in its interior which is visible from both p i, p j and p k. Proof. See Exercise in lecture notes. 11
Algorithms for Constrained Delaunay Triangulation Overview: Similar schemes as for conventional Delaunay, but 1. predefined constrained edges, and 2. modified circle criterion. Only incremental algorithms are considered here: basic operations: inserting a constrained edge into a CDT, and inserting a node into a CDT. 12
Given a PSLG GP,E c where endpoints of E c are in P. Algorithm (Compute G): 1. Compute P, (conventional Delaunay) 2. for each e in E c insert e into P,E c and update to a CDT. E c E c e 3. (add additional points into G) Recall from conventional Delaunay: two schemes for inserting a point p: remove triangles in (star shaped) influence region R p and retriangulate split t which contains the insertion point into three new triangles and apply recswap procedure three times. 13
Inserting an Edge into a CDT Insert constrained edge e c between p a and p b in P, E c P,E c e c. (a) p a e c pb e c L Q, (b) p a e c pb e c R Q, a) R e c b) Q e c,l and Q e c,r Influence region R e c of e c in G are triangles intersected by e c Note that no node is inserted or moved only R e c is affected! (Recall Theorem) Influence polygons, Q e c,l and Q e c,r on each side of e c. 14
Obtain P, E c e c by triangulating Q e c,l and Q e c,r on each side of the constrained edge e c separately using modified circle criterion: Step-by-step approach with base line and growing circles: Retriangulate one Q: 1. Let e c be the first baseline 2. Start with a growing circle with r and grow it into Q. 3. Make a triangle t with the first point p reached that is not separated from e c with a constraint. 4. Chose a new base line e c (an edge of t) and use the same circle. 5. GOTO 3 15
p' e b t p Y The growing The point p is uniquely defined as the point in P that, i) makes the largest angle at p spanned by the baseline e b, and ii) p is visible from the endpoints of e b. Note: No non-procedural approach as for point insertion. 16
e c L Q, (a) e c e c R Q, (b) (c) (d) Growing circles 17
Edge Insertion and Swapping Recall: T 2V I V B 2 I E 3V I 2V B 3 II E I 3V I V B 3 III T E V 1 IV, that is, a new constraint edge between two existing nodes does not change the cardinality of edges or triangles. This suggests that a new constrained edge can be swapped in place. 18
1. Swapping procedure for inserting a constraint e c into P,E c (operating inside R e c only). 2. LOP applied to edges inside each of Q e c,l and Q e c,r to obtain P,E c e c The swapping procedure: Principle: Swap edges away from the constrained edge e c such that eventually e c is included as an edge in the triangulation. Let p a, u 1,,u n,p b define the closed influence polygon Q ec,l to the left of the directed line from p a to p b. Note how the vertices of the polygon are enumerated when it is multiply connected; see figure. Consider a point u m each time where the angle m and swap away edges radiating from u m and intersecting e c. 1. is it always possible to find a point u m where m? 2. is there always a swappable edge at u m? 19
(a) e c L Q, u 2 u 4 u α 1 α 6 4 α 5 u 5 u 6 α 1 α 2 α 3 p a u 3 e c pb e c R Q, u 5 (b) α 1 u 1 u 3 u 4 α 3 α 4 α 5 p a u 2 α 2 e c pb (c) u 1 p a α 1 e c pb 20
LEMMA. A closed and simply connected polygon P has at least three interior angles smaller than. Proof. Let 1,, N, N 3, be the interior angles of P and suppose that k of them are smaller than. From elementary geometry we know that the sum of the interior angles is N 2 and thus, N N 2 i1 i i i i We have i N k, which inserted above gives, i k 2 i. i The right hand side is non-negative, so we have k 2. But since k 0 the right hand side is in fact positive and this gives k 3. i. Simply connected influence polygon: Lemma; at least one vertex different from p a and p b where m. multiply connected: see exercise. 21
w 0 = u m 1 α m u m w = r u + 1 m+1 e c w 1 w 2... w r Illustration for Lemma. Suppose that there are r edges radiating from u m and intersecting e c ; see figure. The endpoints of the r edges on the opposite side of e c from u m are denoted w 1,,w r, numbered counterclockwise. Conventions w 0 u m1 and w r1 u m1. LEMMA. There is at least one edge radiating from u m and intersecting e c, where m, that is a diagonal in a convex quadrilateral (and thus swappable). Proof. The closed polygon defined by the sequence w 0, w 1,,w r, w r1 (not including u m ) has at least three interior angles smaller than by Lemma. Thus, there is at least one point w s,1 s r such that the angle w s1 w s w s1 is smaller than. Then the quadrilateral with u m,w s as a diagonal must be convex since w s1,u m,w s1 is also smaller than. 22
Thus, all edges u m,w s,1s r, where m,can be swapped away from u m such that there are no edges left radiating from u m and intersecting e c. Result: u m is eliminated from the influence polygon. Algorithm (eliminate u m, with m ): 1. while r 1 2. Let u m, w s be a diagonal in a convex quadrilateral u m,w s1,w s,w s1. 3. Swap u m, w s to w s1,w s1 4. r r 1 Eventually, r 1 and and only one edge u m,w 1 radiates from u m and intersects e c. u m, w 1 is a diagonal in the quadrilateral u m, u m1,w 1, u m1 that is convex by Lemma. When u m,w 1 is swapped to u m1,u m1 in the r th cycle of the algorithm, u m is isolated from e c and eliminated from Q; seeu 1 in figure. 23
Repeat Algorithm on Q u m p a,u 1,u m1,u m1,u n,p b etc. and eventually on Q p a,u 1,p b. Algorithm (Insert constrained edge e c 1. while n 1 2. Find a point u m,1m n where m 3. Apply Algorithm to u m 4. n n 1 5. Q ec,l p a, u 1,,u m1,u m1,,u n,p b When n 1, Q p a,u 1,p b and the interior angle 1 at u 1 is smaller than by Lemma; see figure. When u 1,w 1 is swapped to p a,p b it takes the role as the constrained edge e c that has p a and p b as endpoints. 24
Finally, apply LOP to edges inside influence polygons Q e c,l and Q e c,r. LOP terminates as CDT with e c as a constraint! Existence follows from Lemma, extended to multiply connected polygons, and Lemma. 25
Inserting a Point into a CDT (a) (b) p e c e c Influence polygon Q p in a). Let P p,e c be the CDT obtained by inserting a point p into a CDT P,E c. Exact limitation of R p : LEMMA. A triangle t in P,E c will be modified when inserting a point p to obtain P p,e c if and only if the circumcircle of t contains p in its interior and p is visible from all the three nodes of t. Proof. The proof follows directly from Theorem (Delaunay triangle). 26
How can P p,e c be obtained? Alt. 1: THEOREM. All new triangles of P p,e c have p as a common node. Proof. See Exercise in lecture notes. P p,e c can be obtained from P,E c by removing all triangles of R p and connecting p to all points of Q p ;see Figure (b). Alt 2, swapping procedure: As for conventional Delaunay with this modification only: recswapdelaunay must not swap constrained edges. 27