Search Ctrl K
Home / Tools
THE FEUTEX TOOLKIT

Shortest Distance Between Skew Lines

Find separation between two nonparallel 3D lines using their origins and direction vectors.

Geometry workspace● Runs in your browser
01 Your input
02 Your result
View or copy raw result data
FormulaDistance = abs(dx*(uy*vz-uz*vy)+dy*(uz*vx-ux*vz)+dz*(ux*vy-uy*vx))/hypot(uy*vz-uz*vy,uz*vx-ux*vz,ux*vy-uy*vx)
Sources and model references

Made for real tasks

  • Find separation between two nonparallel 3D lines using their origins and direction vectors.
Explore step-by-step workflows →

Worked example

Inputs

Origin displacement x
0 length
Origin displacement y
0 length
Origin displacement z
3 length
Direction U x
1 number
Direction U y
0 number
Direction U z
0 number
Direction V x
0 number
Direction V y
1 number
Direction V z
0 number

Expected results

Distance
3 length

Load the example in the workspace to reproduce these results. Display rounding does not change the underlying calculation.

How to use this tool

  1. Enter origin displacement x, origin displacement y, origin displacement z, direction u x, direction u y, direction u z, direction v x, direction v y, direction v z.
  2. Use the displayed units and confirm the model assumptions.
  3. Calculate and compare the outputs against your input scenario.

Try this example

{
  "dx": 0,
  "dy": 0,
  "dz": 3,
  "ux": 1,
  "uy": 0,
  "uz": 0,
  "vx": 0,
  "vy": 1,
  "vz": 0
}

Accuracy and scope

Infinite lines; closest points may lie outside any finite segments.

Is my data uploaded?

This tool runs locally in your browser. Input and output are not sent to a processing server. Copy or download your result before leaving the page.