Presentation is loading. Please wait.

Presentation is loading. Please wait.

A Divide-and-Conquer Algorithm for Delaunay Triangulation CS 268 @ Gates 219 October 17, 3:00 – 4:20 Richard Zhang (for Leo G.) Disclaimer: All figures.

Similar presentations


Presentation on theme: "A Divide-and-Conquer Algorithm for Delaunay Triangulation CS 268 @ Gates 219 October 17, 3:00 – 4:20 Richard Zhang (for Leo G.) Disclaimer: All figures."— Presentation transcript:

1 A Divide-and-Conquer Algorithm for Delaunay Triangulation CS Gates 219 October 17, 3:00 – 4:20 Richard Zhang (for Leo G.) Disclaimer: All figures in the slides are for illustration only. Best approximations were attempted, but preciseness or correctness of the geometric constructions should not be assumed.

2 Algorithm pipeline 1. Sort n input sites by their x-coordinates x

3 Algorithm pipeline 2. Divide the n sites into two equal halves x

4 Algorithm pipeline 3. Recursively build Delaunay, L & R, for each half
x

5 Algorithm pipeline 3. Recombine by adding cross edges between L & R L
x

6 Algorithm pipeline 3. Recombine by adding cross edges between L & R L
Some LL or RR edges may be deleted L R x

7 Key step: build cross edges (linear time)
Start with the lower common tangent of L’s and R’s convex hulls This edge is on the convex hull, hence a Delaunay edge L R x

8 Key step: build cross edges
Add Delaunay edges bottom-up (ascending y-order) Given a current Delaunay edge (called a basel edge), the next Delaunay edge must share a vertex with the basel – Lemma 28 L R x

9 Key step: build cross edges
Lemma 28 proof sketch: We have a triangulation, the split line (dash) cuts through a series of triangles. Hence, two consecutive cross edges must belong to one triangle. L R x

10 Useful visualization: circular bubbles
Think of all circles that pass through two end points of a basel To go from one such circle to another is like stretching a circular bubble by rising it through a chord (the basel) Fixed Basel = chord Fixed

11 Useful visualization: circular bubbles
Think of all circles that pass through two end points of a basel To go from one such circle to another is like stretching a circular bubble by rising it through a chord (the basel) Fixed Basel = chord Fixed

12 Useful visualization: circular bubbles
Think of all circles that pass through two end points of a basel Stretching on one side = shrinking on the other side stretch Fixed Basel = chord shrink Fixed

13 Some notations Us(AB): upper half plane
Hs(AB): either Us(AB) or Ls(AB) Cir(XYZ): circle through X, Y, Z A basel B Ls(AB): lower half plane

14 Lemma 29 Consider truncated circles, Hs(AB) ∩ Cir(ABM) and Hs(AB) ∩ Cir(ABN) for any points M and N. One of them must entirely contain the other. either A N M B

15 Lemma 29 Consider truncated circles, Hs(AB) ∩ Cir(ABM) and Hs(AB) ∩ Cir(ABN) for any points M and N. One of them must entirely contain the other. A N M or B

16 Lemma 29 If Yellow contains Green on one side (Green to Yellow is a stretch), then Yellow is contained by Green on the other side (G to Y is a shrink). stretch N A shrink B M

17 Lemma 30: characterize the candidate for next basel
Consider a basel AB and let N1, …, Nk be A’s L-neighbors in the upper half plane Us(AB), sorted in counterclockwise order. Note: some edges ANi may be interior edges in the Delaunay triangulation L.

18 Lemma 30: characterize the candidate for next basel
Consider all the Ωi = Us(AB) ∩ Cir(ABNi) ‘s, the truncated circles The containment of Ωi+1 by Ωi is unimodal in that there is a “switching point” j so that before j, i.e., i < j, we have: Ωi ⊇Ωi+1 And after j, i.e., i ≥ j, we have Ωi⊆Ωi+1

19 Lemma 30 Specifically, in the example here, we have Ω1 ⊇Ω2 N5 N4 N2 N3
B

