Quick_Hull_Top (P; P1, P2): { set of points P, points P1, P2}
Find point with maximum d value >= 0 from line (P1, P2)
- if no point exists with d > 0,
then find one with d=0 that lays between P1 and P2
(use distance between points to determine if between)
--> call it Pmax
if no such point
then add edge (P1, P2) to convex hull
else recurse: {
Quick_Hull_Top(P; P1, Pmax)
Quick_Hull_Top(P; Pmax, P2)
}
P1 = (a point with minimum X coord), P2 = (a point with maximum X coord) Quick_Hull_Top(P; P1, P2) Quick_Hull_Bottom(P; P1, P2)






COSC 3P98 Computer Graphics
Brock University
Dept of Computer Science
Copyright © 2007 Brian J. Ross (Except noted figures).
http://www.cosc.brocku.ca/Offerings/3P98/course/lectures/comp_geom/
Last updated: March 1, 2010