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

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

Synopsis

Description

polyhedra computes the List of all Polyhedra in PC of dimension d.
i1 : PC = polyhedralComplex hypercube 3

o1 = PC

o1 : PolyhedralComplex
i2 : L = polyhedra(2,PC)

o2 = {({0, 1}, {}), ({0, 2}, {}), ({0, 4}, {}), ({1, 3}, {}), ({1, 5}, {}),
     ------------------------------------------------------------------------
     ({2, 3}, {}), ({2, 6}, {}), ({3, 7}, {}), ({4, 5}, {}), ({4, 6}, {}),
     ------------------------------------------------------------------------
     ({5, 7}, {}), ({6, 7}, {})}

o2 : List

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

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 |

              3       8
o3 : Matrix QQ  <-- QQ
i4 : apply(L, l -> vertPC_(l#0))

o4 = {| -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 |

o4 : List

Ways to use polyhedra :

For the programmer

The object polyhedra is a method function.