English subtitles

← Rotate a Block - Interactive 3D Graphics

Get Embed Code
3 Languages

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

  1. To solve this one, the three elements you need to determine are the axis, angle
  2. of rotation and the sign. In other words, which direction you're rotating. The
  3. green axis is the one we want to rotate around, and so this is the y axis. For
  4. the angle of rotation, there are 360 degrees in a circle. We want to rotate 2
  5. 12ths of the way around the circle. So that's 60 degrees. We also need to rotate
  6. in a negative direction, since the positive direction is counter clockwise. So
  7. the sign is negative here. All this information is encapsulated in this line of
  8. code, y rotation, negative 60 degrees. There's more than one solution to this
  9. problem. Since we can't tell which end is which. We could instead rotate 120
  10. degrees counter clockwise and get the same answer, which would let us put a
  11. positive angle.