Site Logo

How to understand rotation matrices and local transformations

Rotation matrices are the building blocks of modern 3d computer generated environments, but why? This guide will explore the nature of rotation matrices and some uses of them.

Tutorial Image

Let's take 3x3 rotation matrices as an example, they are used for rotations of objects in 3d space and have untold utility in video games in terms of both graphical rendering and game logic, both of these due to how the vectors in the matrix map to how points should be offset to be rotated with it.

Points in space or even other rotation matrices can be rotated using a rotation matrix by multiplying the rows of one matrix by the corresponding columns in another for each value in the matrix.

This is important in graphics rendering because it allows all of the points in a mesh to be rotated with an object, and important in game development because it allows developers to perform various seemingly complex relative rotation/translation operations with simplicity.

M X Y Z
X 1 0 0
Y 0 1 0
Z 0 0 1

This is an example of a 3x3 identity matrix, the vectors within point straight along the respective axes in this case.