M-File Help: Polygon | View code for Polygon |
- General polygon class
p =vertices | List of polygon vertices, one per column |
extent | Bounding box [minx maxx; miny maxy] |
n | Number of vertices |
Polygon class constructor
p = Polygon(C, wh) is a rectangle centred at C with dimensions wh=[WIDTH, HEIGHT].Area of polygon
a = P.area of the polygon.Centroid of polygon
x = P.centroid of the polygon.String representation
s = P.Difference of polygons
d = P.Display polygon
P.Polygon.charTest if points are inside polygon
in = p.inside the polygon. The corresponding elements of in are either true or false.Intersection of polygon with list of polygons
i = P.Polygon P intersects withIntersection of polygon and line segment
i = P.Intersection of polygons
i = P.Polygon representing theMoments of polygon
a = P.mpq_polyPerimeter of polygon
L = P.perimeter of the polygon.Plot polygon
P.plot the polygon. P.plot.Transformation of polygon vertices
p2 = P.Polygon object whose vertices have been transfored by the 3x3 homgoeneous transformation T.Union of polygons
i = P.Polygon representing theExclusive or of polygons
i = P.Polygon representing the© 1990-2011 Peter Corke.