0:00:00.290,0:00:04.390
The answer is to translate, rotate, and then use the inverse translation. The
0:00:04.390,0:00:08.500
translation moves the model to the origin, where it's now centered. The r matrix
0:00:08.500,0:00:12.333
rotates the model on its base. Finally, the inverse of the translation moves it
0:00:12.333,0:00:16.224
back to where it was. The key idea here is that the object is first being moved
0:00:16.224,0:00:20.230
to the origin. Once that's done, we can rotate around its axis with the r
0:00:20.230,0:00:23.782
matrix. At this point, forget about that there's even a rotation matrix. The
0:00:23.782,0:00:27.710
model's locations are now rotated. Once that's done, we can move it back to the
0:00:27.710,0:00:30.659
same position as before, with the inverse of the translation.