Debian Codegraph @

texmf-dist/doc/latex/pgf-interference/pgf-interference-en.tex

raw
1 % pgf-interference package: English manual
2 % Version 0.1
3 % 9. Januar 2022
4 \documentclass{scrartcl}
5 \usepackage[UKenglish]{babel}
6 \usepackage{pgf-interference}
7 \usepackage{libertinus}
8 \usepackage{cnltx-example}
9 \usepackage{mathtools}
10 \usepackage{pgfplots}
11 \usepackage{worldflags}
12 \usepackage[locale=UK,mode=match]{siunitx}
13 \usepackage[colorlinks=true,
14 allcolors=black,
15 bookmarksopen=true,
16 bookmarksopenlevel=0,
17 bookmarksnumbered=true,
18 pdfencoding=auto,
19 pdftitle={Drawing interference patterns with pgf/TikZ},
20 pdfsubject={Manual for the pgf-interference package},
21 pdfkeywords={latex pgf tikz interference},
22 pdfauthor={K. Wehr}]{hyperref}
23
24 \definecolor{pgfinterferencered}{wave}{632.8}
25
26 \definecolorscheme{pgfinterferencecolorscheme}{cs => cnltxformalblue,
27 option => cnltxgreen,
28 cnltx => pgfinterferencered}
29
30 \setcnltx{add-cmds = {pgfinterferenceoptions,pgfinterferencepattern},
31 color-scheme = pgfinterferencecolorscheme,
32 add-listings-options = {numbers=none},
33 pre-output = {\raggedright}}
34
35 \makeatletter
36 \setlength{\cnltx@before@skip}{5pt plus1pt minus1pt}
37 \setlength{\cnltx@after@skip}{1pt plus1pt minus1pt}
38 \makeatother
39
40 \selectcolormodel{rgb}
41
42 \setmonofont{DejaVu Sans Mono}[Scale=MatchLowercase]
43
44 \pgfplotsset{compat=newest}
45 \usetikzlibrary{angles}
46
47 \newenvironment{Befehlsliste}{\begin{list}{}{
48 \setlength\leftmargin{0pt}
49 \setlength\itemindent{-1em}
50 \setlength\parsep{0pt}
51 \setlength\listparindent{\parindent}
52 \setlength\itemsep{\topsep}}}{\end{list}}
53
54 \newcommand*\Befehlsbeschreibung[2]{\item\cs{#1}#2\\}
55
56 \newcommand*\Optionsbeschreibung[3]{\item\choicekey{#1}{#2}
57 \hfill Default:~\code{#3}\\}
58
59 \newcommand*\OptionsbeschreibungZahl[2]{\item
60 \choicekey{#1}{\meta{number}}
61 \hfill Default:~\code{#2}\\}
62
63 \newcommand*\Paket[1]{\textsf{#1}}
64 \newcommand\inter{\textcolor{pgfinterferencered}{\Paket{pgf-interference}}}
65 \newcommand\pgftikz{\Paket{\textsc{pgf}/Ti\textit{k}Z}}
66 \newcommand\pakettikz{\Paket{Ti\textit{k}Z}}
67 \newcommand\AutorNachname{Wehr}
68 \newcommand\AutorVorname{Keno}
69
70 \begin{document}
71
72 \begin{center}
73 \fontsize{41}{41}\selectfont\textsc{\inter}
74
75 \medskip
76 \pgfinterferencepattern{}
77
78 \LARGE
79 \rmfamily
80 Drawing interference patterns with \pgftikz
81
82 \bigskip
83 \Large
84 \textcolor{pgfinterferencered}{Version 0.1}
85
86 \medskip
87 \large
88 \today
89
90 \bigskip
91 \textit{Package author}
92
93 \smallskip
94 \AutorVorname\ \AutorNachname
95
96 \bigskip
97 \textit{Questions and bug reports}
98
99 \smallskip
100 \normalsize
101 \url{https://codeberg.org/wehr/pgf-interference}
102 \end{center}
103
104 \begin{abstract}
105 \noindent This \LaTeX\ package makes it possible to simulate interference patterns occuring on a screen if monochromatic light is diffracted at regular structures of slits. It makes use of the \pgftikz\ graphics package.
106
107 \medskip
108 \noindent The package is still in an experimental stage. The user interface may change in future versions.
109
110 \medskip
111 \noindent
112 \worldflag[width=9pt,framewidth=0pt]{DE} A German version of this manual is available in the file \texttt{pgf-interference-de.pdf}.
113 \end{abstract}
114
115 \vfill
116 \tableofcontents
117
118 \newpage
119 \section{Introduction}
120 The occurence of interference patterns after passing through fine structures of slits gives impressive evidence for the wave nature of light. Such interference patterns are already examined in physics lessons in upper secondary school.
121
122 As only a limited stock of light sources and diffraction objects is available in physics collections, it is desirable to be able to present the interference images for wavelengths and slit dimensions that are not experimentally accessible.
123 \begin{center}
124 \pgfinterferencepattern{wavelength=450e-9}
125
126 \small
127 Interference pattern for light with a wavelength of
128 \qty{450}{nm}
129 behind a double slit
130
131 \medskip
132 \pgfinterferencepattern{wavelength=550e-9,slits=4,intensity=3}
133
134 \small
135 Interference pattern for light with a wavelength of
136 \qty{550}{nm}
137 behind a quadruple slit
138
139 \medskip
140 \pgfinterferencepattern{slits=1,slit-width=5e-5,intensity=10}
141
142 \small
143 Interference pattern for light with a wavelength of
144 \qty{633}{nm}
145 behind a single slit
146 \end{center}
147
148 The \inter\ package makes this possible. Only monochromatic light and regular slit structures (single, double, and multiple slits) are supported. Also, so far only interference fringes can be displayed, as they occur when the light is expanded vertically, not the typical “interference dots” generated by a laser beam.
149
150 The package is subject to the
151 \emph{\LaTeX\ Project Public License},
152 version 1.3 or later.%
153 \footnote{\url{http://www.latex-project.org/lppl.txt}}
154
155 \newpage
156 \section{Usage}
157 The package is loaded as usual:
158 \begin{sourcecode}
159 \usepackage{pgf-interference}
160 \end{sourcecode}
161 This also loads the \pakettikz{} package indirectly.
162
163 Compiling documents with many interference patterns can take a long time due to the calculations involved. Therefore, there is a draft mode in which only the screen is drawn, but no interference pattern, which is much faster. The draft mode is activated by the package option
164 \code{draft}.
165 \begin{sourcecode}
166 \usepackage[draft]{pgf-interference}
167 \end{sourcecode}
168
169 The \inter{} package defines two commands:
170 \begin{Befehlsliste}
171 \Befehlsbeschreibung{pgfinterferencepattern}{\marg{options}}
172 Generates an interference pattern. The argument is a comma-separated list of options. The available options are described in section \ref{Optionen}.
173 \begin{example}
174 \pgfinterferencepattern{slits=3,wavelength=590e-9,slit-distance=3e-5,intensity=2}
175 \end{example}
176 \Befehlsbeschreibung{pgfinterferenceoptions}{\marg{options}}
177 Sets options without drawing an interference pattern.
178 \begin{sourcecode}
179 \pgfinterferenceoptions{slit-width=1e-6,screen-distance=3.5,screen-width=0.15}
180 \end{sourcecode}
181 \end{Befehlsliste}
182
183 \newpage
184 \section{Options\label{Optionen}}
185 \pgfinterferenceoptions{screen-width=0.05,screen-height=0.015}
186 All lengths of the experiment such as the wavelength, the slit distance, the screen width, etc.\@ are to be given in metres, possibly using the scientific notation. For example, a slit distance of
187 \qty{0,1}{mm}
188 can be typed in as
189 \code{0.0001}, \code{0.1e-3}, or \code{1e-4}.\footnote{The lengths are internally treated as floating point numbers of the \Paket{expl3} module \Paket{l3fp}, whose syntax therefore also applies to the input.}
190
191 \subsection{Options for the light}
192 \begin{Befehlsliste}
193 \OptionsbeschreibungZahl{wavelength}{632.8e-9}
194 Wavelength of the light in \unit{m}. The default setting corresponds to the wavelength of the helium-neon laser
195 (\qty{632,8}{nm}).
196 The wavelength does not only influence the position but also the colour of the interference maxima, which is determined with the help of the \Paket{xcolor} package.
197
198 For wavelengths outside the visible range, the maxima are shown in black.\footnote{According to the algorithm of the \Paket{xcolor} package, this is the case for wavelengths below
199 \qty{363}{nm}
200 and above
201 \qty{814}{nm}.}
202 In order to make such maxima visible, the screen colour should be set to white. The longest possible wavelength is
203 \qty{1}{m}.
204 \begin{sidebyside}
205 \pgfinterferencepattern{wavelength=590e-9}
206 \pgfinterferencepattern{wavelength=350e-9,screen-color=white}
207 \end{sidebyside}
208 \OptionsbeschreibungZahl{intensity}{1.0}
209 Relative intensity of the light. If not all expected maxima are visible, the value should be increased.
210 \begin{sidebyside}
211 \pgfinterferencepattern{slits=5}
212 \pgfinterferencepattern{slits=5,intensity=6.5}
213 \end{sidebyside}
214 \end{Befehlsliste}
215
216 \subsection{Options for the diffraction object}
217 \begin{Befehlsliste}
218 \OptionsbeschreibungZahl{slits}{2}
219 Number of slits
220 \begin{sidebyside}
221 \pgfinterferencepattern{slits=3}
222 \pgfinterferencepattern{slits=20}
223 \end{sidebyside}
224 \OptionsbeschreibungZahl{slit-distance}{1e-4}
225 Slit distance in m
226 \begin{sidebyside}
227 \pgfinterferencepattern{slit-distance=2e-4}
228 \pgfinterferencepattern{slit-distance=5e-5}
229 \end{sidebyside}
230 \OptionsbeschreibungZahl{slit-width}{1e-5}
231 Slit width in m
232 \begin{sidebyside}
233 \pgfinterferencepattern{slit-width=2e-5}
234 \pgfinterferencepattern{slit-width=3.5e-5}
235 \end{sidebyside}
236 \end{Befehlsliste}
237
238 \subsection{Options for the screen}
239 \begin{Befehlsliste}
240 \OptionsbeschreibungZahl{screen-distance}{1.0}
241 Distance of the screen from the diffraction object in m
242 \begin{sidebyside}
243 \pgfinterferencepattern{screen-distance=0.8}
244 \pgfinterferencepattern{screen-distance=1.6}
245 \end{sidebyside}
246 \OptionsbeschreibungZahl{screen-width}{0.1}
247 Width of the screen in m
248 \OptionsbeschreibungZahl{screen-height}{0.03}
249 Height of the screen in m
250 \OptionsbeschreibungZahl{scale}{1.0}
251 Factor by which the screen is scaled in the figure
252
253 The dimensions for width and height refer to the real screen. The size of the screen in the figure depends on the value of the \option{scale} option.
254 \begin{sidebyside}
255 \pgfinterferencepattern{screen-width=0.06,screen-height=0.01}
256 \pgfinterferencepattern{slits=10,slit-distance=2e-6,slit-width=2e-7,screen-width=2,screen-height=0.5,scale=0.03}
257 \end{sidebyside}
258 \Optionsbeschreibung{screen-color}{\meta{colour}}{black}
259 Colour of the screen. The syntax of the \Paket{xcolor} package applies.
260 \begin{sidebyside}
261 \pgfinterferencepattern{screen-color=yellow}
262 \pgfinterferencepattern{screen-color=green!25!black}
263 \end{sidebyside}
264 \Optionsbeschreibung{ruler}{above,below,screen,none}{none}
265 A ruler with a centimetre scale can be displayed above or below the screen.
266
267 With \code{ruler=screen}, the ruler itself serves as a screen. In this case the \option{screen-height} and \option{screen-color} options are ignored.
268 \begin{example}
269 \pgfinterferenceoptions{screen-width=0.135,screen-height=0.025}
270 \pgfinterferencepattern{ruler=above}
271 \pgfinterferencepattern{ruler=below,scale=0.8}
272 \pgfinterferencepattern{ruler=screen}
273 \end{example}
274 \end{Befehlsliste}
275
276 \section{Physical theory}
277 The textbooks (e.\,g. \cite{BS}, p. 373) give the following formula for the intensity of the light diffracted in the direction of $\varphi$ behind a multiple slit:
278 \begin{equation}
279 I(\varphi)\sim\frac{\sin^2\bigl(\frac{\pi\,b}{\lambda}\,\sin\varphi\bigr)}{\bigl(\frac{\pi\,b}{\lambda}\,\sin\varphi\bigr)^2}\cdot\frac{\sin^2\bigl(\frac{p\,\pi}{\lambda}\,s\,\sin\varphi\bigr)}{\sin^2\bigl(\frac{\pi}{\lambda}\,s\,\sin\varphi\bigr)}\label{Winkelabhaengigkeit}
280 \end{equation}
281 where $b$ is the slit width, $s$ the slit distance, and $p$ the number of slits.
282
283 The first factor describes the intensity distribution as a result of diffraction at the single slit, the second the interference at an ideal multiple slit (see Fig.\@
284 \ref{Intensitaetsverteilung}).
285 \begin{figure}
286 \centering
287 \begin{minipage}{13,4cm}
288 \raggedleft
289 \begin{tikzpicture}
290 \begin{axis}[xmin=-2.5,xmax=2.5,ymin=0,ymax=1.2,xlabel=$\varphi$,ylabel=Intensity (a.\,u.),xtick={-2,...,2},xticklabels={\ang{-2},\ang{-1},\ang{0},\ang{1},\ang{2}},yticklabels=\empty,x=2.5cm,y=5.5cm]
291 \addplot[domain=-2.5:2.5,samples=500,blue] {(sin(180*3e-5/632.8e-9*sin(x)))^2/(pi*3e-5/632.8e-9*sin(x))^2};
292 \addplot[domain=-2.5:2.5,samples=700,green] {(sin(4*180/632.8e-9*1e-4*sin(x)))^2/(sin(180/632.8e-9*1e-4*sin(x)))^2/16};
293 \addplot[domain=-2.5:2.5,samples=700,thick,red] {(sin(180*3e-5/632.8e-9*sin(x)))^2/(pi*3e-5/632.8e-9*sin(x))^2*(sin(4*180/632.8e-9*1e-4*sin(x)))^2/(sin(180/632.8e-9*1e-4*sin(x)))^2/16};
294 \legend{Single slit, Ideal quadruple slit, Real quadruple slit}
295 \end{axis}
296 \end{tikzpicture}
297
298 \medskip
299 \pgfinterferencepattern{slits=4,slit-width=3e-5,screen-distance=1.431,screen-width=0.125,screen-height=0.025,intensity=6}
300 \end{minipage}
301 \caption{Intensity distribution and interference pattern for a quadruple slit with a slit distance of
302 \qty{0,1}{mm}
303 and a slit width of
304 \qty{30}{\micro\m}
305 at a wavelength of
306 \qty{632,8}{nm}\label{Intensitaetsverteilung}}
307 \end{figure}
308
309 \begin{figure}
310 \centering
311 \begin{tikzpicture}[font=\small]
312 \draw[thick] (-3,5)--node[above] {Screen} (3,5);
313 \draw (0,0) coordinate (O)--node[left] {$a$} (0,5) coordinate(A);
314 \draw (0,0)--node[right] {$e$} (2,5) coordinate (B);
315 \draw[dotted,thick] (-2,0)--node[below] {Diffraction object} (2,0);
316 \path (A)--node[below] {$x$} (B);
317 \draw pic[draw,angle radius=1.4cm,pic text={$\varphi$}] {angle=B--O--A};
318 \end{tikzpicture}
319 \caption{Relationship between the diffraction angle
320 $\varphi$
321 and the position
322 $x$
323 on the screen
324 \label{Dreieck}}
325 \end{figure}
326 To display the interference pattern, we need the intensity as a function of the position $x$ on the screen. From Fig.\@ 2 we get
327 \begin{equation}
328 \sin\varphi=\frac{x}{e}=\frac{x}{\sqrt{a^2+x^2}}\label{Sinus}
329 \end{equation}
330 where $a$ is the screen distance. Substituting
331 \eqref{Sinus}
332 into
333 \eqref{Winkelabhaengigkeit}
334 gives:
335 \[I(x)\sim\frac{\sin^2\left(\frac{\pi\,b\,x}{\lambda\,\sqrt{a^2+x^2}}\right)}{\left(\frac{\pi\,b\,x}{\lambda\,\sqrt{a^2+x^2}}\right)^2}\cdot\frac{\sin^2\left(\frac{p\,\pi\,s\,x}{\lambda\,\sqrt{a^2+x^2}}\right)}{\sin^2\left(\frac{\pi\,s\,x}{\lambda\,\sqrt{a^2+x^2}}\right)}\]
336 The calculation of the interference patterns is based on this formula.
337
338 The reduction of the intensity due to the increasing distance from the diffraction object with increasing $x$ is not taken into account.
339
340 \begin{thebibliography}{9}
341 \bibitem{BS} Bergmann/Schaefer: Lehrbuch der Experimentalphysik. Band 3: Optik, hrsg. von Heinrich Gobrecht, \textsuperscript{7}1978.
342 \end{thebibliography}
343
344 \end{document}