View source: R/geom_p2pIntersect.R
p2p.point | R Documentation |
Compute the intersection point between three planes
p2p.point(c.m)
c.m |
Matrix of coefficients for the plane equations, one per row. |
A dataframe with the x, y, z coordinates for the intersection point
Check if sign issue is due to c.m[,4]
being flipped to the
other side of eq.
No checks are performed on input.
Cornel M. Pop
c.m = rbind(c(1, 1, -2, 5), c(1, -2, -1, -1), c(2, -3, 1, -10))
res = Lithics3D:::p2p.point(c.m) # c(2, -1, 3)
## Not run:
library(rgl)
points3d(rbind(c(-10,-10,-10), c(10,10,10)))
points3d(rbind(res, res), size=10, col="red") # Draw point of intersection
# Render the intersecting planes
planes3d(c.m[,1], c.m[,2], c.m[,3], c.m[,4], col="green")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.