Segment Intersection
Two segments cross when each straddles the other's line, decided by four orientation tests.
Plane Geometry: Two segments that cross
C and D are on opposite sides of AB (1 vs -1) and A and B on opposite sides of CD (-1 vs 1): the segments cross.
Cost
- Best
- O(1)
- Average
- O(1)
- Worst
- O(1)
- Space
- O(1)
Before this
Leads to
Topics that need this one first.
Taught by the same lesson
Plane Geometry covers these too, in the same run.