Re: [Algorithms] transforming a plane
Brought to you by:
vexxed72
From: Charles B. <cb...@cb...> - 2000-09-07 17:11:37
|
Silly me, that comes out of the math trivially. Assuming an orthonormal matrix, so Transpose(Inverse(M)) = M, then a point on the plane initially is P = d N Transformed, you get P' = MP = M d N = d N' + T where T is the translation in M. Then d' is just d' = N' * P' = d N' * N' + T * N' = d + T * N' In other words, d += T * N' is all you need to transform a plane (and rotate the normal) by an orthonormal matrix. At 11:18 PM 9/6/2000 -0700, you wrote: >> Is there a fast way to transform a plane? >> >> Right now I'm doing it by rotating the normal and tranforming >> a point on the plane, then re-generating the 4d-vector form of >> the plane. It seems there should be a way to do it with a >> single 4x4 matrix multiply in some funny coordinate space. > >Yes, planes can be transformed with a single 4x4 matrix multiply. Planes >transform contravariantly like normal vectors do, meaning that you need to >transform it using the inverse transpose of the matrix that you would >transform normal points with. > >Suppose you have a 4D column vector V representing a plane and a 4x4 >transformation matrix M. Let V = <Nx, Ny, Nz, -d> where N is the plane's >normal vector and d = (P dot N) for any point P on the plane. Then the >transformed plane V' is given by > > V' = Transpose(Inverse(M)) * V > >-- Eric Lengyel > >_______________________________________________ >GDAlgorithms-list mailing list >GDA...@li... >http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list > > -------------------------------------- Charles Bloom www.cbloom.com |