Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

tangentPlane

calculate the orthogonal complement of a 3D-vector


Description

calculate the orthogonal complement of a 3D-vector

Usage

crossProduct(x, y)

tangentPlane(x)

Arguments

x

vector of length 3.

y

vector of length 3.

Details

calculate the orthogonal complement of a 3D-vector or the 3D-crossproduct, finding an orthogonal vector to a plane in 3D.

Value

tangentPlane:

crossProduct: returns a vector of length 3.

y

vector orthogonal to x

z

vector orthogonal to x and y

Author(s)

Stefan Schlager

Examples

require(rgl)

x <- c(1,0,0)
y <- c(0,1,0)

#example tangentPlane
z <- tangentPlane(x)
#visualize result
## Not run: 
lines3d(rbind(0, x), col=2, lwd=2)
## show complement
lines3d(rbind(z$y, 0, z$z), col=3, lwd=2)

## End(Not run)
# example crossProduct
z <- crossProduct(x, y)
# show x and y
## Not run: 
lines3d(rbind(x, 0, y), col=2, lwd=2)
# show z
lines3d(rbind(0, z), col=3, lwd=2)

## End(Not run)

Morpho

Calculations and Visualisations Related to Geometric Morphometrics

v2.8
GPL-2
Authors
Stefan Schlager [aut, cre, cph], Gregory Jefferis [ctb], Dryden Ian [cph]
Initial release
2020-02-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.