in reply to searching polygons not merged
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
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
°) see also Spatial_index#Spatial_index and for instance Quadtree
|
|---|