## ← Where to Rotate - Interactive 3D Graphics

• 2 Followers
• 16 Lines

### Get Embed Code x Embed video Use the following code to embed this video. See our usage guide for more details on embedding. Paste this in your document somewhere (closest to the closing body tag is preferable): ```<script type="text/javascript" src='https://amara.org/embedder-iframe'></script> ``` Paste this inside your HTML body, where you want to include the widget: ```<div class="amara-embed" data-url="http://www.youtube.com/watch?v=2qq5zmwUqOM" data-team="udacity"></div> ``` 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.