Affine2d apply

affine2d-apply · version 1.0.0 · Geometry, location & color · free, no key needed

Apply one exact rational 2D affine map to bounded points or free vectors.

Use when you need to: apply affine transform to points · transform 2D rational coordinates · apply affine map to vectors.

Decide before calling

Read the versioned contract and the supported scope below. Reuse affine2d-apply@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 affine2d-apply@1.0.0 for apply affine transform to points. 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:

{
  "transform": {
    "a": "1",
    "b": "0",
    "c": "0",
    "d": "1",
    "tx": "2",
    "ty": "-3"
  },
  "kind": "point",
  "values": [
    {
      "x": "1",
      "y": "1"
    }
  ]
}

Response:

{
  "result": {
    "kind": "point",
    "values": [
      {
        "x": "3",
        "y": "-2"
      }
    ],
    "reference": "Foley et al., Computer Graphics: Principles and Practice, affine transformations (2nd ed., 1990)"
  }
}

How to call it

MCP

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

{
  "id": "affine2d-apply",
  "version": "1.0.0",
  "input": {
    "transform": {
      "a": "1",
      "b": "0",
      "c": "0",
      "d": "1",
      "tx": "2",
      "ty": "-3"
    },
    "kind": "point",
    "values": [
      {
        "x": "1",
        "y": "1"
      }
    ]
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/affine2d-apply/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"transform":{"a":"1","b":"0","c":"0","d":"1","tx":"2","ty":"-3"},"kind":"point","values":[{"x":"1","y":"1"}]}'

The machine-readable contract is at /v1/tools/affine2d-apply/versions/1.0.0.

CLI

node cli.mjs run affine2d-apply 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.