Top
Back: oldpolymake_lib
Forward: newtonPolytopeP
FastBack: Tropical Geometry
FastForward: tropical_lib
Up: oldpolymake_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.13.1.1 polymakePolytope

Procedure from library oldpolymake.lib (see oldpolymake_lib).

Usage:
polymakePolytope(polytope[,#]); polytope list, # string

Assume:
each row of polytope gives the coordinates of a lattice point of a polytope with their affine coordinates as given by the output of secondaryPolytope

Purpose:
the procedure calls polymake to compute the vertices of the polytope as well as its dimension and information on its facets

Return:
list L with four entries
L[1] : an integer matrix whose rows are the coordinates of vertices of the polytope
L[2] : the dimension of the polytope
L[3] : a list whose i-th entry explains to which vertices the ith vertex of the Newton polytope is connected
-- i.e. L[3][i] is an integer vector and an entry k in there means that the vertex L[1][i] is connected to the vertex L[1][k]
L[4] : an integer matrix whose rows mulitplied by (1,var(1),...,var(nvar)) give a linear system of equations describing the affine hull of the polytope,
i.e. the smallest affine space containing the polytope

Note:
- for its computations the procedure calls the program polymake by Ewgenij Gawrilow, TU Berlin and Michael Joswig, TU Darmstadt; it therefore is necessary that this program is installed in order to use this procedure;
see http://www.math.tu-berlin.de/polymake/
- note that in the vertex edge graph we have changed the polymake convention which starts indexing its vertices by zero while we start with one !
- the procedure creates the file /tmp/polytope.polymake which contains the polytope in polymake format; if you wish to use this for further computations with polymake, you have to use the procedure polymakeKeepTmpFiles in before
- moreover, the procedure creates the file /tmp/polytope.output which it deletes again before ending
- it is possible to provide an optional second argument a string which then will be used instead of 'polytope' in the name of the polymake output file

Example:
 
LIB "oldpolymake.lib";
// the lattice points of the unit square in the plane
list points=intvec(0,0),intvec(0,1),intvec(1,0),intvec(1,1);
// the secondary polytope of this lattice point configuration is computed
intmat secpoly=secondaryPolytope(points)[1];
list np=polymakePolytope(secpoly);
// the vertices of the secondary polytope are:
np[1];
// its dimension is
np[2];
// np[3] contains information how the vertices are connected to each other,
// e.g. the first vertex (number 0) is connected to the second one
np[3][1];
// the affine hull has the equation
ring r=0,x(1..4),dp;
matrix M[5][1]=1,x(1),x(2),x(3),x(4);
np[4]*M;


Top Back: oldpolymake_lib Forward: newtonPolytopeP FastBack: Tropical Geometry FastForward: tropical_lib Up: oldpolymake_lib Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 3-1-6, Dec 2012, generated by texi2html.