Calculate a Vector that lies on a 3D Plane

3dmath

I have a 3D Plane defined by two 3D Vectors:

  • P = a Point which lies on the Plane
  • N = The Plane's surface Normal

And I want to calculate any vector that lies on the plane.

Best Answer

Take any vector, v, not parallel to N, its vector cross product with N ( w1 = v x N ) is a vector that is parallel to the plane.

You can also take w2 = v - N (v.N)/(N.N) which is the projection of v into plane.

A point in the plane can then be given by x = P + a w, In fact all points in the plane can be expressed as x = P + a w2 + b ( w2 x N ) So long as the v from which w2 is "suitable".. cant remember the exact conditions and too lazy to work it out ;)

If you want to determine if a point lies in the plane rather than find a point in the plane, you can use

x.N = P.N

for all x in the plane.