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)
(In reply to fairly easy
by ben young)
Even if they are not parallel, since they are segments rather than full lines, either might end before reaching the point of intersection of the whole line.
Posted by Charlie
on 2003-07-02 08:24:21