Previous | Next --- Slide 19 of 43
Back to Lecture Thumbnails
rohta

Feels like it'll be very likely that I'll make the mistake of what order to run transformations in...

ryanmelon

I am thinking about the reason why the order of this transformation matters is that it contains a translation transformation. (which is asked in class) The result is that this is not the only reason. And then I try to find a example of "the order of combination of linear transformations still matters". Here might be a example but I am not sure about it.

Take the square of this slide. The result of rotating 45 degree and reflecting it horizontally and the result of reflecting it horizontally first and then rotating 45 degree would be different.

fbrsk

If you think about it purely in terms of matrix multiplication, there are only some kinds of multiplications that are commutative and those would be the ones where the order of the transformation doesn't matter. Like two Rotation Matrices or Two Diagonal Matrices. Here is an interesting thread about Simultaneous Diagonalization: https://math.stackexchange.com/questions/170241/when-is-matrix-multiplication-commutative

Max

Good comments. Messing up the order of your transformations is definitely a common mistake :^)

If you're positioning a 3D object in the world, it's usually most intuitive to apply a scale, a rotation (more detail in the next lecture), and then a translation. That way, you scale and rotate the object in its 'rest pose' rather than moving it away from the origin and then rotating it about the origin.

Also note that rotation matrices do not generally commute in R^3.

justaddwater

In lecture, the professor mentioned that whenever there's a rotation, it's best if we translate it towards the center, rotate, then translate it back. Does that mean that if we add these two extra steps to rotation, we can have any order of transformation between rotation and translation? Although it won't be the most efficient one.

Max

Yes, you can! You're just inverting the translation to cancel it out, applying the rotation, then re-applying the translation.

It's a bit less efficient in terms of having to multiply together some more matrices, but if you're still combining via multiplication before applying them to every vertex, this cost is negligible (algebraically, compare ABCx=>Tx and ABCDEFx=>Sx).