\documentclass[ngerman,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\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}
\usepackage{xspace}
\def\UrlFont{\small\ttfamily}
\newcommand*\psp{\texttt{pspicture}\xspace}
\makeatletter
\def\verbatim@font{\small\normalfont\ttfamily}
\makeatother
\usepackage{showexpl}
\lstdefinestyle{syntax}{backgroundcolor=\color{blue!20},numbers=none,xleftmargin=0pt,xrightmargin=0pt,
    frame=single}
\lstdefinestyle{example}{backgroundcolor=\color{red!20},numbers=none,xleftmargin=0pt,xrightmargin=0pt,
    frame=single}
\lstset{wide=true,language=PSTricks,
    morekeywords={psdiffractionCircular,psdiffractionRectangle,psdiffractionTriangle}}


\usepackage{prettyref}
\usepackage{fancyhdr}
\usepackage{multicol}

\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]
\mbox{}\\[1cm]
Beugungsmuster für Beugung an kreisförmigen, rechteckigen und dreieckigen
Öffnungen\\[10pt]
---\\[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
Dank an Doris Wagner für die Übersetzung der Dokumentation.\\
Beiträge und Anmerkungen lieferten: Julien Cubizolles.

\clearpage
\tableofcontents
\clearpage


\section{Versuchsaufbau}

\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}
\pspolygon[linestyle=none,fillstyle=vlines,
    hatchcolor=yellow](S)(L'1)(E'1)(E1)(L1)(P)(L2)(E2)(E'2)(L'2)
% 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}}
\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}

