Coordinate Plane and Distance Calculation