You are given two straight line segments, each defined by the coordinates of its endpoints. Segment AB goes from (Ax,Ay) to (Bx,By) and segment CD - from (Cx,Cy) to (Dx,Dy).
How would you determine if the two line segments intersect?
(Assume that you can't just draw the lines and see)
I note that if a pair of lines are to intersect, then there endpoints must lie on the 'circumference' of an ellipse.
Without wanting to know the exact point of intersection, is there a property of ellipses (and circles) that can be employed here?
Levi is only asking "How would you determine if the two line segments intersect? ", nothing else seems to be required.
|
Posted by brianjn
on 2003-07-07 19:56:42 |