ideas?
Assume four parameters on the two-dimensional Cartesian space
We have a fixed line segment from the assumed point A to B
We have two other assumed points named C and D, and we want to draw a segment of the line between them (I have nothing to do with drawing it at all).
What model or method or in general algorithm do you know that can detect that the line segment between C and D intersects with the line segment between A and B?
The assumption of the problem is that we have the x and y coordinates of all four points
Get the equations for both lines using two point form, then make both lines equal to each other and solve
Обсуждают сегодня