使用 pgfplots 旋转表面

使用 pgfplots 旋转表面

我试图旋转表面来获得如下效果:

在此处输入图片描述

我尝试使用这个答案没有结果。到目前为止我的代码:

\documentclass[10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{shadings}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\begin{document}
\begin{tikzpicture}[bullet/.style={circle,fill,inner sep=0.5pt}, declare function={f(\x,\y)=2-0.2*pow(\x-1.25,2)-0.2*pow(\y-1,2);}]
 \begin{axis}[view={110}{30},colormap/blackwhite,axis lines=middle,%
    zmax=2.5,zmin=0,xmin=-0.2,xmax=2.5,ymin=-0.2,ymax=2.5,%
    xlabel=$x$,ylabel=$y$,zlabel=$z$,
    xtick=\empty,ytick=\empty,ztick=\empty]
    
  
  \draw[fill=white!50!blue, opacity=0.3,thick]
  (60:1) -- (60:2) arc (60:30:2) -- (30:1) arc (30:60:1);
  
  
  \draw[blue,dashed,ultra thin] (1,1.732050808,0) -- (1,1.732050808,{f(1,1.732050808)});
  \draw[blue,dashed,ultra thin] (1.732050808,1,0) -- (1.732050808,1,{f(1.732050808,1)});
  \draw[blue,dashed,ultra thin] (0.5,0.8660254038,0) -- (0.5,0.8660254038,{f(0.5,0.8660254038)});
  \draw[blue,dashed,ultra thin] (0.8660254038,0.5,0) -- (0.8660254038,0.5,{f(0.8660254038,0.5)});
  
  \draw (1,1,0) node[]{$D$};

  \draw (0.6,2,{f(0.6,2)}) node[right,font=\footnotesize]{$z=f(r,\theta)$};
   
  \addplot3[surf,shader=interp,domain=0.25:2,domain y=0.25:2,opacity=0.4] {f(x,y)};
 
   \draw [blue, domain=0:2, smooth, variable=\x, samples=100] plot (\x, {sqrt(3)*\x});
\draw [blue, domain=0:3.5, smooth, variable=\x, samples=100] plot (\x, {1/sqrt(3)*\x});

 \end{axis}

\end{tikzpicture}
\end{document}

在此处输入图片描述

所以基本上我要做的是将表面旋转 30 度,这样它就会与坐标飞机。

相关内容