| LIB "polymake.lib";
// define a polygon with lattice area 5
list polygon=intvec(1,2),intvec(1,0),intvec(2,0),intvec(1,1),
intvec(2,1),intvec(0,0);
list pick=picksFormula(polygon);
// the lattice area of the polygon is:
pick[1];
// the number of lattice points on the boundary is:
pick[2];
// the number of interior lattice points is:
pick[3];
// the number's are related by Pick's formula:
pick[1]-pick[2]-2*pick[3]+2;
|