Got a YouTube account?

New: enable viewer-created translations and captions on your YouTube channel!

English subtitles

← Where to Rotate - Interactive 3D Graphics

Get Embed Code
3 Languages

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

  1. Say you're given a mesh like this. Some statue standing on a platform that's
  2. some distance from the origin. You'd like to rotate it in place on its base so
  3. that it's facing like this. You know that if you just try to rotate it, it's
  4. going to rotate around the origin and it will swing wildly in position. You want
  5. it to stay where it is. You have a few matrices at hand to perform the task.
  6. You're given a translation matrix that would move the center of the model's base
  7. to the origin. You also have a rotation matrix that will rotate the model or
  8. anything else around the y-axis. Finally, you can also invert the translation
  9. and rotation matrices. The question is, what series of transforms will rotate
  10. the model on its base? In other words, we want to end up with the object in the
  11. same position, but rotated around its own axis. Put the transforms in the usual
  12. right to left order, rightmost being applied to the object first. If you don't
  13. need all four slots for matrices, just leave the leftmost ones empty. For
  14. example, if you needed just a single transform, put it in this rightmost slot.
  15. To solve this one, you might want to remember the rule, once a transform is
  16. applied, forget about it and just think about where the model itself is then.