Divide Polygon
Version 1.5 (2.52 KB) by
Ayad Al-Rumaithi
Divide polygon into smaller polygons set by grid
Divide polygon into smaller polygons set by grid
function PXY=DIVIDEXY(polygon,NX,NY)
Input
polygon: a structure consist of polygon.x (vector of x-coordinates) and polygon.y (vector of y-coordinates)
NX: Number of divisions in x direction
NY: Number of divisions in y direction
Output
PXY: a cell array where PX{i,j}.x and PX{i,j}.y are vectors of x and y coordinates of new polygon in (i,j) grid position
Example file is also provided
Cite As
Ayad Al-Rumaithi (2026). Divide Polygon (https://uk.mathworks.com/matlabcentral/fileexchange/71635-divide-polygon), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2017b
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Elementary Polygons in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
