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

# vertices -- displays the vertices of a Polyhedron or a PolyhedralComplex

- Usage:
    `V = vertices P`
- Inputs:
  - P, a convex polyhedron, or an instance of the type PolyhedralComplex
- Outputs:
  - V, a matrix

## Description

vertices returns the vertices of the Polyhedron or PolyhedralComplex P as the columns of the Matrix V.

Please see V- and H-representation on the conventions we use for cones and polyhedra.

    i1 : P = polyhedronFromHData(matrix{{1,-1},{0,-1},{-1,-1},{0,1}}, matrix{{0},{-1},{0},{1}})

    o1 = P

    o1 : Polyhedron

    i2 : vertices P

    o2 = | -1 1 |
         | 1  1 |

                  2       2
    o2 : Matrix QQ  <-- QQ

    i3 : PC = skeleton(2,polyhedralComplex hypercube 3)

    o3 = PC

    o3 : PolyhedralComplex

    i4 : vertices PC

    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 |

                  3       8
    o4 : Matrix QQ  <-- QQ

## Ways to use vertices:

- `vertices(PolyhedralComplex)`
- `vertices(Polyhedron)`

## For the programmer

The object vertices is a method function.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Polyhedra/documentation/old_documentation.m2:1033:0.