답변1
확신하는. 여기에 예가 있습니다. 컴파일을 하면 lualatex
컴파일이 더 빨라집니다.
\documentclass[tikz,border=3mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\begin{document}
\begin{tikzpicture}[declare function={f(\x,\y)=1+\x*\x+\y*\y;}]
\matrix[column sep=3em]{
\begin{axis}[hide axis,domain=0:1,domain y=0:360,smooth,samples=25,samples y=61]
\addplot3[surf,shader=flat] ({x*cos(y)},{0.8*x*sin(y)},{0});
\addplot3[surf,shader=interp,z buffer=sort] ({x*cos(y)},{0.8*x*sin(y)},{f(x*cos(y),0.8*x*sin(y))});
\end{axis}
&
\begin{axis}[hide axis,domain=0:1,domain y=0:360,smooth,samples=25,samples y=61]
\addplot3[surf,shader=flat] ({x*cos(y)*(2+sin(3*y))},{0.8*x*sin(y)*(2+sin(3*y)},{0});
\addplot3[surf,shader=interp,z buffer=sort] ({x*cos(y)*(2+sin(3*y)},{0.8*x*sin(y)*(2+sin(3*y)},{f(x*cos(y),0.8*x*sin(y))});
\end{axis}\\
};
\end{tikzpicture}
\end{document}
또는 삼각형 도메인을 사용합니다.
\documentclass[tikz,border=3mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\begin{document}
\begin{tikzpicture}[declare function={f(\x,\y)=1+\x*\x+\y*\y;}]
\matrix[column sep=3em]{
\begin{axis}[hide axis,domain=0:1,domain y=0:360,smooth,samples=25,samples y=61,
declare function={myx(\x,\y)=\x*cos(\y);myy(\x,\y)=\x*sin(\y);}]
\addplot3[surf,shader=flat] ({myx(x,y)},{myy(x,y)},{0});
\addplot3[surf,shader=interp,z buffer=sort]
({myx(x,y)},{myy(x,y)},{f(myx(x,y),myy(x,y))});
\end{axis}
&
\begin{axis}[hide axis,domain=-1:1,domain y=0:1,samples=25,samples y=61,
declare function={myx(\x,\y)=\x;myy(\x,\y)=\y*(1-abs(\x));}]
\addplot3[surf,shader=flat] ({myx(x,y)},{myy(x,y)},{0});
\addplot3[surf,shader=interp,z buffer=sort]
({myx(x,y)},{myy(x,y)},{f(myx(x,y),myy(x,y))});
\end{axis}\\
};
\end{tikzpicture}
\end{document}
필터를 사용할 수도 있지만 일반적으로 경계가 약간 픽셀화되어 보입니다.