Convex Hull: The "Gift Wrap" Algorithm
acceptable: a quadratic algorithm
The "gift wrap algorithm" has an acceptable efficiency, quadratic order, or O(N2). This means that the algorithm will run 100 times longer (in time) for ten times as many points.
Example: for the point set, find the lowest vertex (or, you could find the highest, rightmost, or leftmost). This vertex must be on the convex hull. Then, find the point which makes the smallest angle to the horizontal drawn through the lowest point, in a counterclockwise direction. This point must also be on the convex hull. Then, continue to find the point which makes the smallest angle with the preceding edge. Continue until you return to the lowest point. These edges constitute the convex hull.
The algorithm is called the "gift wrap" algorithm because it resembles wrapping paper around an arbitrary collection of points, as if they were a strange-shaped package.
There are eight movies: four with 25 points, including one with pauses at important events to ask a question of the viewer or student; two with 50 points; and two with 100 points.
Remember to check the guidelines for the use of these movies.
|
|
|



