Graphics Reference
In-Depth Information
Figure 3.23 First steps of the Quickhull algorithm. Top left: the four extreme points (on the
bounding box of the point set) are located. Top right: all points inside the region formed by
those points are deleted, as they cannot be on the hull. Bottom left: for each edge of the
region, the point farthest away from the edge is located. Bottom right: all points inside the
triangular regions so formed are deleted, and at this point the algorithm proceeds recursively
by locating the points farthest from the edges of these triangle regions, and so on.
endpoints of the edge, these new points form a triangular region. Just as before, any
points located inside this region cannot be on the hull and can be discarded (Figure
3.23, bottom right). The procedure now recursively repeats the same procedure for
each new edge that was added to the hull, terminating the recursion when no points
lie outside the edges.
Although the preceding paragraph completes the overall algorithm description,
two minor complications must be addressed in a robust implementation. The first
complication is that the initial hull approximation may not always be a quadrilateral.
If an extreme point lies, say, in the bottom left-hand corner, the initial shape may
instead be a triangle. If another extreme point lies in the top right-hand corner,
it may be a degenerate hull, consisting of only two points. To avoid problems, an
implementation must be written to handle an initial hull approximation of a variable
number of edges. The second complication is that there might not be a single unique
Search WWH ::




Custom Search