Does this question have a solution? I think it's impossible to know if line segments P1Q1 and P2Q2 intersect at all with just the information about their end points Q1 and Q2.
Thanks.
Does this question have a solution? I think it's impossible to know if line segments P1Q1 and P2Q2 intersect at all with just the information about their end points Q1 and Q2.
Thanks.
the x ranges of the two segments as well as the y ranges must intersect.
The condition "if the $(x,y)$ coordinates of their end points is known" almost certainly means that the coordinates of all four end points is known, namely $P_1,Q_1,P_2,Q_2$. In the usual terminology, each line segment has two end points, not a start point and an end point.
So the question as stated definitely has a solution. I wrote a subroutine in Object Pascal to decide that very issue. Let me know if you need details.
If you only know the coordinates of two of the endpoints, then the question does not have a solution.