# Singular          #### D.13.2.7 splitPolygon

Procedure from library `polymake.lib` (see polymake_lib).

Usage:
splitPolygon (markings); markings list

Assume:
markings is a list of integer vectors representing lattice points in the plane which we consider as the marked points of the convex lattice polytope spanned by them

Purpose:
split the marked points in the vertices, the points on the facets which are not vertices, and the interior points

Return:
list, L consisting of three lists
L : represents the vertices the polygon ordered clockwise
L[i] = intvec, the coordinates of the ith vertex
L[i] = int, the position of L[i] in markings
L[i] : represents the lattice points on the facet of the polygon with endpoints L[i] and L[i+1]
(i considered modulo size(L))
L[i][j] = intvec, the coordinates of the jth lattice point on that facet
L[i][j] = int, the position of L[i][j] in markings
L : represents the interior lattice points of the polygon
L[i] = intvec, coordinates of ith interior point
L[i] = int, the position of L[i] in markings

Example:
 ```LIB "polymake.lib"; ==> Welcome to polymake version ==> Copyright (c) 1997-2015 ==> Ewgenij Gawrilow, Michael Joswig (TU Darmstadt) ==> http://www.polymake.org // 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; ==> : ==> : ==> 3,0 ==> : ==> 2 ==> : ==> : ==> 0,0 ==> : ==> 5 ==> : ==> : ==> 0,3 ==> : ==> 10 // the points on facets which are not vertices sp; ==> : ==> : ==> : ==> 2,0 ==> : ==> 3 ==> : ==> : ==> 1,0 ==> : ==> 4 ==> : ==> : ==> : ==> 0,1 ==> : ==> 7 ==> : ==> : ==> 0,2 ==> : ==> 9 ==> : ==> : ==> : ==> 1,2 ==> : ==> 8 ==> : ==> : ==> 2,1 ==> : ==> 6 // the interior points sp; ==> : ==> : ==> 1,1 ==> : ==> 1 ```

### Misc 