Given polytopes P and Q the function computes the cayley sum of P and Q.
i1 : P=convexHull(matrix{{0,1}}); |
i2 : Q=convexHull(matrix{{0,2}}); |
i3 : C=cayley(P,Q) o3 = C o3 : Polyhedron |
i4 : vertices C o4 = | 0 1 0 2 | | 0 0 1 1 | 2 4 o4 : Matrix QQ <--- QQ |
One can also construct the Cayley polytope of order k by specifying the positive integer k.
i5 : C=cayley(P,Q,3) o5 = C o5 : Polyhedron |
i6 : vertices C o6 = | 0 1 0 2 | | 0 0 3 3 | 2 4 o6 : Matrix QQ <--- QQ |
You can also compute the Cayley sum of several polytopes of any order, by placing the polytopes in a list.
i7 : C=cayley({P,Q,Q,P,P},2) o7 = C o7 : Polyhedron |
i8 : vertices C o8 = | 0 1 0 2 0 2 0 1 0 1 | | 0 0 2 2 0 0 0 0 0 0 | | 0 0 0 0 2 2 0 0 0 0 | | 0 0 0 0 0 0 2 2 0 0 | | 0 0 0 0 0 0 0 0 2 2 | 5 10 o8 : Matrix QQ <--- QQ |
The object cayley is a method function.