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

## 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:

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

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

From the Textbook These can be ignored if using simplified T

From the Textbook

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

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

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!

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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}

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}

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} 

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= } 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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