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.dtx717
1 files changed, 627 insertions, 90 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 b97c1e5af02..3f72b5a451f 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/17 v3.1 Optical experimental setups with PSTricks]
+ [2012/07/26 v3.2 Optical experimental setups with PSTricks]
%</stylefile>
%
%<*driver>
@@ -102,50 +102,38 @@
texcsstyle = [20]\color{DDOrange},%!60!black},%{red!60!black}, %
moretexcs = [20]{lens, optbox, oenode, oenodeIn, oenodeExt, oenodeOut,
oenodeRefA, oenodeRefB, oenodeTrefA, oenodeTrefB, oenodeLabel, oenodeRotref,
- oenodeBeam, oenodeBeamUp, oenodeBeamLow, oenodeCenter, oenodeIfc, optplate,
- optretplate, pinhole, crystal,optdetector, optdiode, doveprism,
- polarization, mirror, beamsplitter, optgrating, optprism, rightangleprism,
- pentaprism, optdipole, optripole, optfiber, optamp, optmzm, optfilter,
- polcontrol, optisolator, optswitch, fiberdelayline, optfiberpolarizer,
- fibercollimator, optcoupler, wdmcoupler, wdmsplitter, optcirculator, fiberbox,
- drawbeam, drawwidebeam, drawfiber, frontlayer, backlayer, newOptexpDipole,
- newOptexpTripole, newOptexpFiberDipole,optplane}, %
+ oenodeBeam, oenodeBeamUp, oenodeBeamLow, oenodeCenter, oenodeIfc,
+ oeBeamVec, oeBeamVecUp, oeBeamVecLow,
+ optplate, optretplate, pinhole, crystal,optdetector, optdiode,
+ doveprism, glanthompson, polarization, mirror, beamsplitter,
+ optgrating, optprism, rightangleprism, pentaprism, optdipole,
+ optripole, optfiber, optamp, optmzm, optfilter, polcontrol,
+ optisolator, optswitch, fiberdelayline, optfiberpolarizer,
+ fibercollimator, optcoupler, wdmcoupler, wdmsplitter, optcirculator,
+ fiberbox, drawbeam, drawwidebeam, drawfiber, frontlayer, backlayer,
+ newOptexpDipole, newOptexpTripole, newOptexpFiberDipole,optplane}, %
explpreset={%
pos=l, width=-99pt, hsep=5mm, overhang=\codeoverhang, varwidth,
- vsep=\bigskipamount, rframe={}},
- extendedchars=true,
-}
+ vsep=\bigskipamount, rframe={}}, extendedchars=true, }
\lstdefinestyle{example}{explpreset={%
escapechar=*, pos=l, width=-99pt, hsep=5mm, overhang=\codeoverhang,
- varwidth, vsep=\bigskipamount, rframe={}}}
-\makeatletter
+ varwidth, vsep=\bigskipamount, rframe={}}} \makeatletter
\providecommand\ON{%
\gdef\lst@alloverstyle##1{\textcolor{black!50}{\strut##1}%
-}}
-\providecommand\OFF{\xdef\lst@alloverstyle##1{##1}}
-\makeatother
+ }} \providecommand\OFF{\xdef\lst@alloverstyle##1{##1}} \makeatother
\colorlet{sectioncolor}{DOrange}
\addtokomafont{sectioning}{\color{sectioncolor}}
-\usepackage[automark,nouppercase]{scrpage2}
-\pagestyle{scrheadings}
-\clearscrheadings
-\clearscrplain
-\ohead{\pagemark}
-\ihead{\headmark}
-\ofoot[\pagemark]{}
-\automark[subsection]{section}
-\setheadsepline{.4pt}[\color{DOrange}]
-\setheadwidth[0pt]{text}
-\setfootwidth[0pt]{text}
-\makeatletter
+\usepackage[automark,nouppercase]{scrpage2} \pagestyle{scrheadings}
+\clearscrheadings \clearscrplain \ohead{\pagemark} \ihead{\headmark}
+\ofoot[\pagemark]{} \automark[subsection]{section}
+\setheadsepline{.4pt}[\color{DOrange}] \setheadwidth[0pt]{text}
+\setfootwidth[0pt]{text} \makeatletter
\patchcmd{\l@chapter}{1.5em}{2em}{}{}
\renewcommand*\l@section{\bprot@dottedtocline{1}{1.5em}{3.0em}}
\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}}}
-\makeatother
-\usepackage{csquotes}
-\MakeAutoQuote{«}{»}
+\makeatother \usepackage{csquotes} \MakeAutoQuote{«}{»}
%^^A spot is used in ltxdockit.sty
\colorlet{spot}{sectioncolor}
\newpsstyle{Refline}{linecolor=gray!70}
@@ -449,7 +437,7 @@
%</driver>
% \fi
%
-% \CheckSum{6209}
+% \CheckSum{0}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -1835,7 +1823,7 @@
%</ignore>
% \fi
%
-% \choitem[relgrav]{labelref}{relative, relgrav, global}
+% \choitem[relgrav]{labelref}{relative, relgrav, global, absolute}
% \ifGERMAN
% Wählt das Bezugssystem für \Lkeyword{labelangle} und die Orientierung der
% Beschriftung.
@@ -1891,7 +1879,7 @@
%</ignore>
% \fi
%
-% \item[global]
+% \item[global, absolute]
% \ifGERMAN Die Beschriftung ist unabhängig von der Komponentenausrichtung.\fi
% \ifENGLISH The label is independent of the component alignment.\fi
% \iffalse
@@ -3074,6 +3062,110 @@
%</ignore>
% \fi
%
+% \ifGERMAN\section{Glan--Thompson prism}\fi
+% \ifENGLISH\section{Glan-Thompson-Prisma}\fi
+%
+% \begin{ltxsyntax}
+% \dipoledesc{glanthompson}
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[morekeywords={[21]{glanthompson}}]
+\begin{pspicture}(3,1.5)
+ \glanthompson[beam](0,1)(3,1){Glan-Thompson}
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+% \end{ltxsyntax}
+%
+% \begin{optionlist}
+% \numitem[1.0]{glanthompsonwidth}
+% \ifGERMAN Die Breite des Prisma.\fi
+% \ifENGLISH The width of the prism.\fi
+%
+% \numitem[0.5]{glanthompsonheight}
+% \ifGERMAN Die Höhe des Prisma.\fi
+% \ifENGLISH The height of the prism.\fi
+%
+% \optitem{glanthompsonsize}{\prm{width} \prm{height}}
+% \ifGERMAN Die Breite und Höhe des Prisma, äquivalent zum Aufruf von
+% \Lkeyword{glanthompsonwidth} und \Lkeyword{glanthompsonheight}.
+% \fi
+% \ifENGLISH The width and height of the prism, is equivalent to calling both
+% \Lkeyword{glanthompsonwidth} and \Lkeyword{glanthompsonheight}.
+% \fi
+%
+% \numitem[0]{glanthompsongap}
+% \ifGERMAN
+% Der Abstand der beiden Teilprismen in $x$-Richtung, die Linienbreiten
+% werden nicht berücksichtigt. Die Gesamtbreite ist von diesem Wert
+% unabhängig, aber der Winkel der reflektierenden Fläche wird davon beeinflusst.
+% \fi
+% \ifENGLISH The separation of the two prisms in $x$-direction. The
+% total width does not depend on this value, but the angle of the
+% reflective plane is affected.
+% \fi
+%
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}
+\begin{pspicture}(3,1)
+ \glanthompson[glanthompsongap=0.1, beam](0,0.5)(3,0.5)
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+% \end{optionlist}
+%
+% \ifGERMAN Von der Implementierung entspricht das Glan-Thompson-Prisma
+% für \Lkeyword{glanthompsongap}\opt{=0} einem Strahlteiler, der nur
+% zwei Knoten zur Positionierung benötigt und nicht quadratisch ist.
+%
+% Beachten Sie, dass das Prisma für \Lkeyword{glanthompsongap}\opt{>\,0}
+% nicht von beiden Seiten gleich verwendet werden kann, da in der
+% derzeitigen Implementierung nur eine uneindeutige Grenzfläche
+% (reflektierend oder transmittierend) zugelassen ist. In dem folgenden
+% Beispiel sieht man, dass der rote Strahl an der falsche Fläche
+% reflektiert wird.
+% \fi
+% \ifENGLISH
+% The implementation of the Glan--Thompson prism for
+% \Lkeyword{glanthompsongap}\opt{=0} is equivalent to a beamsplitter
+% which is positioned with two nodes only and which is not quadratic.
+%
+% Please note, that the Prism cannot be used properly from both sides
+% for \Lkeyword{glanthompsongap}\opt{>\,0} because the current
+% implementation allows only a single ambiguous interface (reflective or
+% transmittive). In the following example you see, that the red beam is
+% reflected at the wrong interface.
+% \fi
+%
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}
+\begin{pspicture}(4,2)
+ \pnode(0,1){A}\pnode(4,1){B}
+ \glanthompson[glanthompsongap=0.2, glanthompsonsize=2 1](A)(B)
+ \optplane[angle=90](2,0)\optplane[angle=90](2,2)
+ \addtopsstyle{Beam}{ArrowInside=->, arrowscale=1.5}
+ \drawbeam[beampos=0.1](A){1-2}
+ \drawbeam[beampos=0.1, linecolor=red](B){1}{3}
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+%
+% \ifGERMAN \prettyref{ex:glan-thompson} enthält ein weiterführendes
+% Beispiel mit einem Glan-Thompson-Prisma.\fi
+% \ifENGLISH \prettyref{ex:glan-thompson} shows a further setup with a
+% Glan--Thompson prism.\fi
+%
% \ifGERMAN\section{Polarisation}\fi
% \ifENGLISH\section{Polarization}\fi
%
@@ -3723,19 +3815,26 @@
% \label{chap:fibercomp}
%
% \ifENGLISH This chapter describes all fiber components and their
-% options. They differ from free-ray components in that they are connected by
-% default with fibers to their reference nodes, and that they cannot be used for
-% raytracing. Most components require only two reference nodes and are handled
-% like the free-ray dipoles. Some special components like couplers
-% (\prettyref{sec:coupler}) and circulators (\prettyref{sec:optcirculator}) are
-% treated differently.
-% \fi
-% \ifGERMAN In diesem Kapitel werden alle Faserkomponenten und deren Parameter
-% beschrieben. Diese werden automatisch über Fasern mit ihren Referenzknoten
-% verbunden und unterstützen kein Raytracing. Die meisten
-% Komponenten benötigen nur zwei Referenzknoten und werden wie die
-% Freistrahlzweipole behandelt. Manche spezielle Komponenten wie Koppler
-% (\ref{sec:coupler}) und Zirkulatoren (\ref{cmd:optcirculator})
+% options. They differ from free-ray components in that they are
+% connected by default with fibers to their reference nodes, and that
+% they cannot be used for raytracing. Instead of automatic fiber
+% connections the components can also be connected manually with fibers,
+% see \prettyref{sec:drawfiber}.
+%
+% Most components require only two reference nodes and are handled like
+% the free-ray dipoles. Some special components like couplers
+% (\prettyref{sec:coupler}) and circulators
+% (\prettyref{sec:optcirculator}) are treated differently.
+% \fi
+% \ifGERMAN In diesem Kapitel werden alle Faserkomponenten und deren
+% Parameter beschrieben. Diese werden automatisch über Fasern mit ihren
+% Referenzknoten verbunden und unterstützen kein Raytracing. Anstelle
+% der automatischen Faserverbindungen können die Komponenten auch
+% manuell mit Fasern verbunden werden, siehe \prettyref{sec:drawfiber}.
+%
+% Die meisten Komponenten benötigen nur zwei Referenzknoten und werden
+% wie die Freistrahlzweipole behandelt. Manche spezielle Komponenten wie
+% Koppler (\ref{sec:coupler}) und Zirkulatoren (\ref{cmd:optcirculator})
% werden anders ausgerichtet.
% \fi
%
@@ -4487,7 +4586,6 @@
% \end{ltxsyntax}
%
% \ifGERMAN
-
% Eine \Lcs{fiberbox} kann entweder mit zwei, oder mit vier Knoten
% positioniert werden. Die Wahl beeinflusst die Position der Komponente
% und der Komponentenknoten und die automatischen Faserverbindungen.
@@ -5557,6 +5655,116 @@
%</ignore>
% \fi
%
+% \ifGERMAN\section{Strahlvektor}\fi
+% \ifENGLISH\section{Beam vector}\fi
+%
+% \ifENGLISH In addition to the beam nodes (see
+% \prettyref{sec:beamnode}) also the vectors of the last saved beams
+% (see \Lkeyword{savebeam}) can be access on Postscript level.
+%
+% These are again separated in single, upper and lower beams. \prm{num}
+% has the same meaning as for \Lcs{oenodeBeam}.
+% \fi
+%
+% \ifGERMAN Zusätzlich zu den Strahlknoten (siehe
+% \prettyref{sec:beamnode}) kann auf Postscript-Ebene auf die normierten
+% Strahlvektoren der letzten gespeicherten Strahlen (siehe
+% \Lkeyword{savebeam}) zugegriffen werden.
+%
+% Auch hier wird zwischen Einzelstrahlen, und oberem bzw. unterem Strahl
+% unterschieden. \prm{num} hat dieselbe Bedeutung wie bei \Lcs{oenodeBeam}.
+% \fi
+% \begin{ltxsyntax}
+% \cmditem{oeBeamVec}{num}
+% \cmditem{oeBeamVecUp}{num}
+% \cmditem{oeBeamVecLow}{num}
+% \end{ltxsyntax}
+%
+% \ifGERMAN Das kann dazu genutzt werden, um z.B. die Polarisation eines
+% Strahls zu kennzeichnen. Im folgenden Beispiel wird ein neuer Knoten
+% \prm{C} definiert, indem mit \Lcs*{nodexn} der Endpunkt des Strahls
+% entlang seiner Trajektorie verschoben wird.
+% \fi
+% \ifENGLISH A possible application is marking of the polarization of a
+% beam. In the following example we define a node \prm{C} which is
+% shifted with \Lcs*{nodexn} from the beam end point along the beam
+% trajectory.
+% \fi
+%
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[linerange={1-7,9-9}]
+\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)
+ \optplane(B)
+ \drawbeam[beampos=1](A){1-2}
+ \nodexn{(\oenodeBeam{})-2(!\oeBeamVec{})}{C}
+ \polarization(C)(\oenodeBeam{})
+ \psdot(C)\uput[45](C){C}
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+%
+% \ifGERMAN Dieses Beispiel zeigt, dass wirklich der letzte eingehende
+% Strahlenvektor genommen wird, im Gegensatz zu \Lkeyword{loadbeam}, wo
+% der ausgehende Strahl weiterverwendet wird. Die Richtung des ausgehenden Strahl ist
+% rot angedeutet.
+% \fi
+% \ifENGLISH This examples shows that the last incoming beam vector is
+% used, instead of \Lkeyword{loadbeam}, where the outgoing beam vector
+% is used. The direction of the outgoing beam is marked red.
+% \fi
+%
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[linerange={1-5,8-8}]
+\begin{pspicture}(3,2)
+ \pnode(0,1){A}\pnode(3,1){B}
+ \optbox[optboxsize=2 1, angle=20](A)(B)
+ \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{})
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+%
+% \ifENGLISH This can be applied to the upper and lower beams as well.\fi
+% \ifGERMAN Das kann ebenfalls auf den oberen und unteren
+% Strahl angewendet werden.
+% \fi
+%
+% \iffalse
+%<*ignore>
+% \fi
+\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)
+ \optplane[angle=90](B)
+ \drawwidebeam[beamwidth=2](A){1-2}
+ \nodexn{(\oenodeBeamUp{})-2(!\oeBeamVecUp{})}{U}
+ \nodexn{(\oenodeBeamLow{})-2(!\oeBeamVecLow{})}{L}
+ \polarization(U)(\oenodeBeamUp{})
+ \polarization(L)(\oenodeBeamLow{})
+ \psdot(U)\uput[45](U){U}\psdot(L)\uput[-45](L){L}
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+%
+% \ifGERMAN Ein weiteres Beispiel finden Sie in \prettyref{ex:glan-thompson}.\fi
+% \ifENGLISH For another example please see \prettyref{ex:glan-thompson}.\fi
+%
+%
% \ifGERMAN\section{Knotenübersicht}\fi
% \ifENGLISH\section{Node overview}\fi
%
@@ -7079,6 +7287,57 @@
% \iffalse
%</ignore>
% \fi
+%
+% \ifGERMAN Beachten Sie, dass \Lkeyword{loadbeam} und
+% \Lkeyword{savebeam} nicht immer funktionieren, wenn der Strahlengang an
+% einem halbdurchlässigen Spiegel oder einem Strahlteiler endet. In
+% diesen Fällen wird nur der transmittierte Strahlvektor gespeichert,
+% soll der Strahlengang über den reflektierenden Weg fortgesetzt werden,
+% so ist das nicht möglich.
+%
+% In den beiden folgenden Beispielen wird demnach der rote Strahl, der
+% von der Komponente zum Knoten \prm{B} fortgesetzt werden soll, nicht
+% gezeichnet.
+% \fi
+% \ifENGLISH Please note, that \Lkeyword{loadbeam} and
+% \Lkeyword{savebeam} do not always work, if the beam path ends inside a
+% semitransparent mirror or a beamsplitter. In these cases only the
+% transmitted ray vector is saved and continuing the beam via the
+% reflective path is not possible.
+%
+% Accordingly, in the following examples the red beam is not drawn,
+% which should continue the green beam from the component to node
+% \prm{B}.
+% \fi
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}[linerange={1-6,9-9}]
+\begin{pspicture}(3,1.5)
+ \pnode(0,0.5){A}\pnode(1.5,1.5){B}\pnode(3,0.5){C}
+ \beamsplitter(A)(1.5,0.5)(B)
+ \drawbeam[beaminsidelast, savebeam](A){}
+ \drawbeam[linecolor=red, beaminsidefirst, loadbeam]{}(B)
+ \drawbeam[linecolor=blue, beaminsidefirst, loadbeam]{}(C)
+ \psdot(B)\uput[-30](B){B}
+ \psdot(C)\uput[-120](C){C}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[linerange={1-6,9-9}]
+\begin{pspicture}(3,1.5)
+ \pnode(0,0.5){A}\pnode(1.5,1.5){B}\pnode(3,0.5){C}
+ \mirror[mirrortype=semitrans](A)(1.5,0.5)(B)
+ \drawbeam[beaminsidelast, savebeam](A){}
+ \drawbeam[linecolor=red, beaminsidefirst, loadbeam]{}(B)
+ \drawbeam[linecolor=blue, beaminsidefirst, loadbeam]{}(C)
+ \psdot(B)\uput[-30](B){B}
+ \psdot(C)\uput[-120](C){C}
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
% \end{optionlist}
%
%
@@ -8359,6 +8618,7 @@
% \ifENGLISH
% \chapter{Examples}
% \fi
+% \label{sec:examples}
% \iffalse
%<*ignore>
% \fi
@@ -8805,11 +9065,135 @@
\drawbeam(In){1-3}{2}{1}{5}
\end{pspicture}
\end{LTXexample}
+
+\begin{LTXexample}[vsep=10mm, pos=t, caption={caption}]
+\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}
+ \begin{optexp}
+ \optbox[position=start](Laser)(Ref){HeNe-Laser}
+ \pinhole[abspos=0.8](Laser)(Ref){Blende}
+ \optbox[abspos=2.5](Laser)(Ref){Raumfilter}
+ \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){%
+ \psframe(0.5,1\pslinewidth)(-0.5,5\pslinewidth)
+ \psline[linewidth=2\pslinewidth](0.5,0)(-0.5,0)
+ }{Film}
+ \newpsstyle{Beam}{linewidth=2\pslinewidth, linecolor=red!90!black, beamalign=absolute}
+ \drawbeam{1-4}
+ \drawbeam[beampos=0.2]{4-6}
+ \mirror[variable, label=0.8 -30]([offset=-0.2]Laser)([offset=-0.2, Xnodesep=-0.7]Ref)(Film){var. Spiegel}
+ \drawbeam[beampos=-0.2]{4}{7}{6}
+ \end{optexp}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[pos=t, caption={caption}]
+\begin{pspicture}(0,0.2)(6.6,3.1)
+ \psset{mirrorwidth=0.6, useNA=false, beaminsidefirst}
+ \pnode(0,2){In}\pnode(1,2){BS}\pnode(1,0.5){M1}\pnode(2,1){M2}\pnode(6,1.5){Det}
+ \mirror[mirrortype=semitrans, n=1](In)(BS)(M1)
+ \mirror[label=0.6 180 . absolute, compname=M](BS)(M1)(M2|M1)
+ \mirror(M1)(M2|M1)(M2)
+ \mirror(M2|M1)(M2)([Xnodesep=1]M2)
+ \optbox[optboxsize=2 1, abspos=2, label=0, allowbeaminside=false](BS)([offset=0.5]Det){%
+ \parbox{1.6\psxunit}{spectral\\filter ($\Omega$)}}
+ \lens[lens=4 4 2, n=3.3]([Xnodesep=-3]Det)(Det)
+ \optbox[optboxsize=0.2 0.6, n=1, label=-1.2](\oenodeOut{6})(Det){%
+ \begin{tabular}{@{}c@{}}nonlinear\\ crystal\end{tabular}}
+ \optplate[linestyle=none](\oenodeOut{7})(Det)
+ \optdetector[detsize=0.6 0.6, fillstyle=solid,fillcolor=blue](\oenodeOut{6})(Det)
+ \newpsstyle{Beam}{linewidth=1.5\pslinewidth}
+ \drawbeam[linecolor=blue]{7-9}
+ \addtopsstyle{Beam}{linecolor=red}
+ \drawbeam(In){1-4}{6-8}
+ \drawbeam{1}{5-8}
+ \rput[r](\oenodeLabel{M}){$\tau$
+ \psline[arrows=<->, arrowinset=0](0.15,0.25)(0.15,-0.15)}
+\end{pspicture}
+\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)
+ \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)
+ \drawbeam(A){1-2}
+ \drawbeam[linestyle=dashed, dash=2pt 2pt, linecolor=red, arrowscale=1.5, arrows=->](A){1}{3}
+ \parallelpol[abspos=1](A)(B)
+ \perppol[abspos=1](A)(B)
+ \nodexn{(\oenodeBeam{})-1.5(!\oeBeamVec{})}{D}
+ \perppol[abspos=7](A)(B)
+ \parallelpol(D)(\oenodeBeam{})
+\end{pspicture}
+\end{LTXexample}
+
+\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}{}
+\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}
+\pnode([Xnodesep=2,offset=1]L){ASLM}\pnode([offset=-0.5,Xnodesep=9]L){MRef}
+\pnode([offset=-7]ASLM){ML}\pnode([Xnodesep=8.5]ML){Cam}
+\begin{optexp}
+ \laser[optboxsize=1.6 0.6](L)(PSLM){Nd:YAG}
+ \beamsplitter[bssize=0.4, labelangle=-90](L)(L|MRef)(MRef){BS}
+ \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}
+ \lens[label=0.6 -40](PSLM)(ASLM){L}
+ \slm[labeloffset=0.5](PSLM)(ASLM)(ML){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}
+ \drawwidebeam[beamwidth=0.1, stopinside]{1-5}
+ \psset{loadbeampoints}
+ \drawwidebeam[stopinside, savebeampoints=2]{5-7}
+ \drawwidebeam[loadbeampoints=2, beamdiv=-8.5]{7-8}
+ \drawwidebeam[loadbeampoints=2, beamdiv=-8.5, beamangle=-4]{7-8}
+ \drawwidebeam[beamdiv=-8.5, beamangle=-4.5]{8-9}
+ \drawwidebeam[loadbeampoints=2, beamdiv=-8.5, beamangle=4]{7-8}
+ \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}
+ \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}
+ \drawwidebeam[savebeampoints=2, stopinside]{9-13}
+ \drawwidebeam[loadbeampoints=2, beamdiv=-16, beamangle=5, stopinside]{13-14}
+ \drawwidebeam[beamangle=-5]{14-18}
+ \drawwidebeam[loadbeampoints=2, beamdiv=-16, beamangle=-5, stopinside]{13-14}
+ \drawwidebeam[beamangle=5]{14-18}
+ \lens[lens=0.5 0.5 0.4, n=2](L|MRef)(MRef){MO}
+ \pinhole[position=0.53, labelangle=180](L|MRef)(MRef){PH}
+ \lens[position=0.65](L|MRef)(MRef){L}
+ \optplate[position=0.7](L|MRef)(MRef){S}
+ \mirror[labeloffset=0.4](L|MRef)(MRef)(MRef|Cam){M}
+ \addtopsstyle{Beam}{fillcolor=red!70}
+ \drawwidebeam[loadbeampoints=false, beamwidth=0.1, savebeampoints]{2}{19-21}
+ \drawwidebeam{21-23}{16-18}
+\end{optexp}
+\end{pspicture}
+\end{LTXexample}
% \iffalse
%</ignore>
% \fi
%
-%
+%
% \ifGERMAN\chapter{Zusatzinformationen}\fi
% \ifENGLISH\chapter{Additional information}\fi
%
@@ -8971,6 +9355,7 @@
% \testextnodes[dettype=diode]{optdetector}{(0,1.5)(2,1.5)}
% \testextnodes{optdiode}{(0,1.5)(3,1.5)}
% \testextnodes{doveprism}{(0,1.5)(3,1.5)}
+% \testextnodes[glanthompsongap=0.15]{glanthompson}{(0,1.5)(3,1.5)}
% \bgroup
% \addtopsstyle{PiezoMirror}{unit=1.5}
% \testextnodes[mirrortype=piezo]{mirror}{(0,1.5)(2,1.5)(2,0)}
@@ -9090,7 +9475,7 @@
% \psdot(\oenodeOut{})\uput[45](\oenodeOut{}){N}
% \rput[bl](0,0){\ttfamily\textbackslash optprism}
% \end{pspicture}%
-% \hspace{\fill}%
+% \hspace{\fill}%
% \begin{pspicture}(3,1.5)
% \pnode(0,1){A}\pnode(2.5,1){B}\pnode(2.5,0){C}
% \optgrating(A)(B)(C)
@@ -9098,9 +9483,20 @@
% \psdot(\oenodeIn{})\uput[-135](\oenodeIn{}){1, N}
% \rput[bl](0,0){\ttfamily\textbackslash optgrating}
% \end{pspicture}%
-% \bigskip
%
-% \noindent
+% \begin{pspicture}(0,-0.5)(3,1.7)
+% \pnode(0,0.7){A}\pnode(3,0.7){B}
+% \glanthompson[glanthompsonsize=1.8 1, glanthompsongap=0.2](A)(B)
+% \drawbeam(A){}(B)
+% \psdot(\oenodeIn{})\uput[135](\oenodeIn{}){1}
+% \psdot(\oenodeIfc{2}{})\uput[45](\oenodeIfc{2}{}){2}
+% \psdot(\oenodeIfc{3}{})\uput[30](\oenodeIfc{3}{}){3,C}
+% \psdot(\oenodeIfc{4}{})\uput[150](\oenodeIfc{4}{}){4}
+% \psdot(\oenodeOut{})\uput[45](\oenodeOut{}){N}
+% \rput[bl](0,-0.4){\ttfamily\textbackslash glanthompson}
+% \end{pspicture}%
+% \hspace{\fill}%
+%
% \begin{pspicture}(3,2.5)
% \pnode(0,1.5){A}\pnode(2.5,1.5){B}\pnode(2.5,0.4){C}
% \beamsplitter[bssize=1.2](A)(B)(C)
@@ -9497,6 +9893,15 @@
% \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.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}
+% \item Fixed wrong computation of node distance in \cs{fiberbox}
+% \item Fixed bug in \cs{wdmsplitter} for \opt{coupleralign=b} and \opt{couplertype=none}
+% \item Fixed bug when filling components placed with \opt{position=end}/\opt{start}
+% \item Added value \opt{absolute} to parameter \opt{labelref}\see{prm:labelref}
+% \item Added examples\see{sec:examples}
+% \end{release}
% \begin{release}{3.1}{2012-07-17}
% \item Added component \cs{fiberbox}\see{cmd:fiberbox}
% \item Extended connection macros to not required curly braces around node parenthesis any more\see{sec:namingobj}
@@ -9946,9 +10351,18 @@
\define@key[psset]{optexp}{labelalign}{%
\def\POE@key@labelalign{#1}%
}
-\define@key[psset]{optexp}{labelref}{%
- \edef\POE@key@labelref{#1}%
-}
+\define@choicekey+[psset]{optexp}{labelref}%
+ [\val\nr]{absolute,relative,relgrav,global}%
+ {%
+ \ifcase\nr\relax
+ \let\POE@key@labelref\POE@str@labelref@global
+ \else
+ \def\POE@key@labelref{#1}%
+ \fi
+ }{%
+ \PackageError{pst-optexp}%
+ {Unknown value '\POE@key@labelref' for labelref}%
+}%
\define@choicekey*+[psset]{optexp}{innerlabel}%
[\val\nr]{true}[true]%
{\ifcase\nr\relax
@@ -10395,6 +10809,32 @@
}%
\psset[optexp]{doveprismsize=0.6}%
% \end{macrocode}
+% Glan-Thompson prism
+% \begin{macrocode}
+\define@key[psset]{optexp}{glanthompsongap}{%
+ \pst@checknum{#1}\POE@key@glanthompsongap
+}%
+\define@key[psset]{optexp}{glanthompsonwidth}{%
+ \pst@checknum{#1}\POE@key@glanthompsonwidth
+}%
+\define@key[psset]{optexp}{glanthompsonheight}{%
+ \pst@checknum{#1}\POE@key@glanthompsonheight
+}%
+\define@key[psset]{optexp}{glanthompsonsize}{%
+ \pst@expandafter\POE@psset@@glanthompsonsize{#1} {} {} {}\@nil
+}%
+\def\POE@psset@@glanthompsonsize#1 #2 #3\@nil{%
+ \ifx\\#2\\
+ \PackageWarning{pst-optexp}{%
+ Parameter 'glanthompsonsize' requires two numbers}%
+ \fi
+ \psset[optexp]{glanthompsonwidth=#1, glanthompsonheight=#2}%
+}%
+\psset[optexp]{%
+ glanthompsongap=0,
+ glanthompsonsize=1 0.5
+}%
+% \end{macrocode}
% Beamsplitter
% \begin{macrocode}
\define@key[psset]{optexp}{bssize}{%
@@ -10969,7 +11409,7 @@
,beaminsidefirst=false
,beaminsidelast=false
,loadbeam=false
- ,savebeam=false
+ ,savebeam=true
,loadbeampoints=false
,savebeampoints=true
,beamangle=0
@@ -11271,11 +11711,11 @@
\ifPOE@backlayer
\ifx\POE@key@startnode\POE@str@auto\else
\POE@pnode{/\POE@key@startnode\space \POE@comps exch pop
- \POE@dict{getsubnode} \tx@UserCoor}{@@A}
+ \POE@dict{GetIfcOrNodeCoord} \tx@UserCoor}{@@A}
\fi
\ifx\POE@key@stopnode\POE@str@auto\else
\POE@pnode{/\POE@key@stopnode\space \POE@comps pop
- \POE@dict{getsubnode} \tx@UserCoor}{@@B}
+ \POE@dict{GetIfcOrNodeCoord} \tx@UserCoor}{@@B}
\fi
\ifx\POE@key@startnode\POE@str@auto
\ifx\POE@key@stopnode\POE@str@auto
@@ -11518,13 +11958,15 @@
/N@\oenodeBeam{\POE@key@savebeampoints}\space 4 -1 roll
} if
savebeam currentdict /lastVecTmp known and dup {
- /lastVec\POE@key@savebeampoints\space lastVecTmp 4 -1 roll
+ /prevVec\POE@key@savebeampoints\space
+ currentdict /prevVecTmp known { prevVecTmp }{ 0 0 } ifelse
+ /lastVec\POE@key@savebeampoints\space lastVecTmp 7 -1 roll
} if
}%
\fi
\end@BeamObj
\POE@Verb{%
- { tx@OptexpDict begin ToVec def end } if
+ { tx@OptexpDict begin ToVec def ToVec def end } if
{ \tx@NodeScale @NewNode } if
}%
}%
@@ -11659,14 +12101,20 @@
savebeam and
currentdict /lastVecTmpLow known and
currentdict /lastVecTmpUp known and dup {
+ /prevVecLow\POE@key@savebeampoints\space /prevVecUp\POE@key@savebeampoints\space
+ currentdict /prevVecLow known currentdict /prevVecUp known and {
+ prevVecLow 3 -1 roll prevVecUp
+ } {
+ 0 0 3 -1 roll 0 0
+ } ifelse
/lastVecLow\POE@key@savebeampoints\space lastVecTmpLow
/lastVecUp\POE@key@savebeampoints\space lastVecTmpUp
- 7 -1 roll
+ 13 -1 roll
} if
}%
\end@BeamObj
\POE@Verb{%
- { tx@OptexpDict begin ToVec def ToVec def end } if
+ { tx@OptexpDict begin 4 { ToVec def } repeat end } if
{ \tx@NodeScale @NewNode @NewNode } if
}%
}%
@@ -12343,7 +12791,18 @@
}%
% \end{macrocode}
% \end{macro}
-%
+%
+% \begin{macrocode}
+\def\oe@BeamVec#1#2{%
+ \POE@dict{%
+ /prevVec#1\ifx\\#2\\1\else#2\fi\space dup
+ currentdict exch known { load exec }{ pop 0 0 } ifelse
+ }%
+}%
+\def\oeBeamVec#1{\oe@BeamVec{}{#1}}%
+\def\oeBeamVecUp#1{\oe@BeamVec{Up}{#1}}%
+\def\oeBeamVecLow#1{\oe@BeamVec{Low}{#1}}%
+% \end{macrocode}
% \section{Components}
%
% \begin{macro}{\newOptexpComp@}
@@ -13049,20 +13508,18 @@
\POE@dict{VecAdd 0.5 VecScale}
\tx@UserCoor){\oenodeRefB{}}
\POE@Verb{%
+ gsave
+ STV CP T
/N@\oenodeRefA{} @GetCenter
/N@\oenodeRefB{} @GetCenter @ABVect NormalizeVec
90 matrix rotate dtransform 2 copy
- \pst@nodedict
- /GetCenterOrig /GetCenter load def
- /GetCenter { begin X Y end } def
- \POE@tempa \POE@tempb @ABVect
- \tx@UserCoor DotProd abs 3 1 roll
- \POE@tempc \POE@tempd @ABVect
- \tx@UserCoor DotProd abs
- /GetCenter /GetCenterOrig load def
- end
- /@@outht ED /@@inht ED
- }%
+ \POE@tempa \POE@tempb @ABVect
+ \tx@UserCoor DotProd abs 3 1 roll
+ \POE@tempc \POE@tempd @ABVect
+ \tx@UserCoor DotProd abs
+ grestore
+ /@@outht ED /@@inht ED
+ }%
\fi
\fi
\POE@drawcomponent[fiberbox]{#5}\fiberbox@ii
@@ -13204,7 +13661,7 @@
\def\POE@nlput@i(#1)(#2)#3#4{%
\begin@SpecialObj
\POE@LDNode(#1)(#2){#3}
- \pcline[linestyle=none](temp@nlputA)(temp@nlputB)%
+ \pcline[linestyle=none,fillstyle=none, arrows=-, ArrowInside=-](temp@nlputA)(temp@nlputB)%
\ncput[npos=0.5]{#4}%
\end@SpecialObj}
% \end{macrocode}
@@ -13287,7 +13744,17 @@
% \end{macrocode}
% Put the label only if it's not empty.
% \begin{macrocode}
- \ifx\POE@temp\@empty\else
+ \ifx\POE@temp\@empty
+% \end{macrocode}
+% Place the correct 'global' label node when the label is empty.
+% \begin{macrocode}
+ \ifx\POE@key@labelref\POE@str@labelref@global
+ \nput[labelsep=\POE@key@labeloffset]%
+ {\POE@key@labelangle}%
+ {\oenodeCenter{}}%
+ {\pnode(0,0){\oenodeLabel{}}}%
+ \fi
+ \else
% \end{macrocode}
% For \opt{global} positioning, the label is placed in global coordinate system
% with respect to the center node.
@@ -13328,7 +13795,7 @@
{ /yA ED /xA ED /yB ED /xB ED} ifelse
} ifelse
} if >%
- \ncline[linestyle=none,fillstyle=none, npos=]%
+ \ncline[linestyle=none,fillstyle=none, npos=, arrows=-, ArrowInside=-]%
{\POE@trefnodeA}{\POE@trefnodeB}%
\ifx\POE@key@position\@empty
\ifx\POE@key@abspos\@empty
@@ -13362,6 +13829,7 @@
\newOptexpDipole[endbox]{optdetector}{}%
\newOptexpDipole{optdiode}{allowbeaminside=false}%
\newOptexpDipole{doveprism}{}%
+\newOptexpDipole{glanthompson}{}%
% \end{macrocode}
%
% Define all free-ray tripoles
@@ -13543,7 +14011,7 @@
\psset[optexp]{abspos={\POE@dict{ @@x0 neg @@x sub }}}%
\fi\fi
\POE@disablepos
- \ncline[linestyle=none,fillstyle=none,npos=]%
+ \ncline[linestyle=none,fillstyle=none,npos=,arrows=-,ArrowInside=-]%
{\POE@refnodeA}{\POE@refnodeB}%
% \end{macrocode}
% Positioning of the component
@@ -14488,7 +14956,51 @@
\ignorespaces}%
% \end{macrocode}
% \end{macro}
+%
+% \subsubsection{glanthompson}
+%
+% \begin{macro}{\glanthompson@ref}
+% \begin{macrocode}
+\def\glanthompson@ref{%
+ \POE@setref{/@@x \POE@key@glanthompsonwidth\space 0.5 mul def
+ /@@y \POE@key@glanthompsonheight\space 0.5 mul def
+ }%
+}%
+% \end{macrocode}
+% \end{macro}
%
+% \begin{macro}{\glanthompson@nodes}
+% \begin{macrocode}
+\def\glanthompson@nodes{%
+ \newOptexpCompAmb{%
+ {@@x neg 0} {0 1} @@x neg @@x trans {PlainIfc}
+ {@@x 0} {0 1} @@x neg @@x trans {PlainIfc}
+ {\POE@key@glanthompsongap\space -0.5 mul 0} {@@x neg @@y} 0 0 trans {PlainIfc}
+ {0 @@y neg} {1 0} @@y neg @@y trans {PlainIfc}
+ {0 @@y} {1 0} @@y neg @@y trans {PlainIfc}
+ 3 \POE@key@n
+ }
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\glanthompson@comp}
+% \begin{macrocode}
+\def\glanthompson@comp{%
+ \ifdim\POE@key@glanthompsongap pt>0pt
+ \pspolygon(!\POE@dict{@@x neg @@y})%
+ (!\POE@dict{@@x neg @@y neg})%
+ (!\POE@dict{@@x \POE@key@glanthompsongap\space sub @@y neg})
+ \pspolygon(!\POE@dict{@@x neg \POE@key@glanthompsongap\space add @@y})%
+ (!\POE@dict{@@x @@y})%
+ (!\POE@dict{@@x @@y neg})%
+ \else
+ \psframe(!\POE@dict{@@x neg @@y neg})(!\POE@dict{@@x @@y})
+ \psline[arrows=cc-cc](!\POE@dict{@@x neg @@y})(!\POE@dict{@@x @@y neg})
+ \fi
+}%
+% \end{macrocode}
+% \end{macro}
% \subsubsection{pentaprism}
%
% \begin{macro}{\pentaprism@nodes}
@@ -15225,7 +15737,7 @@
\psline[style=Fiber](\oenodeIn{})(\oenode{N}{})
\ifx\POE@key@coupleralign\POE@str@bottom
\psline[style=Fiber](! \POE@dict{/N@\oenodeIn{} @GetCenter}
- \tx@UserCoor \POE@key@couplersep\space sub)(\oenode{2}{})
+ \tx@UserCoor \POE@key@couplersep\space add)(\oenode{2}{})
\fi
\fi
\fi
@@ -16434,7 +16946,12 @@ tx@OptexpDict begin
counttomark 3 roll
/PrevCenter /CurrCenter load def
/lastBeamPointTmp /Curr load def
- /lastVecTmp /CurrVec load def
+ currentdict /lastVecTmp known {
+ /prevVecTmp /lastVecTmp load def
+ /lastVecTmp /CurrVec load def
+ } {
+ /CurrVec load dup /lastVecTmp ED /prevVecTmp ED
+ } ifelse
/PrevMode Mode def
CompName cvn load /correct get /PrevCorrect ED
PN IfcCnt eq {
@@ -16699,9 +17216,12 @@ tx@OptexpDict begin
/DrawnSegm 0 def
} if
ret missed eq not {
+ 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 0 gt {
+ 4 -1 roll mul 3 1 roll mul sub 1e-7 gt {
% \end{macrocode}
% swap upper and lower beam points for next beam
% \begin{macrocode}
@@ -16715,6 +17235,10 @@ tx@OptexpDict begin
/lastVecTmpUp /CurrVecUp load def
/lastVecTmpLow /CurrVecLow load def
} ifelse
+ not {
+ /lastVecTmpUp load /lastVecTmpLow load
+ } if
+ /prevVecLow ED /prevVecUp ED
} if
DebugEnd
} bind def
@@ -17567,7 +18091,12 @@ tx@OptexpDict begin
% \end{macro}
%
% \begin{macro}{NearestNode}
-% CompA/NodeA CombB/NodeB -> Coordinates of nodeA or the node of CompA which is nearest to nodeB
+% Get the coordinates of the node of \PSvar{CompA} which is nearest to
+% \PSvar{CompB}/\PSvar{NodeB}, or push the coordinates of
+% \PSvar{NodeA} on stack if it is already a node.
+% \begin{pssyntax}
+% \PSvar{CompA/NodeA} \PSvar{CompB/NodeB} \PSop{NearestNode} \PSvar{X Y}
+% \end{pssyntax}
% \begin{macrocode}
/NearestNode {
(NearestNode) DebugBegin
@@ -17642,6 +18171,7 @@ tx@OptexpDict begin
fiberalign center eq {
RelFiberAngle@center
}{
+ 3 1 roll pop pop
RelFiberAngle@ref
} ifelse
2 copy exch atan
@@ -17663,6 +18193,7 @@ tx@OptexpDict begin
CompA fiberalign center eq {
RelFiberAngle@center
}{
+ 3 1 roll pop pop
RelFiberAngle@tref
} ifelse
2 copy exch atan
@@ -17677,12 +18208,12 @@ tx@OptexpDict begin
% \end{macro}
%
% \begin{macro}{/RelFiberAngle@ref}
+% Calculate the vector of the reference line of \PSvar{CompA}.
% \begin{pssyntax}
-% \PSvar{Xa Ya CompA} \PSop{RelFiberAngle@ref} \PSvar{dX dY}
+% \PSstring{CompA} \PSop{RelFiberAngle@ref} \PSvar{dX dY}
% \end{pssyntax}
% \begin{macrocode}
/RelFiberAngle@ref {
- 3 1 roll pop pop
dup (A) NodeName exch (B) NodeName
@GetCenter 3 -1 roll @GetCenter @ABVect
} bind def
@@ -17692,11 +18223,10 @@ tx@OptexpDict begin
% \begin{macro}{/RelFiberAngle@tref}
% Same as \PSname{RelFiberAngle@ref} but uses the transformed reference nodes.
% \begin{pssyntax}
-% \PSvar{Xa Ya CompA} \PSop{RelFiberAngle@ref} \PSvar{dX dY}
+% \PSvar{CompA} \PSop{RelFiberAngle@ref} \PSvar{dX dY}
% \end{pssyntax}
% \begin{macrocode}
/RelFiberAngle@tref {
- 3 1 roll pop pop
dup (TrefA) NodeName exch (TrefB) NodeName
@GetCenter 3 -1 roll @GetCenter @ABVect
} bind def
@@ -17704,6 +18234,11 @@ tx@OptexpDict begin
% \end{macro}
%
% \begin{macro}{/RelFiberAngle@center}
+% Calculate the vector from the center node of \PSvar{CompA} to the
+% node \PSstring{Xa, Ya}.
+% \begin{pssyntax}
+% \PSvar{Xa Ya CompA} \PSop{RelFiberAngle@center} \PSvar{dX dY}
+% \end{pssyntax}
% \begin{macrocode}
/RelFiberAngle@center {
(Center) NodeName @GetCenter 4 2 roll @ABVect
@@ -17711,10 +18246,12 @@ tx@OptexpDict begin
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{getsubnode}
-% subname node/name -> coordinates
+% \begin{macro}{GetIfcOrNodeCoord}
+% \begin{pssyntax}
+% \PSstring{IfcNum} \PSstring{CompName}/\PSproc{node} \PSop{GetIfcOrNodeCoord} \PSvar{x y}
+% \end{pssyntax}
% \begin{macrocode}
-/getsubnode {
+/GetIfcOrNodeCoord {
dup xcheck {
exch pop exec
} {