another questions re: vert(hom(p, q))

General discussion on polymake goes here.

Moderator: Moderators

Jack Love
Posts: 6
Joined: 13 Nov 2012, 23:44

another questions re: vert(hom(p, q))

Postby Jack Love » 27 Dec 2012, 00:03

Can polymake express a vertex map of hom(p, q) explicitly as a map, i.e., as a linear-map-matrix and a shift vector?

Thank you!

User avatar
joswig
Main Author
Posts: 224
Joined: 24 Dec 2010, 11:10

Re: another questions re: vert(hom(p, q))

Postby joswig » 16 Jun 2019, 13:29

Each point in the mapping polytope/Hom-polytope is encoded as the constant 1 (for homogenization) plus a matrix encoded as consecutive row vectors.
That matrix encodes a projective transformation (yielding affine coordinates, however), such that it can be applied to points in the polytope corresponding to the first argument directly.

Here is a use case (which will become part of the interactive help in the next polymake release):
Let us look at the mapping polytope of the unit interval and the standard unimodular triangle.

Code: Select all

> $I=simplex(1); $T=simplex(2); $Hom_IT=mapping_polytope($I,$T);
The dimension equals (dim I + 1) * dim T.

Code: Select all

> print $Hom_IT->DIM 4 > print rows_labeled($Hom_IT->FACETS,$Hom_IT->FACET_LABELS); v0*F0:0 1 0 0 0 v0*F1:0 0 0 1 0 v0*F2:1 -1 0 -1 0 v1*F0:0 1 1 0 0 v1*F1:0 0 0 1 1 v1*F2:1 -1 -1 -1 -1 > print $Hom_IT->N_VERTICES; 9
This is how to turn, e.g., the first vertex into a linear map.

Code: Select all

> $v=$Hom_IT->VERTICES->[0]; > $M=new Matrix([$v->slice([1..2]),$v->slice([3..4])]); > print $I->VERTICES * transpose($M); 0 0 1 0
The above are coordinates in R^2, without the homogenization commonly used in polymake.


Return to “General Discussion”

cron