English subtitles

← Matrix Zones - Interactive 3D Graphics

Get Embed Code
2 Languages

Showing Revision 2 created 05/24/2016 by Udacity Robot.

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