Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- f[r_, t_] := r (t (4 Pi - t)/(4 Pi^2))^0.2;
- screw[x_, dir_] := Show[
- ParametricPlot3D[
- x + {f[r, t] Sin[ 2 t], f[r, t] Cos[ 2 t], t}, {t, 0, 4 Pi}, {r, 0,
- 1}, Axes -> None, Boxed -> False, Lighting -> "Neutral",
- Mesh -> {2, 2}, PlotRange -> All,
- PlotStyle -> RGBColor[0.7, 0.2, 0.2]],
- Graphics3D[{RGBColor[0.7, 0.7, 0.7],
- If[dir == 1,
- {Cylinder[{x, x + {0, 0, 6 Pi}}, 0.4], GrayLevel[0.2],
- Cylinder[{x + {0, 0, 6 Pi}, x + {0, 0, 6 Pi + 0.5}}, 1]
- }
- ,
- {Cylinder[{x - {0, 0, 2 Pi}, x + {0, 0, 4 Pi}}, 0.4],
- GrayLevel[0.2],
- Cylinder[{x - {0, 0, 2 Pi}, x - {0, 0, 2 Pi + 0.5}}, 1]}
- ]
- }]];
- frame[t_] :=
- Show[screw[{0, 0, 0}, 1], screw[{1.3 Cos[t], 1.3 Sin[t], 0}, -1],
- ImageSize -> {300}, ViewPoint -> {4, 5 Cos[t/3], 5 Cos[t/3]}];
- Manipulate[frame[t], {t, 0, 6 Pi}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement