Given a polyhedron f which is a face of a polyhedron P the function polarFace computes the polar P' of P and the corresponding face of P' on which all points of f attain their minimum. Note that this function only works correctly for polyhedra with the origin in its relative interior.
i1 : P = hypercube 3 o1 = P o1 : Polyhedron |
i2 : f = first faces(1,P) o2 = ({0, 2, 4, 6}, {}) o2 : Sequence |
i3 : f = convexHull (vertices P)_(f#0) o3 = f o3 : Polyhedron |
i4 : fv = polarFace(f, P) o4 = fv o4 : Polyhedron |
i5 : vertices fv o5 = | 1 | | 0 | | 0 | 3 1 o5 : Matrix QQ <--- QQ |
If f is not a face of another polytope, then it considers f as a face of itself. Thus, it computes the polar of f, and returns the empty polyhedron as a face of the polar of f.
i6 : P = hypercube 3 o6 = P o6 : Polyhedron |
i7 : polarFace(P, P) o7 = Polyhedron{...1...} o7 : Polyhedron |