Line Segment Intersection:

1. General Case:
a) (p1, q1, p2) and (p1, q1, q2) have different orientations and
b) (p2, q2, p1) and (p2, q2, q1) have different orientations

2. Special Case
a) (p1, q1, p2), (p1, q1, q2), (p2, q2, p1), and (p2, q2, q1) are all collinear and
b) the x-projections of (p1, q1) and (p2, q2) intersect
c) the y-projections of (p1, q1) and (p2, q2) intersect

To solve the problem floyd warshall algorithm is used.



Leave a Reply

Your email address will not be published. Required fields are marked *