Embed Notice
HTML Code
Corresponding Notice
- Embed this notice@icedquinn
In order to be able to concatenate transformation matrices, each one of its operations is modified into a homogeneous coordinate system.
While scaling and rotation do share the same dimensions, in their respective transformation matrices, translation does not.
Why? Well, translation is a sum, the other two are products.
You see, the translation matrix in product form is pretty heretic. In order to perform a "sum", it takes advantage of matrix math peculiarities. Since a cross product goes in row*column order, you can use a 3*3 identity matrix (aka, product neutral operation), and on the **4th column**, you place the vector you wish to "add" to the original point.
The 4th column behaves as if scaling a unit vector to the intended characteristics of the translation vector, and adding it to the original point.
HOWEVER, this trick adds a 4th fucking column. You want the innermost dimensions of a cross product to be the same, if you wish to actually perform it. As such, both rotation, and scaling are refactored into a 4th dimension form. This will also take care of rotation's gimbal lock, but it'll become clearer in a sec.
The "w", 4th dimension, whatever you wanna call it, means that each axis is scaled w times. In the end, it means that your world is inside a cube, that cube's scale is w*w. This detail in itself, allows us (in the computer graphics world) to be able to work on "cubes"/objects independently from one another, or to place them all inside a bigger cube, and perform transforms in all of them.
It gives us another **degree of freedom**, or in your case, frees you from the gimbal lock problem.
Anyways, I know this is somewhat off the rails, but I just wanted to add another perspective to the origins of the problem.
@SuperDicq