Getting fourth plane point from known three
Hi, I am trying to create a mesh to render a place, but the plane is stored in three vectors.
I have been looking at documents on using the cross product and other techniques to find the normal and the distance of the plane but I can't seem to find anything about the fourth point so I can create the mesh or am I missing something fundamental to storing a plane like this.
Thanks for any help.
A plane (math) has no points, it's defined by 3 vectors and has an infinite size.
What you are looking for is probably a face.
Further more faces are mostly defined as triangles, so a 4th vertex isn't necessary to build a face.
What you are looking for is probably a face.
Further more faces are mostly defined as triangles, so a 4th vertex isn't necessary to build a face.
A plane is usually represented by four values (A,B,C,D) where Ax + By + Cz + D = 0
A,B,C form normal to the plane and D constrains the plane in 3D space.
If you have 3 points (p0, p1, p2) to represent your plane and you need a fourth you can do the following. Create two vectors v1 = p1 - p0 and v2 = p2 - p0. any point on the plane will satisfy the following equation:
pn = G*v1 + H*v2 where G and H are scalar values.
Therefore if you want another point just choose some values for G and H and solve your equation. for example:
G = H = 1 gives
pn = v1 + v2 = p1 - p0 + p2 - p0 = p1 + p2 - 2p0
This point sits on your plane.
Another way to solve the same problem if you have your ABCD values for your plane is to choose two coordinates for your Ax + By + Cz + D = 0 equation and solve for the third.
For example, say we choose x=1 and y = 2.
That means your fourth point would have the coordinates (1,2, -(D + A + 2B)/C)
careful not to divide by zero!
A,B,C form normal to the plane and D constrains the plane in 3D space.
If you have 3 points (p0, p1, p2) to represent your plane and you need a fourth you can do the following. Create two vectors v1 = p1 - p0 and v2 = p2 - p0. any point on the plane will satisfy the following equation:
pn = G*v1 + H*v2 where G and H are scalar values.
Therefore if you want another point just choose some values for G and H and solve your equation. for example:
G = H = 1 gives
pn = v1 + v2 = p1 - p0 + p2 - p0 = p1 + p2 - 2p0
This point sits on your plane.
Another way to solve the same problem if you have your ABCD values for your plane is to choose two coordinates for your Ax + By + Cz + D = 0 equation and solve for the third.
For example, say we choose x=1 and y = 2.
That means your fourth point would have the coordinates (1,2, -(D + A + 2B)/C)
careful not to divide by zero!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement