P = convexHull M
P = convexHull(M,N)
P = convexHull(P1,P2)
P = convexHull L
P = convexHull(M,N,W)
Please see V and Hrepresentation on the conventions we use for cones and polyhedra.
convexHull computes the convex hull of the input. In the first two cases it considers the columns of M as a set of points and the columns of N (if given) as a set of rays and computes the polyhedron that is the convex hull of the points plus the rays. The two matrices must have the same number of rows, i.e. the columns must lie in the same ambient space. If N is not given or equal to 0, then the resulting polyhedron is compact and hence a polytope. The points need not be the vertices of the polyhedron. In the third case it computes the convex hull of P1 and P2 if they lie in the same ambient space. Finally, it computes the convex hull of a list L where the list may contain a combination of the following in any order.
Then convexHull computes the convex hull of all inserted objects, if they are in the same ambient space, i.e. all matrices must have the same number of rows, which must equal the ambient dimension of all cones and polyhedra.
For example, consider the square in QQ^2:


If we add a ray, then it is not compact anymore:


If we add some more vertices to M then we get a hexagon:


Again if we add the ray r then the polyhedron is not compact:

To get this polyhedron we could also have used the application of convexHull to lists or pairs of polyhedra:




The object convexHull is a method function.