Fast and Robust Curve Intersections

Computes intersection points of two curves.

Download
Download

You are now following this Submission

Editor's Note: This file was selected as MATLAB Central Pick of the Week

Cite As

Douglas Schwarz (2026). Fast and Robust Curve Intersections (https://www.mathworks.com/matlabcentral/fileexchange/11837-fast-and-robust-curve-intersections), MATLAB Central File Exchange. Retrieved .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
3.0.0

I just learned about the paged matrix functions from Mike Croucher's blog and immediately replaced backslash with pagemldivide for a significant speedup.

Download
2.0.0

This version uses implicit expansion (or bsxfun in slightly older MATLAB versions) to compute the line segments that might overlap. When the number of line segments is large, it uses a different algorithm to avoid forming large matrices.

Download
1.2.0

Fixed bug that my previous "bug fix" failed to fix.

Download
1.1.0

Fixed bug identified by Rodrigo Portugal. No longer fails when there are no intersections and you need 4 outputs.

Download
1.0.0

Added ability to find self-intersections of one curve.

Download