polybool
geometry · scripts/geometry/polybool.m
POLYBOOL Set operations on polygonal regions(Mapping Toolbox).
[X,Y] = POLYBOOL(FLAG,X1,Y1,X2,Y2) performs the polygon set operation
identified by FLAG on the regions defined by(X1,Y1) and(X2,Y2).
FLAG is one of:
intersection / and / &
union / or / | / + / plus
subtraction / minus / -
exclusiveor / xor
Contours may be NaN-delimited numeric vectors or cell arrays of
vectors. The output uses the same container form as the input.
polybool ignores vertex order; Mapping Toolbox still documents
clockwise outer rings and counterclockwise holes for consistency
with other functions.
Parity target: MATLAB R2026a Mapping Toolbox(function not recommended;
documented behaviour retained; nexus#2098).