Clever way to transform plane by matrix

Hello guys!

What is the easiest and simplest way to transform plane given as:
ax + by + cz + d = 0
by 4x4 OpenGL compatible matrix?


Multiply the homogenous plane vector (a, b, c, d) by the inverse transpose modelview matrix…

Thank you!!!

Could you explain the theory behind such solution?
I don’t really understand why inversed transformation is required :frowning:

It’s really simple vector math:

Assume you have a plane p = (a, b, c, d) and a vector v = (x, y, z, w), both in column vector form. The vector lies on the plane if p.v == 0.

Written as matrix multiplication this is pt . v == 0 (pt being p transposed).

Now you want to transform the plane by the matrix M. That is you want a new plane p’ such that, for each vector v on the original plane p, M.v lies on the new plane p’, that is:

0 == p’t.M.v == pt.v

From that follows that p’t.M must be equal p. Multiply this with M^-1 from right on both sides gives:

p’t == pt.M^-1

Transpose on both sides:
p’ == Mt^-1 . p

Thank you for a great explanation, now that makes sense to me :slight_smile: