• @Adam: So to be sure I understand, the inputs are the numbers $x$, $y$, and $k$, and a polygon describing the size and shape of the small object. – usul Jan 12 '13 at 16:49