Skip to content

Main content

Polygon Edge Orientation Table

Report directed polygon edge displacements and radian orientations; zero edges have null direction, and the cycle is implicitly closed.

Loading tool…

Description

Report directed polygon edge displacements and radian orientations; zero edges have null direction, and the cycle is implicitly closed.

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.

Report directed polygon edge displacements and radian orientations; zero edges have null direction, and the cycle is implicitly closed.

When to use this tool

Use this tool to report directed polygon edge displacements and radian orientations; zero edges have null direction, and the cycle is implicitly closed.

How to use the tool and how it works

  1. Enter points using the input definitions below.
  2. Run the operation. Resolve malformed-input errors before interpreting the result.
  3. Read result.edges. Interpret signs, units, ordering and null values using the rules below.

Close the point cycle implicitly and return dx, dy and atan2(dy,dx) for every directed edge. Return angle = null when both displacements are zero.1

Input fieldMeaning and unitsAccepted input
pointsOrdered planar [x,y] points. Polygon operations close the cycle implicitly; polyline operations use adjacent pairs only.Dense list of at most 128 rows of at most 128 finite numbers; the operation’s shape constraints also apply.
Output fieldInterpretation
resultObject containing the fields below.
result.edgesCyclic edge records {index,dx,dy,angle}; angle is radians or null for zero displacement.
json
{
  "input": {
    "points": [
      [
        0,
        0
      ],
      [
        1,
        0
      ],
      [
        0,
        0
      ]
    ]
  },
  "output": {
    "result": {
      "edges": [
        {
          "index": 0,
          "dx": 1,
          "dy": 0,
          "angle": 0
        },
        {
          "index": 1,
          "dx": -1,
          "dy": 0,
          "angle": 3.141592653589793
        },
        {
          "index": 2,
          "dx": 0,
          "dy": 0,
          "angle": null
        }
      ]
    }
  }
}

Limitations and assumptions

  • Angles are radians under the caller’s coordinate-axis convention; no compass direction or screen-y interpretation is imposed.
  • 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

  1. Tool behavior and example: Polygon Edge Orientation Table — tool.io

Similar or alternative tools

  • Polygon Zero Length Edge Audit

    Identify exactly zero-length edges in an implicitly closed polygon coordinate cycle; explicit repeated closure creates a zero closing edge.

  • Three Point Orientation

    Orient three finite planar points by exact floating arithmetic cross-product sign; no adaptive numerical robustness, geographic coordinates or tolerance inference.