Presentation is loading. Please wait.

Presentation is loading. Please wait.

Voronoi Diagram – Fortune ’ s Algorithm Reporter: GI1 11 號 蔡逸凡 Date: 2004/10/28 Reference: Computational Geometry ch7 ISBN: 3-540-65620-0.

Similar presentations


Presentation on theme: "Voronoi Diagram – Fortune ’ s Algorithm Reporter: GI1 11 號 蔡逸凡 Date: 2004/10/28 Reference: Computational Geometry ch7 ISBN: 3-540-65620-0."— Presentation transcript:

1 Voronoi Diagram – Fortune ’ s Algorithm Reporter: GI1 11 號 蔡逸凡 Date: 2004/10/28 Reference: Computational Geometry ch7 ISBN: 3-540-65620-0

2 Fortune ’ s Algorithm (summary) HandleSiteEvent(pi) 1.Search T for arc directly above pi; delete circle events associated with this arc 2.Add arc of pi into T (with two new break points, ) 3.[DCEL] edge between 4.Detect circle events where the new arc is the left arc in a triple of consecutive arcs HandleCircleEvent(pl) 1.Delete disappearing arc from T and its associated circle events from Q 2.[DCEL] Center of circle as vertex in V.diagram 3.Check new triples for circle events (only if the circle intersects sweep line and not yet in Q) 4.[DCEL] create edges due to disappearing arc

3 From the Textbook These can be ignored if using simplified T

4 From the Textbook

5 Case 1 Initially: Q={p1,p2,p3} T ={} D={} p1 p2 p3

6 Case 1(cont) SiteEvent(p1) Q={p2,p3} T ={p1} D={} Entries in T : the arcs induced by the sites

7 Case 1 (Cont) SiteEvent(p2) Q={p3} Arc above: p1 T ={p1,p2,p1} D={e1= } The arcs in T (bottom to top) Here two p1 represents different segments of the arc!

8 Case 1 (Cont) SiteEvent (p3) Q={} Arc above: p1 T ={p1,p2,p1,p3,p1} D={e1,e2= } Detect circle event: c1: → add c1 in Q

9 Case 1 (Cont) CircleEvent (c1) Q={} Disappearing arc: p1 T ={p1,p2,p1,p3,p1} D={e1,e2,v=, e3= } 

10 Case 1 (Cont) Finally, Q={} T ={p1,p2,p3,p1} D={e1,e2,v,e3}

11 Case 2 Initially: Q={p1,p2,p3,p4} T ={} D={}

12 Case 2(cont) SiteEvent(p1) Q={p2,p3,p4} T ={p1} D={} p1 p2 p4 p3

13 Case 2 (Cont) SiteEvent(p2) Q={p3,p4} Arc above: p1 T ={p1,p2,p1} D={e1= }

14 Case 2 (Cont) SiteEvent(p3) Q={p4} Arc above: p1 T ={p1,p3,p1,p2,p1} D={e1,e2= } Detect circle event: c1: → add c1 in Q={p4,c1} Make a note that c1 is due to

15 Case 2 (Cont) SiteEvent(p4) Q={c1} Arc above: p1 Delete c1 from Q T ={p1,p3,p1,p4,p1,p2,p1} D={e1,e2,e3= } Detect circle event: c2, c3

16 Case 2 (Cont) CircleEvent(c2) Q={c3} Disappearing arc: p1 T ={p1,p3,p1,p4,p1,p2,p1} D={e1,e2,e3,v1=, e4= } 

17 Case 2 (Cont) CircleEvent(c3) Q={} Disappearing arc: p1 T ={p1,p3,p4,p1,p2,p1} D={e1,e2,e3,v1,e4,v2=, e5= } 

18 Case 2 (Cont) Finally, Q={} T ={p1,p3,p4,p2,p1} D={e1,e2,e3,v1,e4,v2,e5}

19 Case 3 Initially: Q={p1,p2,p3,p4} T ={}

20 Case 3 (cont) SiteEvent (p1) Q={p2,p3,p4} T ={p1}

