## project a polytope

Questions and problems about using polymake go here.
chocoffee
Posts: 1
Joined: 28 May 2019, 22:12

### project a polytope

Hi all,
I am trying to get the projection of a given polytope V with new m-dimensional variables y=Ex+f. Here x is the n-dimensional variable vector of the polytope V. E is a m*n matrix. I am wondering if I can get the projection by polymake. Thank you!

gawrilow
Main Author
Posts: 373
Joined: 25 Dec 2010, 17:40

### Re: project a polytope

I guess, all you need is to multiply the vertices of your input polytope with the transformation matrix, isn't it?

Taking care of the 0-th homogeneous coordinate:

Code: Select all

$tr=(1|$f)/(zero_vector<Rational>()|transpose($E));$Vproj=new Polytope<Rational>(POINTS => $V->VERTICES *$tr); 
Replace Rational with an appropriate coordinate type if necessary.

Collars
Posts: 1
Joined: 07 Jun 2019, 12:14

### Re: project a polytope

Does replacing the Rational mess with anything else, Gawrilow?

gawrilow
Main Author
Posts: 373
Joined: 25 Dec 2010, 17:40

### Re: project a polytope

The choice of coordinate data type does not mess with anything, it should just reflect the nature of your input. Rational is the default choice in polymake, and this is appropriate in most standard cases. Float is also supported, but the outcome of many computations is not that reliable because of unavoidable rounding issues. You may try it out if your input is already in floating-point, but you can also switch to Rational, the numbers will be converted automatically.