Skip to content

Main content

Distance: Periodic Axis Minimum Image Gap Tool

Resolve a periodic-axis displacement to [-period/2,period/2), using the negative representative at exact antipodal ties.

Loading tool…

Description

Return a signed minimum-image gap on one periodic axis.

A periodic coordinate identifies values separated by a whole cycle. Minimum-image gaps require a wrapping interval and an explicit half-cycle tie convention; signed direction and unsigned separation answer different questions.

Return a signed minimum-image gap on one periodic axis.

When to use this tool

Use Distance: Periodic Axis Minimum Image Gap when checking one explicit periodic-coordinate or gap convention.

How to use the tool and how it works

  1. Enter left, right, period. 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.

Return a signed minimum-image gap on one periodic axis. Require period > 0; wrap right-left+period/2, then subtract period/2 to obtain a value in [-period/2,period/2).1

Input fieldMeaning and unitsAccepted input
leftLeftRequired. Finite number.
rightRightRequired. Finite number.
periodPeriodRequired. Finite number.
Output fieldInterpretationReturned shape
resultReturned object; expand its named members below.Required. Object.
result.minimumImageGapSigned wrapped gap in [-period/2,period/2); an exact half-cycle tie is negative.Calculated result member: number.
json
{
  "input": {
    "left": 1,
    "right": 9,
    "period": 10
  },
  "output": {
    "result": {
      "minimumImageGap": -2
    }
  }
}

Limitations and assumptions

  • An exact half-period tie is negative, not positive or direction-unique.
  • 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

Use a complete periodic geometry model when multiple axes, seam-crossing intervals or path winding matter.

References

  1. Calculation and input contract: distance/periodic-axis-minimum-image-gap — tool.io

Similar or alternative tools