Advertisement
Matthen

Gyroscope Explanation

Jun 8th, 2011
324
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. Manipulate[
  2. p = RotationMatrix[-2 Pi t, {1, 0, 0}].{0.2 Sin[2 Pi t], 0, 1};
  3. Graphics3D[{
  4. Opacity[0.5],
  5. Cylinder[{{-0.05, 0, 0}, {0.05, 0, 0}}, 1],
  6. Opacity[1],
  7. Sphere[p, 0.15],
  8. Arrow[{p, p + {Cos[2 Pi t], 0, 0}}],
  9. Red,
  10. Arrow[{{0, 0, 1}, {1, 0, 1}}],
  11. Arrow[{{0, 0, -1}, {-1, 0, -1}}],
  12. Black,
  13. Thickness[0.01],
  14. Table[Line[{{0, Sin[2 Pi t + x], Cos[2 Pi t + x]}, {0,
  15. Sin[2 Pi t + x + Pi], Cos[2 Pi t + x + Pi]}}], {x, 0, Pi, Pi/6}]
  16.  
  17. }, PlotRange -> {{-1.2, 1.2}, {-1.2, 1.2}, {-1.2, 1.2}},
  18. Boxed -> False, ImageSize -> {250}, ViewPoint -> {0.5, 2, 0.1}]
  19. , {t, 0, 1}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement