p2p.point: 3-plane intersection point

View source: R/geom_p2pIntersect.R

p2p.pointR Documentation

3-plane intersection point

Description

Compute the intersection point between three planes

Usage

p2p.point(c.m)

Arguments

c.m

Matrix of coefficients for the plane equations, one per row.

Value

A dataframe with the x, y, z coordinates for the intersection point

TODO

Check if sign issue is due to c.m[,4] being flipped to the other side of eq.

Note

No checks are performed on input.

Author(s)

Cornel M. Pop

Examples

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)

cornelmpop/Lithics3D documentation built on Feb. 10, 2024, 11:54 p.m.