This article is from the Puzzles FAQ, by Chris Cole chris@questrel.questrel.com and Matthew Daly mwdaly@pobox.com with numerous contributions by others.
Prove that the area of a triangle formed by three lattice points is integer/2.
geometry/lattice/area.s
The formula for the area is
A = | x1*y2 + x2*y3 + x3*y1 - x1*y3 - x2*y1 - x3*y2 | / 2
If the xi and yi are integers, A is of the form (integer/2)
 
Continue to: