image thumbnail

New Polygon Clipping and Offsetting

version 1.0.2.0 (13.5 KB) by Erik Johnson
Polygon Clipping and Offsetting

1.1K Downloads

Updated 09 Feb 2017

View License

Provide a front end to Angus Johnson's polygon clipping and offsetting algorithms.
Two functions are provided:
* polyclip(x1,y1,x2,y2,method) finds the difference/intersection/xor/union (depending on "method") between two polygons
* polyout(x1,y1,delta,join,joininfo) outsets a polygon by distance delta, using the given corner join method (and optional joininfo specifying more details about the corner) [corner is 'round' or 'square' or 'miter']. Insetting is accomplished with a negative delta.
See the README.txt file for where to download Angus Johnson's clipper C++ code and for compiling instructions.

Cite As

Erik Johnson (2022). New Polygon Clipping and Offsetting (https://www.mathworks.com/matlabcentral/fileexchange/61329-new-polygon-clipping-and-offsetting), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2016b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired by: Polygon Clipping and Offsetting

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!