ComputationalGeometry - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Geometry : Computational Geometry : ComputationalGeometry/ConvexHull

ComputationalGeometry

  

ConvexHull

  

compute convex hull of a set of points in n dimensions

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

ConvexHull(points)

ConvexHull(points)

ConvexHull(points,output=volume)

Parameters

points

-

a list of n element lists or an m by n Matrix representing m n-dimensional points

Description

• 

The ConvexHull command computes the convex hull of the set of input points.

• 

If points is a Matrix, then each row of points is treated as a point. If it is a list of lists, then each sublist is a point.

• 

All entries of points must evaluate to floating-point values when evalf is applied. This happens as a preprocessing step.

• 

If the option output=volume is specified, the volume of the convex hull is returned. Note that the volume of a 2-D convex hull is its area.

• 

For 2-D inputs, the command returns a list of integer references into the input points list or Matrix defining the convex hull in counterclockwise order.

• 

For 2-D inputs, the command discards duplicate or collinear points.

• 

For 3-D or higher dimensional inputs, the command returns a list of n element lists; each inner list specifies the vertices of a simplicial facet as integer references.

• 

The maximum allowed dimension is 11.

• 

There is also a ConvexHulls command in the PolyhedralSets package. The Convex Hulls Example Worksheet discusses both commands and the usefulness of each.

Examples

withComputationalGeometry:

xy0,0,0,0,1,0,2,0,0,1,1,1,2,1,0,2,1,2,2,2

xy0,0,0,0,1,0,2,0,0,1,1,1,2,1,0,2,1,2,2,2

(1)

Note that xy contains duplicate and collinear points

ConvexHullxy

1,4,10,8

(2)

Convex hull of the unit cube.

xyz0,0,0,0,0,1,0,1,0,0,1,1,1,0,0,1,0,1,1,1,0,1,1,1

xyz0,0,0,0,0,1,0,1,0,0,1,1,1,0,0,1,0,1,1,1,0,1,1,1

(3)

hConvexHullxyz

h7,3,1,5,7,1,6,5,1,2,6,1,6,7,5,7,6,8,3,4,1,4,2,1,7,4,3,4,7,8,4,6,2,6,4,8

(4)

plots:-displaymapxplottools:−polygonxyzx,h

Convex hull of 50 random points in 3-D.

mLinearAlgebra:-RandomMatrix50,3

(5)

hConvexHullm

h48,20,45,45,2,29,13,39,29,2,13,29,13,2,31,35,13,31,16,45,29,16,48,45,2,24,31,20,24,45,24,2,45,13,40,39,40,13,35,40,47,39,40,35,21,47,40,21,1,47,21,47,1,48,20,1,21,1,20,48,16,5,48,5,47,48,5,16,29,36,20,21,35,36,21,36,35,31,47,6,39,5,6,47,39,6,29,6,5,29,32,24,20,36,32,20,24,32,31,32,36,31

(6)

plots:-displaymapxplottools:−polygonmx,h,axes=none

ConvexHullm,output=volume

4.53480266666666791106

(7)

Compatibility

• 

The ComputationalGeometry[ConvexHull] command was introduced in Maple 2018.

• 

For more information on Maple 2018 changes, see Updates in Maple 2018.

See Also

ComputationalGeometry