Something similar was discussed on PerlMonks in 2001: Line intersection, scaled to thousands of points.
That article contained a link to a
downloadable chapter from
"Mastering Algorithms with Perl"
called
Geometric Algorithms.
Look for the "bounding_box_intersect" subroutine.
Searching CPAN, I found a package that might do the trick: Math-Geometry-Planar, which has a routine "GpcClip" which can find the intersection of two polygons.
In reply to Re: Checking if squares intersect
by gmargo
in thread Checking if squares intersect
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |