newPolygon3d: Create a new simple 3D polygon.

Description Usage Arguments Value See Also Examples

View source: R/polygon3d.R

Description

Creates a new simple 3D 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 anf the third row are the z coordinates.

Usage

1
  newPolygon3d(x, y, z)

Arguments

x

Vector with x coordinates of the vertices

y

Vector with y coordinates of the vertices

z

Vector with z coordinates of the vertices

Value

A matrix with class polygon3d where each column is a vertex of the polygon

See Also

newPolygon, polygonArea, polygonCentroid

Examples

1
2
p <- newPolygon3d(c(0,1,2,1,2,0), c(0,0,1,2,3,3), c(0,0,0,0,0,0))
print(p)

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