Question: How to find the shortest path between two different points under restriction?

Let the points M_1(-2,3,-4), M_2(4,-1,3) and the two straight lines l_1: x=-t+3,y= 2t-4,z= t+2 , l_2: x=s+4, y= 2s, z= 2s-1 be given. How to find the shortest path from M_1 to M_2 of the form M_1 - A -B - M_2 or M_1 -C - E - M_2, where A belongs to l_1, B belongs to l_2, C belongs to l_2, and E belongs to l_1? In other words, what is the shortest path between M_1 and M_2 which intersects with l_1 and l_2? How to find it with Maple?

Please Wait...