Question: Intersection of line segments

To check the point on the belonging to the segment I use the algorithm shown in the example. This is an example of intersection of the two segments in 2d. (We not check for parallelism.) We find the point of intersection of the corresponding lines and solve the equation f1 with respect to t and f2 with respect to tt. If 0 <= t <= 1, then the point belongs to the first segment, and if 0 <= tt <= 1 then the point belongs to the second segment.
(Similarly we can check point on the belonging to the segment in 3d.)
In the example point belongs to the second segment, but not the first. These segments do not intersect.
Question: Is there a function in Maple to find the intersection of the segments or to check on the belonging segment point, to make shorter?

segments_intersection.mw 

 

Please Wait...