The.Algorithm.Design.Manual.Springer-Verlag.1998
The.Algorithm.Design.Manual.Springer-Verlag.1998 The.Algorithm.Design.Manual.Springer-Verlag.1998
Convex Hull This trick can also be applied beyond two dimensions, although it loses effectiveness as the dimension increases. ● How do I find the shape of my point set? - Although convex hulls provide a gross measure of shape, any details associated with concavities are lost. For example, the shape of the `G' would be indistinguishable from the shape of the `O'. A more general structure, called alpha-shapes, can be parameterized so as to retain arbitrarily large concavities. Implementations and references on alpha-shapes are included below. The primary convex hull algorithm in the plane is the Graham scan. Graham scan starts with one point p known to be on the convex hull (say the point with lowest x-coordinate) and sorts the rest of the points in angular order around p. Starting with a hull consisting of p and the point with the smallest angle, we proceed counterclockwise around v adding points. If the angle formed by the new point and the last hull edge is less than 180 degrees, we add this new point to the hull. If the angle formed by the new point and the last ``hull'' edge is greater than 180 degrees, then a chain of vertices starting from the last hull edge must be deleted to maintain convexity. The total time is , since the bottleneck is sorting the points around v. The basic Graham scan procedure can also be used to construct a nonself-intersecting (or simple) polygon passing through all the points. Sort the points around v, but instead of testing angles simply connect the points in angular order. Connecting this to v gives a polygon without self-intersection, although it typically has many skinny protrusions. The gift-wrapping algorithm becomes especially simple in two dimensions, since each ``facet'' becomes an edge, each ``edge'' becomes a vertex of the polygon, and the ``breadth-first search'' simply walks around the hull in a clockwise or counterclockwise order. The 2D gift-wrapping, or Jarvis march, algorithm runs in O(n h) time, where h is the number of vertices on the convex hull. I would recommend sticking with Graham scan unless you really know in advance that there cannot be too many vertices on the hull. Implementations: O'Rourke [O'R94] provides a robust implementation of the Graham scan in two dimensions and an implementation of an incremental algorithm for convex hulls in three dimensions. Both are written in C. The latter has been proven capable of solving 10,000-point problems in a few minutes on a modern workstation. See Section . Qhull [BDH97] appears to be the convex hull code of choice for general dimensions (in particular from 2 to about 8 dimensions). It is written in C and can also construct Delaunay triangulations, Voronoi vertices, furthest-site Voronoi vertices, and half-space intersections. Qhull has been widely used in scientific applications and has a well-maintained home page at http://www.geom.umn.edu/software/qhull/. An alternative higher-dimensional convex hull code in ANSI C is Ken Clarkson's Hull, available at file:///E|/BOOK/BOOK4/NODE185.HTM (3 of 5) [19/1/2003 1:31:37]
Convex Hull http://www.cs.att.com/netlib/voronoi/hull.html. It does not appear to be as widely used or actively maintained as Qhull, but it also does alpha-shapes. For an excellent alpha-shapes code, originating from the work of Edelsbrunner and Mucke [EM94], check out http://fiaker.ncsa.uiuc.edu/alpha/. Fukuda's cdd program is the best choice for nonsimplicial polytopes in about 6D and higher. See ftp://ifor13.ethz.ch/pub/fukuda/cdd/. It may be used for computing convex hulls and half-space intersection. XTango (see Section ) provides animations of the Graham scan and Jarvis march algorithms in the plane. A Pascal implementation of Graham scan appears in [MS91]. See Section . C++ implementations of planar convex hulls includes LEDA (see Section ). Algorithm 523 [Edd77] of the Collected Algorithms of the ACM is a Fortran code for planar convex hulls. It is available from Netlib (see Section ). Notes: Constructing planar convex hulls plays a similar role in computational geometry as sorting does in algorithm theory. Like sorting, convex hull is a fundamental problem for which a wide variety of different algorithmic approaches lead to interesting or optimal algorithms. Preparata and Shamos [PS85] give a good exposition of several such algorithms, including quickhull and mergehull, both inspired by the sorting algorithms. In fact, a simple construction involving points on a parabola reduces sorting to convex hull, so the information-theoretic lower bound for sorting implies that planar convex hull requires time to compute. A stronger lower bound is established in [Yao81]. Good expositions of the Graham scan algorithm [Gra72] and the Jarvis march [Jar73] include [CLR90, PS85]. The gift wrapping algorithm was introduced by Chand and Kapur [CK70]. Noteworthy among planar convex hull algorithms is Seidel and Kirkpatrick [KS86], which takes time, where h is the number of hull vertices, which captures the best performance of both Graham scan and gift wrapping and is (theoretically) better in between. Alpha-hulls, introduced in [EKS83], provide a useful notion of the shape of a point set. A generalization to three dimensions, with an implementation, is presented in [EM94]. Reverse-search algorithms for constructing convex hulls are effective in higher dimensions [AF92], although constructions demonstrating the poor performance of convex hull algorithms for nonsimplicial polytopes are presented in [AB95]. Through a clever lifting-map construction [ES86], the problem of building Voronoi diagrams in d-dimensions can be reduced to constructing convex hulls in (d+1)- dimensions. See Section for more details. file:///E|/BOOK/BOOK4/NODE185.HTM (4 of 5) [19/1/2003 1:31:37]
- Page 511 and 512: Planarity Detection and Embedding p
- Page 513 and 514: Graph Problems: Hard Problems ● C
- Page 515 and 516: Clique approximate even to within a
- Page 517 and 518: Independent Set Next: Vertex Cover
- Page 519 and 520: Independent Set Related Problems: C
- Page 521 and 522: Vertex Cover Vertex cover and indep
- Page 523 and 524: Traveling Salesman Problem Next: Ha
- Page 525 and 526: Traveling Salesman Problem practice
- Page 527 and 528: Traveling Salesman Problem Size is
- Page 529 and 530: Hamiltonian Cycle Eulerian cycle, p
- Page 531 and 532: Graph Partition Next: Vertex Colori
- Page 533 and 534: Graph Partition annealing, is almos
- Page 535 and 536: Vertex Coloring Several special cas
- Page 537 and 538: Vertex Coloring Notes: An excellent
- Page 539 and 540: Edge Coloring The minimum number of
- Page 541 and 542: Graph Isomorphism Next: Steiner Tre
- Page 543 and 544: Graph Isomorphism vertices into equ
- Page 545 and 546: Steiner Tree Next: Feedback Edge/Ve
- Page 547 and 548: Steiner Tree The worst case for a m
- Page 549 and 550: Feedback Edge/Vertex Set Next: Comp
- Page 551 and 552: Feedback Edge/Vertex Set An interes
- Page 553 and 554: Computational Geometry complete bib
- Page 555 and 556: Robust Geometric Primitives Next: C
- Page 557 and 558: Robust Geometric Primitives ● Are
- Page 559 and 560: Robust Geometric Primitives Related
- Page 561: Convex Hull ● How many dimensions
- Page 565 and 566: Triangulation Next: Voronoi Diagram
- Page 567 and 568: Triangulation GEOMPACK is a suite o
- Page 569 and 570: Voronoi Diagrams Next: Nearest Neig
- Page 571 and 572: Voronoi Diagrams McDonald's, the ti
- Page 573 and 574: Nearest Neighbor Search Next: Range
- Page 575 and 576: Nearest Neighbor Search Implementat
- Page 577 and 578: Range Search Next: Point Location U
- Page 579 and 580: Range Search subdivisions in C++. I
- Page 581 and 582: Point Location the n edges for inte
- Page 583 and 584: Point Location More recently, there
- Page 585 and 586: Intersection Detection ● Do you w
- Page 587 and 588: Intersection Detection Implementati
- Page 589 and 590: Bin Packing Next: Medial-Axis Trans
- Page 591 and 592: Bin Packing approach for general sh
- Page 593 and 594: Medial-Axis Transformation Next: Po
- Page 595 and 596: Medial-Axis Transformation Implemen
- Page 597 and 598: Polygon Partitioning number of piec
- Page 599 and 600: Simplifying Polygons Next: Shape Si
- Page 601 and 602: Simplifying Polygons vertices and o
- Page 603 and 604: Shape Similarity Next: Motion Plann
- Page 605 and 606: Shape Similarity or how close it is
- Page 607 and 608: Motion Planning There is a wide ran
- Page 609 and 610: Motion Planning often arise in the
- Page 611 and 612: Maintaining Line Arrangements Think
Convex Hull<br />
http://www.cs.att.com/netlib/voronoi/hull.html. It does not appear to be as widely used or actively<br />
maintained as Qhull, but it also does alpha-shapes. For an excellent alpha-shapes code, originating from<br />
the work of Edelsbrunner and Mucke [EM94], check out http://fiaker.ncsa.uiuc.edu/alpha/.<br />
Fukuda's cdd program is the best choice for nonsimplicial polytopes in about 6D and higher. See<br />
ftp://ifor13.ethz.ch/pub/fukuda/cdd/. It may be used for computing convex hulls and half-space<br />
intersection.<br />
XTango (see Section ) provides animations of the Graham scan and Jarvis march algorithms in the<br />
plane.<br />
A Pascal implementation of Graham scan appears in [MS91]. See Section . C++ implementations of<br />
planar convex hulls includes LEDA (see Section ). <strong>Algorithm</strong> 523 [Edd77] of the Collected<br />
<strong>Algorithm</strong>s of the ACM is a Fortran code for planar convex hulls. It is available from Netlib (see Section<br />
).<br />
Notes: Constructing planar convex hulls plays a similar role in computational geometry as sorting does<br />
in algorithm theory. Like sorting, convex hull is a fundamental problem for which a wide variety of<br />
different algorithmic approaches lead to interesting or optimal algorithms. Preparata and Shamos [PS85]<br />
give a good exposition of several such algorithms, including quickhull and mergehull, both inspired by<br />
the sorting algorithms. In fact, a simple construction involving points on a parabola reduces sorting to<br />
convex hull, so the information-theoretic lower bound for sorting implies that planar convex hull requires<br />
time to compute. A stronger lower bound is established in [Yao81].<br />
Good expositions of the Graham scan algorithm [Gra72] and the Jarvis march [Jar73] include [CLR90,<br />
PS85]. <strong>The</strong> gift wrapping algorithm was introduced by Chand and Kapur [CK70]. Noteworthy among<br />
planar convex hull algorithms is Seidel and Kirkpatrick [KS86], which takes time, where h is the<br />
number of hull vertices, which captures the best performance of both Graham scan and gift wrapping and<br />
is (theoretically) better in between.<br />
Alpha-hulls, introduced in [EKS83], provide a useful notion of the shape of a point set. A generalization<br />
to three dimensions, with an implementation, is presented in [EM94].<br />
Reverse-search algorithms for constructing convex hulls are effective in higher dimensions [AF92],<br />
although constructions demonstrating the poor performance of convex hull algorithms for nonsimplicial<br />
polytopes are presented in [AB95]. Through a clever lifting-map construction [ES86], the problem of<br />
building Voronoi diagrams in d-dimensions can be reduced to constructing convex hulls in (d+1)-<br />
dimensions. See Section for more details.<br />
file:///E|/BOOK/BOOK4/NODE185.HTM (4 of 5) [19/1/2003 1:31:37]