Overview
The Orientation Test evaluates the sign of a 2D cross product or determinant. The sign tells whether the ordered triple turns counterclockwise, clockwise, or lies on one line.
Determines whether three points make a left turn, right turn, or are collinear.
Compact metadata for implementation and discovery.
The Orientation Test evaluates the sign of a 2D cross product or determinant. The sign tells whether the ordered triple turns counterclockwise, clockwise, or lies on one line.
Quick facts
Runtime and memory behavior at a glance.
Best
O(1)
Average
O(1)
Worst
O(1)
Space
O(1)
sign((bx-ax)*(cy-ay) - (by-ay)*(cx-ax))Determines whether three points make a left turn, right turn, or are collinear.
Show computing the sign of a determinant for three points on a small point orientation example.
Many geometric algorithms are only as reliable as their orientation predicate.
What each reference supports for this entry.
Specific reference for Orientation Test's robust orientation, in-circle, or adaptive geometric predicate behavior.
Open sourceTextbook support for Orientation Test's computational geometry problem family, predicates, structures, or geometric construction.
Open sourceGood next jumps from the relationship graph, ranked for useful discovery.
Geometry · Foundation
Convex hull algorithms use orientation tests to keep or remove candidate turns.
Compare with thisGeometry · Foundation
Segment intersection uses orientation tests to compare endpoint orderings.
Compare with thisSegment intersection uses orientation tests to compare endpoint orderings.
Convex hull algorithms use orientation tests to keep or remove candidate turns.
Adaptive predicates improve robustness for orientation and related geometric tests.