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. two dimensional convolution of line source

hopefully someone can help, thanks a lot guys :)

i started with something like that:





\begin{tikzpicture}[scale = 1,
                    lens/.style = {black},
                    parameter/.style = {thick,->},
                    rounded corners = 1pt,
                    opticalaxis/.style = {dashdotted},
\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);

  • 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
    Commented Sep 15, 2018 at 22:05
  • i thought the last one would be the hardest..
    – Bakira
    Commented Sep 15, 2018 at 22:16

1 Answer 1


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.


    \begin{tikzpicture}[declare function={f(\r)={cos(\r*48)/(11+\r*\r)};
        % https://tex.stackexchange.com/a/275668/121799
        \begin{axis}[name=plot1,xshift=-6cm,axis lines = center,
             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,
            \addplot3[draw=none] (0,x,{f(x)});
            \draw[-latex] (0,#1,0) -- (0,#1,0.07);}

        % https://tex.stackexchange.com/a/124936/121799
        \begin{axis}[name=plot2,axis lines = center,
             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)$},
            y domain=0:12,samples y=72]
            \addplot3 [surf,mesh/ordering=y varies,shader=interp,z buffer=sort] {f(y)};
            samples=30,shader=interp,axis lines = center,
            every axis z label/.append style={name=zlabel-3,
            at={(ticklabel* cs:1.05)}},
            xlabel = {$x$},
            ylabel = {$y$},         
            zlabel = {$\LSF(x)$},
            y domain=-12:12,samples y=72]
            \addplot3 [surf,mesh/ordering=y varies,shader=interp,z buffer=sort] 
            \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;
        \path (zlabel-1) -- node[midway]{$\times$} (zlabel-2)
         -- node[midway]{$=$} (zlabel-3);

enter image description here

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .