ConvexHull - Maple Help

PolyhedralSets

 ConvexHull
 convex hull of polyhedral sets

 Calling Sequence ConvexHull(ps1, ps2, ..., psn) ConvexHull(ps1, ps2, ..., psn, method = m)

Parameters

 ps1, ps2, ..., psn - sequence of $n$ polyhedral sets m - (optional) one of hrepresentation (default) or vrepresentation

Description

 • This command computes the convex hull of a sequence of polyhedral sets, returning the result as a new PolyhedralSet.
 • The method = hrepresentation option computes the convex hull using the H-Representation of the polyhedral sets, forming their convex hull by accumulating the sets of relations.
 • The method = vrepresentation option constructs a convex hull using the V-Representation of the polyhedral sets, computing their vertices and rays and combining the results to form a new set.
 • There is also a ConvexHulls command in the ComputationalGeometry package. The Convex Hulls Example Worksheet discusses both commands and the usefulness of each.

Examples

 > $\mathrm{with}\left(\mathrm{PolyhedralSets}\right):$

A dodecahedron can be formed as the convex hull of a tetrahedron and a cube.

 > $\mathrm{tetrahedron}≔\mathrm{PolyhedralSet}\left(\frac{3}{2}\left[\left[1,1,1\right],\left[1,-1,-1\right],\left[-1,1,-1\right],\left[-1,-1,1\right]\right]\right):$$\mathrm{cube}≔\mathrm{ExampleSets}:-\mathrm{Cube}\left(\right):$$\mathrm{Plot}\left(\left[\mathrm{tetrahedron},\mathrm{cube}\right],\mathrm{faceoptions}=\left[\mathrm{transparency}=\left[0.25,0.\right]\right]\right)$
 > $\mathrm{convhull}≔\mathrm{ConvexHull}\left(\mathrm{tetrahedron},\mathrm{cube}\right):$$\mathrm{Plot}\left(\mathrm{convhull}\right)$

The tetrahedron and cube are then subsets of this convex hull.

 > $\mathrm{tetrahedron}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{subset}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{convhull}$
 ${\mathrm{true}}$ (1)
 > $\mathrm{cube}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{subset}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{convhull}$
 ${\mathrm{true}}$ (2)

The convex hull of a triangle with a point gives a tetrahedron.

 > $\mathrm{triangle}≔\mathrm{PolyhedralSet}\left(\left[0\le x,0\le y,x+y\le 1,z=0\right]\right):$$\mathrm{pnt}≔\mathrm{PolyhedralSet}\left(\left[\left[0,0,1\right]\right],\left[x,y,z\right]\right):$$\mathrm{Plot}\left(\left[\mathrm{triangle},\mathrm{pnt}\right],\mathrm{orientation}=\left[-30,70,0\right]\right)$
 > $\mathrm{tetra}≔\mathrm{ConvexHull}\left(\mathrm{pnt},\mathrm{triangle}\right);$$\mathrm{Plot}\left(\mathrm{tetra},\mathrm{orientation}=\left[-30,70,0\right]\right)$
 ${\mathrm{tetra}}{≔}{{}\begin{array}{lll}{\mathrm{Coordinates}}& {:}& \left[{x}{,}{y}{,}{z}\right]\\ {\mathrm{Relations}}& {:}& \left[{-}{z}{\le }{0}{,}{z}{\le }{1}{,}{-}{y}{\le }{0}{,}{-}{x}{\le }{0}{,}{x}{+}{y}{+}{z}{\le }{1}\right]\end{array}$

Compatibility

 • The PolyhedralSets[ConvexHull] command was introduced in Maple 2015.