Upload
elaine-weekes
View
218
Download
1
Embed Size (px)
Citation preview
Voronoi Diagram – Fortune’s Algorithm
Reporter: GI1 11 號 蔡逸凡Date: 2004/10/28Reference: Computational Geometry ch7 ISBN: 3-540-65620-0
Fortune’s Algorithm (summary)HandleSiteEvent(pi)1. Search T for arc directly ab
ove pi; delete circle events associated with this arc
2. Add arc of pi into T (with two new break points <pi,pj>,<pj,pi>)
3. [DCEL] edge between <pi,pj>
4. Detect circle events where the new arc is the left arc in a triple of consecutive arcs
HandleCircleEvent(pl)1. Delete disappearing arc fro
m 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 TextbookThese can be ignored if using simplified T
These can be ignored if using simplified T
Case 1 (Cont)SiteEvent(p2)
Q={p3}
Arc above: p1
T ={p1,p2,p1}
D={e1=<p2,p1>
}
The arcs in T (bottom to
top)
Here two p1 represents different
segments of the arc!
Case 1 (Cont)SiteEvent (p3)Q={}Arc above: p1T ={p1,p2,p1,p3,p1}D={e1,e2=<p1,p3>} Detect circle event:c1:<p2,p1,p3>→ add c1 in Q
Case 1 (Cont)
CircleEvent (c1)Q={}Disappearing arc: p1T ={p1,p2,p1,p3,p1}D={e1,e2,v=<p2,p1,p3>, e3=<p2,p3>}
Case 2 (Cont)
SiteEvent(p3)
Q={p4}
Arc above: p1
T ={p1,p3,p1,p2,p1}
D={e1,e2=<p3,p1>}
Detect circle event:
c1:<p3,p1,p2>
→ add c1 in Q={p4,c1}
Make a note that c1 is due to <p3,p1,p2>
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=<p1,p4>}
Detect circle event:
<p3p1p4>c2,<p4p1p2>c3
Case 2 (Cont)
CircleEvent(c2)
Q={c3}
Disappearing arc: p1
T ={p1,p3,p1,p4,p1,p2,p1}
D={e1,e2,e3,v1=<p3p1p4>,
e4=<p3,p4>}
Case 2 (Cont)
CircleEvent(c3)
Q={}
Disappearing arc: p1
T ={p1,p3,p4,p1,p2,p1}
D={e1,e2,e3,v1,e4,v2=<p4p1p2
>, e5=<p4,p2> }
Case 3 (cont)SiteEvent (p3)Q={p4}Arc above: p1T ={p1,p2,p1,p3,p1}D={e1,e2=<p1,p3>}Circle event <p2,p1,p3>c1Q={p4,c1}
Case 3 (cont)SiteEvent (p4)Q={c1}Arc above:p3; remove c1T ={p1,p2,p1,p3,p4,p3,p1}D={e1,e2,e3=<p3,p4>}Circle event <p1,p3,p4>c2 Q={c2}
Case 3 (cont)
CircleEvent (c2)Q={}Disappearing arc p3T ={p1,p2,p1,p3,p4,p3,p1}D={e1,e2,e3,v1=<p1,p3,p4>,e4=<p1,p4>}Circle event <p2,p1,p4>c3Q={c3}
Case 3 (cont)
CircleEvent (c3)Q={}Disappearing arc p1T ={p1,p2,p1,p4,p3,p1}<p2,p4,p3> circle before sweep lineD={e1,e2,e3,v1,e4,v2=<p2,p1,p4>, e5=<p2,p4>}
Case 4 (Cont)
SiteEvent(p3)
Q={p4}
Arc above: p1
T ={p1,p2,p1,p3,p1}
D={e1,e2=<p1,p3>}
Detect circle event:
c1:<p2,p1,p3>
→ add c1 in Q
Case 4 (Cont)
CircleEvent(c1)
Q={p4}
Disappearing arc: p1
T ={p1,p2,p1,p3,p1}
D={e1,e2,v1=<p2,p1,p3>,e
3=<p2,p3>}
Case 4 (Cont)
SiteEvent(p4)
Q={}
Arc directly above: p2
T ={p1,p2,p4,p2,p3,p1}
Circle event <p4,p2,p3>c2
D={e1,e2,v1,e3,e4=<p2,p4>
}
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=<p4p2p3>, e5=<p4,p3>}
Case 5 (cont)
SiteEvent(p3)
Q={p4}
Arc above: p1
T ={p1,p3,p1,p2,p1}
D={e1,e2=<p1,p3>}
Detect circle event:
c1:<p3,p1,p2>
→ add c1 in Q
Case 5 (cont)
CircleEvent(c1)
Q={p4}
Disappearing arc: p1
T ={p1,p3,p1,p2,p1}
D={e1,e2,v1=<p3,p1,p2>,e3
=<p3,p2>}
Case 5 (cont)
SiteEvent(p4)
Q={}
Arc above: p2
T ={p1,p3,p2,p4,p2,p1}
D={e1,e2,v1,e3,e4=<p2,p4>}
Detect circle event:
c2:<p3,p2,p4>
→ 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=<p3,p
2,p4>,e5=<p3,p4>}