Page 1 of 1

Computing the coordinates of the Vertices_in_facets ?

Posted: 26 Nov 2019, 20:58
by Lai
Hello,

I am quite new to both polymake and programming and my question is this:

I have a 6 dimensional polytope with 48 vertices, and I am interested in computing the vertices that are contained in each facet. I was able to use the VERTICES_IN_FACETS command which is great, however I would love to have the vertices in terms of their coordinates instead of indexed by an integer label.

Is it possible to do this with a polymake command?

Thank you very much!

Re: Computing the coordinates of the Vertices_in_facets ?

Posted: 26 Nov 2019, 21:51
by gawrilow
Numbers in VERTICES_IN_FACETS refer to the rows of VERTICES matrix.
You can do something like this:

Code: Select all

# $p is the Polytope object for my $i (0 .. $p->N_FACETS-1) { print "facet $i contains vertices:\n", $p->VERTICES->minor($p->VERTICES_IN_FACETS->row($i), All), "\n"; }

Re: Computing the coordinates of the Vertices_in_facets ?

Posted: 26 Nov 2019, 22:39
by Lai
Thank you very much, it worked wonderfully.