These routines count the number of intersections among 2-D segments.
With easy changes, the routines may also return the intersection point coordinates.
Implementation of the routines is in MEX C code, so that the routines are pretty fast.
Special cases (e.g. collinear, parallel or overlapping segments) are accounted for.
Francesco Montorsi (2024). Segments Intersection Test Functions (https://www.mathworks.com/matlabcentral/fileexchange/35492-segments-intersection-test-functions), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Inspired by: Fast Line Segment Intersection
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!