Line-Line Intersection (2d)

Calculate intersection point of two 2d lines specified with 2 points each
1.6K Downloads
Updated 13 Mar 2012

View License

Calculate intersection point of two 2d lines specified with 2 points each
(X1, Y1; X2, Y2; X3, Y3; X4, Y4), while 1&2 and 3&4 specify a line.
Gives back NaN or Inf/-Inf if lines are parallel (= when denominator = 0)
see http://en.wikipedia.org/wiki/Line-line_intersection

Cite As

Sebastian W (2026). Line-Line Intersection (2d) (https://www.mathworks.com/matlabcentral/fileexchange/35606-line-line-intersection-2d), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags
Version Published Release Notes
1.0.0.0