Description
Orient three finite planar points by exact floating arithmetic cross-product sign; no adaptive numerical robustness, geographic coordinates or tolerance inference.
Planar geometry operates on two-coordinate Cartesian points and explicit shape boundaries. A closed rectangle includes its edges, while a segment parameter locates a point along a supporting line. Signed cross products, areas and axis gaps preserve orientation or direction information that a magnitude alone would lose.
Orient three finite planar points by exact floating arithmetic cross-product sign; no adaptive numerical robustness, geographic coordinates or tolerance inference.
When to use this tool
Use this tool to orient three finite planar points by exact floating arithmetic cross-product sign; no adaptive numerical robustness, geographic coordinates or tolerance inference.
How to use the tool and how it works
- Enter a, b, c using the input definitions below.
- Run the operation. Resolve malformed-input errors before interpreting the result.
- Read result.cross, result.orientation. Interpret signs, units, ordering and null values using the rules below.
Compute (Bx−Ax)(Cy−Ay)−(By−Ay)(Cx−Ax). Label positive cross as counterclockwise, negative as clockwise, and exact zero as collinear.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| a | First point [x,y]; for segment-pair tools this is the first segment’s start. | Dense list of at most 128 finite numbers, subject to the stated integer/shape rules. |
| b | Second point [x,y]; for segment-pair tools this is the first segment’s end. | Dense list of at most 128 finite numbers, subject to the stated integer/shape rules. |
| c | Third point [x,y]; for segment-pair tools this is the second segment’s start. | Dense list of at most 128 finite numbers, subject to the stated integer/shape rules. |
| Output field | Interpretation |
|---|---|
| result | Object containing the fields below. |
| result.cross | Signed two-dimensional cross product in squared coordinate units. |
| result.orientation | counterclockwise, clockwise or collinear from the exact cross-product sign. |
{
"input": {
"a": [
0,
0
],
"b": [
1,
0
],
"c": [
0,
1
]
},
"output": {
"result": {
"cross": 1,
"orientation": "counterclockwise"
}
}
} Limitations and assumptions
- The labels assume an upward-positive mathematical y axis. This is not an adaptive robust orientation predicate for nearly collinear points.
- Point components and rectangle bounds are finite within ±1,000,000,000. Rectangles use [minX,minY,maxX,maxY] with ordered inclusive bounds. Floating arithmetic is used without an implicit robustness tolerance.
- Every declared top-level input is required and unknown fields are rejected. Ordinary strings are limited to 8,192 UTF-16 code units and lists to 128 entries, with tighter operation-specific bounds where stated. JSON text has bounded nesting and node counts.
- Numeric outputs must be finite and within the absolute safe-integer magnitude; exact larger integers use decimal text. Source positions are zero-based UTF-16 offsets and span ends are exclusive unless a different convention is explicitly stated.
Alternative or Complementary methods
Choose the boundary and coordinate convention explicitly. Use robust geometric predicates or a topology-aware library when near-coincidence, holes, invalid polygons or geographic coordinates matter.
References
Similar or alternative tools
- Polygon Edge Orientation Table
Report directed polygon edge displacements and radian orientations; zero edges have null direction, and the cycle is implicitly closed.
- Point Segment Clamped Nearest Point
Find the clamped nearest point on a nondegenerate planar segment and its Euclidean distance; finite number arithmetic, not a spatial index.