Pick’s Theorem — lattice polygon

What this is?

A simple polygon whose vertices are all integer lattice points. We draw the true integer lattice (grid lines at every integer x and y), compute the polygon area by the shoelace formula, count lattice points on the boundary and inside, and verify Pick’s Theorem: Area = Interior + Boundary/2 − 1.

Answer — drawing

Reason

  1. Area. With vertices (x₀,y₀), …, (xₙ₋₁,yₙ₋₁) in order, A = ½ · |Σ (xᵢyᵢ₊₁ − xᵢ₊₁yᵢ)|.
  2. Boundary lattice points. An edge with Δx, Δy contains gcd(|Δx|,|Δy|) lattice points when endpoints are counted once overall. Summing over edges gives B.
  3. Pick’s Theorem. A = I + B/2 − 1 where I is the number of interior lattice points and B the number on the boundary.

Check

    Vertices are highlighted as small blue squares; boundary lattice points as blue dots; interior lattice points as green dots.