Delaunay Triangulation

43
Delaunay Triangulation Jyun-Ming Chen Reference: deBerg et al.

description

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. - PowerPoint PPT Presentation

Transcript of Delaunay Triangulation

Page 1: Delaunay Triangulation

Delaunay TriangulationJyun-Ming ChenReference: deBerg et al.

Page 2: Delaunay Triangulation

Fall 2005 2

Important ConceptsAngle vector of T: sorted internal anglesAngle-optimal triangulation T : A(T) A(T’) for all triangulations T’ of P

Page 3: Delaunay Triangulation

Fall 2005 3

Important ConceptsIllegal edge, edge-flip and angle-vector

Legality test:

A(T) < A(T’)

[The correctness of this criterion follows from Thales’ theorem]

Page 4: Delaunay Triangulation

Fall 2005 4

ProofWe need to show that angle vector gets bigger if illegal edge is flippedThere 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

p

q

s

r

Page 5: Delaunay Triangulation

Fall 2005 5

qps > qpr

qsr > qpr

qsp > qrpq

p

r

sThales’ theorem

Page 6: Delaunay Triangulation

Fall 2005 6

pqs > prs

qrs > prs

sqr > rps

q

p

r

s

Page 7: Delaunay Triangulation

Fall 2005 7

Algorithm

Only flip if ijkl are convex (non-convex cannot flip)It will terminateToo slow to be interestingHow to come up with initial triangulation T ?!

Page 8: Delaunay Triangulation

Fall 2005 8

Incremental AlgorithmThis was first suggested by Lawson(77)

Page 9: Delaunay Triangulation

Fall 2005 9

Recursive Call

Complication on presence of p-1, p-2, p-3

Page 10: Delaunay Triangulation

Fall 2005 10

Swap Test (Text, exercise 9.5)

0

1111

det

22

22

22

22

yxyx

yxyx

yxyx

yxyx

ssssrrrrqqqqpppp p

q

s

rNote the triangle pqr is CCW!

Page 11: Delaunay Triangulation

Fall 2005 11

Swap Test (TRIPACK, Renka96)

21

21

sin2sin1cos2cos1sin12sin

sin2 2cos

sin1 1cos

180 if swap

qpqrsrsp

qpqrqpqr

srspsrsp

p

q

s

r

1

2

For numerical robustness (next page):Swap if sin12 - swtol Just check

the sign!!

Page 12: Delaunay Triangulation

Fall 2005 12

Numerical Robustnesscocircular Almost cocircular

[do not flip – avoid cycling]

1

2

34

[1]

[2] [3]

[4]

Don’t flipflip

Page 13: Delaunay Triangulation

Fall 2005 13

ObservationEvery new edge created due to insertion of pr is incident to pr

This is also called the Bowyer-Watson algorithm

Page 14: Delaunay Triangulation

Fall 2005 14

Boywer-Watson Algorithm

Bowyer-Watson triangulation: circum-circles that contain the new point, and the resulting triangulation

Page 15: Delaunay Triangulation

Fall 2005 15

Page 16: Delaunay Triangulation

Fall 2005 16

1

2

4

35

Create DT(P)•Mark center of circum-circle carefully•Do the in-circle test by comparing distances•Perform all necessary LegalizeEdge steps

(i)

(i)

(i)

-1

-2 -3

Page 17: Delaunay Triangulation

Fall 2005 17

1

2

4

35 (i)

-1

-2 -3

(iv)

(0)

Page 18: Delaunay Triangulation

Fall 2005 18

1

2

4

35

-1

-2 -3

(iv)

(0)

(iv)

Page 19: Delaunay Triangulation

Fall 2005 19

1

2

4

35

-1

-2 -3

(iii)(0)

(i)

Page 20: Delaunay Triangulation

Fall 2005 20

1

2

4

35

-1

-2 -3

(0)

(ii)

Page 21: Delaunay Triangulation

Fall 2005 21

1

2

4

35

-1

-2 -3

(0)

(iii)

(i)

Page 22: Delaunay Triangulation

Fall 2005 22

1

2

4

35

-1

-2 -3

(iii)

(ii)

Page 23: Delaunay Triangulation

Fall 2005 23

1

2

4

35

-1

-2 -3

(0)

(0)

Page 24: Delaunay Triangulation

Fall 2005 24

1

2

4

35

-1

-2 -3

Page 25: Delaunay Triangulation

Fall 2005 25

Page 26: Delaunay Triangulation

Fall 2005 26

Page 27: Delaunay Triangulation

Fall 2005 27

Page 28: Delaunay Triangulation

Fall 2005 28

Page 29: Delaunay Triangulation

Fall 2005 29

Page 30: Delaunay Triangulation

Fall 2005 30

Page 31: Delaunay Triangulation

Fall 2005 31

Page 32: Delaunay Triangulation

Fall 2005 32

Edge swap complexity!?

Page 33: Delaunay Triangulation

Fall 2005 33

Page 34: Delaunay Triangulation

Fall 2005 34

Page 35: Delaunay Triangulation

Fall 2005 35

Choosing Initial Trianglefar away so that they don’t influence the DT of P

Don’t want to introduce huge coordinate (numerical errors)

Page 36: Delaunay Triangulation

Fall 2005 36

The Choice Suggested by Text

Choose them to contain PModify 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}

Page 37: Delaunay Triangulation

Fall 2005 37

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

Page 38: Delaunay Triangulation

Fall 2005 38

Logical Analysis[i,j,k,l]

i<0 j<0 NOT( i<0 j<0)

[i,j,k,l] all positive

[i,j,k,l] one negative

[i,j,k,l] two negative: ij must be one negative

[i,j,k,l] three negative:impossible

Page 39: Delaunay Triangulation

Fall 2005 39

Point-Location SubproblemTo locate the triangle containing pr Data structure D

as described in text

Page 40: Delaunay Triangulation

Fall 2005 40

Alternate Point-Location Test

Abstract of [Mucke et al. 96]

Page 42: Delaunay Triangulation

Fall 2005 42

Example

p

Page 43: Delaunay Triangulation

Fall 2005 43

AP: EMST (exercise 9.11)(n2) edges, standard MST algorithm O(n2)EMST DGO(nlogn) algorithm to compute EMST for PTSP …