Skip to content

Main content

Unit Progress Ping Pong Phase

Map signed continuous progress to a triangular ping-pong phase with period two and explicit branch direction; turning points use the outgoing branch.

Loading tool…

Description

Map signed continuous progress to a triangular ping-pong phase with period two and explicit branch direction; turning points use the outgoing branch.

Easing maps normalized progress to a dimensionless curve value. A slope differentiates that curve with respect to progress, while delay remapping and ping-pong phases change the input coordinate. To turn progress into position or time-dependent velocity, supply the application’s distance scale and duration separately.

Map signed continuous progress to a triangular ping-pong phase with period two and explicit branch direction; turning points use the outgoing branch.

When to use this tool

Use this tool to map signed continuous progress to a triangular ping-pong phase with period two and explicit branch direction; turning points use the outgoing branch.

How to use the tool and how it works

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

Normalize signed progress modulo two to p in [0,2). Return phase = p for p≤1 and 2−p otherwise; direction is +1 for p<1 and −1 otherwise.1

Input fieldMeaning and unitsAccepted input
progressSigned continuous progress coordinate; every two units form a ping-pong period.Finite number satisfying the stated comparisons.
Output fieldInterpretation
resultObject containing the fields below.
result.phaseTriangular normalized phase from 0 through 1.
result.directionOutgoing branch sign: +1 ascending or −1 descending.
json
{
  "input": {
    "progress": 1.25
  },
  "output": {
    "result": {
      "phase": 0.75,
      "direction": -1
    }
  }
}

Limitations and assumptions

  • At phase zero use the outgoing +1 branch; at phase one use the outgoing −1 branch. This samples a triangular phase, not a motion history.
  • Curves ordinarily require normalized input t from 0 through 1; ping-pong and delay-remapping operations instead accept their explicitly stated progress coordinates. Floating-point roundoff remains possible.
  • 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

Choose the curve and parameter convention before combining operations. Use a scheduler or animation engine for playback, and apply the appropriate duration/distance factors when interpreting slopes physically.

References

  1. Tool behavior and example: Unit Progress Ping Pong Phase — tool.io

Similar or alternative tools

  • Unit Progress Delay Remap

    Remap an explicit progress interval into a clamped unit interval; delay/end are finite ordered coordinates, not a scheduler.

  • Unit Cubic In Out Easing Value

    Evaluate Unit Cubic In Out Easing Value on the closed unit domain; deterministic numerical curve arithmetic without animation scheduling.