integrated quadtree partitioning function to speed up rendering