Line Intersection
Where two segments meet is decided by orientations, then the point by cross-product ratios.
Decision · step 2 of 6Plane Geometry: Two segments that cross
orient(A, B, C) = 1: C is to the left of the line through A and B.
What you will see
The intersection point is dropped where the lines meet.
Cost
| Best | O(1) |
|---|---|
| Average | O(1) |
| Worst | O(1) |
| Space | O(1) |
How you work with it here
play it through, step one change at a time, scrub to any step, run it on your own input, try operations in any order.
Screen readers: Points announce coordinates and role; each step announces the geometric test and its result in words (left turn, intersects).
Reduced motion: Shapes appear in place; the sweep line jumps between events.
Before this
Taught by the same lesson
Plane Geometry covers these too, in the same run.