Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass{standalone}
- usepackage{pgfplots}
- pgfplotsset{compat=1.4}
- usepackage{tikz-3dplot}
- tdplotsetmaincoords{60}{-30}
- tdplotsetrotatedcoords{0}{90}{90}%
- begin{document}
- begin{tikzpicture}
- [tdplot_rotated_coords,
- scale=3,
- mdc/.style={fill=blue, color=blue,draw=none, opacity=.4,line join=round},
- length/.style={<->,thick,line cap=round}]
- defd{1}
- defr{d*.45}
- % Cylinder
- foreach t in {0,12,...,348}
- draw[mdc] ({cos(t )*r+d/2}, 0, {sin(t )*r+d/2}) % side vertice of cylinder
- -- ({cos(t+12)*r+d/2}, 0, {sin(t+12)*r+d/2})
- -- ({cos(t+12)*r+d/2}, d, {sin(t+12)*r+d/2})
- -- ({cos(t )*r+d/2}, d, {sin(t )*r+d/2})
- -- cycle;
- end{tikzpicture}
- end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement