summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/pst-optexp/pst-optexp.dtx')
-rw-r--r--Master/texmf-dist/source/latex/pst-optexp/pst-optexp.dtx1164
1 files changed, 968 insertions, 196 deletions
diff --git a/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.dtx b/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.dtx
index 3f72b5a451f..1a5d8f93647 100644
--- a/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.dtx
+++ b/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.dtx
@@ -18,7 +18,7 @@
%<stylefile>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<stylefile>\ProvidesPackage{pst-optexp}
%<*stylefile>
- [2012/07/26 v3.2 Optical experimental setups with PSTricks]
+ [2012/08/17 v3.3 Optical experimental setups with PSTricks]
%</stylefile>
%
%<*driver>
@@ -41,12 +41,16 @@
\usepackage[labelfont={color=DOrange},
singlelinecheck=false,
justification=raggedright]{caption}
-\DeclareCaptionFormat{poe}{%
+\DeclareCaptionFormat{poenocaption}{%
\setlength{\POEcaptionmargin}{\widthof{#1}+7pt}%
\setlength{\POEcaptionheight}{\heightof{#1}+3pt}%
\hspace*{-\POEcaptionmargin}#1\par\vspace*{-\POEcaptionheight}%
-}
-\captionsetup[lstlisting]{format=poe, skip=0pt}
+}%
+\DeclareCaptionFormat{poecaption}{%
+ \setlength{\POEcaptionmargin}{\widthof{#1}+7pt}%
+ \hspace*{-\POEcaptionmargin}#1#2#3\par
+}%
+\captionsetup[lstlisting]{format=poenocaption}
\usepackage{nicefrac}
\usepackage{pst-func}
\usepackage{pst-optexp}
@@ -55,7 +59,7 @@
\usepackage{hypdoc}
\hypersetup{%
colorlinks=true,
- urlcolor=black,
+ urlcolor=DOrange,
linkcolor=pdflinkcolor,
breaklinks,
linktocpage=true}
@@ -97,7 +101,7 @@
belowcaptionskip=0pt,%
abovecaptionskip=0pt,%
xleftmargin=1em, %
- prebreak = {\raisebox{-1ex}[\ht\strutbox]{\kern0.5ex \large\Righttorque}},
+ prebreak = {\raisebox{-0.5ex}[\ht\strutbox]{\kern0.5ex\large\Righttorque}},
rulecolor=\color{black!20}, %
texcsstyle = [20]\color{DDOrange},%!60!black},%{red!60!black}, %
moretexcs = [20]{lens, optbox, oenode, oenodeIn, oenodeExt, oenodeOut,
@@ -133,6 +137,8 @@
\renewcommand*\l@subsection{\bprot@dottedtocline{2}{3.8em}{4.0em}}
\newrobustcmd*{\fnurl}[1][]{\hyper@normalise\ltd@fnurl{#1}}
\def\ltd@fnurl#1#2{\footnote{#1\hyper@linkurl{\Hurl{#2}}{#2}}}
+\newrobustcmd*{\arxivurl}[1]{\href{http://arxiv.org/abs/#1}{arXiv:#1}}
+\newrobustcmd*{\doiurl}[1]{\href{http://dx.doi.org/#1}{DOI:#1}}
\makeatother \usepackage{csquotes} \MakeAutoQuote{«}{»}
%^^A spot is used in ltxdockit.sty
\colorlet{spot}{sectioncolor}
@@ -430,9 +436,6 @@
\OnlyDescription
\begin{document}
\DocInput{pst-optexp.dtx}
- \begin{otherlanguage}{english}
- \printindex[idx]
- \end{otherlanguage}
\end{document}
%</driver>
% \fi
@@ -3253,7 +3256,7 @@
% \ifGERMAN \linewidthexplanation{des Spiegels}{Spiegel}\fi
% \ifENGLISH \linewidthexplanation{mirror}{mirrors}\fi
%
-% \numitem[0]{mirrorradius}
+% \optitem[0]{mirrorradius}{\prm{radius}[ 0]}
% \ifGERMAN
% Diese Parameter setzt die Krümmung des Spiegels. Null ergibt einen
% ebenen, ein negativer Radius einen konvexen und ein positiver Radius
@@ -3270,10 +3273,59 @@
% \fi
\begin{LTXexample}[morekeywords={[21]{mirrorradius}}]
\begin{pspicture}(3,3)
- \psset{labeloffset=0.5}
+ \psset[optexp]{labeloffset=0.5}
\mirror[mirrorradius=1](0,0)(1,2)(1.8,1){convex}
\mirror[mirrorradius=-1](1,2)(1.8,1)(2.5,3){concave}
- \drawbeam(0,0){1}{2}(2.5,3)
+ \drawbeam(0,0){-}(2.5,3)
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+%
+% \ifGERMAN Wird kein zweiter Wert angegeben, so ist die Krümmung der
+% zweiten Fläche eines \opt{extended} oder \opt{semitrans} Spiegels die
+% Gleiche wie bei der Hauptgrenzfläche (siehe vorheriges Beispiel). Wird
+% die Null als zweiter Wert angegeben (andere Werte werden nicht
+% unterstützt), so ist die zweite Fläche flach:
+% \fi
+% \ifENGLISH If no second value is specified, the curvature of the
+% second interface of an \opt{extended} or \opt{semitrans} mirror is the
+% same as that of the main interface (see previous example). If zero is
+% given as second value (other values are not supported), the second
+% interface is plain.
+% \fi
+%
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords={[21]{mirrorradius}}]
+\begin{pspicture}(3,3)
+ \mirror[mirrorradius=1 0, mirrortype=semitrans](0,0)(1,2)(1.8,1){convex}
+ \mirror[mirrorradius=-1 0, mirrortype=extended](1,2)(1.8,1)(2.5,3){concave}
+ \drawbeam(0,0){-}(2.5,3)
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+%
+% \ifGERMAN Die Angabe von \Lkeyword{mirrordepth} bezieht sich immer auf
+% die Mindesttiefe des Spiegels.
+% \fi
+% \ifENGLISH The value of \Lkeyword{mirrordepth} always refers to the
+% minimum depth of the mirror.
+% \fi
+%
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords={[21]{mirrorradius, mirrordepth}}]
+\begin{pspicture}(3,3)
+ \psset[optexp]{mirrordepth=0.2}
+ \mirror[mirrorradius=1 0, mirrortype=semitrans](0,0)(1,2)(1.8,1){convex}
+ \mirror[mirrorradius=-1 0, mirrortype=extended](1,2)(1.8,1)(2.5,3){concave}
+ \drawbeam(0,0){-}(2.5,3)
\end{pspicture}
\end{LTXexample}
% \iffalse
@@ -3326,13 +3378,11 @@
%
% \ifGERMAN Ein halbdurchlässiger Spiegel (\opt{semitrans}) hat, im Gegensatz zu
% den anderen Spiegeltypen, zwei Grenzflächen, deren Abstand und Position vom
-% Wert und Vorzeichen von \Lkeyword{mirrordepth} abhängt. Beachten Sie, dass
-% keine gekrümmten Spiegel dieses Typs möglich sind.
+% Wert und Vorzeichen von \Lkeyword{mirrordepth} abhängt.
% \fi
% \ifENGLISH A semi-transparent mirror (\opt{semitrans}) has two interfaces, in
% contrast to the other mirror types. Their distance and position depends on the
-% value and sign of \Lkeyword{mirrordepth}. Note, that this type does not
-% support curved mirrors.
+% value and sign of \Lkeyword{mirrordepth}.
% \fi
% \iffalse
%<*ignore>
@@ -3359,6 +3409,14 @@
% \iffalse
%</ignore>
% \fi
+%
+% \ifGERMAN Eine negative Spiegeltiefe \Lkeyword{mirrordepth} ist
+% äquivalent zu einer positiven Tiefe kombiniert mit
+% \Lkeyword{angle}\opt{=180}.
+% \fi
+% \ifENGLISH A negative \Lkeyword{mirrordepth} is equivalent to a
+% positive depth combined with \Lkeyword{angle}\opt{=180}.
+% \fi
%
% \boolitem[false]{variable}
% \ifGERMAN
@@ -3596,6 +3654,37 @@
% \iffalse
%</ignore>
% \fi
+%
+% \choitem[top]{gratingalign}{t, top, c, center}
+% \ifGERMAN
+% Wählt, ob die Reflektionsebene auf den Gitterspitzen (\opt{top}), oder
+% in der Mitte des Gitters (\opt{center}) liegt. Wählt man \opt{center}
+% aus, macht es Sinn die \Lenv{optexp}-Umgebung oder eine
+% halbtransparente Strahlfüllung zu verwenden.
+% \fi
+% \ifENGLISH
+% Selects if the reflection plane resides on \opt{top} of the grating or
+% in its \opt{center}. If you choose \opt{center}, you should use the
+% \Lenv{optexp} environment or a semitransparent beam filling.
+% \fi
+%
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords={[21]{gratingalign}}]
+\begin{pspicture}(3,2)
+\pnode(0.5,0){A}\pnode(0.5,1.5){B}\pnode(2,1.5){C}\pnode(2,0){D}
+\psset{unit=1.5, labeloffset=0.4}
+\begin{optexp}
+ \optgrating[gratingalign=top](A)(B)(C){top}
+ \optgrating[gratingalign=center](B)(C)(D){center}
+ \drawwidebeam[fillstyle=solid, fillcolor=green!50, beamwidth=0.5](A){-}(D)
+\end{optexp}
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
%
% \boolitem[false]{reverse}
% \ifGERMAN
@@ -5606,6 +5695,42 @@
% \iffalse
%</ignore>
% \fi
+%
+% \ifGERMAN Bei einer Reflektion können ebenfalls die Rollen vertauscht werden.\fi
+% \ifENGLISH After a reflection the roles can also be exchanged.\fi
+%
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[linerange={1-6,8-8,15-15}]
+\begin{pspicture}(0,-1)(4,2)
+ \pnode(0,1.5){A}\pnode(2,1.5){B}\pnode(2.8,0){C}
+ \mirror[mirrorwidth=1.2, mirrortype=extended](A)(B)(C)
+ \addtopsstyle{Beam}{%
+ fillstyle=solid, fillcolor=green, opacity=0.3}
+ \drawwidebeam[beamwidth=0.5](A){}
+ \pnode(\oenodeBeamUp{}){Up1}\pnode(\oenodeBeamLow{}){Low1}
+ \drawwidebeam[loadbeam]{}(C)
+ \psdot(\oenodeBeamUp{})\psdot(\oenodeBeamLow{})
+ \uput[90](\oenodeBeamUp{}){\rput[lb](0,0){BeamUp}}
+ \uput[-90](\oenodeBeamLow{}){BeamLow}
+ \psdot(Up1)\psdot(Low1)
+ \uput[90](Up1){\rput[lb](0,0){BeamUp}}
+ \uput[0](Low1){\rput[l](0,0){BeamLow}}
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+%
+% \ifGERMAN
+% Beachten Sie, dass sich die Orientierung von «oben» und «unten» in
+% Version 3.3 geändert hat, siehe \prettyref{sec:bwd-comp-3.3}.
+% \fi
+% \ifENGLISH
+% Note, that the orientation of «upper» and «lower» changed with version
+% 3.3, for more details see \prettyref{sec:bwd-comp-3.3}.
+% \fi
% \end{ltxsyntax}
%
% \ifGERMAN
@@ -5700,7 +5825,7 @@
\lens[abspos=1, lens=5 5 3, n=2.1](A)(B)
\optplane(B)
\drawbeam[beampos=1](A){1-2}
- \nodexn{(\oenodeBeam{})-2(!\oeBeamVec{})}{C}
+ \nodexn{(\oenodeBeam{})-1.5(!\oeBeamVec{})}{C}
\polarization(C)(\oenodeBeam{})
\psdot(C)\uput[45](C){C}
\end{pspicture}
@@ -5729,7 +5854,7 @@
\drawbeam[beaminsidelast, beamalign=abs](A){1}
\nodexn{(\oenodeBeam{})-(!\oeBeamVec{})}{C}
\psdot(C)\uput[-90](C){C}
- \psline[linecolor=red, linestyle=dashed, dash=2pt 2pt](A|\oenodeBeam{})(B|\oenodeBeam{})
+ \psline[linecolor=red, linestyle=dashed, dash=2pt 2pt, arrows=->, arrowscale=1.5](A|\oenodeBeam{})(B|\oenodeBeam{})
\end{pspicture}
\end{LTXexample}
% \iffalse
@@ -5747,7 +5872,7 @@
\begin{LTXexample}[linerange={1-9,11-11}]
\begin{pspicture}(3,3)
\pnode(0,1.5){A}\pnode(3,1.5){B}
- \lens[abspos=1, lens=5 5 3, n=2.1](A)(B)
+ \lens[abspos=1, lens=5 5 3, n=2.0](A)(B)
\optplane[angle=90](B)
\drawwidebeam[beamwidth=2](A){1-2}
\nodexn{(\oenodeBeamUp{})-2(!\oeBeamVecUp{})}{U}
@@ -5762,7 +5887,7 @@
% \fi
%
% \ifGERMAN Ein weiteres Beispiel finden Sie in \prettyref{ex:glan-thompson}.\fi
-% \ifENGLISH For another example please see \prettyref{ex:glan-thompson}.\fi
+% \ifENGLISH For another example see \prettyref{ex:glan-thompson}.\fi
%
%
% \ifGERMAN\section{Knotenübersicht}\fi
@@ -6688,6 +6813,42 @@
% \iffalse
%</ignore>
% \fi
+%
+% \boolitem[false]{forcebeaminside}
+% \ifGERMAN
+% Wenn auf \opt{true} gesetzt, wird der Strahlengang innerhalb der
+% betroffenen Komponenten immer gezeichnet wird, unabhängig von allen
+% anderen Strahleinstellungen mit \Lkeyword{allowbeaminside},
+% \Lkeyword{beaminside}, \Lkeyword{beaminsidefirst} und
+% \Lkeyword{beaminsidelast}. Damit kann der Strahl innerhalb einzelner
+% Komponenten gezeichnet werden, auch wenn alle anderen Komponenten in
+% dem Strahlengang keinen internen Strahl haben sollen.
+% \fi
+% \ifENGLISH
+% Forces to draw a beam inside a component. The option affects
+% components only and overwrites all settings of
+% \Lkeyword{allowbeaminside}, \Lkeyword{beaminside},
+% \Lkeyword{beaminsidefirst}, and \Lkeyword{beaminsidelast} if set to
+% \opt{true}. With this you can force an internal beams for single
+% components within a beam path.
+% \fi
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords = {[21]{forcebeaminside}}]
+\begin{pspicture}(3,2)
+ \psset{optboxwidth=0.5}
+ \pnode(0,1){A}\pnode(3,1){B}
+ \optbox[position=0.2](A)(B)
+ \optbox[position=0.4, forcebeaminside](A)(B)
+ \optbox[position=0.6](A)(B)
+ \optbox[position=0.8](A)(B)
+ \drawbeam[beaminside=false](A){-}(B)
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
% \end{optionlist}
%
% \ifENGLISH\subsection{Connecting with nodes}\fi
@@ -6876,6 +7037,28 @@
% upper limit is defined.
% \fi
% \end{optionlist}
+%
+% \ifGERMAN \Lkeyword*{ArrowInside} kann auch verwendet werden ohne dass
+% ein Linientyp definiert ist.
+% \fi
+% \ifENGLISH \Lkeyword*{ArrowInside} can be used also without a
+% linestyle.
+% \fi
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}
+\begin{pspicture}(0,0)(3.5,2)
+ \pnode(0,1.5){A}\pnode(2,1.5){B}\pnode(2.8,0){C}
+ \mirror[mirrorwidth=1.2, mirrortype=extended](A)(B)(C)
+ \newpsstyle{Beam}{linecolor=green, linestyle=none, fillstyle=solid, fillcolor=green, opacity=0.2}
+ \drawwidebeam[beamwidth=0.5](A){}(C)
+ \drawbeam[ArrowInside=->, arrowscale=2.5, ArrowFill=false, linewidth=1.5\pslinewidth, ArrowInsidePos=0.9, ArrowInsideMaxLength=1.8](A){}(C)
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
%
% \ifGERMAN\section{Aufgeweitete Strahlen}\fi
% \ifENGLISH\section{Drawing wide beams}\fi
@@ -8413,17 +8596,88 @@
% \end{ltxsyntax}
%
% \ifENGLISH
-% These components can also be connected with beams and fibers, but do not
-% provide full access to all options. They define only a single interface which,
-% of course, cannot respect the geometry of the individual drawings.
+% These components can also be connected with beams and fibers, but do
+% not provide full access to all options. \Lcs{opttripole} defines a
+% single reflective interface, whereas \Lcs{optdipole} can have two
+% transmittive interfaces:
% \fi
% \ifGERMAN
-% Diese Komponenten können sowohl mit Fasern als auch mit Strahlen verbunden
-% werden, können aber nicht deren volles Potential ausschöpfen. Sie haben nur
-% eine einzelne Grenzfläche, die die Geometrie der benutzerdefinierten Zeichnung
-% natürlich nicht berücksichtigen kann.
+% Diese Komponenten können sowohl mit Fasern als auch mit Strahlen
+% verbunden werden, können aber nicht deren volles Potential
+% ausschöpfen. \Lcs{opttripole} definiert eine einzelne reflektive
+% Grenzfläche, \Lcs{optdipole} kann zwei transmittive Grenzflächen haben:
+% \fi
+%
+% \begin{optionlist}
+% \optitem[0 0]{optdipolesize}{\prm{width}[ \prm{height}]}
+% \ifGERMAN
+% Hiermit können zwei transmittierende Grenzflächen für
+% \Lcs{optdipole} definiert werden, die sich bei
+% $(\pm 0.5\text{\prm{width}}, 0)$ befinden.
+% \fi
+% \ifENGLISH
+% With this option you can define two transmittive interfaces for
+% \Lcs{optdipole}, which are placed at $(\pm 0.5\text{\prm{width}}, 0)$.
+% \fi
+%
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords={[21]optdipolesize}]
+\begin{pspicture}(3,2)
+\pnode(0,1){A}\pnode(3,1){B}
+\optdipole[optdipolesize=1, showifcnodes](A)(B){%
+ \psframe[fillstyle=solid,fillcolor=black!30](-0.5,-0.5)(-0.3,0.5)
+ \psframe(-0.5,-0.5)(0.5,0.5)}{label}
+\drawwidebeam[beamwidth=0.3, beaminside=false](A){}(B)
+\drawbeam[beaminside=false, linecolor=red](A){}(B)
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
% \fi
%
+% \ifGERMAN Wenn zusätzlich eine Höhe \prm{height} ungleich Null
+% angegeben wird, so wird diese als Apertur für das Raytracing genommen
+% (siehe \Lkeyword{useNA}). Im folgenden Beispiel ist die Höhe gleich
+% \opt{0.2} und damit kleiner als der aufgeweitete Strahl der deshalb
+% anders als im vorangegangenen Beispiel nicht gezeichnet wird.
+% \fi
+% \ifENGLISH
+% If also a \prm{height} greater than zero is set, this is used as size
+% of the numerical aperture for ray tracing (see \Lkeyword{useNA}). In
+% the following example the height is set to \opt{0.2} which is smaller
+% than the wide beam which is not drawn, in contrast to the previous
+% example.
+% \fi
+%
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords={[21]optdipolesize}]
+\begin{pspicture}(3,2)
+\pnode(0,1){A}\pnode(3,1){B}
+\optdipole[optdipolesize=1 0.2, showifcnodes](A)(B){%
+ \psframe[fillstyle=solid,fillcolor=black!30](-0.5,-0.5)(-0.3,0.5)
+ \psframe(-0.5,-0.5)(0.5,0.5)}{label}
+\drawwidebeam[beamwidth=0.3, beaminside=false](A){}(B)
+\drawbeam[beaminside=false, linecolor=red](A){}(B)
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+%
+% \ifGERMAN
+% Weitere Beispiel sind \prettyref{ex:lclv} und
+% \prettyref{ex:absspektr}.
+% \fi
+% \ifENGLISH
+% Further examples are \prettyref{ex:lclv} and
+% \prettyref{ex:absspektr}.
+% \fi
+% \end{optionlist}
+%
% \ifGERMAN
% \section{Benutzerdefinierte Version existierender Komponenten}
% \fi
@@ -8636,7 +8890,7 @@
\mirror[labelangle=45](L)(M)(OSA){flip mirror}
\optbox[position=end, optboxsize=3.2 1, innerlabel, compshift=-0.2](M)(IRSpec){IR spectrometer}
\lens[abspos=1](M)(OSA)
- \optplane([offset=-1.5]M)
+ \optplane[angle=90]([offset=-1.5]M)
\optfiber[fiberloopradius=0.2, fiberloopsep=0.2, label=1, newFiber={linewidth=1.5\pslinewidth}]([offset=-1.5]M)(OSA){MM fiber}
\optbox[position=end, innerlabel, optboxwidth=1.1](M)(OSA){OSA}
\newpsstyle{Beam}{linestyle=none, fillcolor=red, fillstyle=solid, raytrace=false}
@@ -8731,16 +8985,11 @@
\end{LTXexample}
\bigskip
-%^^A An idea from <http://arxiv.org/abs/1112.5270>
-\enlargethispage{3cm}
-\begin{LTXexample}[pos=t, caption={caption}]
-\begin{pspicture}(0.3,0.6)(5.5,7.8)
-\newOptexpTripole{reflslm}{}
-\makeatletter
-\def\reflslm@comp{%
- \psframe[fillstyle=solid,fillcolor=gray!50](-0.3,0)(0.3,0.2)
- \psline(-0.3,0.1)(-0.5,0.1)(-0.5,0.5)(0.5,0.5)(0.5,0.1)(0.3,0.1)}%
-\makeatother
+\enlargethispage{2cm}
+\begingroup
+\captionsetup[lstlisting]{format=poecaption}
+\begin{LTXexample}[pos=t, caption={\ifGERMAN Angepasst von \fi\ifENGLISH Adapted from \fi\arxivurl{1112.5270v2}}]
+\begin{pspicture}(0.3,0.4)(5.5,8.3)
\pnode(2,7){L}\pnode(2,5.8){Pbs}\pnode([Xnodesep=1]Pbs){Blk1}\pnode(2,2.3){Bs}
\pnode([Xnodesep=-1]Bs){Blk2}\pnode([Xnodesep=3.5]Bs){Out}\pnode(2,1.3){Slm}
\begin{optexp}
@@ -8758,7 +9007,9 @@
\mirror[labeloffset=0.4](Bs)(Blk2)(Bs){B}
\lens[abspos=1, lensradius=1.4](Bs)(Out){L}
\lens[abspos=2.8, lens=0.7 0.7 0.7, n=2](Bs)(Out){L}
- \reflslm(Bs)(Slm)(Bs){SLM}
+ \opttripole(Bs)(Slm)(Bs){%
+ \psframe[fillstyle=solid,fillcolor=gray!50](-0.3,0)(0.3,0.2)
+ \psline(-0.3,0.1)(-0.5,0.1)(-0.5,0.5)(0.5,0.5)(0.5,0.1)(0.3,0.1)}{SLM}
\addtopsstyle{Beam}{linestyle=none, fillstyle=solid, fillcolor=green!70!black}
\drawwidebeam[beamwidth=0.1]{1-4}
\drawwidebeam[beamwidth=0.1, beaminsidefirst, beaminsidelast]{3}{5-8}
@@ -8767,6 +9018,7 @@
\end{optexp}
\end{pspicture}
\end{LTXexample}
+\endgroup
\begin{LTXexample}[pos=t, caption={caption}]
\begin{pspicture}(6.4,3.2)
@@ -8789,10 +9041,10 @@
\enlargethispage{1cm}
\begin{LTXexample}[pos=t, caption={caption}]
-\begin{pspicture}(0.4,0.6)(8.2,3.5)
+\begin{pspicture}(0.2,0.6)(8.2,3.5)
\pnode(2,3){Laser}\pnode(2,1){PwMeter}\pnode(6,3){CplTop}\pnode(6,1){CplBot}
\psset{arrowscale=1.5, arrowinset=0}
-\optbox[position=start, optboxsize=1.6 1, labeloffset=0](Laser)([Xnodesep=0.1]Laser){%
+\optbox[position=start, optboxsize=1.8 1, labeloffset=0](Laser)([Xnodesep=0.1]Laser){%
\begin{tabular}{@{}c@{}}Nd:YAG\\[-0.4ex]cw laser\end{tabular}}
\optcoupler[addtoFiberIn1={ArrowInside=->}, addtoFiberIn2={ArrowInside=-<},
labeloffset=0.4](Laser)(PwMeter)(CplTop)(CplBot){WDM}
@@ -8803,7 +9055,7 @@
\end{LTXexample}
\begin{LTXexample}[pos=t, caption={caption}]
-\begin{pspicture}(0.9,0.9)(10.4,5.9)
+\begin{pspicture}(0.9,0.9)(10.4,6.1)
\psset{arrowscale=1.5, arrowinset=0}
\pnode(2,5){PC1in}\pnode(4,5){PC1out}\pnode(6,5){PC2in}
\pnode(8,5){PC2out}\pnode(2,2){CplSig}\pnode(5,2){CplIn}
@@ -8820,7 +9072,7 @@
\wdmcoupler[addtoFiberIn1={ArrowInside=->}, addtoFiberIn2={angleA=0},
addtoFiberOut={angleB=0,arrows=-|}, ncurv=0.9,
coupleralign=bottom, compshift=0.8](Pump)(PC2out)(PumpSig){pump}
-\optbox[position=start, innerlabel](Pump)([offset=-0.1]Pump){980~nm}
+\optbox[position=start, innerlabel, optboxwidth=1.6](Pump)([offset=-0.1]Pump){980~nm}
\optfiber[fiberloops=2, labeloffset=0.4](CplIn)(PumpSig){Er$^+$-doped}
\end{pspicture}
\end{LTXexample}
@@ -8854,19 +9106,8 @@
\end{LTXexample}
\bigskip
-\begin{LTXexample}[pos=t, caption={caption}]
+\begin{LTXexample}[pos=t, caption={caption}, label={ex:lclv}]
\begin{pspicture}(-0.2,0)(9,5)
-\makeatletter
-\newOptexpDipole{LCLV}{}
-\def\LCLV@nodes{%
- \newOptexpComp{ {-0.12 0} {0 1} -0.5 0.5 trans {PlainIfc}
- {0.15 0} {0 1} -0.5 0.5 trans {PlainIfc} \POE@key@n}%
-}%
-\def\LCLV@comp{%
- \psframe[fillstyle=solid,fillcolor=black,dimen=outer](-0.12,-0.5)(0,0.5)
- \psframe[fillstyle=solid,fillcolor=gray!50,dimen=outer](0,-0.5)(0.15,0.5)
-}%
-\makeatother
\psset[optexp]{lens=1.2 0 1.2, n=1.72}
\addtopsstyle{Beam}{fillstyle=solid, fillcolor=green, opacity=0.3}
\pnode(2.4,1){BS1}\pnode([offset=3]BS1){M1}
@@ -8874,7 +9115,10 @@
\begin{optexp}
\optbox[label=0, position=start, optboxwidth=1.6]([Xnodesep=-1]BS1)(BS1){Nd:YAG}
\beamsplitter[compname=BS](BS2)(BS1)(M1){BS}
- \LCLV[position=0.2, compname=LCLV](BS1)(BS2){LCLV}
+ \optdipole[position=0.2, compname=LCLV, optdipolesize=0.28 1](BS1)(BS2){%
+ \psframe[fillstyle=solid,fillcolor=black,dimen=outer](-0.14,-0.5)(-0.02,0.5)
+ \psframe[fillstyle=solid,fillcolor=gray!50,dimen=outer](-0.02,-0.5)(0.14,0.5)
+ }{LCLV}
\optretplate(BS1)(M1){P}
\mirror(BS1)(M1)(PP){M}
\lens[position=0.2](M1)(PP){L}
@@ -9003,8 +9247,10 @@
\end{pspicture}
\end{LTXexample}
-\begin{LTXexample}[pos=t, caption={caption}, label={ex:czerny-turner}, linerange={1-19,24-24}]
-\begin{pspicture}(0,-1.5)(8,4)
+\begingroup
+\captionsetup[lstlisting]{format=poecaption}
+\begin{LTXexample}[pos=t, caption={\ifGERMAN Angepasst von \fi\ifENGLISH Adapted from \fi\href{http://de.wikipedia.org/w/index.php?title=Datei:Czerny-turner.png}{Wikipedia}}, label={ex:czerny-turner}]
+\begin{pspicture}(0,-1)(8.5,4)
\psframe[fillstyle=solid,fillcolor=gray!90,linestyle=none](0,-1)(8.5,4)
\addtopsstyle{OptComp}{linecolor=white}
\newpsstyle{Beam}{ArrowInside=->, linejoin=2, arrowscale=1.3, arrowinset=0}
@@ -9023,12 +9269,9 @@
\drawwidebeam[ArrowInsidePos=0.7, linecolor=green!60!white, arrows=->, ArrowInsideMinLength=2]{3-5}(E)
\drawwidebeam[ArrowInsidePos=0.8, beamangle=-3, linecolor=red!60!white]{3-6}
\end{optexp}
-\rput[lb](0,-1.5){\footnotesize
- \ifGERMAN Angepasst von \fi
- \ifENGLISH Adapted from \fi
- \url{http://de.wikipedia.org/w/index.php?title=Datei:Czerny-turner.png}}
\end{pspicture}
\end{LTXexample}
+\endgroup
\begin{LTXexample}[pos=t, caption={caption}]
\begin{pspicture}(0,0.7)(9.4,3.3)
@@ -9066,7 +9309,9 @@
\end{pspicture}
\end{LTXexample}
-\begin{LTXexample}[vsep=10mm, pos=t, caption={caption}]
+\begingroup
+\captionsetup[lstlisting]{format=poecaption}
+\begin{LTXexample}[vsep=10mm, pos=t, caption={\ifENGLISH Adapted from \fi\ifGERMAN Angepasst von \fi\href{http://www.semibyte.de/wp/graphicslibrary/gl-physics/versuchsaufbauten-f-praktikum/}{semibyte.de}}]
\begin{pspicture}(13.6,2.6)
\psset[optexp]{labeloffset=1, mirrorwidth=0.5, optboxwidth=2}
\pnode(2,1){Laser}\pnode(12,2){Film}\pnode(Film|Laser){Ref}
@@ -9077,7 +9322,7 @@
\lens[fillstyle=solid, fillcolor={[rgb]{0.87,0.91,0.93}}](Laser)(Ref){Linse}
\mirror[label=1 30]([offset=0.2]Laser)([offset=0.2]Ref)(Film){%
\begin{tabular}{l}Spiegel\\(fest)\end{tabular}}
- \opttripole[label=0.4 180](Ref)(Film)(Ref){%
+ \opttripole[label=0.4](Ref)(Film)(Ref){%
\psframe(0.5,1\pslinewidth)(-0.5,5\pslinewidth)
\psline[linewidth=2\pslinewidth](0.5,0)(-0.5,0)
}{Film}
@@ -9089,6 +9334,7 @@
\end{optexp}
\end{pspicture}
\end{LTXexample}
+\endgroup
\begin{LTXexample}[pos=t, caption={caption}]
\begin{pspicture}(0,0.2)(6.6,3.1)
@@ -9116,10 +9362,10 @@
\end{LTXexample}
\begin{LTXexample}[pos=t, caption={caption}, label={ex:glan-thompson}]
-\newpsobject{perppol}{polarization}{poltype=perp, linecolor=green!90!black, polsize=1}
-\newpsobject{parallelpol}{polarization}{poltype=parallel, linecolor=red, polsize=0.8}
-\newpsstyle{Polarization}{arrowinset=0, arrowscale=1.2}
\begin{pspicture}(-1,-0.5)(8,1.5)
+ \newpsobject{perppol}{polarization}{poltype=perp, linecolor=green!90!black, polsize=1}
+ \newpsobject{parallelpol}{polarization}{poltype=parallel, linecolor=red, polsize=0.8}
+ \newpsstyle{Polarization}{arrowinset=0, arrowscale=1.2}
\pnode(0,1){A}\pnode(8,1){B}\pnode(4,-0.5){C}
\glanthompson[glanthompsongap=0.2, glanthompsonsize=2 1](A)(B)
\optplane(B)\optplane[angle=90](C)
@@ -9133,13 +9379,143 @@
\end{pspicture}
\end{LTXexample}
+\enlargethispage{110pt}
+\begingroup
+\captionsetup[lstlisting]{format=poecaption}%
+\begin{LTXexample}[pos=t, caption={\ifGERMAN Angepasst von \fi\ifENGLISH Adapted from \fi\doiurl{10.1364/OL.37.000930}}]
+\begin{pspicture}(0,0.2)(13.5,4.7)
+\psset[optexp]{optboxsize=1 0.8, usefiberstyle}
+\pnode(1,3.2){Scan}\pnode([offset=-1.6]Scan){Sat}
+\pnode([Xnodesep=5]Scan){ScanCpl}\pnode(ScanCpl|Sat){SatCpl}
+\pnode([Xnodesep=1.5,offset=-0.8]ScanCpl){Cpl}\pnode([Xnodesep=5]Cpl){PD}
+\pnode([Xnodesep=2.5, offset=-1.4]Cpl){Pump}\psset[optexp]{fiber=none}
+\optbox[position=start, label=0](Scan)(ScanCpl){Scan}
+\optmzm[abspos=1, compname=M1, extnode=t](Scan)(ScanCpl)
+\optmzm[abspos=2.5, compname=M2, extnode=t](Scan)(ScanCpl)
+\optamp[abspos=3.7](Scan)(ScanCpl)
+\polcontrol[abspos=4.5, fiber=o](Scan)(ScanCpl)
+\drawfiber{1}{2}{3}{4}{5}
+\optbox[position=start, compname=S, extnode=b, label=0](Sat)(SatCpl){Sat}
+\optmzm[abspos=1.75, compname=M3, extnode=b](Sat)(SatCpl)
+\optamp[abspos=3.7](Sat)(SatCpl)
+\polcontrol[abspos=4.5, fiber=o](Sat)(SatCpl)
+\drawfiber{6}{7}{8}{9}
+\wdmcoupler[fiber=i](ScanCpl)(SatCpl)(Cpl)
+\optisolator[position=0.1](Cpl)(Pump|Cpl)
+\optfiber[position=0.6](Cpl)(Pump|Cpl)
+\addtopsstyle{OptCircArrow}{arrows=<-}
+\optcirculator[optcircangle=0 -90](Cpl)(PD)(Pump)
+\wdmsplitter[position=0.8, coupleralign=t](Cpl)(PD)
+\optbox[position=end, label=0, compname=Pd, extnode=t](Cpl)(PD){PD}
+\optbox[position=end, label=0, compshift=-1.5](Cpl)(PD){OSA}
+\optamp[fiber](Pump)(\oenodeIfc{2}{13})
+\optbox[position=start, optboxsize=0.6 1.2, label=0 . . absolute](Pump)(Pump|Cpl){Pump}
+\drawfiber{10}{11}{12}{13}{14}{15}\drawfiber{14}{16}
+% electrical stuff
+\newpsstyle{Fiber}{}\psset[optexp]{label=0}
+\optbox[compshift=0.7, optboxsize=2.5 0.8](\oenodeExt{M2})(\oenodeExt{Pd}|\oenodeExt{M2}){Lock-In Amp}
+\ncangle[angleA=90, angleB=180, linearc=0.3]{\oenodeExt{M2}}{\oenodeIn{}}
+\ncangle[angleB=90, linearc=0.3]{\oenodeOut{}}{\oenodeExt{Pd}}
+\psset[optexp]{fiber=all, optboxsize=0.8 1, position=start}
+\optbox(\oenodeExt{S}|Pump)(\oenodeExt{S}){\psline(-0.3,-0.2)(0.3,0.2)(0.3,-0.2)}
+\optbox(\oenodeExt{M3}|Pump)(\oenodeExt{M3}){\psline(-0.3,-0.2)(0,0.2)(0.3,-0.2)}
+\oscillator[output=none, unit=0.75, linewidth=0.666\pslinewidth]([offset=1]\oenodeExt{M1}){}{}
+\psline(\oenodeExt{M1})([offset=0.4]\oenodeExt{M1})
+\end{pspicture}
+\end{LTXexample}
+\endgroup
+
+\enlargethispage{100pt}
+\begingroup
+\captionsetup[lstlisting]{format=poecaption}
+\begin{LTXexample}[pos=t, caption={\ifENGLISH Adapted from \fi\ifGERMAN Angepasst von \fi\href{http://www.semibyte.de/wp/graphicslibrary/gl-physics/versuchsaufbauten-f-praktikum/}{semibyte.de}}, label={ex:absspektr}]
+\begin{pspicture}(0.2,0.5)(9,7.4)
+ \pnode(1,2){DL}\pnode([offset=0.5]DL){OAP}\pnode([Xnodesep=2]OAP){ST}
+ \pnode([offset=-1.4]ST){SP4}\pnode([Xnodesep=4]SP4){SP3}
+ \pnode([offset=3]SP3){JL}\pnode([Xnodesep=1]SP3|ST){SP1}
+ \pnode([Xnodesep=1]ST|JL){SP2}\pnode([Xnodesep=1.5,offset=3]SP2){Det}
+ \psset[optexp]{optboxsize=1.5 0.9, labeloffset=0.6}
+ \begin{optexp}
+ \optbox[position=start, innerlabel](DL)(OAP){\parbox{1.5\psunit}{\centering Dioden-\\laser}}
+ \psset[optexp]{mirrortype=extended}
+ \mirror[mirrorradius=2](DL)(OAP)(ST){OAP}
+ \psset[optexp]{variable}
+ \beamsplitter[bssize=0.4, labelangle=-45](SP4)(ST)(SP1){ST}
+ \optplate[abspos=1, plateheight=0.7](ST)(SP1){CP}
+ \mirror(ST)(SP1)(SP2){SP1}\mirror(SP1)(SP2)(Det){SP2}
+ \optdipole[label=-0.7 . b relative, optdipolesize=2, position=0.6](SP2)(Det){%
+ \psframe[dimen=outer](-1,-0.6)(1,0.6)
+ \psset{fillstyle=solid, fillcolor=blue!40, linestyle=none}
+ \psframe(-1,-0.5)(-0.9,0.5)\psframe(0.9,-0.5)(1,0.5)}{Plasmareaktor}
+ \optdetector[label=. 30 l](SP2)(Det){Detektor}
+ \optbox[position=end, innerlabel](SP3)(JL){\parbox{1.5\psunit}{\centering Justage-\\laser}}
+ \mirror(SP4)(SP3)(JL){SP3}\mirror(ST)(SP4)(SP3){SP4}
+ \psset{linewidth=2\pslinewidth}
+ \drawbeam[linecolor=blue, beampos=0.03]{1-2}
+ \drawbeam[beamalign=abs, loadbeampoints, linecolor=blue]{2-8}
+ \drawbeam[linecolor=red, beampos=-0.03]{9-11}{3-8}
+ \end{optexp}
+ \pnode([Xnodesep=1.2,offset=-0.6]\oenodeIn{8}){NaCl}
+ \psset{linestyle=dashed, arrows=->, arrowscale=1.5}
+ \ncline[nodesepA=0.1, nodesepB=0.2]{NaCl}{\oenodeIn{7}}
+ \ncline[nodesepA=0.1, nodesepB=0.3]{NaCl}{\oenodeOut{7}}
+ \rput[l](NaCl){NaCl-Fenster}
+\end{pspicture}
+\end{LTXexample}
+\endgroup
+
\begin{LTXexample}[pos=t, linerange={1-1}, caption={caption}]
-\begin{pspicture}(12.3,8.6)
-\makeatletter
-\def\slm@comp{\psframe[dimen=outer](-0.5,0)(0.5,0.1)}%
-\makeatother
-\newOptexpTripole{slm}{}
+\psset{unit=1.1}
+\begin{pspicture}(9.3,5.8)
+ \psset{labeloffset=0.5, optboxsize=1 0.8, arrowscale=1.2, arrowinset=0}
+ \newpsstyle{Fiber}{linecolor=red!70!black, linewidth=1.5\pslinewidth}
+ \pnode(1, 3.4){LD}\pnode([Xnodesep=3.2]LD){LoopIn}\pnode([offset=-1]LoopIn){LoopInsIn}
+ \pnode([offset=-1,Xnodesep=2]LoopIn){LoopInsOut}\pnode(LoopInsOut|LoopIn){LoopOut}
+ \optswitch[compname=LSw, label=. 180 b, abspos=2.7, fiber=o](LD)(LoopIn){load switch}
+ \optcoupler[addtoFiber={ArrowInside=->, ArrowInsidePos=0.7}](LoopIn)(LoopInsIn)(LoopOut)(LoopInsOut){50/50}
+ \optbox[labelstyle=\footnotesize, position=end, fiber, label=0, optboxsize=1.4 1.2](LoopOut)([Xnodesep=0.1]LoopOut){\parbox{1.4\psxunit}{\centering Linear\\Optical\\Sampling}}%
+ \pnode([Xnodesep=2.8]LoopInsOut){TR}
+ \pnode([offset=-2]TR){BR}
+ \pnode([Xnodesep=-1.5]LoopInsIn){TL}
+ \pnode(TL|BR){BL}
+ \psset[optexp]{fiber=none}
+ \optisolator[isolatorsize=0.5, abspos=0.6](LoopInsOut)(TR){isolator}% 4
+ \optbox[label=0, extnode=t, compname=PM, abspos=2](LoopInsOut)(TR){PM}
+ \drawfiber(LoopInsOut){4}{5}
+ \optfiber[label=0.2 . t, abspos=4](BL)(BR){fiber}
+ \drawfiber[fiberstyle=bar, angleA=0, startnode=N, linearc=0.5, armA=0.6]{5}{6}
+ \optamp[labelalign=b, abspos=3.8](BR)(BL){EDFA}
+ \optfilter[label=. 180 b, usefiberstyle, abspos=1](BL)(BR){OBPF}
+ \drawfiber{6}{7}{8}
+ \optswitch[labelalign=t, abspos=1, fiber=o](TL)(LoopInsIn){unload switch}
+ \drawfiber[angleA=180, linearc=0.5, armA=1, startnode=1, fiberstyle=bar]{8}{9}
+ \optbox[extnode=t, compname=Mod, innerlabel, abspos=0.7](LD)(LoopIn){MOD}
+ \optbox[position=start, innerlabel](LD)(LoopIn){LD}
+ \drawfiber{}{Mod}
+ \drawfiber[arrows=->]{Mod}{LSw}
+ \psline[arrows=->]([offset=1]\oenodeExt{PM})(\oenodeExt{PM})
+ \pnode([offset=1.2, Xnodesep=-1]\oenodeExt{Mod}){Osci}
+ \oscillator[output=none, unit=0.8, linewidth=0.666\pslinewidth](Osci){}{}
+ \uput{0.5}[90](Osci){SYN}
+ \newpsstyle{Fiber}{}
+ \optbox[compname=PG, extnode=b, abspos=0.6, fiber=i, label=0.5 180 b]([Xnodesep=0.4]Osci)(\oenodeExt{PM}|Osci){PG}
+ \rput(\oenodeCenter{}){\psplot[plotpoints=200]{-0.3}{0.3}{2.7182818 x 0.05 div 2 exp neg exp 0.3 mul 0.15 sub}}
+ \optfilter[label=0.5 180 b, abspos=1, fiber=i](\oenodeOut{PG})(\oenodeExt{PM}|Osci){BPF}
+ \rput[r]([offset=0.4, Xnodesep=0.2]\oenodeOut{}){\psplot[plotpoints=200]{0}{1}{360 3.14159 div x 6 mul mul sin 2 exp 0.3 mul 0.15 sub}}
+ \ncangle[angleA=-90, angleB=90, arrows=->, armB=0.5]{\oenodeExt{PG}}{\oenodeExt{Mod}}
+ \ncangle[angleB=90, arrows=->]{\oenodeOut{}}{\oenodeExt{PM}}
+ \rput([Xnodesep=0.1, offset=0.2]\oenodeOut{Mod}){%
+ \psplot[plotpoints=200, unit=0.7]{0}{1}{2.7182818 x 0.5 sub 0.08 div 2 exp neg exp 0.5 mul}%
+ }%
+\end{pspicture}
+\end{LTXexample}
+
+\begingroup
+\captionsetup[lstlisting]{format=poecaption}
+\begin{LTXexample}[pos=t, linerange={1-1}, caption={\ifGERMAN Angepasst von \fi\ifENGLISH Adapted from \fi\doiurl{10.1364/OL.37.000797}}]
+
+\begin{pspicture}(12.3,8.8)
\newpsobject{laser}{optbox}{position=start, innerlabel}
\psset[optexp]{lens=2, phwidth=0.07, outerheight=0.6}
\pnode(1,7){L}\pnode([offset=-6]L){PSLM}
@@ -9151,14 +9527,14 @@
\lens[abspos=1.2, lens=0.5 0.5 0.4, n=2.5, labelangle=-10](L)(PSLM){MO}
\pinhole[abspos=1.4, labelangle=10](L)(PSLM){PH}
\lens[abspos=2.3](L)(PSLM){L}
- \slm[labeloffset=0.5](L)(PSLM)(ASLM){PSLM}
+ \opttripole[label=0.5](L)(PSLM)(ASLM){\psframe[dimen=outer](-0.5,0)(0.5,0.1)}{PSLM}
\lens[label=0.6 -40](PSLM)(ASLM){L}
- \slm[labeloffset=0.5](PSLM)(ASLM)(ML){ASLM}
+ \opttripole[label=0.5](PSLM)(ASLM)(ML){\psframe[dimen=outer](-0.5,0)(0.5,0.1)}{ASLM}
\lens[position=0.45, labelangle=180](ASLM)(ML){L}
\optretplate[labelangle=180, position=0.55](ASLM)(ML){$\lambda/2$}
\optplate[labelangle=180, position=0.62](ASLM)(ML){P}
\mirror[labeloffset=0.4](ASLM)(ML)(Cam){M}
- \newpsstyle{Beam}{fillcolor=green!80!black, opacity=0.5, fillstyle=solid, linestyle=none, beaminside}
+ \newpsstyle{Beam}{fillcolor=green!80!black, opacity=0.5, fillstyle=solid, linestyle=none, beaminside=false}
\drawwidebeam[beamwidth=0.1, stopinside]{1-5}
\psset{loadbeampoints}
\drawwidebeam[stopinside, savebeampoints=2]{5-7}
@@ -9169,7 +9545,7 @@
\drawwidebeam[beamdiv=-8.5, beamangle=4.5]{8-9}
\lens[abspos=2](ML)(Cam){L}
\lens[abspos=4](ML)(Cam){L}
- \crystal[abspos=6, voltage, crystalwidth=1, crystalheight=0.6, frontlayer, fillcolor=yellow!90!black, fillstyle=solid](ML)(Cam){SBN}
+ \crystal[abspos=6, voltage, crystalsize=1 0.6, fillcolor=yellow!90!black, fillstyle=solid](ML)(Cam){SBN}
\beamsplitter[bssize=0.6](MRef)(MRef|Cam)(Cam){BS}
\lens[n=2.4](MRef|Cam)(Cam){L}
\optbox[optboxsize=0.8 0.6, position=end](ML)(Cam){Cam}
@@ -9189,6 +9565,87 @@
\end{optexp}
\end{pspicture}
\end{LTXexample}
+\endgroup
+
+\begingroup
+\captionsetup[lstlisting]{format=poecaption}
+\begin{LTXexample}[pos=t, linerange={1-1}, caption={\ifGERMAN Angepasst von \fi\ifENGLISH Adapted from \fi\doiurl{10.1364/AOP.1.000308}, \ifGERMAN Abb. \fi\ifENGLISH Fig. \fi 37}]
+
+\begin{pspicture}(-2,-0.2)(8.3,5.9)
+ \scriptsize
+ \definecolor[ps]{bl}{rgb}{tx@addDict begin Red Green Blue end}%
+ \addtopsstyle{SemitransMirror}{linestyle=solid, linewidth=0.7\pslinewidth}
+ \newpsstyle{ExtendedMirror}{style=SemitransMirror}
+ \psset[optexp]{mirrortype=extended, mirrorwidth=0.7, n=1, gratingalign=c}
+ \newpsstyle{Beam}{linecolor=red!80!black, linewidth=1.5\pslinewidth, beaminside=false}
+ \pnode(-2,0.5){In}\pnode(8,0.5){G1}\pnode([Xnodesep=-1.5, offset=1.3]G1){G2}\pnode(G1|G2){MG}
+ \pnode([Xnodesep=1,offset=1]In){M1}
+ \pnode([Xnodesep=5]In){M}
+ \begin{optexp}
+ \mirror[mirrortype=semitrans, mirrorlinewidth=0.7\pslinewidth, label=0.6 -90, compname=Et](In)([Xnodesep=-3]G1)(M1){Etalon}
+ \optgrating[angle=40](In)(G1)(G2)
+ \optgrating[reverse, angle=40](G1)(G2)(MG)
+ \mirror[mirrorwidth=1, label=1 135](G2)(MG)(G2){Stretcher}
+ \multido{\i=0+1}{40}{%
+ \pstVerb{%
+ \i\space 650 400 sub 39 div mul 400 add
+ tx@addDict begin wavelengthToRGB end }%
+ \drawbeam[linecolor=bl, beamangle=\i\space 16 sub 0.2 mul]{2-3}%
+ \drawbeam[linecolor=bl, loadbeampoints]{3-4}
+ }%
+ \newpsstyle{Beam}{fillstyle=solid, fillcolor=red!90!black, beamwidth=0.1, linestyle=none}
+ \drawwidebeam(In){1-2}
+ \pnode([offset=4]M1){M2}\pnode([Xnodesep=3]M2){M3}
+ \pnode([offset=0.2,Xnodesep=0.2]M|M1){M4}
+ \pnode([Xnodesep=4, offset=4]M){CM}
+ \pnode([Xnodesep=-1,offset=-2]M3){SM}
+ \pnode([offset=0.5]SM){S}
+ \mirror[compname=M1](\oenodeIn{Et})(M1)(M2)
+ \mirror(M1)(M2)(M3)
+ \mirror(M2)(M3)(M4)
+ \mirror[compname=M4, angle=1.5](M3)(M4)(CM)
+ \mirror[mirrorradius=3.5 0, angle=2, compname=CM](M4)(CM)(SM)
+ \mirror(G1)(M)(CM)
+ \optretplate[plateheight=0.5, abspos=1.5, label=0.6](M)(CM){$\lambda/2$}
+ \optbox[optboxsize=0.3 0.5, position=0.25, fillstyle=solid, fillcolor=yellow!90!black](CM)(SM){\begin{tabular}{@{}c@{}}nonlinear\\crystal\end{tabular}}
+ \pinhole[phwidth=0.1, position=0.35](CM)(SM)
+ \lens[lens=0.7 0.7 0.7, position=0.5, n=1.25](CM)(SM)
+ \lens[lens=0.7 0.7 0.7, position=0.9, n=1.31](CM)(SM)
+ \mirror[compname=SM](CM)(SM)(S)
+ \optbox[position=end, optboxsize=0.8 1.9, compshift=0.6, label=0](SM)(S){Spectrometer}
+ \drawwidebeam{Et}{5-8}\backlayer{\pnode(\oenodeBeamLow{}){BeamA}}
+ \drawwidebeam[loadbeam]{8-9}\backlayer{\pnode(\oenodeBeamUp{}){BeamB}}
+ \drawwidebeam[loadbeam]{9}{12-13}
+ \drawwidebeam[beamangle=-1.9, beaminsidelast]{10-11}\backlayer{\pnode(\oenodeBeamLow{}){BeamC}}
+ \drawwidebeam[loadbeam]{11}{9}\backlayer{\pnode(\oenodeBeamLow{}){BeamD}}
+ \drawwidebeam[loadbeam]{9}{12-13}
+ \addtopsstyle{Beam}{fillcolor=blue!40}
+ \drawwidebeam[beamwidth=0, beamdiv=8, stopinside]{12-14}\backlayer{\pnode(\oenodeBeamUp{}){BeamE}}
+ \drawwidebeam[loadbeam]{14-15}\backlayer{\pnode(\oenodeBeamUp{}){BeamF}}
+ \drawwidebeam[loadbeam, startinside]{15-17}
+ \end{optexp}
+ % now put the pulses
+ \def\mypulse{\psplot[style=Pulse]{-0.3}{0.3}{2.7182818 x 0.1 div 2 exp neg exp 0.8 mul}}%
+ \newpsstyle{Pulse}{linecolor=red!90!black, linewidth=1.5\pslinewidth, plotpoints=200}
+ \newpsstyle{Arrow}{arrowinset=0, arrowscale=1.2, linewidth=2\pslinewidth, linecolor=red!90!black}
+ \rput([Xnodesep=0.3,offset=0.1]In){%
+ \mypulse\psline[arrows=->, style=Arrow](0.3,0.2)(1,0.2)}%
+ \rput([Xnodesep=1.5,offset=-0.3]\oenodeCenter{Et}){\psline[arrows=<->, style=Arrow](-0.7,0)(0.7,0)}
+ \nlput[nrot=:U](\oenodeIn{M1})(\oenodeIn{Et}){2}{%
+ \psline[arrows=->, style=Arrow](-0.3,0.25)(-1,0.25)%
+ \rput(0,0.1){\psset{unit=0.7}\mypulse\rput(0.8,0){\mypulse}}}%
+ \nlput[nrot=:U](BeamA)(BeamB){1}{%
+ \psline[arrows=->, style=Arrow](1,0.25)(1.7,0.25)%
+ \rput(0,0.05){\psset{unit=0.7}\mypulse\rput(0.8,0){\mypulse}}}%
+ \nlput[nrot=:U](BeamD)(BeamC){2}{%
+ \psline[arrows=->, style=Arrow](-1,0.25)(-1.7,0.25)%
+ \psplot[style=Pulse]{-1}{1}{2.7182818 x 1 div 2 exp neg exp 0.5 mul 0.1 sub}}%
+ \nlput[nrot=:U](BeamF)(BeamE){1.9}{%
+ \rput(0,0.05){\addtopsstyle{Pulse}{linecolor=blue!50!red!50}\mypulse
+ \rput(-0.7,0){\addtopsstyle{Pulse}{linecolor=blue!50}\mypulse}}}%
+\end{pspicture}
+\end{LTXexample}
+\endgroup
% \iffalse
%</ignore>
% \fi
@@ -9406,6 +9863,7 @@
% \ifENGLISH\subsubsection*{Free-ray components}\fi
% \ifGERMAN\subsubsection*{Freistrahlkomponenten}\fi
%
+% \begingroup
% \addtopsstyle{Beam}{arrows=->, arrowinset=0, arrowscale=1.5}
% \newcommand{\showdipoleifc}[1]{%
% \begin{pspicture}(0,-0.5)(3,1)
@@ -9530,6 +9988,7 @@
% \psdot(\oenodeOut{})\uput[-45](\oenodeOut{}){N}
% \rput[bl](0,0){\ttfamily\textbackslash pentaprism}
% \end{pspicture}%
+% \endgroup
%
% \ifENGLISH\subsubsection*{Fiber components}\fi
% \ifGERMAN\subsubsection*{Faserkomponenten}\fi
@@ -9633,6 +10092,90 @@
% ändern müssen um mit der neuen Version korrekt zu funktionieren. \fi
%
%
+% \subsection{Version 3.3}\label{sec:bwd-comp-3.3}
+%
+% \begin{optionlist}
+% \poeitem{\textbackslash opttripole}
+% \ifGERMAN Der Ausgangswinkel für die Beschriftung des
+% \Lcs{opttripole} wurde um 180° geändert um konsistent zu den anderen
+% Dreipolen zu sein.
+% \fi
+% \ifENGLISH Changed the reference angle for the label of the
+% \Lcs{opttripole} to be consistent with the other tripoles.
+% \fi
+% \end{optionlist}
+%
+% \ifGERMAN\subsubsection{Strahlknoten}\fi
+% \ifENGLISH\subsubsection{Beam nodes}\fi
+%
+% \ifGERMAN Vor Version 3.3 sind the Strahlknoten \Lcs{oenodeBeamUp} und
+% \Lcs{oenodeBeamLow} nicht korrekt ausgerichtet gewesen, «upper» und
+% «lower» war immer relativ zur Strahlrichtung (analog zu
+% \Lkeyword{extnodealign}\opt{=relative}).
+%
+% Das konnte zu Problemen führen wenn \Lkeyword{loadbeampoints} zusammen
+% mit \Lkeyword{beamdiv} verwendet wurde, da das Vorzeichen von
+% \Lkeyword{beamdiv} nicht eindeutig kontrahierenden bzw. expandierenden
+% Strahlen zugeordnet war.
+%
+% Seit Version 3.3 werden die Strahlknoten analog zu
+% \Lkeyword{extnodealign}\opt{=absolute} definiert und die Zuordnung
+% eines negativen \Lkeyword{beamdiv} mit kontrahierenden Strahlen sowie
+% positiven \Lkeyword{beamdiv} mit expandierenden Strahlen ist immer
+% gültig. In den folgenden beiden Beispielen ist immer der
+% \Lcs{oenodeBeamUp} gekennzeichnet.
+% \fi
+% \ifENGLISH Before version 3.3 the beam nodes
+% \Lcs{oenodeBeamUp} and \Lcs{oenodeBeamLow} were not swapped correctly
+% and the orientation of «upper» and «lower» was only relative to the
+% beam direction (equivalent to
+% \Lkeyword{extnodealign}\opt{=relative}).
+%
+% This could lead to problems when using \Lkeyword{loadbeampoints} with
+% \Lkeyword{beamdiv}. In that case the sign of \Lkeyword{beamdiv} was
+% not unambiguously associated with contracting or expanding beam.
+%
+% As of version 3.3 the beam nodes are arranged according to
+% \Lkeyword{extnodealign}\opt{=absolute} and the association of negative
+% \Lkeyword{beamdiv} with a contracting and positive \Lkeyword{beamdiv}
+% with an expanding beam is always valid. In the following two examples
+% all \Lcs{oenodeBeamUp} are marked.
+% \fi
+%
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}
+\begin{pspicture}(-2,-2)(2,2)
+ \addtopsstyle{Beam}{fillstyle=solid, fillcolor=green!40}
+ \multido{\i=0+90,\ia=1+2,\ib=2+2}{4}{%
+ \optplate[position=end](0.3;\i)(1;\i)
+ \optplate[position=end, plateheight=1.5](1;\i)(2;\i)
+ \drawwidebeam[beamwidth=0.2](0.3;\i){\ia}
+ \pnode(\oenodeBeamUp{}){Up}
+ \drawwidebeam[loadbeampoints, beamdiv=45]{\ia-\ib}
+ \psdot(Up)\psdot(\oenodeBeamUp{})
+ }
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}
+\begin{pspicture}(-2,-2)(2,2)
+ \addtopsstyle{Beam}{fillstyle=solid, fillcolor=green!40}
+ \multido{\i=0+90,\ia=1+2,\ib=2+2}{4}{%
+ \optplate[position=end](0.3;\i)(1;\i)
+ \optplate[position=end](1;\i)(2;\i)
+ \drawwidebeam[beamwidth=0.2](0.3;\i){\ia}
+ \pnode(\oenodeBeamUp{}){Up}
+ \drawwidebeam[loadbeampoints, beamdiv=-45]{\ia-\ib}
+ \psdot(Up)\psdot(\oenodeBeamUp{})
+ }
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+%
% \subsection{Version 3.0}\label{sec:bwd-comp-3.0}
%
% \ifENGLISH The changes in version 3.0 compared to version 2.1 which are not
@@ -9893,6 +10436,19 @@
% \begin{changelog}
%\patchcmd{\release}{\setlength{\itemsep}{0pt}}{\setlength{\itemsep}{0pt}\setlength{\parsep}{0pt}}{}{}
% ^^A Do not wrap lines inside the \items, otherwise Changes.py does not work properly
+% \begin{release}{3.3}{2012-08-17}
+% \item Extended \cs{opttripole} and \cs{optdipole}\see{cmd:optdipole}
+% \item Modified reference angle for label of \cs{opttripole}\see{sec:bwd-comp-3.3}
+% \item Added option \opt{optdipolesize} to support two interfaces for \cs{optdipole}\see{prm:optdipolesize}
+% \item Added option \opt{gratingalign}\see{prm:gratingalign}
+% \item Added option \opt{forcebeaminside}\see{prm:forcebeaminside}
+% \item Extended option \opt{mirrorradius}\see{prm:mirrorradius}
+% \item Improved \cs{drawbeam} and \cs{drawwidebeam} to be able to use \opt{ArrowInside} without linestyle\see{prm:ArrowInsideMaxLength}
+% \item Fixed orientation of \cs{oenodeBeamUp} and \cs{oenodeBeamLow}\see{cmd:oenodeBeamUp}
+% \item Fixed a bug related to \opt{beaminside} and ambiguous components.
+% \item Fixed some trailing spaces
+% \item Added more examples\see{sec:examples}
+% \end{release}
% \begin{release}{3.2}{2012-07-26}
% \item Added component \cs{glanthompson}\see{cmd:glanthompson}
% \item Added access to beam vectors with \cs{oeBeamVec}, \cs{oeBeamVecUp} and \cs{oeBeamVecLow}\see{cmd:oeBeamVec}
@@ -10031,6 +10587,9 @@
%
% \StopEventually{}
%
+% \begin{otherlanguage}{english}
+% \printindex[idx]
+% \end{otherlanguage}
%
% \chapter{The \LaTeX/\TeX\ implementation}
%<*stylefile>
@@ -10361,7 +10920,7 @@
\fi
}{%
\PackageError{pst-optexp}%
- {Unknown value '\POE@key@labelref' for labelref}%
+ {Unknown value '\val' for labelref}%
}%
\define@choicekey*+[psset]{optexp}{innerlabel}%
[\val\nr]{true}[true]%
@@ -10379,7 +10938,7 @@
\psset[optexp]{labelref=#4}%
\fi
\fi
- \edef\POE@temp{#3}
+ \edef\POE@temp{#3}%
\ifx\POE@temp\@empty\else
\expandafter\ifx\POE@temp.\else
\psset[optexp]{labelalign=#3}%
@@ -10864,8 +11423,20 @@
\pst@checknum{#1}\POE@key@mirrordepth
}
\define@key[psset]{optexp}{mirrorradius}{%
+ \pst@expandafter\POE@psset@@mirrorradius{#1} {} {} {}\@nil
+}%
+\def\POE@psset@@mirrorradius#1 #2 #3\@nil{%
\pst@checknum{#1}\POE@key@mirrorradius
-}
+ \ifx\\#2\\
+ \def\POE@key@mirrorradiusB{}%
+ \else
+ \pst@checknum{#2}\POE@key@mirrorradiusB
+ \ifdim\POE@key@mirrorradiusB pt=0pt\else
+ \PackageWarning{optexp}{%
+ The second value for option 'mirrorradius' must be 0.}%
+ \fi
+ \fi
+}%
\define@boolkey[psset]{optexp}[POE@]{variable}[true]{}
\psset[optexp]{%
mirrorwidth=1,
@@ -10938,6 +11509,17 @@
\define@key[psset]{optexp}{gratinglinewidth}{%
\edef\POE@key@gratinglinewidth{#1}%
}
+\define@choicekey+[psset]{optexp}{gratingalign}%
+ [\val\nr]{t,c,top,center}%
+ {%
+ \ifcase\nr\relax
+ \let\POE@key@gratingalign\POE@str@top
+ \or
+ \let\POE@key@gratingalign\POE@str@center
+ \else
+ \def\POE@key@gratingalign{#1}%
+ \fi}%
+ {\PackageError{pst-optexp}{Unknown value '\val' for gratingalign.}}
\define@boolkey[psset]{optexp}[POE@]{reverse}[true]{}
\psset[optexp]{%
gratingcount=10,
@@ -10946,6 +11528,7 @@
gratingdepth=0.075,
gratingtype=blazed,
gratinglinewidth=0.7\pslinewidth,
+ gratingalign=t
}%
% \end{macrocode}
% Penta prism
@@ -10980,6 +11563,21 @@
prismalign=auto
}%
% \end{macrocode}
+%
+% Optdipole and Opttripole
+% \begin{macrocode}
+\define@key[psset]{optexp}{optdipolesize}{%
+ \pst@expandafter\POE@psset@@optdipolesize{#1} {} {} {}\@nil
+}%
+\def\POE@psset@@optdipolesize#1 #2 #3\@nil{%
+ \ifx\\#2\\
+ \def\POE@key@optdipoleheight{0}%
+ \else
+ \pst@checknum{#2}\POE@key@optdipoleheight
+ \fi
+ \pst@checknum{#1}\POE@key@optdipolewidth
+}%
+\psset[optexp]{optdipolesize=0 0}%
% \subsection{Parameters of fiber-optical components}
% \subsubsection{fiber}
% \begin{macrocode}
@@ -11339,9 +11937,9 @@
\define@choicekey+[psset]{optexp}{loadbeampoints}%
[\val\nr]{true,false}[true]{%
\ifcase\nr\relax
- \def\POE@key@loadbeampoints{1}
+ \def\POE@key@loadbeampoints{1}%
\or
- \def\POE@key@loadbeampoints{0}
+ \def\POE@key@loadbeampoints{0}%
\fi
}{%
\ifnum9<1#1
@@ -11376,6 +11974,7 @@
}%
\define@boolkey[psset]{optexp}[POE@]{beaminside}[true]{}%
\define@boolkey[psset]{optexp}[POE@]{allowbeaminside}[true]{}%
+\define@boolkey[psset]{optexp}[POE@]{forcebeaminside}[true]{}%
\define@boolkey[psset]{optexp}[POE@]{raytrace}[true]{}%
\define@boolkey[psset]{optexp}[POE@]{useNA}[true]{}%
\define@key[psset]{optexp}{skipconn}{%
@@ -11405,6 +12004,7 @@
,startinside=false
,stopinside=false
,allowbeaminside=true
+ ,forcebeaminside=false
,beaminside=true
,beaminsidefirst=false
,beaminsidelast=false
@@ -11799,6 +12399,7 @@
/loadbeampoints \POE@key@loadbeampoints\space def
/loadbeam \ifPOE@loadbeam true \else false \fi def
/beamangle \POE@key@beamangle\space def
+ /beamdiv \POE@key@beamdiv\space def
/savebeampoints \POE@key@savebeampoints\space def
/savebeam \ifPOE@savebeam true \else false \fi def
/beaminsidefirst \ifPOE@beaminsidefirst true \else false \fi def
@@ -11915,8 +12516,12 @@
% \begin{macro}{\drawbeam@iii}
% \begin{macrocode}
\def\drawbeam@iii{%
- \ifx\pslinestyle\@none
- \addto@pscode{ false false }%
+ \ifodd
+% \end{macrocode}
+% Do not draw anything only if both linestyle and ArrowInside are not set.
+% \begin{macrocode}
+ \ifx\pslinestyle\@none\ifx\psk@ArrowInside\@empty 1\else 0\fi\else 0\fi
+ \addto@pscode{ cleartomark false false }%
\else
\addto@pscode{%
% \end{macrocode}
@@ -11967,7 +12572,7 @@
\end@BeamObj
\POE@Verb{%
{ tx@OptexpDict begin ToVec def ToVec def end } if
- { \tx@NodeScale @NewNode } if
+ { \tx@NodeScale @NewNode } if
}%
}%
% \end{macrocode}
@@ -12052,7 +12657,9 @@
\else
/fillBeam {\psk@fillstyle} def
\fi
- /strokeBeam \ifx\pslinestyle\@none false \else true \fi def
+ /strokeBeam
+ \ifx\pslinestyle\@none false \else true \fi
+ \ifx\psk@ArrowInside\@empty false \else true \fi or def
[/lastBeamPointTmpLow /lastBeamPointTmpUp
/lastVecTmpLow /lastVecTmpUp]
{currentdict exch undef} forall
@@ -12805,14 +13412,43 @@
% \end{macrocode}
% \section{Components}
%
+% \begin{macrocode}
+\def\POE@useifccode{%
+ \POE@Verb{%
+ [ \pst@code
+ \ifPOE@allowbeaminside true \else false \fi
+ \ifPOE@forcebeaminside true \else false \fi
+ (\oenode{}{}) {\tx@ScreenCoor}
+ NewOptexpComp
+ }%
+ \gdef\pst@code{}%
+}%
+\def\begin@CompIfc{%
+ \begingroup
+}%
+\def\end@CompIfc{%
+ \addto@pscode{ false }%
+ \POE@useifccode
+ \endgroup
+ \ignorespaces
+}%
+\def\end@AmbCompIfc{%
+ \addto@pscode{ true }%
+ \POE@useifccode
+ \endgroup
+ \ignorespaces
+}%
+% \end{macrocode}
% \begin{macro}{\newOptexpComp@}
% \begin{macrocode}
\def\newOptexpComp@#1#2{%
\POE@Verb{%
\tx@NodeScale
- [ #1 #2 \ifPOE@allowbeaminside true \else false \fi
- (\oenode{}{}) {\tx@ScreenCoor}
- NewOptexpComp
+ [ #1 #2
+ \ifPOE@allowbeaminside true \else false \fi
+ \ifPOE@forcebeaminside true \else false \fi
+ (\oenode{}{}) {\tx@ScreenCoor}
+ NewOptexpComp
}%
\ignorespaces}%
% \end{macrocode}
@@ -13851,16 +14487,21 @@
% \begin{macro}{\optdipole}
% \begin{macrocode}
\def\optdipole{\pst@object{optdipole}}
-\def\optdipole@i(#1)(#2)#3#4{%
+\def\optdipole@i(#1)(#2)#3{%
+ \@ifnextchar\bgroup%
+ {\optdipole@i@(#1)(#2){#3}}%
+ {\optdipole@i@(#1)(#2){#3}{}}%
+}%
+\def\optdipole@i@(#1)(#2)#3#4{%
\begin@OptexpObj
\ifPOE@backlayer
\POE@regNodes{#1}{#2}
\POE@extnodealign
\fi
- \POE@drawcomponent{#4}{%
+ \POE@drawcomponent[optdipole]{#4}{%
\ifPOE@backlayer
- \pnode(0,0){\oenodeCenter{}}%
- \newOptexpComp{{0 0} {0 1} 0 0 trans {PlainIfc} 1 }%
+ \pnode(!\POE@dict{@@x0 @@y0}){\oenodeCenter{}}%
+ \dipole@nodes
\fi
\ifPOE@frontlayer
#3
@@ -13873,22 +14514,44 @@
}%
% \end{macrocode}
% \end{macro}
+%
+% \begin{macro}{\optdipole@ref}
+% \begin{macrocode}
+\def\optdipole@ref{%
+ \POE@setref{%
+ /@@x \POE@key@optdipolewidth\space 0.5 mul def
+ /@@y \POE@key@optdipoleheight\space 0.5 mul def
+ }%
+}%
+% \end{macrocode}
+% \end{macro}
%
% \begin{macro}{\opttripole}
% \begin{macrocode}
\def\opttripole{\pst@object{opttripole}}
-\def\opttripole@i(#1)(#2)(#3)#4#5{%
+\def\opttripole@i(#1)(#2)(#3)#4{%
+ \@ifnextchar\bgroup%
+ {\opttripole@i@(#1)(#2)(#3){#4}}%
+ {\opttripole@i@(#1)(#2)(#3){#4}{}}%
+}%
+\def\opttripole@i@(#1)(#2)(#3)#4#5{%
+ \addafter@par{ref@angle=180}
\begin@OptexpTripole
\ifPOE@backlayer
- \POE@regNodes{#1}{#3}%
\POE@calcNodes{#1}{#2}{#3}%
+ \POE@regNodes{#1}{#3}%
\fi
\POE@drawcomponent{#5}{%
- \pnode(0,0){\oenodeCenter{}}%
- \newOptexpComp{{0 0} {1 0} 0 0 refl {PlainIfc} 1 }%
- #4
+ \ifPOE@backlayer
+ \tripole@nodes
+ \fi
+ \ifPOE@frontlayer
+ #4
+ \fi
}%
- \POE@drawInternalConnections
+ \ifPOE@backlayer
+ \POE@drawInternalConnections
+ \fi
\end@OptexpTripole
}%
% \end{macrocode}
@@ -13998,7 +14661,9 @@
\fi
\fi
}%
- \@ifundefined{#1@ref}{}{\@nameuse{#1@ref}}%
+ \ifx\\#1\\\else
+ \@ifundefined{#1@ref}{}{\@nameuse{#1@ref}}%
+ \fi
\ifPOE@endbox
\psset[optexp]{abspos={%
\POE@dict{%
@@ -14202,6 +14867,11 @@
\POE@setref{\POE@key@mirrordepth\space 0.5 mul dup /@@y0 ED /@@y ED}
\fi
\fi
+ \else
+ \POE@setref{/@@x \POE@key@mirrorwidth\space 0.5 mul def}%
+ \ifx\POE@key@mirrortype\POE@str@mirrortype@plain\else
+ \POE@setref{\POE@key@mirrordepth\space 0.5 mul dup /@@y0 ED /@@y ED}
+ \fi
\fi
}%
% \end{macrocode}
@@ -14210,40 +14880,69 @@
% \begin{macro}{\mirror@nodes}
% \begin{macrocode}
\def\mirror@nodes{%
+ \begin@CompIfc
+% \end{macrocode}
+% Add this one reflective interface in any case
+% \begin{macrocode}
\ifdim\POE@key@mirrorradius pt=0pt
- \ifx\POE@key@mirrortype\POE@str@mirrortype@semitrans
- \newOptexpCompAmb{%
- {0 0} {1 0}
- \POE@key@mirrorwidth\space -0.5 mul dup neg
- refl {PlainIfc}
- {0 \POE@key@mirrordepth} {1 0}
- \POE@key@mirrorwidth\space -0.5 mul dup neg
- trans {PlainIfc}
- \POE@key@mirrordepth\space -1e-5 lt {
- 12 6 roll 2
- } {
- \POE@key@mirrordepth\space 1e-5 lt {
- 6 {pop} repeat
- } if
- 1
- } ifelse
- \POE@key@n }%
- \else
- \newOptexpComp{%
- {0 0} {1 0}
- \POE@key@mirrorwidth\space -0.5 mul dup neg
- refl {PlainIfc} 1 }%
- \fi
+ \addto@pscode{%
+ {0 0} {1 0}
+ \POE@key@mirrorwidth\space -0.5 mul dup neg
+ refl {PlainIfc} }%
\else
- \newOptexpComp{%
+ \addto@pscode{%
{0 0} {0 \POE@key@mirrorradius\space neg}
\POE@key@mirrorwidth\space -0.5 mul dup neg
- refl {CurvedIfc} 1 }%
- \ifx\POE@key@mirrortype\POE@str@mirrortype@semitrans
- \PackageWarning{pst-optexp}{%
- Mirrortype 'semitrans' does not support curved\MessageBreak
- mirror, falling back to 'plain' type.}%
- \fi
+ refl {CurvedIfc} }%
+ \fi
+% \end{macrocode}
+% A second interface exists only for semitrans mirrors
+% \begin{macrocode}
+ \ifx\POE@key@mirrortype\POE@str@mirrortype@semitrans
+% \end{macrocode}
+% if no second mirror radius was specified, use the same curvature of the first interface.
+% \begin{macrocode}
+ \ifx\POE@key@mirrorradiusB\@empty
+ \ifdim\POE@key@mirrorradius pt=0pt
+ \addto@pscode{%
+ {0 \POE@key@mirrordepth} {1 0}
+ @@x neg @@x trans {PlainIfc} }%
+ \else
+ \addto@pscode{%
+ {0 \POE@key@mirrordepth}
+ {0 \POE@key@mirrorradius\space neg}
+ \POE@key@mirrorwidth\space -0.5 mul dup neg
+ trans {CurvedIfc} }%
+ \fi
+ \else
+% \end{macrocode}
+% the second interface is plain if it should not have the curvature of the first interface.
+% \begin{macrocode}
+ \addto@pscode{%
+ {0 \POE@key@mirrordepth
+ dup \POE@key@mirrorradius\space mul 0 lt {
+ dup sign \POE@key@mirrorradius\space @@x capHeight mul add
+ } if}
+ {1 0} @@x neg @@x trans {PlainIfc} }%
+ \fi
+% \end{macrocode}
+% Rearrange the two interfaces depending on the sign of mirrordepth
+% \begin{macrocode}
+ \addto@pscode{%
+ \ifdim\POE@key@mirrordepth pt<-0.0001pt
+ 12 6 roll 2
+ \else
+ \ifdim\POE@key@mirrordepth pt< 0.0001pt
+ 6 {pop} repeat
+ \fi
+ 1
+ \fi
+ \POE@key@n
+ }%
+ \end@AmbCompIfc
+ \else
+ \addto@pscode{1 }%
+ \end@CompIfc
\fi
}%
% \end{macrocode}
@@ -14263,55 +14962,7 @@
\edef\@extpostcode{%
neg \@dp add 5 -1 roll exch 5 2 roll 90 add exch 90 add %
}%
-% \end{macrocode}
-% concave mirrors
-% \begin{macrocode}
- \ifdim\POE@key@mirrorradius pt<0pt
- \ifx\POE@key@mirrortype\POE@str@mirrortype@extended
-% \end{macrocode}
-% extended concave mirror
-% \begin{macrocode}
- \bgroup
- \psset{style=ExtendedMirror}
- \begin@ClosedObj
- \addto@pscode{%
- \pst@optexpdict \@ht \@r rightCurvedIfc \@postcode
- \@ht \@r rightCurvedIfc \@extpostcode arc
- closepath end}%
- \end@ClosedObj
- \egroup
- \fi
- \bgroup
- \psset{linewidth=\POE@key@mirrorlinewidth}
- \begin@OpenObj
- \addto@pscode{\POE@dict{ \@ht \@r rightCurvedIfc \@postcode }}%
- \end@OpenObj
- \egroup
-% \end{macrocode}
-% convex mirrors
-% \begin{macrocode}
- \else\ifdim\POE@key@mirrorradius pt>0pt
- \ifx\POE@key@mirrortype\POE@str@mirrortype@extended
-% \end{macrocode}
-% extended convex mirror
-% \begin{macrocode}
- \bgroup
- \psset{style=ExtendedMirror}
- \begin@ClosedObj
- \addto@pscode{%
- \pst@optexpdict \@ht \@r rightCurvedIfc \@postcode
- \@ht \@r rightCurvedIfc \@extpostcode arcn
- closepath end}%
- \end@ClosedObj
- \egroup
- \fi
- \bgroup
- \psset{linewidth=\POE@key@mirrorlinewidth}
- \begin@OpenObj
- \addto@pscode{\POE@dict{ \@ht \@r rightCurvedIfc \@postcode }}%
- \end@OpenObj
- \egroup
- \else
+ \ifdim\POE@key@mirrorradius pt=0pt
% \end{macrocode}
% plain mirror
% \begin{macrocode}
@@ -14342,7 +14993,61 @@
\psline[linewidth=\POE@key@mirrorlinewidth]%
(! \@ht neg \getCLWH)(! \@ht \getCLWH)
\fi
- \fi\fi
+ \else
+% \end{macrocode}
+% concave/convex mirror
+% \begin{macrocode}
+ \ifdim\POE@key@mirrorradius pt<0pt
+ \def\POE@temparc{arc }
+ \else
+ \def\POE@temparc{arcn }
+ \fi
+ \ifodd
+ \ifx\POE@key@mirrortype\POE@str@mirrortype@extended 1
+ \else\ifx\POE@key@mirrortype\POE@str@mirrortype@semitrans 1
+ \else 0
+ \fi\fi
+% \end{macrocode}
+% extended or semitrans mirrortype
+% \begin{macrocode}
+ \bgroup
+ \ifx\POE@key@mirrortype\POE@str@mirrortype@extended
+ \psset{style=ExtendedMirror}
+ \else\ifx\POE@key@mirrortype\POE@str@mirrortype@semitrans
+ \psset{style=SemitransMirror}
+ \fi\fi
+ \begin@ClosedObj
+ \addto@pscode{%
+ \pst@optexpdict \@ht \@r rightCurvedIfc \@postcode
+ \ifx\POE@key@mirrorradiusB\@empty
+ \@ht \@r rightCurvedIfc \@extpostcode \POE@temparc
+ \else
+ 0 \@dp
+% \end{macrocode}
+% For positive mirrorradius and positive mirror depth, add the cap
+% height so that mirrordepth is the minimum mirror depth. For both
+% negative radius and depth, subtract the cap height.
+% \begin{macrocode}
+ \POE@key@mirrordepth\space\POE@key@mirrorradius\space
+ mul 0 gt {
+ dup sign \@r \@ht capHeight mul add
+ } if
+ rlineto 2 \@ht mul 0 rlineto
+ \fi
+ closepath end}%
+ \end@ClosedObj
+ \egroup
+ \fi
+% \end{macrocode}
+% draw the reflective interface
+% \begin{macrocode}
+ \bgroup
+ \psset{linewidth=\POE@key@mirrorlinewidth}
+ \begin@OpenObj
+ \addto@pscode{\POE@dict{ \@ht \@r rightCurvedIfc \@postcode }}%
+ \end@OpenObj
+ \egroup
+ \fi
\ifPOE@variable
\psarc[style=VariableStyle]%
(! \POE@key@mirrorwidth\space 0.5 mul 0.4 sub
@@ -14715,7 +15420,17 @@
\else
\edef\@ht{\POE@key@gratingheight\space}%
\fi
- \edef\@dp{\POE@key@gratingdepth\space}%
+% \end{macrocode}
+% Shift the grating by its depth if gratingalign is set to 'center'.
+% \begin{macrocode}
+ \ifx\POE@key@gratingalign\POE@str@top
+ \edef\@dp{\POE@key@gratingdepth\space}%
+ \edef\@bl{0 }%
+ \else
+ \edef\@dp{0 }%
+ \edef\@bl{\POE@key@gratingdepth\space neg }%
+ \edef\@ht{\@ht \POE@key@gratingdepth\space sub }%
+ \fi
\edef\@step{\POE@key@gratingwidth\space\@cnt div }%
\ifx\POE@key@gratingtype\POE@str@gratingtype@blazed
\pscustom[linewidth=\POE@key@gratinglinewidth, linejoin=1]{%
@@ -14725,23 +15440,24 @@
\psline[liftpen=1]%
(! \@wd neg \i\space \@step mul add \@dp)%
(! \@wd neg \i\space
- \ifPOE@reverse\else 1 add \fi \@step mul add 0)%
+ \ifPOE@reverse\else 1 add \fi \@step mul add \@bl)%
(! \@wd neg \i\space 1 add \@step mul add \@dp)%
}%
\closepath
}%
\else\ifx\POE@key@gratingtype\POE@str@gratingtype@binary
- \pscustom[linewidth=\POE@key@gratinglinewidth]{%
+ \pscustom[linewidth=\POE@key@gratinglinewidth, linejoin=1]{%
\psline[liftpen=1](! \@wd \@dp)(! \@wd \@ht)%
(! \@wd neg \@ht)(! \@wd neg \@dp)%
\multido{\i=0+1}{\POE@key@gratingcount}{%
\psline[liftpen=1]%
(! \@wd neg \i\space \@step mul add \@dp)%
- (! \@wd neg \i\space \@step mul add 0)%
- (! \@wd neg \i\space 0.5 add \@step mul add 0)%
+ (! \@wd neg \i\space \@step mul add \@bl)%
+ (! \@wd neg \i\space 0.5 add \@step mul add \@bl)%
(! \@wd neg \i\space 0.5 add \@step mul add \@dp)%
(! \@wd neg \i\space 1 add \@step mul add \@dp)%
}%
+ \closepath
}%
\fi\fi
\ifPOE@variable
@@ -16069,7 +16785,7 @@ tx@OptexpDict begin
% Analogous to \PSname{leftCurvedIfc} for «right» interfaces, defines
% \PSname{ArcR} for later use.
% \begin{pssyntax}
-% \PSvar{h R2} \PSop{leftCurvedIfc} \PSvar{y |R2| alpha\textunderscore b
+% \PSvar{h R2} \PSop{rightCurvedIfc} \PSvar{y |R2| alpha\textunderscore b
% alpha\textunderscore t R2}
% \end{pssyntax}
% \begin{macrocode}
@@ -16227,6 +16943,7 @@ tx@OptexpDict begin
6 dict dup 3 1 roll def begin
/ambiguous false def
/allowbeaminside false def
+ /forcebeaminside false def
/name ED
/correct false def
% \end{macrocode}
@@ -16380,8 +17097,9 @@ tx@OptexpDict begin
% \end{psarglist}
%
% \begin{pssyntax}
-% \PSvar{[} \PSproc{x y} \PSproc{dx dy | rx ry} \PSvar{NAlow NAup} \PSvar{type}
-% \PSproc{\ldots Ifc} \PSvar{\ldots{} [n] correct? amb? allowbeaminside?}
+% \PSvar{[} \PSproc{x y} \PSproc{dx dy | rx ry} \PSvar{NAlow NAup}
+% \PSvar{type} \PSproc{\ldots Ifc}
+% \PSvar{\ldots{} [n] correct? amb? allowbeaminside? forcebeaminside?}
% \PSstring{CompName} \PSproc{scaling} \PSop{NewOptexpComp}
% \end{pssyntax}
% \begin{macrocode}
@@ -16391,6 +17109,7 @@ tx@OptexpDict begin
gsave
12 dict dup 3 1 roll def begin
/name ED
+ /forcebeaminside ED
/allowbeaminside ED
/ambiguous ED
dup type /booleantype eq not { false } if /correct ED
@@ -16786,7 +17505,7 @@ tx@OptexpDict begin
name GetRefIndex
trans draw ] cvx
IfcCntTmp IfcCnt gt { exch } if
- } {
+ }{
% \end{macrocode}
% check the mode of the ambiguous interface
% \begin{macrocode}
@@ -16795,7 +17514,11 @@ tx@OptexpDict begin
CurrVecTmp (C) name GetPlaneVec NormalVec outToPlane
GetIfcCenter (C) name GetIfcCenter @ABVect DotProd
0 lt { trans } { refl } ifelse % mode
- draw ] cvx
+% \end{macrocode}
+% if the ambiguous interface is the first, always draw to it
+% \begin{macrocode}
+ IfcCntTmp IfcCnt eq { true }{ draw } ifelse
+ ] cvx
% \end{macrocode}
% now check which is the outgoing plane
% \begin{macrocode}
@@ -16979,6 +17702,14 @@ tx@OptexpDict begin
} bind def
% \end{macrocode}
% \end{macro}
+%
+% \begin{macro}{Chirality}
+% \begin{macrocode}
+/Chirality {
+ 4 -1 roll mul 3 1 roll mul sub sign
+} bind def
+% \end{macrocode}
+% \end{macro}
%
% \begin{macro}{TraceAndFillWideBeam}
% Fill a wide beam. This has an own procedure, because each segment
@@ -17037,7 +17768,23 @@ tx@OptexpDict begin
currentdict /lastBeamPointTmpUp known and {
/lastBeamPointTmpLow load /CurrLow ED
/lastBeamPointTmpUp load /CurrUp ED
+% \end{macrocode}
+% The lower and upper beam vectors must possibly swapped if the
+% intersection points are loaded from a previous beam, but the beam
+% divergence is specified manually for this beam only. We must make
+% sure, that negative divergence gives a contracting beam.
+% \begin{macrocode}
+ loadbeam not beamdiv 0 eq not and {
+ CurrVecLow CurrVecUp Chirality
+ CurrLow CurrUp @ABVect CurrVecLow CurrVecUp VecAdd Chirality 0 lt { neg } if
+ beamdiv sign eq not {
+ /CurrVecLow load /CurrVecUp load /CurrVecLow ED /CurrVecUp ED
+ } if
+ } if
} {
+% \end{macrocode}
+% Transform the beam vectors relative to the connection between the first two interfaces.
+% \begin{macrocode}
counttomark 2 ge {
2 copy /StartLow load TransformStartPos /CurrLow ED
2 copy /StartUp load TransformStartPos /CurrUp ED
@@ -17046,6 +17793,8 @@ tx@OptexpDict begin
/StartUp load /CurrUp ED
} ifelse
} ifelse
+ /PrevVecUp /CurrVecUp load def
+ /PrevVecLow /CurrVecLow load def
% \end{macrocode}
% \PSvar{IfcCnt} is the number of interfaces pushed on the stack by
% \PSvar{PushAllPlanesOnStack}. This number may be corrected later if an
@@ -17094,7 +17843,6 @@ tx@OptexpDict begin
currentdict /relAngleUp known { relAngleUp } { 0 } ifelse
connectInterfaces /relAngleUp ED
} if
- /CurrVecUp load /PrevVecUp ED
/CurrUp load /PrevUp ED
IfcNum CompName Mode n2 8 4 roll HandleInterface
dup /ret ED
@@ -17108,7 +17856,6 @@ tx@OptexpDict begin
% \end{macrocode}
% Calculate new lower vector and intersection point
% \begin{macrocode}
- /CurrVecLow load /PrevVecLow ED
/CurrLow load /PrevLow ED
CurrLow CurrVecLow
connectifc PrevCorrect PN 2 gt and PN 2 eq or and {
@@ -17183,7 +17930,9 @@ tx@OptexpDict begin
} if
PN 1 eq {
% \end{macrocode}
-% PN == 1
+% At the first interface, we only determine the actual intersection
+% points with the interfaces, the beam vectors are not changed and must
+% be reset to the previous values.
% \begin{macrocode}
/CurrVecUp /PrevVecUp load def
/CurrVecLow /PrevVecLow load def
@@ -17207,6 +17956,8 @@ tx@OptexpDict begin
exit
} if
/PN PN 1 add def
+ /PrevVecUp /CurrVecUp load def
+ /PrevVecLow /CurrVecLow load def
/PrevPCenter /CurrPCenter load def
/PrevMode Mode def
CompName cvn load /correct get /PrevCorrect ED
@@ -17219,9 +17970,25 @@ tx@OptexpDict begin
currentdict /lastVecTmpUp known currentdict /lastVecTmpLow known and dup {
/lastVecTmpUp load /lastVecTmpLow load 3 -1 roll
} if
- CurrUp CurrLow @ABVect
- CurrVecUp CurrVecLow 3 -1 roll add 3 1 roll add exch
- 4 -1 roll mul 3 1 roll mul sub 1e-7 gt {
+% \end{macrocode}
+% Check if Up and Low must be swapped for next beam. This depends both
+% on the relative orientation (chirality) of the incoming beam vector
+% and the vector between the two intersection points CurrUp and CurrLow,
+% and the direction of the beam vector.
+%
+% The intersection points are swapped if the angle of the beam vector is
+% between $90°+\epsilon$ and $-90°+\epsilon$ and the chirality is
+% positive, or if the beam vector points to the right, positive
+% half-circle and the chirality is negative. The $\epsilon$ is
+% introduced to get the correct order for $\pm 90°$ despite numerical
+% errors.
+% \begin{macrocode}
+ CurrLow CurrUp @ABVect % from Low to Up
+ PrevVecUp PrevVecLow VecAdd
+ 2 copy 6 2 roll
+ Chirality 0 lt
+ 3 1 roll 2 copy pop -1e-5 lt
+ 3 1 roll exch 1e-5 lt exch 0 lt and or xor {
% \end{macrocode}
% swap upper and lower beam points for next beam
% \begin{macrocode}
@@ -17513,7 +18280,12 @@ tx@OptexpDict begin
beaminside
} ifelse
} ifelse
- exch load dup dup /allowbeaminside get 4 -1 roll and
+ exch load dup dup
+ /forcebeaminside get {
+ 3 -1 roll pop true
+ } {
+ dup /allowbeaminside get 4 -1 roll and
+ } ifelse
/drawinside ED
/ambiguous get {
/name get drawinside [ 3 1 roll ]