change coordinate system to get the path of all intersection points and use Jarvis March to compute the path