# 3D Plot - Optical Transfer Function

For my Thesis i would like to replot the image shown above. unfortunately i have absolutly no idea how to do that. my skills in tikz are not that bad, however, this exceeds my abilities.

hopefully someone can help, thanks a lot guys :)

i started with something like that:

\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}

• Welcome to TeX.SE! What have you tried? The first and last plots can be done with tikz-3dplot or pgfplots, the middle plot also but requires some more effort than the other two.
– user121799
Sep 15 '18 at 22:05
• i thought the last one would be the hardest.. Sep 15 '18 at 22:16

You seem to already have done the first plot. (Notice, however, that you are loading tikz-3dplot, even set the view but never implement it. You need to put tdplot_main_coords somewhere.) Here is a pgfplots alternative. I guessed functions that look somewhat like what you plot on your screen shot.

\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]
\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]
\end{axis}
\begin{axis}[xshift=6cm,yshift=0.5cm,view={-45}{45},
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]
{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}


• One way to get a mesh is to remove shader=interp and add draw=black,thin, to the respective plots.
– user121799
Sep 15 '18 at 23:36
• Thanks a lot! Very helpfull, know i can just make small modifications :-) Sep 16 '18 at 9:18