1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
|
\documentclass[dvips,english,a4paper]{article}
\usepackage[latin9]{inputenc}%
\usepackage[T1]{fontenc}
\usepackage[bmargin=2cm,tmargin=2cm]{geometry}
%
\usepackage{pstricks,pst-node,pst-grad,url}
\usepackage{pst-diffraction}
\let\PSTfileversion\fileversion
\let\PSTfiledate\filedate
%
\usepackage{ccfonts}
\usepackage[euler-digits]{eulervm}
\usepackage[scaled=0.85]{luximono}
\def\UrlFont{\small\ttfamily}
\makeatletter
\def\verbatim@font{\small\normalfont\ttfamily}
\makeatother
\usepackage{prettyref}
\usepackage{fancyhdr}
\usepackage{babel}
\usepackage[colorlinks,linktocpage]{hyperref}
\pagestyle{fancy}
\def\Lcs#1{{\ttfamily\textbackslash #1}}
\lfoot{\small\ttfamily\jobname.tex}
\cfoot{Documentation}
\rfoot{\thepage}
\lhead{PSTricks}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\newcommand{\PS}{PostScript}
\newcommand\CMD[1]{\texttt{\textbackslash#1}}
\makeatother
\usepackage{framed}
\definecolor{shadecolor}{cmyk}{0.2,0,0,0}
\SpecialCoor
\title{\texttt{pst-diffraction}\\[6pt]
Diffraction patterns for diffraction from circular, rectangular and triangular
apertures
\\[1cm]
---\\[10pt]
{\normalsize v. \PSTfileversion (\PSTfiledate)}}
\author{%
\tabular[t]{c}Manuel Luque\\[3pt]
\url{ml@PSTricks.de}
\endtabular \and
\tabular[t]{c}Herbert Vo\ss\\[3pt]
\url{hv@PSTricks.de}\endtabular%
}
\date{\today}
\begin{document}
\maketitle
\vfill\noindent
Thanks to Doris Wagner for help with the documentation.\\
Also thanks to: Julien Cubizolles.
\clearpage
\tableofcontents
\clearpage
\section{Optical setup}
\begin{center}
\begin{pspicture}(0,-3)(12,3)
\pnode(0,0){S} \pnode(4,1){L'1} \pnode(4,-1){L'2} \pnode(6,1){E'1} \pnode(6,-1){E'2}
\pnode(6,0.5){E1}\pnode(6,-0.5){E2}\pnode(8.5,1.5){L1}\pnode(8.5,0.5){L2}\pnode(11.5,1.25){P}
% lentille L'
\pscustom[fillstyle=gradient,linecolor=blue,gradend=white]{%
\code{0.5 0.83333 scale}
\psarc(4,0){4.176}{-16.699}{16.699}
\psarc(12,0){4.176}{163.30}{196.699}}
% lentille L
\pscustom[fillstyle=gradient,linecolor=blue,gradend=white]{%
\code{1 1.5 scale}
\psarc(4.5,0){4.176}{-16.699}{16.699}
\psarc(12.5,0){4.176}{163.30}{196.699}}
\pspolygon[linestyle=none,fillstyle=vlines,
hatchcolor=yellow](S)(L'1)(E'1)(E1)(L1)(P)(L2)(E2)(E'2)(L'2)
\uput[90](4,1){$L'$}\uput[90](8.5,2){$L$}
\psdot(S)\uput[180](S){S}
\psline(S)(12,0)\psline[linewidth=2\pslinewidth](6,2)(6,0.5)\psline[linewidth=2\pslinewidth](6,-2)(6,-0.5)
\psline[linestyle=dashed](6,0.5)(6,-0.5)\psline(11.5,-3)(11.5,3)\psline(S)(L'1)(E'1)\psline(S)(L'2)(E'2)
\uput[0](P){P}
\psline(E1)(L1)(P)\psline(E2)(L2)(P)\psline[linestyle=dashed](8.5,0)(P)
%\rput(8.5,0){\psarc{->}(0,0){1.5}{0}{!1.25 3 atan}\uput[0](1.5;15){$\theta$}}
\uput[-90](10,0){$f$}\uput[0](6,2){E}\uput[135](6,0){T}\uput[45](11.5,0){O}
\end{pspicture}
\end{center}
Monochromatic light rays diverging from the focal point S of a positive lens L' emerge parallel to
the axis and strike the aperture stop E with the aperture T.
The light bends behind the aperture, this bending is called diffraction:
Every point in the opening acts as if it was a point source (Huygens's principle) and the
light waves of all those points overlap and produce an interference pattern (diffraction
pattern) on a screen. When the screen is very far away, the observed patterns are called
Fraunhofer diffraction patterns. In this case one can assume that the rays from the aperture
striking the same point P on the screen are parallel.\\
In practice one wants to realize a short distance between the aperture stop and the screen.
Hence one sets up a converging lens L after the opening and installs the screen
into the focal plane (containing the points P and O) of this lens. Parallel rays incident on
the lens are then focused at a point P in the focal plane.
With the following PSTricks-commands we can draw the diffraction patterns for different
geometric forms
of apertures. It is understood that only monochromatic light is used. The aperture stops can
have rectangular, circular or triangular openings.
The options available are the dimensions of the aperture under consideration and of the particular optical
setting, e.g. the radius in case of an circular opening. Moreover one can choose the wavelength
of the light (the associated color will be given automatically by the package).
There are three commands, for rectangular, circular and triangular openings respectively:
\begin{verbatim}
\psdiffractionRectangle[<Optionen>]
\psdiffractionCircular[<Optionen>]
\psdiffractionTriangle[<Optionen>]
\end{verbatim}
\section{The color}
The desired color is defined by specifying the associated wavelength $\lambda$ (in nanometers).
Red for instance one gets by the option \texttt{[lambda=632]} because
red light has the wavelength $\lambda_{\textrm{rot}}=632\,\textrm{nm}$.
The conversion of the wavelength into the associated \texttt{RGB}-value is done by PostScript.
The code is similar to the code of a FORTRAN program which can be found here: \\
\url{http://www.midnightkite.com/color.html}
\clearpage
\section{Diffraction from a rectangular aperture}
\begin{center}
\begin{pspicture}(-2,-1)(2,1.5)
\psframe(-0.5,-1)(0.5,1)
\pcline{<->}(-0.5,1.1)(0.5,1.1)
\Aput{$a$}
\pcline{<->}(0.6,1)(0.6,-1)
\Aput{$h=k\times a$}
\end{pspicture}
\end{center}
The width of the rectangle with the area $h=k\times a$ is defined by the letter \texttt{[a]},
the height by \texttt{[k]}.
The focal length is specified by \texttt{[f]}, the desired resolution in pixels [pixel].
With the option \texttt{[contrast]} one can improve the visibility of the minor secondary
maxima more.\\
We get a black and white picture if we use the option \texttt{[colorMode=0]},
the option \texttt{[colorMode=1]} provides the associated negative pattern. The options
\texttt{[colorMode=2]} and \texttt{[colorMode=3]} render color pictures in the
CMYK and RGB color model respectively.
By default the settings are as follows:
\begin{itemize}
\item \texttt{[a=0.2e-3]} in m ;
\item \texttt{[k=1]} ;
\item \texttt{[f=5]} in m ;
\item \texttt{[lambda=650]} in nm ;
\item \texttt{[pixel=0.5]} ;
\item \texttt{[contrast=38]}, maximal value ;
\item \texttt{[colorMode=3]}.
\end{itemize}
\begin{center}
\begin{pspicture}(-4,-4)(4,4)
\psdiffractionRectangle[f=2.5]
\uput[270](0,-3.5){$\backslash$\texttt{psdiffractionRectangle[f=2.5]}}
\end{pspicture}
\end{center}
\begin{center}
\begin{pspicture}(-2,-4.5)(2,4.5)
\psdiffractionRectangle[a=0.5e-3,k=0.5,f=4,pixel=0.5,colorMode=0]
\uput[270](0,-4.5){$\backslash$\texttt{psdiffractionRectangle[a=0.5e-3,k=0.5,f=4,colorMode=0]}}
\end{pspicture}
\end{center}
\begin{center}
\begin{pspicture}(-4,-2.5)(4,3)
\psdiffractionRectangle[a=0.5e-3,k=2,f=10,lambda=515,colorMode=1]
\uput[270](0,-2){$\backslash$\texttt{psdiffractionRectangle[a=0.5e-3,k=2,f=10,lambda=515,colorMode=1]}}
\end{pspicture}
\end{center}
\begin{center}
\begin{pspicture}(-4,-1)(4,1)
\psdiffractionRectangle[a=0.5e-3,k=20,f=10,pixel=0.5,lambda=450]
\uput[270](0,-0.5){$\backslash$\texttt{psdiffractionRectangle[a=0.5e-3,k=20,f=10,lambda=450]}}
\end{pspicture}
\end{center}
\section{Diffraction from two rectangular apertures}
%\begin{shaded}
%This simulation was provided by Julien
%\textsc{Cubizolles}.
%\end{shaded}
It is also possible to render the diffraction pattern of two congruent rectangles
(placed parallel such that their base is located on the $x$-axis)
by using the option \texttt{[twoSlit]}.
By default this option is deactivated.
The distance of the two rectangles is specified by the option $s$.
The default for $s$ is $\texttt{12e-3}\,\mathrm{m}$.
\begin{center}
\begin{pspicture}(-4,-1)(4,1)
\psdiffractionRectangle[a=0.5e-3,k=10,f=10,pixel=0.5,lambda=650,twoSlit,s=2e-3]
\uput[270](0,-0.5){$\backslash
$\texttt{psdiffractionRectangle[a=0.5e-3,k=10,f=10,pixel=0.5,lambda=650,twoSlit,s=2e-3]}}
\end{pspicture}
\end{center}
\clearpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Diffraction from a circular aperture}
The radius of the circular opening can be chosen via the letter \texttt{r}, e.g.
\texttt{[r=1e-3]}. The default is $r=1$ mm. In the first quadrant
PSTricks displays the graph of the intensity distribution (the maximum in the center will be
cropped if its height exceeds the margin of the \texttt{pspicture}-environment).
\begin{center}
\begin{pspicture}(-5,-5)(5,5)
\psdiffractionCircular[r=0.5e-3,f=10,pixel=0.5,lambda=520]
\uput[270](0,-5){$\backslash$\texttt{psdiffractionCircular[r=0.5e-3,f=10,lambda=520]}}
\end{pspicture}
\end{center}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Diffraction from two circular apertures}
Only the case of equal radii is provided, this common radius can be defined like in the
previous section via \texttt{[r=\dots]}.
Furthermore one has to give the half distance of the circles measured from their centers by
\texttt{[d=\dots]}, e.g. \texttt{[d=3e-3]}. Also the option
\texttt{[twoHole]} has to be used.\\
The rendering process could take some time in this case\dots
\begin{center}
\begin{pspicture}(-5,-5)(5,4)
\psdiffractionCircular[r=0.5e-3,f=10,d=3e-3,lambda=515,twoHole]
\uput[270](0,-4){$\backslash$\texttt{psdiffractionCircular[r=0.5e-3,f=10,d=3e-3,lambda=515,twoHole]}}
\end{pspicture}
\end{center}
\begin{center}
\begin{pspicture}(-6,-6)(6,6)
\psdiffractionCircular[r=0.5e-3,f=10,d=2e-3,lambda=700,twoHole,colorMode=0]
\uput[270](0,-5){$\backslash$\texttt{psdiffractionCircular[r=0.5e-3,f=10,d=2e-3,lambda=700,twoHole,colorMode=0]}}
\end{pspicture}
\end{center}
Not in every case bands occur in the central circle. The number $N$ of those inner
bands is given by $N=2.44\frac{d}{r}$. Thus this effect is not observable until $N\geq2$
or $d=\frac{2r}{1.22}$ (see \url{http://www.unice.fr/DeptPhys/optique/diff/trouscirc/diffrac.html}).
\begin{center}
\begin{pspicture}(-5,-6)(5,5)
\psdiffractionCircular[r=0.5e-3,f=10,d=4.1e-4,lambda=632,twoHole]
\uput[270](0,-5){$\backslash$
\texttt{psdiffractionCircular[r=0.5e-3,f=10,d=4.1e-4,lambda=632,twoHole]}}
\end{pspicture}
\end{center}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Diffraction from a triangular aperture}
Only the case of an equilateral triangle is provided, whose height \texttt{[h]} has to be
defined as an option. As is generally known, $h$ can be computed from the length $s$ of
its side by $h=\frac{\sqrt{3}}{2}s$. A black and white picture can be obtained by using the
option \texttt{[colorMode=0]}.
\begin{center}
\begin{pspicture}(-1,-1)(1,1)
\pspolygon*(0,0)(1;150)(1;210)
\pcline{|-|}(-0.732,-1)(0,-1)
\Aput{$h$}
\end{pspicture}
\vspace{1cm}
$\backslash$\texttt{psdiffractionTriangle[f=10,h=1e-3,contrast=38,colorMode=]}
\makebox[\linewidth]{%
\begin{pspicture}(-3,-3)(3,3)
\psdiffractionTriangle[f=10,h=1e-3,lambda=515,contrast=38]
\uput[270](0,-2.5){default color mode (>1)}
\end{pspicture}
\quad
\begin{pspicture}(-3,-3)(3,3)
\psdiffractionTriangle[f=10,h=1e-3,colorMode=1,contrast=38,lambda=515]
\uput[270](0,-2.5){\texttt{colorMode=1}}
\end{pspicture}
\quad
\begin{pspicture}(-3,-3)(3,3)
\psdiffractionTriangle[f=10,h=1e-3,colorMode=0,contrast=38,lambda=515]
\uput[270](0,-2.5){\texttt{colorMode=0}}
\end{pspicture}}
\end{center}
%\section{Credits}
\bgroup
\nocite{*}
\raggedright
\bibliographystyle{plain}
\bibliography{pst-diffraction-doc}
\egroup
\end{document}
|