QuadTree Generator and Distance Graph