3D 图 - 光学传递函数

3D 图 - 光学传递函数

对于我的论文,我想重新绘制上面显示的图像。不幸的是,我完全不知道该怎么做。我的 tikz 技能还不错,但是,这超出了我的能力。 线源二维卷积

希望有人能帮忙,非常感谢大家:)

我从类似这样的事情开始:

\documentclass{standalone}

\usepackage{tikz}
\usepackage{tikz-3dplot}

\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amstext}

\tdplotsetmaincoords{70}{150}

\begin{document}
\begin{tikzpicture}[scale = 1,
                    >=stealth,
                    lens/.style = {black},
                    parameter/.style = {thick,->},
                    rounded corners = 1pt,
                    opticalaxis/.style = {dashdotted},
                    tdplot_main_coords
                    ]
\draw[parameter] (0,0,0) coordinate(zero) --++ (-1,0,0); 
\draw[thick] (zero) --++ (1,0,0);
\draw[thick,->] (zero) --++ (0,2,0) node[below] {$y$};
\draw[thick] (zero) --++ (0,-2,0);
\draw[parameter] (zero) --++ (0,0,1) node[above]{$\delta(x) 1(y)$};

\foreach \y in {-1.8,-1.7,...,1.8} {
        \draw[->, >=latex] (0,\y,0) -- (0,\y,0.6);
        }

\end{tikzpicture}
\end{document}

答案1

您似乎已经完成了第一个图。(但是请注意,您正在加载tikz-3dplot,甚至设置视图但从未实现它。您需要放在tdplot_main_coords某处。)这是一个 pgfplots 替代方案。我猜函数看起来有点像您在屏幕截图上绘制的函数。

\documentclass[border=3.14mm,tikz]{standalone}
\usetikzlibrary{positioning}
\usepackage{amsmath}
\DeclareMathOperator{\PSF}{PSF}
\DeclareMathOperator{\LSF}{LSF}

\usepackage{pgfplots}
\pgfplotsset{compat=1.16,width=12cm,view={-45}{45}}
\begin{document}
    \begin{tikzpicture}[declare function={f(\r)={cos(\r*48)/(11+\r*\r)};
    g(\r)={0.05+cos(\r*48)/(11+1.5*\r*\r)};}]
        % https://tex.stackexchange.com/a/275668/121799
        \begin{axis}[name=plot1,xshift=-6cm,axis lines = center,
             ticks=none,
             every axis z label/.append style={name=zlabel-1,
             at={(ticklabel* cs:1.15)}},            
             data cs=polar,
             xlabel = {$x$},
             ylabel = {$y$},
             zlabel = {$\delta(x)\cdot 1(y)$},
             ticks=none,samples y=1,ymin=-12,ymax=12,
            enlargelimits=0.3]
            \addplot3[draw=none] (0,x,{f(x)});
            \pgfplotsinvokeforeach{-12,...,12}{
            \draw[-latex] (0,#1,0) -- (0,#1,0.07);}
        \end{axis}

        % https://tex.stackexchange.com/a/124936/121799
        \begin{axis}[name=plot2,axis lines = center,
             ticks=none,            
             data cs=polar,
             every axis z label/.append style={name=zlabel-2,
             at={(ticklabel* cs:1.15)}},
             xlabel = {$x$},
             ylabel = {$y$},
             zlabel = {$\PSF(x,y)$},
            enlargelimits=0.3,
            samples=30,
            domain=0:360, 
            y domain=0:12,samples y=72]
            \addplot3 [surf,mesh/ordering=y varies,shader=interp,z buffer=sort] {f(y)};
        \end{axis}
        \begin{axis}[xshift=6cm,yshift=0.5cm,view={-45}{45},
            samples=30,shader=interp,axis lines = center,
             ticks=none,    
            domain=-12:12,
            every axis z label/.append style={name=zlabel-3,
            at={(ticklabel* cs:1.05)}},
            xlabel = {$x$},
            ylabel = {$y$},         
            zlabel = {$\LSF(x)$},
            enlargelimits=0.6,
            y domain=-12:12,samples y=72]
            \addplot3 [surf,mesh/ordering=y varies,shader=interp,z buffer=sort] 
            {g(x)};
            \draw[fill=gray] plot[variable=\x,smooth,samples=30,domain=-12:12] 
            (\x,-12,{g(\x)}) --(12,-12,0) -- (-12,-12,0) -- 
            (-12,12,0) --  (-12,12,{g(12)}) -- cycle;
        \end{axis}
        \path (zlabel-1) -- node[midway]{$\times$} (zlabel-2)
         -- node[midway]{$=$} (zlabel-3);
    \end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容