20 Lemma 30 Specifically, in the example here, we have Ω2 ⊇Ω3 N5 N4 N2 N3
B

21 Lemma 30 Specifically, in the example here, but then a switch at N3:
Ω3 ⊆Ω4 N5 N4 N2 N3 N1 A B

22 Lemma 30 Then the containment does not switch back any more, we have
Ω4 ⊆Ω5 … N5 N4 N2 N3 N1 A B

23 N5 N4 L N2 R N3 N1 A B Lemma 30 The switching point N3 is special. It is the candidate (on the L side) for B as the next basel. There is also a similar candidate on the R side for A, as the next basel.

24 N5 N4 L N2 R N3 N1 A B Lemma 30 If N3 were chosen, then edges AN1 and AN2 would be deleted, since they cannot be Delaunary. N3 becomes the next A to form the next basel edge. We will start at the new AB and repeat …

25 N5 N4 L N2 R A N1 B Lemma 30 If N3 were chosen, then edges AN1 and AN2 would be deleted, since they cannot be Delaunary. N3 becomes the next A to form the next basel edge. We will start at the new AB and repeat …

26 A key observation about the switching point (used later)
Since Ω3, the truncated circle Cir(ABN3) ∩ Us(AB) for the switching point, is contained by all the other Ω’s, ALL other N’s, N1, N2, N4, …, must lie outside of Ω3.

27 Proof of Lemma 30 The key is to look at intersection Xi between Cir(ANiNi+1) and line AB and noticing that they monotonically move toward A. N5 N4 N3 N2 N1 X1 A B

28 Proof of Lemma 30 The key is to look at intersection Xi between Cir(ANiNi+1) and line AB and noticing that they monotonically move toward A. N5 N4 N3 N2 N1 X2 X1 A B

29 Proof of Lemma 30 The switch (at N3) occurs when Xi crosses B N5 N4 N3

30 Proof of Lemma 30 The switch (at N3) occurs when Xi crosses B
Before crossing, Cir(ANiNi+1) contains B. Afterwards, B is outside. N5 N4 N3 N2 N1 X2 X1 A X3 B

31 To prove monotonicity of the Xi’s:
Look at ANY three consecutive points Ni-1, Ni, and Ni+1. Since ANi-1Ni is Delaunay, Ni+1 must lie outside Cir(ANi-1Ni). Consider ANi as the chord, to get from Cir(ANi-1Ni) to Cir(ANiNi+1), Cir(ANi-1Ni) must be stretched through the chord. Ni+1 Ni Ni-1 Stretch B A Xi-1 Xi

32 To prove monotonicity of the Xi’s:
Look at ANY three consecutive points Ni-1, Ni, and Ni+1. Recall Lemma 29, on the other side of ANi, Cir(ANi-1Ni) must be shrunk through the chord. Hence, the intersection Xi must move from Xi-1 toward A. Ni+1 Ni Ni-1 Stretch B A Xi-1 Xi Shrink

33 Lemma 31: how to choose the next Delaunay cross edge
Let N be the L candidate and M be the R candidate for besal edge AB, which is the current Delaunay cross edge found. Let ABC be the current Delaunay triangle. Recall: N is the “switching point” in A’s L-neighbors. M is the “switching point” in B’s B-neighbors. L N R M A B C

34 Lemma 31: how to choose the next Delaunay cross edge
Let N be the L candidate and M be the R candidate for besal edge AB, which is the current Delaunay cross edge found. Let ABC be the current Delaunay triangle. How to choose: If M is outside Cir(ABN), then BN is chosen instead of AM. Need to show that BN must be a Delaunay edge. L N R M A B C

35 Lemma 31 To show that BN is a Delaunay edge, we show Cir(ABN) is empty of ALL sites. First, look at the Ls(AB), the lower side of AB. Since ABC is Delaunay, ALL sites, including N, must lie outside Cir(ABC). Since N lies outside, in Ls(AB), Cir(ABN) is contained in Cir(ABC). So in the lower side, Cir(ABN) cannot contain any site. L N R M A B C

36 Lemma 31 To show that BN is a Delaunay edge, we show Cir(ABN) is empty of ALL sites. Now let us look at the Us(AB), the upper side of AB. Recall a previous key observation about the choice of switching point N. L N R M A B

37 A key observation about the switching point (used now)
Reminder slide N5 N4 L N2 R N3 N1 A B A key observation about the switching point (used now) Since Ω3, the truncated circle Cir(ABN3) ∩ Us(AB) for the switching point, is contained by all the other Ω’s, ALL other N’s, N1, N2, N4, …, must lie outside of Ω3.

38 L R N A B With N as the switching point, it is not hard to see: not any sites in the L side can lie inside Cir(ABN) in the upper side of AB.

39 L R N M A B Similarly, since M is the switching point on the R side for B, no R sites can lie inside Cir(ABM) in the upper side of AB.

40 L R N M A B Since M lies outside Cir(ABN) --- which was why BN was chosen over AM, Cir(ABN) lies inside of Cir(AMB) in Us(AB). Hence, no R sides can lie inside of Cir(ABN) in the upper side of AB.

41 Hence, in the upper side (of AB), Cir(ABN) cannot contain any site.
Cir(ABN) cannot contain any site in either side of AB. BN is Delaunay. Lemma 31 is proved. L R N M A B

42 Now recall how we build cross edges
Get lower common tangent of L’s and R’s convex hulls at first basel For each basel edge AB, Search for switching points on L and R sides. Let them be N for A and M for B. Choose between N and M to determine the next basel edge, then repeat. Stop when reaching the upper common tangent.

43 Complexity analysis Linear time. Straightforward scheme (see notes) visits only L and R hull vertices. Get lower common tangent of L’s and R’s convex hulls at first basel For each basel edge AB, Search for switching points on L and R sides. Let them be N for A and M for B. Choose between N and M to determine the next basel edge, then repeat. Stop when reaching the upper common tangent.

44 Complexity analysis Get lower common tangent of L’s and R’s convex hulls at first basel For each basel edge AB, Search for switching points on L and R sides. Let them be N for A and M for B. Choose between N and M to determine the next basel edge, then repeat. Stop when reaching the upper common tangent. Do inCircle test. Constant time.

45 Complexity analysis Get lower common tangent of L’s and R’s convex hulls at first basel For each basel edge AB, Search for switching points on L and R sides. Let them be N for A and M for B. Choose between N and M to determine the next basel edge, then repeat. Stop when reaching the upper common tangent. Only tricky analysis is this step. Need an amortized analysis. Recall that to search for the switching point N for the L (or A’s) side, we simply need to perform a series of inCircle tests.

46 Reminder slide Lemma 30 N5 N4 L R New A = N3 N2 N1 A B
If N3 were chosen, then edges AN1 and AN2 would be deleted. N3 becomes the next A, we will start at the basel AB and repeat … To test for switching points, can do tests inCircle(A, B, Ni, Ni+1), etc.

47 Complexity analysis Get lower common tangent of L’s and R’s convex hulls at first basel For each basel edge AB, Search for switching points on L and R sides. Let them be N for A and M for B. Choose between N and M to determine the next basel edge, then repeat. Stop when reaching the upper common tangent. The number of inCircle tests = number of delete edges, for this step.

48 Complexity analysis Get lower common tangent of L’s and R’s convex hulls at first basel For each basel edge AB, Search for switching points on L and R sides. Let them be N for A and M for B. Choose between N and M to determine the next basel edge, then repeat. Stop when reaching the upper common tangent. Overall, the total number of inCircle tests for candidate selections in the entire process of finding cross edges will be no more than the total number of L or R Delaunay edges deleted. There are linear number of edges in the L and R Delaunay triangulations and no edge is deleted twice. Hence this step is linear-time and the entire process of finding cross edges is linear time. The whole divide-and-conqure algorithm takes O(n log n).


Download ppt "A Divide-and-Conquer Algorithm for Delaunay Triangulation CS 268 @ Gates 219 October 17, 3:00 – 4:20 Richard Zhang (for Leo G.) Disclaimer: All figures."

Similar presentations


Ads by Google