PICK’S THEOREM area from dots — count interior and boundary lattice points
A small miracle of lattice geometry. Pick’s theorem (1899) gives the area of any polygon with integer-coordinate vertices by counting dots: A = I + B/2 − 1, where I is the number of lattice points strictly inside and B the number on the boundary. No coordinates in the formula — just counts. The boundary count is a sum of gcd(|Δx|, |Δy|) over the edges; the interior then follows. For the triangle (0,0),(4,0),(0,4): area 8 (by shoelace), boundary 12, so interior is exactly 3 — and Pick checks. Area and dot-counts, bound by one clean equation.
THE TECHNIQUE A = I + B/2 − 1 — area from interior + boundary lattice points
The demo takes the triangle (0,0),(4,0),(0,4): area 8, boundary 12, interior 3 — and confirms Pick’s theorem: live demo
HISTORY & CREDIT Georg Pick · 1899
“Area is a continuous quantity.” — for a lattice polygon it equals a count of interior and boundary dots, exactly. cited
the formula · A = I + B/2 − 1 — interior dots, half the boundary dots, minus one. the boundary · B = ∑ gcd(|Δx|,|Δy|) over the edges — lattice points per edge. 1899 · Georg Alexander Pick — area as a dot-count, exact for lattice polygons.
A polygon’s area equal to a count of the dots it holds — continuous geometry pinned to integers. theorem
RECOMMEND FOR I-13 area from dots, on the compiler
On the canonical compiler, the triangle has area 8, boundary 12, interior 3 — and I + B/2 − 1 = 8:
$ i13 run cg_pickstheorem.i13 # A = I + B/2 - 1
RUN OK · 110 step(s) · peak stack 4 · call depth 2
area = 8 -- by shoelace
B = 12 -- boundary dots (sum of gcd per edge)
Interior = 3
picks_check = 1 -- 3 + 12/2 - 1 = 8
Recommend as a keeper shot, then NULL — the batch’s most beautiful bid. Pick’s theorem is a startling bridge: a continuous area equals a discrete dot-count. One could reach for a “discrete-continuous duality” axis. But it is a theorem — a proven identity every lattice polygon obeys (B39), coextensive with the area, not a mechanism a keeper enacts. i13 confirms it (3 + 6 − 1 = 8). NULL by B39 — and the loveliest fact in the batch, on dart 500.