Das von der punktförmigen Lichtquelle S ausgehende monochromatische Licht verlässt die
Sammellinse L' achsenparallel und trifft auf die Blende E mit der Öffnung T.
Das Licht wird an der Öffnung gebeugt:
Jeder Punkt in der Öffnung wirkt als punktförmige Lichtquelle (Huygens'sches Prinzip) und es entsteht ein
Interferenzmuster (Beugungsmuster), welches auf einem Schirm beobachtet werden kann. Ist der Schirm von der
Blende hinreichend weit entfernt, so spricht man von Fraunhofer'scher Beugung. 
In diesem Fall kann man annehmen, da"s alle Lichtstrahlen, die von der Öffnung her kommen und
denselben Punkt P auf dem Schirm treffen, parallel verlaufen.\\
In der Praxis will man den Abstand zwischen Schirm und Blende klein halten. Deshalb
wird zwischen die Blende und den Schirm eine Sammellinse L montiert und der
Schirm (in der Zeichnung enthält er die Punkte P und O) in die Brennebene dieser Linse gestellt. 
Links von der Linse parallel verlaufende Lichtstrahlen werden dann im Punkt P in der Brennebene
fokussiert.

Die folgenden PSTricks-Befehle ermöglichen es, Beugungsmuster für
verschiedene Formen von Blendenöffnungen zu erstellen. Dabei wird die Verwendung von monochromatischem
Licht vorausgesetzt. Die Blenden können eine rechteckige, kreisförmige oder
dreieckige Öffnung haben.

Als mögliche Optionen für die Befehle hat man die Abmessungen, die sich aus dem jeweiligen
Versuchsaufbau ergeben, etwa
den Radius bei Verwendung einer Lochblende. Au"serdem kann man die Wellenlänge des verwendeten Lichts
angeben (die zugehörige Farbe wird vom Paket dann automatisch zugeordnet).

Es gibt drei Befehle, jeweils einen für rechteckige, kreisförmige und
dreieckige Öffnungen:


\begin{lstlisting}[style=syntax]
\psdiffractionRectangle[<Optionen>]
\psdiffractionCircular[<Optionen>]
\psdiffractionTriangle[<Optionen>]
\end{lstlisting}


\section{Die Farbe}
Die gewünschte Lichtfarbe wird über die Angabe der zugehörigen Wellenlänge
$\lambda$ (in Nanometern) definiert. Für die Farbe rot beispielsweise gibt man als
Option \texttt{[lambda=632]} an wegen $\lambda_{\textrm{rot}}=632\,\textrm{nm}$.

Die Umrechnung der Wellenlänge in den entsprechenden Wert des
\texttt{RGB}-Farbschemas wird von PostScript durchgeführt. Der zugrunde liegende
Code lehnt sich an an ein Fortran-Programm, welches man auf folgender Seite
findet:
\url{http://www.midnightkite.com/color.html}.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Beugung an einer rechteckigen Blendenöffnung}

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

Die Breite des Rechtecks mit der Fläche $h=k\times a$ wird
über den Buchstaben \texttt{[a]} definiert, die Höhe
über den Buchstaben \texttt{[k]}.
Die Brennweite der Linse gibt man durch \texttt{[f]} an, die Auflösung kann man mit der
Option [pixel] verändern.
Mit der Option \texttt{[contrast]} kann man erreichen, da"s die Nebenmaxima des
Beugungsmusters deutlicher werden.\\
Ein Schwarzweissbild erhält man, wenn man die Option \texttt{[colorMode=0]}
verwendet, \texttt{[colorMode=1]} liefert das zugehörige Negativ. Die Optionen
\texttt{[colorMode=2]} bzw. \texttt{[colorMode=3]} liefern Farbbilder im
CMYK-Farbmodell bzw. RGB-Farbmodell.

Defaultmä"sig sind folgende Werte voreingestellt:

\begin{tabular}{@{}lll@{}}
\texttt{[a=0.2e-3]} in m;    & \texttt{[k=1]};       &  \texttt{[f=5]} in m;\\
\texttt{[lambda=650]} in nm; & \texttt{[pixel=0.5]}; &   \texttt{[contrast=38]}, Maximalwert;\\
\texttt{[colorMode=3]};   &   \texttt{[IIID=false]}.
\end{tabular}

\bigskip
\noindent
\begin{pspicture}(-3.5,-3.5)(3.5,3.5)
\psdiffractionRectangle[f=2.5]
\end{pspicture}
\hfill
\begin{pspicture}(-1.5,-2.5)(3.5,3.5)
\psdiffractionRectangle[IIID,Alpha=30,f=2.5]
\end{pspicture}

\begin{lstlisting}[style=example]
\begin{pspicture}(-3.5,-3.5)(3.5,3.5)
\psdiffractionRectangle[f=2.5]
\end{pspicture}
\hfill
\begin{pspicture}(-1.5,-2.5)(3.5,3.5)
\psdiffractionRectangle[IIID,Alpha=30,f=2.5]
\end{pspicture}
\end{lstlisting}



\noindent\begin{pspicture}(-2,-4)(2,4)
\psdiffractionRectangle[a=0.5e-3,k=0.5,f=4,pixel=0.5,colorMode=0]
\end{pspicture}
\hfill
\begin{pspicture}(0,-3)(4,4)
\psdiffractionRectangle[IIID,a=0.5e-3,k=0.5,f=4,pixel=0.5,colorMode=0]
\end{pspicture}


\begin{lstlisting}[style=example]
\begin{pspicture}(-2,-4)(2,4)
\psdiffractionRectangle[a=0.5e-3,k=0.5,f=4,pixel=0.5,colorMode=0]
\end{pspicture}
\hfill
\begin{pspicture}(0,-3)(4,4)
\psdiffractionRectangle[IIID,a=0.5e-3,k=0.5,f=4,pixel=0.5,colorMode=0]
\end{pspicture}
\end{lstlisting}



\noindent
\begin{pspicture}(-2.5,-2.5)(3.5,3)
\psdiffractionRectangle[a=0.5e-3,k=2,f=10,lambda=515,colorMode=1]
\end{pspicture}
\hfill
\begin{pspicture}(-1.5,-2)(3.5,3)
\psdiffractionRectangle[IIID,Alpha=20,a=0.5e-3,k=2,f=10,lambda=515,colorMode=1]
\end{pspicture}


\begin{lstlisting}[style=example]
\begin{pspicture}(-2.5,-2.5)(3.5,3)
\psdiffractionRectangle[a=0.5e-3,k=2,f=10,lambda=515,colorMode=1]
\end{pspicture}
\hfill
\begin{pspicture}(-1.5,-2)(3.5,3)
\psdiffractionRectangle[IIID,Alpha=20,a=0.5e-3,k=2,f=10,lambda=515,colorMode=1]
\end{pspicture}
\end{lstlisting}


\noindent
\begin{pspicture}(-3.5,-1)(3.5,1)
\psdiffractionRectangle[a=0.5e-3,k=20,f=10,pixel=0.5,lambda=450]
\end{pspicture}
\hfill
\begin{pspicture}(-3.5,-1)(3.5,4)
\psdiffractionRectangle[IIID,Alpha=10,a=0.5e-3,k=20,f=10,pixel=0.5,lambda=450]
\end{pspicture}

\begin{lstlisting}[style=example]
\begin{pspicture}(-3.5,-1)(3.5,1)
\psdiffractionRectangle[a=0.5e-3,k=20,f=10,pixel=0.5,lambda=450]
\end{pspicture}
\hfill
\begin{pspicture}(-3.5,-1)(3.5,4)
\psdiffractionRectangle[IIID,Alpha=10,a=0.5e-3,k=20,f=10,pixel=0.5,lambda=450]
\end{pspicture}
\end{lstlisting}

\section{Beugung an zwei rechteckigen Blendenöffnungen}

\begin{shaded}
Der Code für diese Simulation wurde von Julien \textsc{Cubizolles} erstellt.
\end{shaded}
Man kann auch das Beugungsmuster zweier kongruenter Rechtecke (so nebeneinander
angeordnet, da"s ihre Grundlinie auf der $x$-Achse liegt) erstellen,
indem man zusätzlich
zu den Angaben für den Fall nur eines Rechtecks die Option \texttt{[twoSlit]} angibt.
Defaultmä"sig ist \texttt{[twoSlit]} deaktiviert. Den Abstand zwischen den beiden
Rechtecken kann man über die Option $s$ einstellen. Sie wird, wenn nichts anderes angegeben
wird, mit dem Wert $12e^{-3}\,\mathrm{m}$ belegt.

\begin{center}
\noindent
\begin{pspicture}(-4,-1)(4,1)
\psdiffractionRectangle[a=0.5e-3,k=10,f=10,pixel=0.5,lambda=650,twoSlit,s=2e-3]
\end{pspicture}
\end{center}

\begin{lstlisting}[style=example]
\begin{pspicture}(-4,-1)(4,1)
\psdiffractionRectangle[a=0.5e-3,k=10,f=10,pixel=0.5,lambda=650,twoSlit,s=2e-3]
\end{pspicture}
\end{lstlisting}

\begin{center}
\begin{pspicture}(-2,-1)(4,4)
\psdiffractionRectangle[IIID,Alpha=20,a=0.5e-3,k=10,f=10,pixel=0.5,lambda=650,twoSlit,s=2e-3]
\end{pspicture}
\end{center}

\begin{lstlisting}[pos=t,style=example,wide=false]
\begin{pspicture}(-2,-1)(4,4)
\psdiffractionRectangle[IIID,Alpha=20,a=0.5e-3,k=10,f=10,pixel=0.5,lambda=650,twoSlit,s=2e-3]
\end{pspicture}
\end{lstlisting}


\section{Beugung an einer kreisförmigen Blendenöffnung}
Der Lochradius wird über den Buchstaben \texttt{r} angesprochen, beispielsweise
\texttt{[r=1e-3]}. Der Default ist $r=1$ mm. Im ersten Quadranten wird der Graph der
Intensitätsverteilung abgebildet (das Maximum in der Mitte wird abgeschnitten,
falls es über den oberen Rand der \psp-Umgebung hinausgeht).

\begin{center}
\begin{pspicture}(-3.5,-3.5)(3.5,3.5)
\psdiffractionCircular[r=0.5e-3,f=10,pixel=0.5,lambda=520]
\end{pspicture}
%
\begin{pspicture}(-3.5,-1.5)(3.5,3.5)
\psdiffractionCircular[IIID,r=0.5e-3,f=10,pixel=0.5,lambda=520]
\end{pspicture}
\end{center}



\begin{lstlisting}[style=example]
\begin{pspicture}(-3.5,-3.5)(3.5,3.5)
\psdiffractionCircular[r=0.5e-3,f=10,pixel=0.5,lambda=520]
\end{pspicture}
%
\begin{pspicture}(-3.5,-1.5)(3.5,3.5)
\psdiffractionCircular[IIID,r=0.5e-3,f=10,pixel=0.5,lambda=520]
\end{pspicture}
\end{lstlisting}





%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Beugung an zwei kreisförmigen Blendenöffnungen}
Es ist nur der Fall gleich gro"ser Radien vorgesehen, diesen gemeinsamen Radius
spezifiziert man wie vorher über \texttt{[r=\dots]}. Au"serdem muss man den
halben Abstand der beiden Kreismitten festlegen vermöge \texttt{[d=\dots]},
beispielsweise \texttt{[d=3e-3]}. Zusätzlich muss man die Option
\texttt{[twoHole]} verwenden. Der Bildaufbau kann in diesem Fall etwas länger dauern\dots

\begin{pspicture}(-3,-3.5)(3.5,3.5)
\psdiffractionCircular[r=0.5e-3,f=10,d=3e-3,lambda=515,twoHole]
\end{pspicture}
%
\begin{pspicture}(-3.5,-1.5)(3.5,3.5)
\psdiffractionCircular[IIID,r=0.5e-3,f=10,d=3e-3,lambda=515,twoHole]
\end{pspicture}


\begin{lstlisting}[style=example]
\begin{pspicture}(-3,-3.5)(3.5,3.5)
\psdiffractionCircular[r=0.5e-3,f=10,d=3e-3,lambda=515,twoHole]
\end{pspicture}
%
\begin{pspicture}(-3.5,-1.5)(3.5,3.5)
\psdiffractionCircular[IIID,r=0.5e-3,f=10,d=3e-3,lambda=515,twoHole]
\end{pspicture}
\end{lstlisting}


\hspace*{-1cm}%
\begin{pspicture}(-3,-3)(3.5,4)
\psdiffractionCircular[r=0.5e-3,f=10,d=2e-3,lambda=700,twoHole,colorMode=0]
\end{pspicture}
%
\begin{pspicture}(-3.5,-2)(3.5,3.5)
\psdiffractionCircular[IIID,r=0.5e-3,f=10,d=2e-3,lambda=700,twoHole,colorMode=0]
\end{pspicture}

\begin{lstlisting}[style=example]
\begin{pspicture}(-3.5,-3)(3.5,4)
\psdiffractionCircular[r=0.5e-3,f=10,d=2e-3,lambda=700,twoHole,colorMode=0]
\end{pspicture}
%
\begin{pspicture}(-3.5,-2)(3.5,3.5)
\psdiffractionCircular[IIID,r=0.5e-3,f=10,d=2e-3,lambda=700,twoHole,colorMode=0]
\end{pspicture}
\end{lstlisting}

Nicht in jedem Fall ergibt sich im mittleren Kreis ein Streifenmuster. Die Anzahl $N$ der Streifen
im Inneren ist gegeben durch $N=2,44\frac{d}{r}$. Man kann diesen Effekt also erst für
$N\geq2$ bzw. ab $d=\frac{2r}{1,22}$ beobachten (siehe
\url{http://www.unice.fr/DeptPhys/optique/diff/trouscirc/diffrac.html}).


\hspace*{-1cm}%
\begin{pspicture}(-3,-3.5)(3,3.5)
\psdiffractionCircular[r=0.5e-3,f=10,d=4.1e-4,lambda=632,twoHole]
\end{pspicture}
%
\begin{pspicture}(-3.5,-1.5)(3.5,3)
\psdiffractionCircular[IIID,r=0.5e-3,f=10,d=4.1e-4,lambda=632,twoHole]
\end{pspicture}


\begin{lstlisting}[style=example]
\begin{pspicture}(-3,-3.5)(3,3.5)
\psdiffractionCircular[r=0.5e-3,f=10,d=4.1e-4,lambda=632,twoHole]
\end{pspicture}
%
\begin{pspicture}(-3.5,-1.5)(3.5,3)
\psdiffractionCircular[IIID,r=0.5e-3,f=10,d=4.1e-4,lambda=632,twoHole]
\end{pspicture}
\end{lstlisting}



\section{Brechung an einer dreieckigen Blendenöffnung}
Es ist nur der Fall eines gleichseitigen Dreiecks vorgesehen. Als Option gibt man dessen Höhe
\texttt{[h]} an, welche sich bekanntlich über $h=\frac{\sqrt{3}}{2}s$ aus der Seitenlänge $s$
des Dreiecks berechnet. Ein Schwarzweissbild erhält man mit \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}
\end{center}

\makebox[\linewidth]{%
\begin{pspicture}(-3,-3)(3,2.5)
\psdiffractionTriangle[f=10,h=1e-3,lambda=515,contrast=38]
\end{pspicture}
\quad
\begin{pspicture}(-3,-3)(3,2.5)
\psdiffractionTriangle[f=10,h=1e-3,colorMode=1,contrast=38,lambda=515]
\end{pspicture}
\quad
\begin{pspicture}(-3,-3)(3,2.5)
\psdiffractionTriangle[f=10,h=1e-3,colorMode=0,contrast=38,lambda=515]
\end{pspicture}}


\begin{lstlisting}[style=example]
\begin{pspicture}(-3,-3)(3,2.5)
\psdiffractionTriangle[f=10,h=1e-3,lambda=515,contrast=38]
\end{pspicture}
\quad
\begin{pspicture}(-3,-3)(3,2.5)
\psdiffractionTriangle[f=10,h=1e-3,colorMode=1,contrast=38,lambda=515]
\end{pspicture}
\quad
\begin{pspicture}(-3,-3)(3,2.5)
\psdiffractionTriangle[f=10,h=1e-3,colorMode=0,contrast=38,lambda=515]
\end{pspicture}
\end{lstlisting}


\makebox[\linewidth]{%
\begin{pspicture}(-3,-2)(3,3.5)
\psdiffractionTriangle[IIID,f=10,h=1e-3,lambda=515,contrast=38]
\end{pspicture}
\quad
\begin{pspicture}(-3,-2)(3,3.5)
\psdiffractionTriangle[IIID,f=10,h=1e-3,colorMode=1,contrast=38,lambda=515]
\end{pspicture}
\quad
\begin{pspicture}(-3,-2)(3,3.5)
\psdiffractionTriangle[IIID,f=10,h=1e-3,colorMode=0,contrast=38,lambda=515]
\end{pspicture}}

\begin{lstlisting}[style=example]
\begin{pspicture}(-3,-2)(3,3.5)
\psdiffractionTriangle[IIID,f=10,h=1e-3,lambda=515,contrast=38]
\end{pspicture}
\quad
\begin{pspicture}(-3,-2)(3,3.5)
\psdiffractionTriangle[IIID,f=10,h=1e-3,colorMode=1,contrast=38,lambda=515]
\end{pspicture}
\quad
\begin{pspicture}(-3,-2)(3,3.5)
\psdiffractionTriangle[IIID,f=10,h=1e-3,colorMode=0,contrast=38,lambda=515]
\end{pspicture}
\end{lstlisting}


%\section{Credits}


\bgroup
\nocite{*}
\raggedright
\bibliographystyle{plain}
\bibliography{pst-diffraction-doc}
\egroup



\end{document}
