The Wayback Machine - https://web.archive.org/web/20131002215728/http://mathworld.wolfram.com/ConvexHull.html

Convex Hull

DOWNLOAD Mathematica Notebook EXPLORE THIS TOPIC IN the MathWorld Classroom
ConvexHull2D

The convex hull of a set of points S in n dimensions is the intersection of all convex sets containing S. For N points p_1, ..., p_N, the convex hull C is then given by the expression

 C={sum_(j=1)^Nlambda_jp_j:lambda_j>=0 for all j and sum_(j=1)^Nlambda_j=1}.

Computing the convex hull is a problem in computational geometry. The indices of the points specifying the convex hull of a set of points in two dimensions is given by the command ConvexHull[pts] in the Mathematica package ComputationalGeometry` . Future versions of Mathematica will support three-dimensional convex hulls. A makeshift package for computing three-dimensional convex hulls in Mathematica has been written by Meeussen and Weisstein.

In d dimensions, the "gift wrapping" algorithm, which has complexity O(n^(|_d/2_|+1)), where |_x_| is the floor function, can be used (Skiena 1997, p. 352). In two and three dimensions, however, specialized algorithms exist with complexity O(nlnn) (Skiena 1997, pp. 351-352). Yao (1981) has proved that any decision-tree algorithm for the two-dimensional case requires quadratic or higher-order tests, and that any algorithm using quadratic tests (which includes all currently known algorithms) cannot be done with lower complexity than O(nlnn). However, it remains an open problem whether better complexity can be obtained using higher-order polynomial tests (Yao 1981). Yao's analysis applies to the hardest cases, where the number of vertices n is equal to the number of vertices in the hull h. In easier cases where h<n, the bound of O(nlnn) can be improved to O(nlnh) (Chan 1996).

O'Rourke (1998) gives a robust two-dimensional implementation as well as an O(n^2) three-dimensional implementation. Qhull works efficiently in 2 to 8 dimensions (Barber et al. 1996).

The dual polyhedron of any non-convex uniform polyhedron is a stellated form of the convex hull of the given polyhedron (Wenninger 1983, pp. 3-4 and 40).

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computable Document Format »

The format that makes Demonstrations (and any information) easy to share and interact with.

STEM initiative »

Programs & resources for educators, schools & students.

Computerbasedmath.org »

Join the initiative for modernizing math education.