|Ah, the linear equation. I'd forgotten about it, silly me. Thanks! I think I can get that to work easily enough even without examples.|
Regarding using multiple lines, that would be the ideal solution (it seems you could do even better by having four lines for each object, one for each corner), but a bit excessive for my purposes.