Cross Product
The 2D cross product is twice the signed area of the triangle; its sign is the turn direction.
Decision · step 2 of 3Plane Geometry: A left turn
cross(AB, AC) = 5 x 5 - 1 x 3 = 22. Positive: C is to the left of the line through A and B, so the path turns left (counter-clockwise). The magnitude, 22, is twice the area of triangle ABC.
What you will see
The parallelogram spanned by two vectors, shaded by sign.
Cost
| 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
Related
Taught by the same lesson
Plane Geometry covers these too, in the same run.