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