poly3dArea: Calculates the area of a 3D polygon.

Description Usage Arguments Value See Also Examples

View source: R/geometry.R

Description

Computes the area of a simple 3D polygon given the coordinates of its vertices arranged as a matrix where each column is a vertex numbered in counterclockwise manner.

Usage

1
  poly3dArea(p, n = NULL)

Arguments

p

Matrix containing the vertices of the polygon.

n

Normal to the polygon (if it has been previously computed).

Value

Area of the polygon.

See Also

crossProduct, poly3dNormal

Examples

1
2
poly <- matrix(c(0,0,0, 1,0,0, 1,1,0, 0,1,0), 3, 4)
print(poly3dArea(poly))

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