image thumbnail

Intersection point of lines in 3D space

version 1.0.0.0 (1.58 KB) by Anders Eikenes
Finding intersection point of lines in 3D space (two or more lines).

2.7K Downloads

Updated 15 Jun 2012

View License

Finding intersection point of lines in 3D space (two or more lines).
Will return point with the minimum sum of squared distances from point to lines (LSM-method, using pseudoinverse).

% PA : Nx3-matrix containing starting point of N lines
% PB : Nx3-matrix containing end point of N lines
% P_Intersect : Best intersection point of the N lines, in least squares sense.
% distances : Distances from intersection point to the input lines
% Anders Eikenes, 2012

Cite As

Anders Eikenes (2021). Intersection point of lines in 3D space (https://www.mathworks.com/matlabcentral/fileexchange/37192-intersection-point-of-lines-in-3d-space), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2012a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!