Find the coefficients of the plane equation

plane_coefficients(p, n)

Arguments

p A point on the plane (or N x 3 matrix of multiple points) vector normal to the plane (or N x 3 matrix of multiple vectors)

Value

a matrix with 4 columns a,b,c,d where ax + by + cz + d = 0

Details

Both p and n can accept multiple points/vectors to calculate many planes at once.

Other geometry: intersect_plane()

Examples


# Mushroom Body Entry Point - plane perpendicular to axon tract as
# projection neurons enter mushroom body calyx
mbe=plane_coefficients(p=c(207, 102, 142), n=c(.6,-0.1,0.3))
if (FALSE) {
plot3d(Cell07PNs)
planes3d(mbe[1:3], d=mbe[4])
}