| Definitions of Planar
Convex Hull:
|
|
||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||
| A subset S of the plane is called convex if and only if for any pair of points (p,q) belonging to S the line segment pq is completely contained in S. |
|
||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| If all points belonging to S other than p and q lie to the right
of or on the directed line through p to q, then pq is an
edge of convex hull of S.
All edges consist of a complete convex hull.
|
![]() |
||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||
| Fundamental Data Structures
for Planar Convex Hull Computing
|
|||||||||||||||||||||||||||||||||
| Point :
1D Array with dimension of 2 (every element pointing to a coordinate).
|
|
||||||||||||||||||||||||||||||||
| Edge (w/o direction):
1D Array with dimension of 2 (every element pointing to an Point).
|
|||||||||||||||||||||||||||||||||
| Planar Convex Hull (Polygon):
A set of ordered points which specify vertices of the polygon. |
|||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||
| Algorithms
|
|||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||
| Input: A set P of
points in the plane
output: A list of L containing the vertices of CH(P) in clockwise order E<-0
for all points r belonging to P not equal to p or q
|
![]() |
||||||||||||||||||||||||||||||||
Question: How can we sort E to get L efficiently
?
repeat it until the end point of f is the starting point of the first edge. time complexity O(n^2)
|
|
||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||
| Let m be the point with the minimum x-coordinate;
S be the set of points in the plane. Initialize p<-m, q not equal to p. Repeat
output q swap p and q
|
![]() |
||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||
|
h is the number of points on convex hull |
|||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||
| Input: A set P of points
in the plane
output: A list of L containing the vertices of CH(P) in clockwise order Sort the points lexicographically, resulting in a sequence p1,...pn. Put p1,p2 in a list Lupper, with p1 a the first point. for i=3->n
for i=n-2 down to 1
do Delete the middle of the last three points from Llower. Append Llower to Lupper, and call the resulting list L. return L
|
![]() |
||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||
|
![]() |
||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||
| A global problem is divided into (smaller) subproblems.
These subproblems are recursively conquered, or solved, and
their solutions married, or recombined, into a solution for the original
(larger) problem.
|
![]() |
||||||||||||||||||||||||||||||||
| Base case: one point
Combination strategy: see the right figure |
![]() |
||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||
| Analogous to well known divide-conquer method in sorting problem, its time complexity is O(nlogn). | |||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||
| Input: An existing convex hull with h vertices and a newly added
point p.
Output: A new convex hull updated with the new point p. Traveling along the old clockwisely directly convex hull and test every edge, delete the edge that will make a left turn to reach the new point p. Add two new edges from the new point p to the two ends of rest of edges. |
![]() |
||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||
| Degeneracies & Robustness
|
|||||||||||||||||||||||||||||||||
|
Symbolically:
For a floating point computing system with a precision
of 5 digits:
|
||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||
| An Application: Half-Space Intersection | |||||||||||||||||||||||||||||||||
| How to obtain the intersection of half spaces defined by a set
of lines ?
Construct a dual space by mapping a line Ax+By-1=0 into a point(A,B). All lines are mapped into points in the dual space. The half-space intersection corresponds to the convex hull in the dual space. Solve this planar convex hull problem with the methods we just talked about above. Mapping the convex hull back into the primal space to obtain the solution
of the original problem.
|
![]() |
||||||||||||||||||||||||||||||||