Find Nearest Points on Line Segments

Find Nearest Points on Line Segments

Choose your operating system:

Windows

macOS

Linux

Find closest points between 2 segments.

Target is Kismet Math Library

Find Nearest Points on Line Segments
Segment 1Start
X0
Y 0
Z 0
Segment 1End
X0
Y 0
Z 0
Segment 2Start
X0
Y 0
Z 0
Segment 2End
X0
Y 0
Z 0
Segment 1Point
X0
Y 0
Z 0
Segment 2Point
X0
Y 0
Z 0

Inputs

Segment 1Start
Vector

Start of the 1st segment.

Segment 1End
Vector

End of the 1st segment.

Segment 2Start
Vector

Start of the 2nd segment.

Segment 2End
Vector

End of the 2nd segment.

Outputs

Segment 1Point
Vector

Closest point on segment 1 to segment 2.

Segment 2Point
Vector

Closest point on segment 2 to segment 1.