Thursday, November 17, 2016

Normal vectors? Normal covectors? Normal pseudevectors?

Normal to a parametrized surface, if defined as dp/du x dp/dv (cross product), is a pseudovector. However this is not how we usually treat normal vectors, because if a surface is mirrored (across itself for example), we usually want the normal vector to be reflected as well and this doesn't happen if we were to stick to the definition precisely.

But otherwise, normal "vector" obviously does not transform like a regular vector. Wikipedia page for a pseudevector ( says that if a regular vector is transformed by v' = Rv, then a pseudovector transforms by v' = det(R)*(Rv). But this considers only rotations - proper and improper. E.g., the reflection mentioned above is an improper rotation, and it is exactly the situation where we don't want to think of a normal as a pseudovector, and I suppose that any improper rotation in CG represents a similar situation (under proper rotations, vectors and pseudevectors behave the same way). So the above formula for transforming normals (the way pseudovectors transform) seems to be useless in CG.

So what isn't useless for transforming normals? The formula that is well known in graphics: the inverse transpose of a regular transformation. Reflection transformation doesn't change under inverse transpose because it is orthonormal (we remember a useful mnemonic from CG - if there is no nonuniform scaling in the transformation, it is equal to its inverse transpose). Otherwise, the inverse transpose technique takes care of preserving the correct normal in other kinds of transformations, and this is precisely how covectors transform.

So, what is a normal (the mathematical one, defined through the cross product)? It has to be a pseudovector. But it also seems to be a covector, since a covector transformation rule is what turns out to be correct for transforming normals in CG. Apparently, the distinction between vectors and pseudovectors is orthogonal to the distinction between covariant and contravariant vectors. The terminology is a little confusing, but the actual possible combinations are: contravariant vector, contravariant pseudovector, covariant vector, covariant pseudovector. The normal to a surface seems to be of the last type.

What is most confusing to me is that whenever I read a more advanced and supposedly mathematically correct description of transforming normals in CG, they mention that normals are pseudovectors (which is mildly useful, because as described above it apparently boils down to flipping or not flipping the sign when the transformation changes the handedness), but they almost never mention that they are covectors as well, which is where the inverse-transform formula comes from (I actually only found out about this when learning basic tensor analysis and noticing that the transformation for covectors has this specific form).