| LIB "polymake.lib";
ring r=0,(x,y),dp;
// the Newton polygon of the following polynomial
// has precisely one interior point
poly f=x22y11+x19y10+x17y9+x16y9+x12y7+x9y6+x7y5+x2y3;
list polygon=newtonPolytopeLP(f);
// its lattice points are
polygon;
// find its normal form
list nf=ellipticNF(polygon);
// the vertices of the normal form are
nf[1];
// it has been transformed by the unimodular affine transformation A*x+v
// with matrix A
nf[2];
// and translation vector v
nf[3];
// the 3rd lattice point ...
polygon[3];
// ... has been transformed to
nf[4][3];
|