# normalizing a plane

This topic is 4811 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I have a plane defined by three (at least) points in 3-space. From that I can compute the equation of the plane. What I need to do is rotate the coordinate system so that an axis is parallel to the normal vector of the plane, in effect cancelling out one of the coordinates so I can measure the plane . This has got to be an important transformation in texture mapping, but for the life of me I cannot find it discussed anywhere (in terms I can understand - that's likely my problem). I'm an old engineer, started with FORTRAN II, and probably missed a lot along the way. Can someone kindly point me towards a down-to-earth math explanation or perhaps even C code? Thanks for the help.

##### Share on other sites
If you have 3 plane points, you can compute 2 vectors that belong to the plane (P2 - P1 and P3 - P1). The cross product gives you the plane normal, which is perpendicular to the plane, so you have a basis for a coordinate system where the plane is one of the canonical axes, but this base isn't orthonormal.

First normalize the three vectors, then take the cross product of one of the original vectors and the normal vector. These three vectors (P2-P1, N and (P2-P1)xN) form an orthonormal basis for the coordinate system you're looking for. So if you use them as the columns of a 3x3 matrix, that matrix transforms from the canonical R3 to your plane's coordinate system. The inverse (which is the transpose in this case) maps plane points to canonical R3, where you can discard one of the coordinates (the one you mapped to N) and measure in 2D using the other 2.

This is off the top of my head, so I may have missed some detail.

1. 1
2. 2
3. 3
Rutin
15
4. 4
khawk
14
5. 5
frob
12

• 9
• 11
• 11
• 23
• 12
• ### Forum Statistics

• Total Topics
633662
• Total Posts
3013231
×