| This is as good a place to ask as any...
My solid geometry is terrible, as is my linear algebra, but I think
that the dot product of the normal vector with any vector in the plane
should be 0, so you can solve the set of equations:
(x1-x2)x + (y1-y2)y + (z1-z2)z = 0
(x1-x3)x + (y1-y3)y + (z1-z3)z = 0
(x2-x3)x + (y2-y3)y + (z2-z3)z = 0
2 2 2
and x + y + z = 1
for x, y and z; (x,y,z) is a unit vector normal to the plane. If the system
of equations doesn't have a unique solution then two or more of your points
are collinear.
Richie
|
| < Note 626.0 by MMO03::DANTONI "Gaitan D'Antoni" >
-< Normal to a plane in 3d? >-
I'm not sure if this is where to ask this but here goes...
Given three points in space (x1,y1,z1), (x2,y2,z2), and (x3,y3,z3), and
a plane, P, defined by these three points, what is the formula for
finding the normal, N, to the plane P?
Gaitan
> Since any two points in the plane define a line in the plane,
> and any line normal to that plane must be parallel to the
> vector cross product of any pair of distinct vectors in that
> plane, one normal vector would be:
> N1 = ( x1, y1, z1 ) cross ( x2, y2, z2 )
> = ( y1*z2 - y2*z1,
> x2*z1 - x1*z2,
> x1*y2 - x2*y1 )
> The line passing through point ( x0, y0, z0 ) and parallel
> to the non-zero vector ( a, b, c ) has the parametric
> equations:
> x = x0 + a*t, y = y0 + b*t, z = z0 + c*t
> Use N1.x, N1.y, and N1.z for a, b, c respectively.
> A family of lines is thus defined corresponding to different
> values of x0, y0, and z0.
|