0

Does anyone know how to do this scheme? Thanks in advance Diffraction pattern

New contributor
Quentin Mosset is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
3

This is one option (it is a bit bloated, but you will see why below)

\documentclass[border = 5pt, tikz]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}

\def\nframes{20}
\def\frame{0}

\begin{document}

\foreach \frame in {0,...,\nframes}
{
\pgfmathsetmacro{\time}{\frame / \nframes}


\begin{tikzpicture}[
    slit/.style={
      line width = 3pt,
      blue
    },
    wave/.style={
      green!30!black
    },
    arrow/.style={
      ->,
      tips = proper,
      color = magenta,
      line width = 1.5mm
    }
  ]

  %
  \path (-4, -4) rectangle (4, 4);

  % slit
  \draw[slit] (0, 1) -- ++(0, 2) (0, -1) -- ++(0, -2);

  % wave in
  \foreach \x in {-4,...,-1} {
    \draw[wave] (\x + \time, -3) -- (\x + \time, 3);
  }

  % wave out
  \foreach \x in {0,...,3} {
    \draw[wave] (\x + \time, -1) -- (\x + \time, 1);
  }

  \foreach \x in {0,...,2} {
    \draw[wave, xshift = 1cm, yshift = 1cm, rotate = 30] (\x + \time, -1) -- (\x + \time, 1);
    \draw[wave, xshift = 1cm, yshift = -1cm, rotate = -30] (\x + \time, -1) -- (\x + \time, 1);
  }

  % arrow
  \draw[arrow] (0.5, 1) ++ (30:\time) -- ++(30: 1);
  \draw[arrow] (-3.0, 0.0) ++ (0:\time) -- ++(0: 1);
  \draw[arrow] (1.0, 0.0) ++ (0:\time) -- ++(0: 1);
  \draw[arrow] (0.5, -1) ++ (-30:\time) -- ++(-30: 1);

\end{tikzpicture}
}
\end{document}

enter image description here

Now, if you uncomment the line \foreach \frame in {0,...,\nframes} this is what you get

enter image description here

Your Answer

Quentin Mosset is a new contributor. Be nice, and check out our Code of Conduct.

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.