require(rgl)
x <- c(1,0,0)
y <- c(0,1,0)
#example tangentPlane
z <- tangentPlane(x)
#visualize result
if (FALSE) {
lines3d(rbind(0, x), col=2, lwd=2)
## show complement
lines3d(rbind(z$y, 0, z$z), col=3, lwd=2)
}
# example crossProduct
z <- crossProduct(x, y)
# show x and y
if (FALSE) {
lines3d(rbind(x, 0, y), col=2, lwd=2)
# show z
lines3d(rbind(0, z), col=3, lwd=2)
}
Run the code above in your browser using DataLab