NVIDIA Interview Question
Software Engineer InternsCountry: United States
Interview Type: In-Person
We have few spaces were we operate. Object space - transformations are done only to an object, world space - transformations apply to objects and positions of objects in the world. 3x3 matrix is enough to perform any transformation inside the object space since the object is at the origin. But lets say we want to move that object somewhere in the world and transform it also. We would need to do two operations if we are working only within 3x3 matrix to perform that, one to transform the object and the other to translate the object. In order to change the origin of transformation we need fourth dimension. Since working and keeping two separate states (transformation and translation) is not convinient it is better to store state of object in the world space in 4x4. it is more convenient for the use and the math will work when we decide to multiply 4x4 matrices to keep all the transformations/translations together.
3x3 matrix represent a transformation in a vector space. But, we use an affine space to describe an object.
- Frédéric Vauchelles March 17, 2013A rotation followed by a translation is a transformation which can be considered with a 3x3 matrix (rotation) and a 1x3 vector (translation). But it is far more convenient to consider a 4x4 matrix where the 3x3 inner matrix is the rotation matrix, the 4th column is the translation vector (and the last row is (0, 0, 0, 1)).
Finally, using 4x4 matrix for affine space transformation is a much more convenient to perform calculation than 3x3 matrix and additional data.