Description
Project a point onto a ray’s supporting line and flag a parameter behind the origin.
A signed distance depends on a chosen normal or axis orientation. Projection parameters, perpendicular distances and reflected signs are different quantities; a nonunit direction introduces a scale into its parameter.
Project a point onto a ray’s supporting line and flag a parameter behind the origin.
When to use this tool
Use Signed Ray Distance Behind Origin Flag when checking a supplied projection, orientation or reflection convention.
How to use the tool and how it works
- Enter point, origin, direction. 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 parameter, behindOrigin. Inspect behindOrigin before interpreting the associated values.
Require equally long nonempty point, origin and direction arrays and a nonzero direction vector. parameter = dot(point-origin,direction)/dot(direction,direction); behindOrigin tests the numerator < 0.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| point | Point | Required. Array of finite number; maximum items 256. |
| origin | Origin | Required. Array of finite number; maximum items 256. |
| direction | Direction | Required. Array of finite number; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| parameter | Supporting-line projection parameter; physical distance only for unit direction. | Required. Finite number. |
| behindOrigin | Behind Origin | Required. Boolean. |
{
"input": {
"point": [
2,
0
],
"origin": [
0,
0
],
"direction": [
1,
0
]
},
"output": {
"parameter": 2,
"behindOrigin": false
}
} Limitations and assumptions
- The parameter is not a physical distance unless direction is unit length. This projects onto the supporting line without clamping to the ray or returning perpendicular distance.
- 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 complete geometric objects and consistent units to compute actual distances, projections or multi-axis reflections.
References
Similar or alternative tools
- Distance: Signed Plane Point Projection Distance
signedDistance = (dot(point,normal)+offset)/norm(normal), for plane normal·x+offset = 0.
- Point To Ray Projection Clamp Gap Tool
Calculate point to ray projection clamp gap from explicit caller-supplied inputs.