Elementary Polygons
Given a set of points, you can create simple polygons and compute basic geometric
quantities such as area. For more complex polygons or access to more geometric information,
create a polyshape
object.
Then, use object functions to modify, query, and visualize the polygon or set of
polygons.
Functions
Simple Polygons
boundaryshape | Create polyshape from 2-D triangulation |
inpolygon | Points located inside or on edge of polygonal region |
nsidedpoly | Regular polygon |
polyarea | Area of polygon |
polybuffer | Create buffer around points, lines, or polyshape
objects |
rectint | Rectangle intersection area |
Polyshape Object
Create and Modify Polyshape
polyshape | 2-D polygonal shapes |
addboundary | Add polyshape boundary |
polybuffer | Create buffer around points, lines, or polyshape
objects |
rmboundary | Remove polyshape boundary |
rmholes | Remove holes in polyshape |
rmslivers | Remove polyshape boundary outliers |
rotate | Rotate polyshape |
scale | Scale polyshape |
simplify | Simplify polyshape boundaries |
sortboundaries | Sort polyshape boundaries |
sortregions | Sort polyshape regions |
translate | Translate polyshape |
Query and Visualize
boundary | Vertex coordinates of polyshape boundary |
holes | Convert polyshape hole boundaries to array of
polyshape objects |
ishole | Determine if polyshape boundary is a hole |
isinterior | Query points inside polyshape |
issimplified | Determine if polyshape is well-defined |
nearestvertex | Query nearest polyshape vertex |
numboundaries | Number of polyshape boundaries |
numsides | Number of polyshape sides |
overlaps | Determine whether polyshape objects overlap |
plot | Plot polyshape |
regions | Access polyshape regions |
Geometric Quantities
area | Area of polyshape |
boundingbox | Bounding box of polyshape |
centroid | Centroid of polyshape |
convhull | Convex hull of polyshape |
turningdist | Compute turning distance between polyshape
objects |
triangulation | Triangulate polyshape |
perimeter | Perimeter of polyshape |
Boolean Operations
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)