All integrable Hamiltonian systems are alike, while each nonintegrable one is nonintegrable in its own way
||const point_t *a,|
|const point_t *b,|
When passed a pair of polygons, specified as arrays of point_t (and their lengths), calculates their area of intersection.
The method of calculation reduces the area integration to a boundary integration using Green's theorem; this is the same principle as is used in the planimeter.
The design of the algorithm and its implementation for GCC is due to Norman Hardy (see Hardy's Cap Lore site for further details).
This implementation in C99 is by J.J. Green.