cs133
play

CS133 Computational Geometry Voronoi Diagram Delaunay - PowerPoint PPT Presentation

CS133 Computational Geometry Voronoi Diagram Delaunay Triangulation 1 Nearest Neighbor Problem Given a set of points and a query point , find the closest point to , , ,


  1. Plane Sweep Constructs Sweep line status: The VD of the sites and the sweep line. In other words, the final part of the VD + the beach line in non-decreasing 𝑦 order Event points: Site event: A new site that adds a new arc to the VD. 1-to-1 mapping to an input site Circle event: The disappearance of an arc resulting in a vertex in VD. Can only be discovered along the way 49

  2. Sweep Line Status The final part of VD is stored in the Doubly- Connected Edge List (DCEL) data structure The beach line is stored as a BST ( 𝜐 ) of arcs sorted by 𝑦 Leaves store arcs Internal nodes store the breakpoints as a pair of sites π‘ž 𝑗 , π‘ž π‘˜ 50

  3. Sweep Line Status π‘ž 1 , π‘ž 2 π‘ž 1 π‘ž 1 , π‘ž 2 𝛽 1 π‘ž 2 π‘ž 2 , π‘ž 3 π‘ž 3 π‘ž 1 π‘ž 2 , π‘ž 3 𝛽 2 𝛽 3 π‘ž 2 π‘ž 3 51

  4. Event Points Stored in a priority queue 𝑅 as a max-heap ordered by 𝑧 𝑅 is initialized with all sites 52

  5. Handle Site Event ( 𝒒 𝒋 ) If 𝜐 is empty, add the site to it and return Search in 𝜐 for the arc 𝛽 vertically above π‘ž 𝑗 If exists, delete a circle event linked with 𝛽 Split 𝛽 into two arcs and insert a new arc 𝛽 𝑗 corresponding to π‘ž 𝑗 The new intersections are 𝛽, 𝛽 𝑗 and 𝛽 𝑗 , 𝛽 Check the new triples of arcs and add their corresponding circle event to 𝑅 53

  6. Handle Site Event ( 𝒒 𝒋 ) π‘ž 1 , π‘ž 2 π‘ž 1 π‘ž 1 , π‘ž 2 𝛽 1 π‘ž 2 π‘ž 2 , π‘ž 3 π‘ž 3 π‘ž 1 π‘ž 2 , π‘ž 3 𝛽 2 𝛽 3 π‘ž 2 π‘ž 3 π‘ž 4 54

  7. Handle Site Event ( 𝒒 𝒋 ) π‘ž 1 , π‘ž 2 π‘ž 1 π‘ž 1 , π‘ž 2 𝛽 1 π‘ž 2 π‘ž 2 , π‘ž 3 π‘ž 3 𝛽 2 π‘ž 1 π‘ž 2 , π‘ž 3 𝛽 3 π‘ž 4 , π‘ž 2 π‘ž 2 , π‘ž 4 π‘ž 2 π‘ž 3 π‘ž 4 55

  8. Handle Site Event ( 𝒒 𝒋 ) π‘ž 1 , π‘ž 2 π‘ž 1 π‘ž 1 , π‘ž 2 𝛽 1 π‘ž 2 π‘ž 2 , π‘ž 3 π‘ž 3 𝛽 2 π‘ž 1 π‘ž 2 , π‘ž 3 𝛽 3 π‘ž 4 , π‘ž 2 π‘ž 2 , π‘ž 4 π‘ž 3 π‘ž 2 , π‘ž 4 π‘ž 4 π‘ž 2 π‘ž 4 , π‘ž 2 π‘ž 4 π‘ž 2 56

  9. Handle Site Event ( 𝒒 𝒋 ) 𝛽 1 𝛽 2 𝛽 3 are no longer adjacent βž” Remove the circle event that corresponds to 𝛽 2 𝛽 1 𝛽 2 𝛽 4 are now adjacent βž” Create a new circle event for them Similarly, create a circle event for 𝛽 4 𝛽 2 𝛽 3 π‘ž 1 , π‘ž 2 π‘ž 1 π‘ž 1 , π‘ž 2 𝛽 1 π‘ž 2 π‘ž 2 , π‘ž 3 π‘ž 3 𝛽 2 π‘ž 1 π‘ž 2 , π‘ž 3 𝛽 3 π‘ž 4 , π‘ž 2 π‘ž 2 , π‘ž 4 π‘ž 3 π‘ž 2 , π‘ž 4 π‘ž 4 π‘ž 2 π‘ž 4 , π‘ž 2 No circle event for the triple 𝛽 2 𝛽 4 𝛽 2 because they don’t correspond tot three different sites π‘ž 4 π‘ž 2 57

  10. Creating a Circle Event Given three sites π‘ž 𝑗 , π‘ž π‘˜ , π‘ž 𝑙 that have three adjacent arcs, we first compute the center of their circumcircle, i.e., the intersection of the two perpendicular bisectors to π‘ž 𝑗 π‘ž π‘˜ and π‘ž π‘˜ π‘ž 𝑙 Compute the bottom point of the circle as 𝑦 𝑑 , 𝑧 𝑑 βˆ’ 𝑠 where 𝑦 𝑑 , 𝑧 𝑑 are the coordinates of the circle center and 𝑠 is the circle radius Associate the circle event with the middle site in the tree order 58

  11. Handle Circle Event ( 𝜹 ) Delete the leaf 𝛿 that corresponds to the disappearing arc 𝛽 𝑗 from 𝜐 Delete the two breakpoints that involve 𝛽 𝑗 Insert a new break point Add the center of the circle event as a vertex in VD. This center is one side of two half- edges Check for any new circle events caused by the now adjacent triples of arcs Running time: 𝑃 π‘œ log π‘œ 59

  12. Circle Event ( 𝜹 ) π‘ž 4 π‘ž 2 π‘ž 1 π‘ž 3 π‘ž 1 , π‘ž 2 π‘ž 2 , π‘ž 3 π‘ž 3 , π‘ž 4 𝛽 1 𝛽 4 𝛽 2 𝛽 3 𝜐 π‘ž 2 , π‘ž 3 Circle event point π‘ž 1 , π‘ž 2 π‘ž 3 , π‘ž 4 π‘ž 1 π‘ž 2 π‘ž 3 π‘ž 4 60

  13. Circle Event ( 𝜹 ) π‘ž 4 π‘ž 2 π‘ž 1 π‘ž 3 π‘ž 1 , π‘ž 2 π‘ž 2 , π‘ž 3 π‘ž 3 , π‘ž 4 𝛽 1 𝛽 4 𝛽 2 𝛽 3 𝜐 π‘ž 2 , π‘ž 3 Circle event point π‘ž 1 , π‘ž 2 π‘ž 3 , π‘ž 4 π‘ž 1 π‘ž 2 π‘ž 3 π‘ž 4 61

  14. Circle Event ( 𝜹 ) π‘ž 4 π‘ž 2 π‘ž 1 π‘ž 3 π‘ž 1 , π‘ž 2 π‘ž 2 , π‘ž 3 π‘ž 3 , π‘ž 4 𝛽 1 𝛽 4 𝛽 2 𝛽 3 𝜐 π‘ž 1 , π‘ž 3 Circle event point π‘ž 3 , π‘ž 4 (π‘ž 1 , π‘ž 3 , π‘ž 4 ) are now adjacent in the π‘ž 1 tree, create a corresponding circle event π‘ž 3 π‘ž 4 62

  15. Delaunay Triangulation 63

  16. Delaunay Triangulation A Delaunay triangulation can be defined as the (unique) triangulation in which the circumcircle of each triangle has no other sites NaΓ―ve algorithm: Consider all possible triangles 𝑃 π‘œ 3 Check if the circumcircle of the triangle is empty 𝑃 π‘œ Running time 𝑃 π‘œ 4 64

  17. Guibas and Stolfi’s Algorithm A divide and conquer algorithm 65

  18. Algorithm Outline DelaunayTriangulation(P) If (|P| <= 3) return TrivialDT(P) Split P into P1 and P2 DT1 = DelaunayTriangulation(P1) DT2 = DelaunayTriangulation(P1) Merge(DT1, DT2) 66

  19. Split Pre-sort by x 67

  20. TrivialDT(P) P TrivialDT(P) 68

  21. Merge(P1, P2) 69

  22. Merge(P1, P2) 70

  23. Merge(P1, P2) 71

  24. Merge(P1, P2) 72

  25. Find the First LR edge Base LR edge Upper tangent of π’Ÿβ„‹ 𝑄 1 , π’Ÿβ„‹ 𝑄 2 73

  26. Rising Bubble 74

  27. Rising Bubble 75

  28. Rising Bubble 76

  29. Rising Bubble New Base LR edge 77

  30. Rising Bubble 78

  31. Rising Bubble 79

  32. Rising Bubble 80

  33. Rising Bubble 81

  34. Rising Bubble 82

  35. Rising Bubble 83

  36. Rising Bubble 84

  37. Rising Bubble 85

  38. Rising Bubble 86

  39. Rising Bubble 87

  40. Rising Bubble 88

  41. Rising Bubble 89

  42. Rising Bubble 90

  43. Rising Bubble 91

  44. Rising Bubble 92

  45. Rising Bubble 93

  46. Rising Bubble 94

  47. Rising Bubble 95

  48. Rising Bubble 96

  49. Rising Bubble 97

  50. Rising Bubble 98

  51. Rising Bubble 99

  52. Rising Bubble 100

Recommend


More recommend