View source: R/geom_p2pIntersect.R
planeCoefs | R Documentation |
Computes the coefficients of the plane equation for a plane defined by 3 3D points.
planeCoefs(p)
p |
A 3x3 matrix-like object of point coordinates, one point per row. |
A vector of scalar plane equation coefficients in the form Ax + By + Cz + D = 0
Write unit tests
Cornel M. Pop
p = data.frame(x=c(1,4,5), y=c(0,5,1), z=c(1.4, -4, 4))
res = planeCoefs(p)
## Not run:
library(rgl)
points3d(p, size=10, col="red")
planes3d(res[1], res[2], res[3], res[4], col="green")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.