File Exchange

image thumbnail

Intersection point of lines in 3D space

version 1.0 (1.58 KB) by

Finding intersection point of lines in 3D space (two or more lines).

17 Downloads

Updated

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

Comments and Ratings (4)

Ziwei Zhao

Great code

Jamie Heather

Good compact & efficient piece of code - thanks!

Tianhan

Thank you for the implementation!

Alan Jennings

Alan Jennings (view profile)

Works great. Thanks for adding it up.

MATLAB Release
MATLAB 7.14 (R2012a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video