 LIB "polymake.lib";
==> Welcome to polymake version
==> Copyright (c) 19972015
==> Ewgenij Gawrilow, Michael Joswig (TU Darmstadt)
==> http://www.polymake.org
ring r=0,(x,y,z),dp;
matrix M[4][1]=1,x,y,z;
poly f=y3+x2+xy+2xz+yz+z2+1;
// the Newton polytope of f is
list gf=groebnerFanP(f);
==> polymake: used package ppl
==> The Parma Polyhedra Library (PPL): A C++ library for convex polyhedra
==> and other numerical abstractions.
==> http://www.cs.unipr.it/ppl/
==>
// the exponent vectors of f are ordered as follows
gf[4];
==> 0,3,0,
==> 2,0,0,
==> 1,1,0,
==> 1,0,1,
==> 0,1,1,
==> 0,0,2,
==> 0,0,0
// the first cone of the groebner fan has the inequalities
gf[1][1][1];
==> 2, 0, 0,
==> 0,3, 0,
==> 0, 0,2
// as a string they look like
gf[1][1][2];
==> [1]:
==> 0 > 2x
==> [2]:
==> 0 > 3y
==> [3]:
==> 0 > 2z
// and it has the extreme rays
print(gf[1][1][3]);
==> 1, 0, 0,
==> 0,1, 0,
==> 0, 0,1
// the linearity space is spanned by
print(gf[2]);
==> 0,0,0
// the vertices of the Newton polytope are:
gf[3][1];
==> 0,0,0,
==> 2,0,0,
==> 0,3,0,
==> 0,0,2
// its dimension is
gf[3][2];
==> 3
// np[3] contains information how the vertices are connected to each other,
// e.g. the 1st vertex is connected to the 2nd, 3rd and 4th vertex
gf[3][3][1];
==> 2,3,4
