faces -- computes all faces of a certain codimension of a Cone or Polyhedron

Synopsis

• Usage:
L = faces(k,C)
L = faces(k,P)
• Inputs:
• Outputs:
• L, a list, containing the faces of codimension k

Description

faces computes the faces of codimension k of the given Cone or Polyhedron, where k must be between 0 and the dimension of the second argument. The faces will be of the same class as the original convex object.

For example, we can look at the edges of the cyclicPolytope with 5 vertices in 3 space

 i1 : P = cyclicPolytope(3,5) o1 = {ambient dimension => 3 } dimension of lineality space => 0 dimension of polyhedron => 3 number of facets => 6 number of rays => 0 number of vertices => 5 o1 : Polyhedron i2 : L = faces(2,P) o2 = {{ambient dimension => 3 }, {ambient dimension => 3 dimension of lineality space => 0 dimension of lineality space => dimension of polyhedron => 1 dimension of polyhedron => 1 number of facets => 2 number of facets => 2 number of rays => 0 number of rays => 0 number of vertices => 2 number of vertices => 2 ------------------------------------------------------------------------ }, {ambient dimension => 3 }, {ambient dimension => 3 0 dimension of lineality space => 0 dimension of lineality space dimension of polyhedron => 1 dimension of polyhedron => 1 number of facets => 2 number of facets => 2 number of rays => 0 number of rays => 0 number of vertices => 2 number of vertices => 2 ------------------------------------------------------------------------ }, {ambient dimension => 3 }, => 0 dimension of lineality space => 0 dimension of polyhedron => 1 number of facets => 2 number of rays => 0 number of vertices => 2 ------------------------------------------------------------------------ {ambient dimension => 3 }, {ambient dimension => 3 dimension of lineality space => 0 dimension of lineality space => dimension of polyhedron => 1 dimension of polyhedron => 1 number of facets => 2 number of facets => 2 number of rays => 0 number of rays => 0 number of vertices => 2 number of vertices => 2 ------------------------------------------------------------------------ }, {ambient dimension => 3 }, {ambient dimension => 3 0 dimension of lineality space => 0 dimension of lineality space dimension of polyhedron => 1 dimension of polyhedron => 1 number of facets => 2 number of facets => 2 number of rays => 0 number of rays => 0 number of vertices => 2 number of vertices => 2 ------------------------------------------------------------------------ }} => 0 o2 : List

Since this is only a list of polyhedra we look at their vertices:

 i3 : apply(L,vertices) o3 = {| 0 2 |, | 1 2 |, | 0 1 |, | 0 3 |, | 2 3 |, | 3 4 |, | 0 4 |, | 2 | 0 4 | | 1 4 | | 0 1 | | 0 9 | | 4 9 | | 9 16 | | 0 16 | | 4 | 0 8 | | 1 8 | | 0 1 | | 0 27 | | 8 27 | | 27 64 | | 0 64 | | 8 ------------------------------------------------------------------------ 4 |, | 1 4 |} 16 | | 1 16 | 64 | | 1 64 | o3 : List

Ways to use faces :

• "faces(ZZ,Cone)"
• "faces(ZZ,Polyhedron)"

For the programmer

The object faces is .