Skip to content

Main content

Interpolation: Interpolation Grid Cell Fractions Tool

Compute per-axis local coordinates only inside one explicit nondegenerate axis-aligned cell; not a multidimensional interpolant or extrapolator.

Loading tool…

Description

Return (point - lower)/(upper - lower) on each axis.

A point's normalized cell coordinates express its position within each axis interval. Fractions require positive spans and provide weights only after an interpolation rule is chosen.

Return (point - lower)/(upper - lower) on each axis.

When to use this tool

Use Interpolation: Interpolation Grid Cell Fractions when you need unit-cell fractions for aligned coordinates.

How to use the tool and how it works

  1. Enter point, lower, upper. Keep parallel arrays aligned. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read result. Expand result to inspect the returned fields.

Require aligned nonempty point, lower, and upper arrays, with every positive-width interval containing its point coordinate. Return (point - lower)/(upper - lower) on each axis.1

Input fieldMeaning and unitsAccepted input
pointPointRequired. Array of finite number. Implementation limit: 128 items.
lowerLowerRequired. Array of finite number. Implementation limit: 128 items.
upperUpperRequired. Array of finite number. Implementation limit: 128 items.
Output fieldInterpretationReturned shape
resultResultRequired. Object.
result.fractionsFractionsCalculated result member: array.
json
{
  "input": {
    "point": [
      1,
      3
    ],
    "lower": [
      0,
      1
    ],
    "upper": [
      2,
      5
    ]
  },
  "output": {
    "result": {
      "fractions": [
        0.5,
        0.5
      ]
    }
  }
}

Limitations and assumptions

  • This yields unit-cell fractions without corner values or multidimensional interpolation; outside points are rejected.
  • Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Validate the full grid and corner-value layout before using normalized fractions in multidimensional interpolation.

References

  1. Calculation and input contract: interpolation/interpolation-grid-cell-fractions — tool.io

Similar or alternative tools