Algorithm for finding the fewest rectangles to cover a set of rectangles without overlapping

Despite the title to your question, I think you’re actually looking for the minimum dissection into rectangles of a rectilinear polygon. (Jason’s links are about minimum covers by rectangles, which is quite a different problem.) David Eppstein discusses this problem in section 3 of his 2010 survey article Graph-Theoretic Solutions to Computational Geometry Problems, and … Read more

Efficient (and well explained) implementation of a Quadtree for 2D collision detection [closed]

Efficient Quadtrees All right, I’ll take a shot at this. First a teaser to show the results of what I’ll propose involving 20,000 agents (just something I whipped up real quick for this specific question): The GIF has extremely reduced frame rate and significantly lower res to fit the 2 MB maximum for this site. … Read more