21 Case 3 (cont) SiteEvent (p2) Q={p3,p4} Arc above: p1 T ={p1,p2,p1} D={e1= }

22 Case 3 (cont) SiteEvent (p3) Q={p4} Arc above: p1 T ={p1,p2,p1,p3,p1} D={e1,e2= } Circle event c1 Q={p4,c1}

23 Case 3 (cont) SiteEvent (p4) Q={c1} Arc above:p3; remove c1 T ={p1,p2,p1,p3,p4,p3,p1} D={e1,e2,e3= } Circle event c2 Q={c2}

24 Case 3 (cont) CircleEvent (c2) Q={} Disappearing arc p3 T ={p1,p2,p1,p3,p4,p3,p1} D={e1,e2,e3,v1=,e4= } Circle event c3 Q={c3} 

25 Case 3 (cont) CircleEvent (c3) Q={} Disappearing arc p1 T ={p1,p2,p1,p4,p3,p1} circle before sweep line D={e1,e2,e3,v1,e4,v2=, e5= } 

26 Case 3 (cont) Finally: D={e1,e2,e3,v1, e4,v2, e5}

27 Case 4 Initial: Q={p1,p2,p3,p4} B={} D={} SiteEvent(p1) Q={p2,p3,p4} T ={p1} D={}

28 Case 4 (Cont) SiteEvent(p2) Q={p3,p4} Arc above: p1 T ={p1,p2,p1} D={e1= }

29 Case 4 (Cont) SiteEvent(p3) Q={p4} Arc above: p1 T ={p1,p2,p1,p3,p1} D={e1,e2= } Detect circle event: c1: → add c1 in Q

30 Case 4 (Cont) CircleEvent(c1) Q={p4} Disappearing arc: p1 T ={p1,p2,p1,p3,p1} D={e1,e2,v1=,e 3= } 

31 Case 4 (Cont) SiteEvent(p4) Q={} Arc directly above: p2 T ={p1,p2,p4,p2,p3,p1} Circle event c2 D={e1,e2,v1,e3,e4= } P4 is equal distance to p2 & p3

32 Case 4 (Cont) CircleEvent(c2) Q={} Disappearing arc: p2 T ={p1,p2,p4,p2,p3,p1} D={e1,e2,v1,e3,e4,v2=, e5= } 

33 Case 4 (Cont) Finally, D={e1,e2,v1,e3,v2,e3,e4,e5}

34 Case 5 SiteEvent(p1) Q={p2,p3,p4} T ={p1} D={}

35 Case 5 (cont) SiteEvent(p2) Q={p3,p4} Arc above: p1 T ={p1,p2,p1} D={e1= }

36 Case 5 (cont) SiteEvent(p3) Q={p4} Arc above: p1 T ={p1,p3,p1,p2,p1} D={e1,e2= } Detect circle event: c1: → add c1 in Q

37 Case 5 (cont) CircleEvent(c1) Q={p4} Disappearing arc: p1 T ={p1,p3,p1,p2,p1} D={e1,e2,v1=,e3 = } 

38 Case 5 (cont) SiteEvent(p4) Q={} Arc above: p2 T ={p1,p3,p2,p4,p2,p1} D={e1,e2,v1,e3,e4= } Detect circle event: c2: → add c2 in Q

39 Case 5 (cont) CircleEvent(c2) Q={} Disappearing arc: p2 T ={p1,p3,p2,p4,p2,p1} D={e1,e2,v1,e3,e4,v2=,e5= } 

40 Case 5 (cont) Finally, D={e1,e2,v1,e3,e4,v2, e5}

41 Questions  How do I know which one is the arc above? Location above  How to know which arc is disappearing Location above?!  Link between circle event and arc Things in T should be arcs (with a corresponding site)  Degeneracy: 4points on a circle Does it matter?


Download ppt "Voronoi Diagram – Fortune ’ s Algorithm Reporter: GI1 11 號 蔡逸凡 Date: 2004/10/28 Reference: Computational Geometry ch7 ISBN: 3-540-65620-0."

Similar presentations


Ads by Google