Description Usage Arguments Value See Also Examples
Creates a new simple 2D polygon from the coordinates. The polygon is stored as a matrix where the first row are the x coordinates of the vertices and the second row are the y coordinates.
1 | newPolygon(x, y)
|
x |
Vector with x coordinates of the vertices |
y |
Vector with y coordinates of the vertices |
A matrix with class polygon
where each column is a
vertex of the polygon
newPolygon3d
, polygonArea
,
polygonCentroid
,
polygonIntersect
1 2 | p <- newPolygon(c(0,1,2,1,2,0), c(0,0,1,2,3,3))
print(p)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.