Description
Return hypot of all dimensions and each dimension divided by it as direction cosines.
Solid-geometry formulas assume particular shapes and measurement directions. Axial height, slant length, filled-volume centroid, and surface centroid are different quantities even when they describe the same object.
Return hypot of all dimensions and each dimension divided by it as direction cosines.
When to use this tool
Use Cuboid Space Diagonal Direction Cosine when you need a local dimension, area, or centroid term for the stated ideal solid.
How to use the tool and how it works
- Enter width, height, depth. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read cosines, diagonal. Use the output convention below.
Require nonnegative width, height, and depth with positive space diagonal. Return hypot of all dimensions and each dimension divided by it as direction cosines.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| width | Width or interval span on the measurement basis above. | Required. Finite number; minimum 0. |
| height | Height in the common length unit and direction stated above. | Required. Finite number; minimum 0. |
| depth | Depth on the common length basis and sign convention above. | Required. Finite number; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| cosines | Cosines | Required. Array of finite number; maximum items 256. |
| diagonal | Diagonal | Required. Finite number. |
{
"input": {
"width": 3,
"height": 4,
"depth": 0
},
"output": {
"cosines": [
0.6,
0.8,
0
],
"diagonal": 5
}
} Limitations and assumptions
- Coordinates use the positive-octant diagonal from the chosen origin; degenerate zero dimensions are allowed and no actual cuboid, orientation, or manufactured tolerances are verified.
- 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 solid model for clipping, oblique shapes, or nonuniform material. Confirm radius, height, and centroid conventions before applying an ideal-shape identity.
References
Similar or alternative tools
- East North Up Vector Azimuth Component
Return atan2(east, north) in degrees wrapped into [0, 360), and hypot(east, north) for horizontalMagnitude.
- East North Up Axis Handedness Token
Count pairwise inversions relative to that order and return rightHanded when the count is even.