Skip to content

polyxpoly

geometry · scripts/geometry/polyxpoly.m

POLYXPOLY  Intersection points for lines or polygon edges.
  [XI,YI] = POLYXPOLY(X1,Y1,X2,Y2) returns planar intersection points of
  the polylines (X1,Y1) and (X2,Y2).  NaN separates parts.  Overlapping
  collinear segments contribute both endpoints of the overlap.
  [XI,YI,II] = POLYXPOLY(...) also returns a two-column array of segment
  (or vertex) indices for each intersection.
  [XI,YI] = POLYXPOLY(...,'unique') drops duplicate intersection points.

  Parity target: MATLAB R2026a Mapping Toolbox (nexus#2098).