Description
Optionally negate the second when their dot product is negative, blend linearly, require a positive blend norm, and normalize.
Quaternion interpolation represents rotations with unit four-component vectors, where opposite quaternion signs can represent the same orientation. Near-parallel and antipodal cases require explicit branch choices.
Optionally negate the second when their dot product is negative, blend linearly, require a positive blend norm, and normalize.
When to use this tool
Use Interpolation: Quaternion Nlerp Normalization Factor when you need a rotation-interpolation branch or normalization diagnostic.
How to use the tool and how it works
- Enter firstQuaternion, secondQuaternion, fraction, shortestArc. Keep parallel arrays aligned. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
Require two length-four unit quaternions within norm tolerance 1e-10 and fraction in [0, 1]. Optionally negate the second when their dot product is negative, blend linearly, require a positive blend norm, and normalize.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| firstQuaternion | First Quaternion | Required. Array of finite number. Implementation limit: 128 items. |
| secondQuaternion | Second Quaternion | Required. Array of finite number. Implementation limit: 128 items. |
| fraction | Dimensionless fraction under the stated convention. | Required. Finite number. |
| shortestArc | Shortest Arc | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Result | Required. Object. |
| result.normalizationFactor | Positive Euclidean norm of the pre-normalization blend, not its reciprocal. | Calculated result member: number. |
| result.normalized | Normalized | Calculated result member: array. |
| result.secondNegated | Second Negated | Calculated result member: boolean. |
{
"input": {
"firstQuaternion": [
1,
0,
0,
0
],
"secondQuaternion": [
0,
1,
0,
0
],
"fraction": 0.5,
"shortestArc": true
},
"output": {
"result": {
"normalizationFactor": 0.7071067811865476,
"normalized": [
0.7071067811865476,
0.7071067811865476,
0,
0
],
"secondNegated": false
}
}
} Limitations and assumptions
- normalizationFactor is the pre-normalization norm, not its reciprocal; antipodal cancellation without shortest-arc correction is rejected and nlerp is not constant-angular-speed slerp.
- 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 rotation library with an explicit shortest-path and interpolation-speed policy for actual orientation trajectories.
References
Similar or alternative tools
- Slerp Near Parallel Branch Margin
Select linearBranch only for cosine strictly above threshold and return cosine minus threshold as margin.
- Interpolation: Interpolation Grid Cell Fractions
Return (point - lower)/(upper - lower) on each axis.