go ahead... be a heretic | |
PerlMonks |
Re: searching polygons not mergedby LanX (Saint) |
on Oct 27, 2018 at 15:42 UTC ( [id://1224767]=note: print w/replies, xml ) | Need Help?? |
You should describe the format of your polygon data, to avoid us guessing. In general many efficient so called "clipping" algorithms depend on calculating "bounding boxes". This - the smallest surrounding rectangular - allows eliminating many impossible candidates. The rules are:
Thus storing the bounding-boxes in an ordered structure° helps efficiently eliminating impossible combinations. But I suppose you are better off using an already available graphic lib. HTH! :)
Cheers Rolf
update°) see also Spatial_index#Spatial_index and for instance Quadtree
In Section
Seekers of Perl Wisdom
|
|