English subtitles

← Cylinder Positioning - Interactive 3D Graphics

Get Embed Code
2 Languages

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

  1. The code for this one is pretty short overall. You get the cylinder's axis, get
  2. the length from it. And then get the center by taking the average of the two
  3. point's locations. Notice that this is the one time where we actually add two
  4. points together to get the center point between them. If you're up for a
  5. challenge, try this exercise again, but delete the MakeLengthAngleAxisTransform
  6. method and write it yourself. I was going to make this the assignment
  7. originally, but after taking a few hours myself fighting JavaScript and some
  8. cross product headaches, I decided against it.