quadtree and Hoppes method for 2d