next | previous | forward | backward | up | top | index | toc | Macaulay2 website
SRdeformations :: convHull

convHull -- The convex hull complex.

Synopsis

Description

Returns the convex hull of lattice vectors lying all in the same space. The output has C.isPolytope==true.

If applied to the string fn the result of a previous computation stored via the option file is read from the file fn.

The 0-point has to lie in the convex hull.

i1 : L={vector {1,0,0},vector {-1,0,0},vector {0,1,0},vector {0,-1,0},vector {0,0,1},vector {0,0,-1}}

o1 = {| 1 |, | -1 |, | 0 |, |  0 |, | 0 |, |  0 |}
      | 0 |  |  0 |  | 1 |  | -1 |  | 0 |  |  0 |
      | 0 |  |  0 |  | 0 |  |  0 |  | 1 |  | -1 |

o1 : List
i2 : P=convHull(L)

o2 = 3: y y y y y y  
         0 1 2 3 4 5

o2 : complex of dim 3 embedded in dim 3 (printing facets)
     equidimensional, non-simplicial, F-vector {1, 6, 12, 8, 1}, Euler = 0
i3 : dP=boundaryOfPolytope P

o3 = 2: y y y  y y y  y y y  y y y  y y y  y y y  y y y  y y y  
         0 2 4  1 2 4  0 3 4  1 3 4  0 2 5  1 2 5  0 3 5  1 3 5

o3 : complex of dim 2 embedded in dim 3 (printing facets)
     equidimensional, simplicial, F-vector {1, 6, 12, 8, 0}, Euler = 1

Caveat

This uses the package OldPolyhedra.m2 to compute the facets. Too slow compared to Maple/convex.

If the package ConvexInterface is loaded, then this command calls Maple/Convex. See the corresponding option explained at SRdeformations.

See also

Ways to use convHull :

For the programmer

The object convHull is a method function with options.