| LIB "polymake.lib";
// the lattice polygon spanned by the points (0,0), (3,0) and (0,3)
// with all integer points as markings
list polygon=intvec(1,1),intvec(3,0),intvec(2,0),intvec(1,0),
intvec(0,0),intvec(2,1),intvec(0,1),intvec(1,2),
intvec(0,2),intvec(0,3);
// split the polygon in its vertices, its facets and its interior points
list sp=splitPolygon(polygon);
// the vertices
sp[1];
==> [1]:
==> [1]:
==> 3,0
==> [2]:
==> 2
==> [2]:
==> [1]:
==> 0,0
==> [2]:
==> 5
==> [3]:
==> [1]:
==> 0,3
==> [2]:
==> 10
// the points on facets which are not vertices
sp[2];
==> [1]:
==> [1]:
==> [1]:
==> 2,0
==> [2]:
==> 3
==> [2]:
==> [1]:
==> 1,0
==> [2]:
==> 4
==> [2]:
==> [1]:
==> [1]:
==> 0,1
==> [2]:
==> 7
==> [2]:
==> [1]:
==> 0,2
==> [2]:
==> 9
==> [3]:
==> [1]:
==> [1]:
==> 1,2
==> [2]:
==> 8
==> [2]:
==> [1]:
==> 2,1
==> [2]:
==> 6
// the interior points
sp[3];
==> [1]:
==> [1]:
==> 1,1
==> [2]:
==> 1
|