500 likes | 981 Views
Delaunay Triangulation. Jyun-Ming Chen Reference: deBerg et al. Angle vector of T : sorted internal angles Angle-optimal triangulation T : A( T ) A( T ’ ) for all triangulations T ’ of P. Important Concepts. A( T ) < A( T ’). Important Concepts.
E N D
Delaunay Triangulation Jyun-Ming Chen Reference: deBerg et al.
Angle vector of T: sorted internal angles Angle-optimal triangulation T : A(T) A(T’) for all triangulations T’ of P Important Concepts
A(T) < A(T’) Important Concepts • Illegal edge, edge-flip and angle-vector • Legality test: [The correctness of this criterion follows from Thales’ theorem]
p s q r Proof • We need to show that angle vector gets bigger if illegal edge is flipped • There are six angles in current configuration: • pqr + psr > 180 are the larger ones;the rest four are the smaller ones • Need to show that once flipped, all six new angles are larger than the four old smaller ones • The ordering of angle vector is determined by smallest angle
qsp > qrp qsr > qpr qps > qpr Thales’ theorem q r p s
pqs > prs sqr > rps qrs > prs q r p s
Algorithm • Only flip if ijkl are convex (non-convex cannot flip) • It will terminate • Too slow to be interesting • How to come up with initial triangulation T ?!
This was first suggested by Lawson(77) Incremental Algorithm
Recursive Call Complication on presence of p-1, p-2,p-3
p s q r Swap Test (Text, exercise 9.5) Note the triangle pqr is CCW!
q1 q2 p s q r Swap Test (TRIPACK, Renka96) For numerical robustness (next page): Swap if sin12 - swtol Just check the sign!!
[2] [3] Numerical Robustness 2 cocircular Almost cocircular 3 4 1 [do not flip – avoid cycling] [4] Don’t flip flip [1]
Observation • Every new edge created due to insertion of pr is incident to pr This is also called the Bowyer-Watsonalgorithm
Boywer-Watson Algorithm Bowyer-Watson triangulation: circum-circles that contain the new point, and the resulting triangulation
2 5 3 1 4 • Create DT(P) • Mark center of circum-circle carefully • Do the in-circle test by comparing distances • Perform all necessary LegalizeEdge steps -1 (i) (i) -2 (i) -3
2 5 3 1 4 -1 (0) (i) (iv) -2 -3
2 5 3 1 4 -1 (0) (iv) (iv) -2 -3
2 5 3 1 4 -1 (iii) (0) (i) -2 -3
2 5 3 1 4 -1 (ii) (0) -2 -3
2 5 3 1 4 -1 (0) (i) (iii) -2 -3
2 5 3 1 4 -1 (ii) (iii) -2 -3
2 5 3 1 4 -1 (0) (0) -2 -3
2 5 3 1 4 -1 -2 -3
Choosing Initial Triangle • far away so that they don’t influence the DT of P • Don’t want to introduce huge coordinate (numerical errors)
The Choice Suggested by Text • Choose them to contain P • Modify illegal edge test whenever p-i are involved • p-1 is outside any circles defined by P • p-2 is outside any circles defined by P{p-1} • p-3 is outside any circles defined by P{p-1,p-2}
Case Analysis: Is pipj legal? [0] Polygon concave: legal [i] Both i&j negative: legal [ii] i,j,k,l positive: normal case [iii] Exactly one of (i,j,k,l) negative: choose the one with positive as legal [iv]Exactly two of (i,j,k,l) negatives: choose the one with smaller negative as legal [v] Exactly three of (i,j,k,l) negatives: cannot occur
Logical Analysis [i,j,k,l] i<0 j<0 NOT( i<0 j<0) [i,j,k,l] two negative: ij must be one negative [i,j,k,l] all positive [i,j,k,l] one negative [i,j,k,l] three negative: impossible
To locate the triangle containing pr Data structure D as described in text Point-Location Subproblem
Alternate Point-Location Test Abstract of [Mucke et al. 96]
Example p
AP: EMST (exercise 9.11) • Q(n2) edges, standard MST algorithm O(n2) • EMST DG • O(nlogn) algorithm to compute EMST for P • TSP …