Skip to content

Main content

Affine Matrix Chain Prefix Records

Affine six-coefficient layout [a,b,c,d,e,f] maps x,y to a*x+c*y+e,b*x+d*y+f; accumulate transform-chain prefixes in first-then-next order, preserving each composed state without mutating input.

Loading tool…

Description

Accumulate transform-chain prefixes in first-then-next order, preserving each composed state without mutating input.

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.

Accumulate transform-chain prefixes in first-then-next order, preserving each composed state without mutating input.

When to use this tool

Use this tool to accumulate transform-chain prefixes in first-then-next order, preserving each composed state without mutating input.

How to use the tool and how it works

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

Start with identity [1,0,0,1,0,0]. Compose each next matrix after the accumulated transform and return a copied six-coefficient prefix state after every input element.1

Input fieldMeaning and unitsAccepted input
matricesOrdered list of six-coefficient transforms, in application order.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.prefixesAccumulated six-coefficient matrices after each input transform, in application order.
json
{
  "input": {
    "matrices": [
      [
        1,
        0,
        0,
        1,
        1,
        2
      ],
      [
        2,
        0,
        0,
        3,
        0,
        0
      ]
    ]
  },
  "output": {
    "result": {
      "prefixes": [
        [
          1,
          0,
          0,
          1,
          1,
          2
        ],
        [
          2,
          0,
          0,
          3,
          2,
          6
        ]
      ]
    }
  }
}

Limitations and assumptions

  • An empty chain returns no prefixes rather than an extra identity record. Inputs are not mutated.
  • 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 Matrix Chain Prefix Records — tool.io

Similar or alternative tools