Once you start looking under the hood, you'll get some sense of the lay of the
land with matrices and how they relate to transforms. Here's a map of the sort
of things you'll find. The upper left area of the matrix is where rotations and
scales show up. If a transform changes only this area of the matrix, it's called
a linear transformation. I'm not going to spend time on the formal definition of
this term. The additional course materials include resources for more on the
underlying math. The definition is fairly basic stuff about how addition and
multiplication are preserved. But doesn't have much effect on how we actually do
computer graphics. The upper right is where the translations accumulate. These
translation values will get effected by multiplication with other matrices of
course. Translations only effect points since vectors have zero for their fourth
coordinate. 3JS provides a function called decompose to extract the translation,
rotation and scale factors from a matrix. The translation and scale factors come
back as vectors, as you might expect. The rotation comes back as a quaternion.
Something we'll talk about when we get to animation. The short version is that a
quaternion is a compact way to store the axis and angle of rotation for a
rotation matrix. One useful property quarternions have is that you can easily
interpolate between them, which is useful for interpolating between two
different orientation. Notice that the bottom row is always 0, 0, 0 1. The
transforms we covered here are called affine transforms. Parallel lines stay
parallel when an affine transform is applied. In modeling you'll essentially
always use affine transforms. So we never change this last row. Since GPUs are
tuned to use four by four matrices Most of us just use four by fours everywhere
for simplicites sake. When we discuss perspective cameras, we'll set the values
in this last row. We'll then be using a projective transform. With affine
transforms, when a points coordinates are multipied by the matrix. The fourth
coordinate starts out as one and ends up as one. This last row in a projection
matrix modifies that fourth coordinate to be something other than one. What that
means is something we'll leave til a later lesson.