Pick's Theorem
For any polygon with vertices on grid points, Area = I + B/2 − 1, where I is the number of interior grid points and B the number on the boundary. Pick a shape and count.
Interior points (green) I = 25, boundary points (amber) B = 24. Pick’s formula gives I + B/2 − 1 = 36.0, matching the actual area 36.0.
Pick’s theorem: for a polygon whose vertices are lattice points, Area = I + B/2 − 1, where I counts interior grid points and B counts boundary grid points. Try the different shapes and watch both sides match.
What you are seeing
Count the grid points strictly inside the polygon: that is I.
Count the grid points on the boundary: that is B.
Then Area = I + B/2 − 1 matches the true area.
Why it matters
Pick’s theorem turns area into simple counting and links geometry with combinatorics on the integer lattice.
Complexity & details
Counting is O(grid area); boundary via gcd is O(edges).
Frequently asked questions
Does it need a lattice polygon?+
Yes — every vertex must be a grid point, otherwise the formula does not apply.