triNormal: Compute the normal to a triangle.

Description Usage Arguments Value See Also Examples

View source: R/geometry.R

Description

Compute the normal to the plane formed by the edges of a triangle.

Usage

1
  triNormal(x, invert = FALSE)

Arguments

x

Matrix 3x3 with each column as a vertex.

invert

A boolean that specifies whether the outer normal is wanted.

Value

A vector containing the 3 components of the normal.

See Also

crossProduct

Examples

1
2
tri <- matrix(c(0,0,0, 1,0,0, 1,1,0), 3, 3)
print(triNormal(tri))

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