AlgoScope

Segment Intersection

AlgorithmintermediateGeometry Algorithms

Two segments cross when each straddles the other's line, decided by four orientation tests.

Decision · step 2 of 6Plane Geometry: Two segments that cross
A✓B✓C✓D

orient(A, B, C) = 1: C is to the left of the line through A and B.

Open in the player →or start at step 2

What you will see

Four orientation tests light up in turn; the verdict appears.

How plane geometry works →

Cost

BestO(1)
AverageO(1)
WorstO(1)
SpaceO(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

Leads to

Topics that need this one first.