我想要得到一个双曲圆柱体 $\frac{x^2}{a^2}-\frac{y^2}{b^2}=1$。
如何修改代码:请帮忙。
\documentclass[border=2mm]{standalone}
\usepackage {tikz}
\usetikzlibrary{3d}
\begin{document}
\begin{tikzpicture}[line cap=round,line join=round,x={(-0.5cm,-0.6cm)},y={(0.9333cm,-0.1646cm)},z={(0cm,0.5cm)}]
% coordinates
\coordinate (A1) at ({-4+2*cos(60)}, 1.75,{ 2*sin(60)});
\coordinate (C1) at ({-4+2*cos(60)},-1.75,{-2*sin(60)});
\coordinate (A2) at ({ 4-2*cos(60)}, 1.75,{ 2*sin(60)});
\coordinate (C2) at ({ 4-2*cos(60)},-1.75,{-2*sin(60)});
% cylinder back
\begin{scope}[canvas is xz plane at y=-1.75]
\shade [opacity=0.7,left color=blue!10,right color=blue!70,shading angle=120]
(A1) arc (60:-60:2) -- (C1) arc (-60:60:2) -- cycle;
\end{scope}
% y,z axis
\draw [-latex] (0,0,0) -- (0,3,0) node [right] {$y$};
\draw [-latex] (0,0,0) -- (0,0,3) node [above] {$z$};
% front cylinder
\begin{scope}[canvas is xz plane at y=-1.75]
\shade [opacity=0.7,left color=gray!10,right color=gray!70,shading angle=30]
(A2) arc (120:240:2) -- (C2) arc (240:120:2) -- cycle;
\end{scope}
\draw [-latex] (0,0,0) -- (3,0,0) node [left] {$x$};
\end{tikzpicture}
\end{document}