Macaulay2 » Documentation
Packages » OldPolyhedra :: polyhedra
next | previous | forward | backward | up | index | toc

# polyhedra -- computes all polyhedra of a polyhedral complex of a certain dimension

- Usage:
    `L = polyhedra(d,PC)`
- Inputs:
  - d, an integer, between 0 and the dimension of the polyhedral complex
  - PC, an instance of the type PolyhedralComplex
- Outputs:
  - L, a list

## Description

polyhedra computes the List of all Polyhedra in PC of dimension d.

    i1 : PC = polyhedralComplex hypercube 3

    o1 = {ambient dimension => 3             }
          number of generating polyhedra => 1
          top dimension of the polyhedra => 3

    o1 : PolyhedralComplex

    i2 : L = polyhedra(2,PC)

    o2 = {{ambient dimension => 3           }, {ambient dimension => 3
           dimension of lineality space => 0    dimension of lineality space =>
           dimension of polyhedron => 2         dimension of polyhedron => 2
           number of facets => 4                number of facets => 4
           number of rays => 0                  number of rays => 0
           number of vertices => 4              number of vertices => 4
         ------------------------------------------------------------------------
          }, {ambient dimension => 3           }, {ambient dimension => 3
         0    dimension of lineality space => 0    dimension of lineality space
              dimension of polyhedron => 2         dimension of polyhedron => 2
              number of facets => 4                number of facets => 4
              number of rays => 0                  number of rays => 0
              number of vertices => 4              number of vertices => 4
         ------------------------------------------------------------------------
             }, {ambient dimension => 3           },
         => 0    dimension of lineality space => 0
                 dimension of polyhedron => 2
                 number of facets => 4
                 number of rays => 0
                 number of vertices => 4
         ------------------------------------------------------------------------
         {ambient dimension => 3           }}
          dimension of lineality space => 0
          dimension of polyhedron => 2
          number of facets => 4
          number of rays => 0
          number of vertices => 4

    o2 : List

To actually see the polyhedra of the complex we can look at their vertices, for example:

    i3 : apply(L,vertices)

    o3 = {| -1 -1 -1 -1 |, | 1  1  1  1 |, | -1 1  -1 1  |, | -1 1  -1 1 |, | -1
          | -1 1  -1 1  |  | -1 1  -1 1 |  | -1 -1 -1 -1 |  | 1  1  1  1 |  | -1
          | -1 -1 1  1  |  | -1 -1 1  1 |  | -1 -1 1  1  |  | -1 -1 1  1 |  | -1
         ------------------------------------------------------------------------
         1  -1 1  |, | -1 1  -1 1 |}
         -1 1  1  |  | -1 -1 1  1 |
         -1 -1 -1 |  | 1  1  1  1 |

    o3 : List

## Ways to use polyhedra:

- `polyhedra(ZZ,PolyhedralComplex)`

## For the programmer

The object polyhedra is a method function.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/OldPolyhedra.m2:5208:0.