Skip to main content


Showing posts from May, 2012

Why is the normal transformation a inverse transpose? (9)

Conclusion I think it is not exactly correct that the normal transform is an inverse transpose. A normal vector is not a column vector, the transform is a left inverse as Equation 5 shows. The transpose comes from the implementation of the vector class. This should be a left inverse as a rigorous formulation. I don't say the references [2,3,6] are incorrect, but I prefer the references [4,5] since they distinguish these two kind of vectors.

However, the references [2,3,6] have an easier to understand explanations. Especially, [2,3,6] shows why normal transformation doesn't work with applying A intuitively. I like these explanations more. Here I would like to highlight the difference of a usual vector and a normal vector, they are a column vector or a row vector. By the way, contravariant vector means doesn't-change-vector, but, its representation can change. It seems I should explain the difference of these vectors are related with inner product. I would like to study mo…

Why is the normal transformation a inverse transpose? (8)

Why does it transpose of inverse matrix?
In the last section, we know what is the transformation matrix for the normals. I will write it here again.
But this is not a transpose of inverse matrix. It's just a left inverse matrix. Because a normal vector is a row vector, this is the correct notation. But, in a graphics library, i.e. OpenGL, we usually don't distinguish row vectors and column vectors in the computer memory. Moreover, we also don't distinguish points and vectors in the computer memory, they are usually length three (or four) of array. A usual vector is a column vector, and since we don't distinguish normal vectors and usual vectors, they are all treated as column vectors. But actually they are different. This point, you can see the difference. To make it normal vector, we need to transpose a normal vector to make it a column vector.  The transpose of Equation 5 is:
Now you see why most of the books said normal transformation is a transpose of inverse matr…

Why is the normal transformation a inverse transpose? (7)

Let coordinate \Sigma 's the origin O, coordinate \Sigma' 's origin O', then we can think about the coordinates of O'O in the coordinate system \Sigma' that is represented as:
I would like to have a comment of this why this matters. In some graphics system, e.g., OpenGL, we can move or distort objects by applying transformation matrix.  This looks like the object is moved or is distorted. This interpretation is possible, but, here we did not move the objects, but we changed the coordinate system. This is rather how we interpret the result. I prefer this interpretation since we can think changing coordinate system without objects. You can still think the applying transformation matrix is an applying an operator, but, object is just one subject to operate. I would like to think rather about operator itself. Then we can concentrate operator itself, the transformation matrix itself. In Figure 3, there is a point P, this point actually doesn't move in the space…

Why is the normal transformation a inverse transpose? (6)

Normal vector as a covariant vector This third explanation includes how to transform normal vectors. This explanation is based on one of my favorite book[5] by Sugihara. This explanation is a bit formal and less intuitive compare to the first and the second explanation. If you are not interested in a formal explanation, you can skip this section.

First I would like to introduce the affine transformation.

Affine transformation is one of linear transformations. This is quite often used in computer graphics area. Affine transformation transform a line to a line and keep the ratio on a line. If we include a degenerated case, a triangle is always transformed into a triangle. Assume a representation of a three-dimensional affine transformation is a 3x3 matrix. This transformation is a transformation between two coodinate systems. Therefore, I think an object deformation by the transformation is a secondary effect. As a result, we can deform an object. However, this is a transformation of …

Why is the normal transformation a inverse transpose? (5)

Normal defined by inner product Let's think about a normal is defined by inner product.
As you see, the normal is actually in a row space instead of in a column space.
A coordinate transformation matrix M is a transformation of a column vector.
Therefore, the following equation is not defined.
This is my second explanation what is the difference between normal vector and usual vector.

Why is the normal transformation a inverse transpose? (4)

Normal vector as a perpendicular vector of the surface tangent vectors
Normal vector has the same direction to the cross product of two tangent vectors of a surface.  Figure 2 shows the tangent vectors are correctly transformed by the matrix M that magnifies only x direction. However, their cross product is not necessary to the same as the transformation of normal by the matrix M.

In short, tangent vectors u, v can be transformed by M, but their cross product is not. In general,
Are you convinced this is the reason distinguishing a usual vector and a normal vector? If you think about the x component of the cross product, uy vz -uz vy, this is not linear. Therefore, a linear transformation cannot transform this. This is my first explanation.

Why is the normal transformation a inverse transpose? (3)

The difference between normal vectors and usual vectors
Actually, normal vectors and usual vectors are different type of vectors. A usual vector itself defines direction or position. Let's recall how the normal vector is defined. A normal vector is not defined by itself. First a face is defined using usual vectors, then, the normal vector is defined according to this surface. The definition of the normal vector is a unit vector that perpendicular to the surface, in other words, it is defined as the inner product of surface tangent vector and the normal vector is 0. We should think these vectors are different vectors when they follow a transformation. As we saw in the Figure 1, when we transform a normal vector, the meaning of normal is lost. If we consider this vector is a usual vector, twice large x component is still fine, just it is not normal anymore. In this sense, normal vector has a special meaning, that should be always perpendicular to the surface.

The following three s…

Why is the normal transformation a inverse transpose? (2)

What is the problem? What is the transformation matrix of normal? We use transformation matrices every day when we move objects in a computer. Current the state of the art DCC (digital contents creation) software usually represents objects with triangles or polygons.  Each vertex of the triangles or polygons usually has its coordinates.  When we rotate or move each vertex, we apply a transformation matrix on each vertex. A vertex is usually three dimensional vector in computer graphics.

We can define a normal vector for each triangle. A normal vector points out to which direction a triangle face is oriented. This normal vector is also a three dimensional vector. In a 3D computer graphics system, normal vectors are important since we need these normal vectors to compute how bright the surfaces are. Because a usual vector can be transformed by a matrix, it seems straightforward to use the same matrix to transform a normal vector. However, this fails. But why? The article is all about …

Why is the normal transformation a inverse transpose? (1)

Abstract Several books[2,6] explained the normal vector transformation matrix is $(M^{-1})^{T}$. I always forget this formula. This time I understand it a bit in three different ways, so I will write them down here.
Introduction Assume matrix M is applied to a vector where the M is a coordinate transformation matrix. For example, M could be a translation, rotation, scaling, and so forth. To transform a position vector, we can just multiply this matrix M. However, we may fail when we transform a normal vector by just multiplying the matrix M. Several books mentioned normal transformation matrix should be $(M^{-1})^{T}$[2,6].

In this article, I would like to mention about the following three issues:

What is the problem? What is the transformation matrix of normal?Why may multiplying matrix M fail?Why is it an inverse of transpose of matrix M? (The references will be shown up at the end of this series.)
Next time, I would like to talk about the problem.