Map two coordinates to angle,distance of corresponding line