Intersection and distance algorithms implemented.