Skip to content

Main content

Affine Axis Basis Image

Affine six-coefficient layout [a,b,c,d,e,f] maps x,y to a*x+c*y+e,b*x+d*y+f; expose origin image and linear basis-vector images separately, avoiding translation contamination of displacement axes.

Loading tool…

Description

Expose origin image and linear basis-vector images separately, avoiding translation contamination of displacement axes.

A planar affine transform combines a linear map and translation. This family stores [a,b,c,d,e,f], mapping [x,y] to [a×x+c×y+e,b×x+d×y+f]. Positions include translation; displacements use only the linear block, and normal covectors use its inverse transpose. Composition order changes the result.

Expose origin image and linear basis-vector images separately, avoiding translation contamination of displacement axes.

When to use this tool

Use this tool to expose origin image and linear basis-vector images separately, avoiding translation contamination of displacement axes.

How to use the tool and how it works

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

Return origin=[e,f], xBasis=[a,b] and yBasis=[c,d]. The basis entries are images of displacement unit vectors, separated from the translated origin.1

Input fieldMeaning and unitsAccepted input
matrixSix finite coefficients [a,b,c,d,e,f] in the mapping defined above.Dense list of at most 128 finite numbers, subject to the stated integer/shape rules.
Output fieldInterpretation
resultObject containing the fields below.
result.originTranslation [e,f], the image of [0,0].
result.xBasisLinear image [a,b] of x-axis unit displacement.
result.yBasisLinear image [c,d] of y-axis unit displacement.
json
{
  "input": {
    "matrix": [
      2,
      0,
      0,
      3,
      4,
      5
    ]
  },
  "output": {
    "result": {
      "origin": [
        4,
        5
      ],
      "xBasis": [
        2,
        0
      ],
      "yBasis": [
        0,
        3
      ]
    }
  }
}

Limitations and assumptions

  • The basis vectors are not absolute transformed points [1,0] and [0,1]; add origin for those positions.
  • Matrices have six finite coefficients. Point/vector inputs have two components within ±1,000,000,000; rectangle bounds are likewise bounded and ordered. Coordinate units and axis directions are caller-defined. No conditioning threshold is inferred for inversion.
  • 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

Check coefficient layout and application order when exchanging matrices. Use point, displacement or normal operations according to the quantity being transformed, and a separate conditioning analysis for numerically sensitive inverses.

References

  1. Tool behavior and example: Affine Axis Basis Image — tool.io

Similar or alternative tools