Singular Manual: picksFormula

| #### D.13.4.9 picksFormula Procedure from library `polymake.lib` (see polymake_lib). Usage: picksFormula(polygon); polygon list Assume: polygon is a list of integer vectors in the plane and consider their convex hull C Return: list, L of three integersthe L[1] : the lattice area of C, i.e. twice the Euclidean area L[2] : the number of lattice points on the boundary of C L[3] : the number of interior lattice points of C Note: the integers in L are related by Pick's formula, namely: L[1]=L[2]+2*L[3]-2 Example:
    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;

User manual for Singular version 4.4.1, 2025, generated by texi2html.