solid-of-revolution.tex 673 B

1234567891011121314151617181920212223242526
  1. % Author: Marco Miani
  2. \documentclass[varwidth=true, border=2pt]{standalone}
  3. \usepackage{pgfplots}
  4. \pgfplotsset{compat=1.9}
  5. \begin{document}
  6. \pgfplotsset{
  7. colormap={whitered}{
  8. color(0cm)=(white);
  9. color(1cm)=(orange!75!red)
  10. }
  11. %colormap={color}{color(0cm)=(white); color(1cm)=(blue)}
  12. }
  13. \begin{tikzpicture}
  14. \begin{axis}[view={60}{30}]
  15. \addplot3[surf,
  16. samples=50,
  17. domain=1:2,y domain=0:2*pi,
  18. z buffer=sort]
  19. %({(2 + tan(deg(y)))*cos((deg(x)))}, {(2 + cos(x)) * sin(x)}, {x});
  20. ({x * cos(deg(y))}, {x * sin(deg(y))}, {1/x});
  21. \end{axis}
  22. \end{tikzpicture}
  23. \end{document}