Polygon measures compute

polygon-measures-compute · version 1.0.0 · Other utilities · free, no key needed

Compute exact signed double-area, area, orientation, and squared edge lengths for a rational simple polygon.

Use when you need to: compute exact polygon area · shoelace formula for rational coordinates · find polygon orientation.

Decide before calling

Read the versioned contract and the supported scope below. Reuse polygon-measures-compute@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.

Explain the choice

"I can use polygon-measures-compute@1.0.0 for compute exact polygon area. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "vertices": [
    {
      "x": "0",
      "y": "0"
    },
    {
      "x": "4",
      "y": "0"
    },
    {
      "x": "0",
      "y": "3"
    }
  ]
}

Response:

{
  "result": {
    "signed_double_area": "12",
    "absolute_area": "6",
    "orientation": "counterclockwise",
    "perimeter_squared_components": [
      "16",
      "25",
      "9"
    ]
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "polygon-measures-compute",
  "version": "1.0.0",
  "input": {
    "vertices": [
      {
        "x": "0",
        "y": "0"
      },
      {
        "x": "4",
        "y": "0"
      },
      {
        "x": "0",
        "y": "3"
      }
    ]
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/polygon-measures-compute/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"vertices":[{"x":"0","y":"0"},{"x":"4","y":"0"},{"x":"0","y":"3"}]}'

The machine-readable contract is at /v1/tools/polygon-measures-compute/versions/1.0.0.

CLI

node cli.mjs run polygon-measures-compute 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.