Home Online Manual
Top
Back: latticeArea
Forward: ellipticNF
FastBack:
FastForward:
Up: polymake_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

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";
==> Welcome to polymake version
==> Copyright (c) 1997-2015
==> Ewgenij Gawrilow, Michael Joswig (TU Darmstadt)
==> http://www.polymake.org
// 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];
==> 5
// the number of lattice points on the boundary is:
pick[2];
==> 5
// the number of interior lattice points is:
pick[3];
==> 1
// the number's are related by Pick's formula:
pick[1]-pick[2]-2*pick[3]+2;
==> 0