Q convex hull gift wrapping start w ith theole lectst

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Mepo y the two co lve p p q p p q p q q p q Merging the left and right subhulls. q CONVEX HULL - Gift Wrapping ✦ Start w ith theole-Lectst e o int onvex Hullaroun d N n ftmour pE: C an d wrap s l p=l l p p p p l F l l p The execution of Jarvis’s March. In other words, if q is the vertex following p, and r is any other input , r is in counter-clockwise HULL e caGift eachrsuppingvertex in lin order. W - n find W a ccessive CONVEX series of O(n) counter-clockwise tests. JarvisMarch(X [1 .. n], Y [1 .. n]): ←1 for i ← 2 to n if X [i] < X [ ] ←i p← rep eat q ←p+1 Make sure p = q for i ← 2 to n if CCW(p, i, q ) q←i next[p] ← q ; pr ev [q ] ← p p←q until p = algorithm sp ends O(n) time for each convex hull vertex, the worst-case ru CONVEXithm is optimal (within aBounant factor), he HULL - Lower const d Our algor proof by reduction from sor ting. let N = (x1 , x2 , . . . xn ) ⊂ IR for all i let pi = (xi , x2 ) i compute C H(P ) P : y = x2 C H(P ) p3 p2 p1 p4 Intro Line-segment intersection Given n line segments, does an...
View Full Document

This note was uploaded on 01/15/2012 for the course COT 5405 taught by Professor Ungor during the Fall '08 term at University of Florida.

Ask a homework question - tutors are online