Advertisement
Guest User

Untitled

a guest
Oct 27th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. documentclass{standalone}
  2. usepackage{pgfplots}
  3. pgfplotsset{compat=1.4}
  4. usepackage{tikz-3dplot}
  5. tdplotsetmaincoords{60}{-30}
  6. tdplotsetrotatedcoords{0}{90}{90}%
  7. begin{document}
  8. begin{tikzpicture}
  9. [tdplot_rotated_coords,
  10. scale=3,
  11. mdc/.style={fill=blue, color=blue,draw=none, opacity=.4,line join=round},
  12. length/.style={<->,thick,line cap=round}]
  13. defd{1}
  14. defr{d*.45}
  15.  
  16. % Cylinder
  17. foreach t in {0,12,...,348}
  18. draw[mdc] ({cos(t )*r+d/2}, 0, {sin(t )*r+d/2}) % side vertice of cylinder
  19. -- ({cos(t+12)*r+d/2}, 0, {sin(t+12)*r+d/2})
  20. -- ({cos(t+12)*r+d/2}, d, {sin(t+12)*r+d/2})
  21. -- ({cos(t )*r+d/2}, d, {sin(t )*r+d/2})
  22. -- cycle;
  23. end{tikzpicture}
  24. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement