polygonArea: Calculates the area of a polygon.

Description Usage Arguments Value See Also Examples

View source: R/polygon.R

Description

A generic S3 function that computes the area of polygons given the coordinates of its vertices arranged as a matrix where each column is a vertex numbered in counterclockwise manner.

Usage

1

Arguments

p

Matrix containing the vertices of the polygon.

Value

Area of the polygon.

See Also

crossProduct, poly3dArea

Examples

1
2
poly <- newPolygon(c(0, 1, 1, 0), c(0, 0, 1, 1))
print(polygonArea(poly))

tunelipt/model3d documentation built on Nov. 5, 2019, 10:59 a.m.