Advertisement
Matthen

Mitre saw, 45+45=60

Oct 24th, 2012
448
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.51 KB | None | 0 0
  1. frame[t_] :=
  2. Block[{\[Theta], \[Alpha], \[Beta], dy, ey, ez},
  3. ez = {1/2, -(1/2), 1/Sqrt[2]};
  4. \[Theta] = 0;
  5. \[Alpha] = 0;
  6. \[Beta] = 0;
  7. dy = 1;
  8. If[t < 0.5,
  9. If[t < 0.25,
  10. \[Alpha] = Pi t;
  11. ,
  12. \[Alpha] = Pi/4;
  13. \[Beta] = (t - 0.25) Pi;
  14. ]
  15. ,
  16. If[t < 0.75,
  17. dy = 1 - 4 (t - 0.5);,
  18. \[Theta] = 4 Pi (t - 0.75);
  19. dy = 0;
  20. ]
  21. \[Alpha] = Pi/4; \[Beta] = Pi/4;
  22. ];
  23. ey = RotationMatrix[\[Beta], (RotationMatrix[\[Alpha], {0, 0,
  24. 1}].{1, 0, 0})].(RotationMatrix[\[Alpha], {0, 0, 1}].{0, 1,
  25. 0});
  26. Show[
  27. Graphics3D[{
  28. Gray,
  29. Cylinder[{{0, 0, 0} + 3 ez dy, ey/10 + 3 ez dy}, 1]}
  30. , PlotRange -> {{-1, 3}, {-4, 1}, {-1, 4}},
  31. ViewPoint -> {5, 5, 2}],
  32. If[t < 0.75,
  33. RegionPlot3D[(x^2 + z^2 <= 0.1), {x, -1, 3}, {y, -4, 1}, {z, -1,
  34. 4}, NormalsFunction -> None, Mesh -> None, PlotStyle -> Orange,
  35. PlotPoints -> 30]
  36. ,
  37. {RegionPlot3D[(x^2 + z^2 <= 0.1) && ey.{x, y, z} < 0, {x, -1,
  38. 3}, {y, -4, 1}, {z, -1, 4}, NormalsFunction -> None,
  39. Mesh -> None, PlotStyle -> Orange, PlotPoints -> 30],
  40. RegionPlot3D[(xt^2 + zt^2 <= 0.1 &&
  41. ey.{xt, yt, zt} > 0) /. {xt -> rot[\[Theta], x, y, z][[1]],
  42. yt -> rot[\[Theta], x, y, z][[2]],
  43. zt -> rot[\[Theta], x, y, z][[3]]}, {x, -1, 3}, {y, -4,
  44. 1}, {z, -1, 4}, NormalsFunction -> None, Mesh -> None,
  45. PlotStyle -> Orange, PlotPoints -> 30]
  46. }
  47. ]
  48. ]
  49. ];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement