quadtree and marching squares