Physics engine for axis-aligned squares.