Advertisement
Matthen

Hyperbolic Cylinder

Nov 26th, 2013
518
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. d\[Theta] =
  2. Interpolation[{{0, 0}, {1, 2 Pi/3}, {2, 2 Pi/3}, {3, 0}},
  3. InterpolationOrder -> 1];
  4. z0 = Interpolation[{{0, 900}, {1, 900}, {2, -900}, {3, -900}},
  5. InterpolationOrder -> 1];
  6. x0 = Interpolation[{{0, 0}, {1, 0}, {1.5, 20}, {2, 0}, {3, 0}},
  7. InterpolationOrder -> 1];
  8. x[t_] := 900 Exp[-10 (t - 1.5)^2];
  9. z[t_] := -900 Tanh[5 (t - 1.5)];
  10. frame[t_] := Module[{p0, p1},
  11. p0 = {Sin[d\[Theta][t]], Cos[d\[Theta][t]], 1};
  12. p1 = {0, 1, 0};
  13. Graphics3D[
  14. {White, Thickness[0.005],
  15. Table[
  16. Line[{RotationTransform[\[Theta], {0, 0, 1}][p0],
  17. RotationTransform[\[Theta], {0, 0, 1}][p1]}],
  18. {\[Theta], 0, 2 Pi, 2 Pi/20}]
  19. , FaceForm[], EdgeForm[Directive[Thickness[0.005], White]],
  20. Cylinder[{{0, 0, 0}, {0, 0, 1}}, 1]}
  21. , Boxed -> False, ViewPoint -> {x[t], 0, z[t]},
  22. ImageSize -> {300, 300}, Background -> Black]
  23. ];
  24. Manipulate[
  25. frame[t],
  26. {t, 0, 3}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement