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
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
Sweep Line Status π 1 , π 2 π 1 π 1 , π 2 π½ 1 π 2 π 2 , π 3 π 3 π 1 π 2 , π 3 π½ 2 π½ 3 π 2 π 3 51
Event Points Stored in a priority queue π as a max-heap ordered by π§ π is initialized with all sites 52
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
Handle Site Event ( π π ) π 1 , π 2 π 1 π 1 , π 2 π½ 1 π 2 π 2 , π 3 π 3 π 1 π 2 , π 3 π½ 2 π½ 3 π 2 π 3 π 4 54
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
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
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
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
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
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
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
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
Delaunay Triangulation 63
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
Guibas and Stolfiβs Algorithm A divide and conquer algorithm 65
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
Split Pre-sort by x 67
TrivialDT(P) P TrivialDT(P) 68
Merge(P1, P2) 69
Merge(P1, P2) 70
Merge(P1, P2) 71
Merge(P1, P2) 72
Find the First LR edge Base LR edge Upper tangent of πβ π 1 , πβ π 2 73
Rising Bubble 74
Rising Bubble 75
Rising Bubble 76
Rising Bubble New Base LR edge 77
Rising Bubble 78
Rising Bubble 79
Rising Bubble 80
Rising Bubble 81
Rising Bubble 82
Rising Bubble 83
Rising Bubble 84
Rising Bubble 85
Rising Bubble 86
Rising Bubble 87
Rising Bubble 88
Rising Bubble 89
Rising Bubble 90
Rising Bubble 91
Rising Bubble 92
Rising Bubble 93
Rising Bubble 94
Rising Bubble 95
Rising Bubble 96
Rising Bubble 97
Rising Bubble 98
Rising Bubble 99
Rising Bubble 100
Recommend
More recommend