English subtitles

← Rotation - Interactive 3D Graphics

Get Embed Code
2 Languages

Showing Revision 3 created 05/25/2016 by Udacity Robot.

  1. 3 j s also has some built in support for object rotation. The call is like this,
  2. you can specify x y or z for the axis of rotation. The object will rotate around
  3. it's center along that axis in a counter clock wise fashion. The angle is
  4. specified in radians which computers like, as a human I like degrees. So here
  5. I'm specifying 70 degrees then converting this number to radians by multiplying
  6. by PI over 180. Here we can see the direction is counterclockwise if you were to
  7. point the x axis toward you. A way to remember this direction is the right-hand
  8. rule. Even though it looks clockwise in this figure, if you put your thumb along
  9. the x axis and rotate around you'll see it's indeed following the right-hand
  10. rule.