答案1
我觉得如果你尝试在其他帖子的基础上进行构建,包括你得到的答案,你会做得更好。
\documentclass[tikz,border=3mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16,width=7cm,height=11cm}
\begin{document}
\begin{tikzpicture}
\begin{axis}[axis lines=middle,ymin=0,xmin=0,zmin=0,smooth,
colormap/hot,view={115}{20},
xtick=\empty,ytick=\empty,ztick=\empty,
declare function={f(\x)=15+\x*\x;k=3;}]
\draw[blue] plot[variable=\y,domain=0:360,smooth cycle]
({7+k*cos(\y)*(1-0.2*cos(2*\y)-0.2*cos(\y))},{7+k*sin(\y)*(1-0.2*cos(2*\y)-0.2*cos(\y))},{0});
\fill[blue,fill opacity=0.5] plot[variable=\y,domain=290:97]
({7+k*cos(\y)*(1-0.2*cos(2*\y)-0.2*cos(\y))},{7+k*sin(\y)*(1-0.2*cos(2*\y)-0.2*cos(\y))},{f(k)})
-- (7,12.5,{f(k)}) -- (1.5,12.5,{f(k)}) -- (1.5,1.5,{f(k)}) -- (7,1.5,{f(k)}) -- cycle;
\addplot3[surf,shader=interp,domain y=0:360,samples y=51,domain=0:4,z buffer=sort]
({7+x*cos(y)*(1-0.2*cos(2*y)-0.2*cos(y))},{7+x*sin(y)*(1-0.2*cos(2*y)-0.2*cos(y))},{f(x)});
\fill[blue,fill opacity=0.5] plot[variable=\y,domain=-70:97]
({7+k*cos(\y)*(1-0.2*cos(2*\y)-0.2*cos(\y))},{7+k*sin(\y)*(1-0.2*cos(2*\y)-0.2*cos(\y))},{f(k)})
-- (7,12.5,{f(k)}) -- (12.5,12.5,{f(k)}) -- (12.5,1.5,{f(k)}) -- (7,1.5,{f(k)}) -- cycle;
\end{axis}
\end{tikzpicture}
\end{document}