diff options
author | Karl Berry <karl@freefriends.org> | 2012-07-22 22:53:45 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-07-22 22:53:45 +0000 |
commit | fe821b3e418e038551ff9a32e79a35c0c74799cc (patch) | |
tree | 9c14a1c4083ec9354f0b0162c38c23f1e35d0425 /Master/texmf-dist | |
parent | 8552ae7941203f1a1cf1779b74b219b9b838a7e3 (diff) |
pst-optexp 3.1 (18jul12)
git-svn-id: svn://tug.org/texlive/trunk@27097 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/pst-optexp/Changes | 9 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-DE.pdf | bin | 1163028 -> 1194165 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-quickref.pdf | bin | 44681 -> 44956 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/pst-optexp/pst-optexp.pdf | bin | 1138738 -> 1170543 bytes | |||
-rw-r--r-- | Master/texmf-dist/dvips/pst-optexp/pst-optexp.pro | 3 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/pst-optexp/Makefile | 4 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/pst-optexp/pst-optexp.dtx | 777 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/pst-optexp/pst-optexp.ins | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/pst-optexp/pst-optexp.sty | 266 |
9 files changed, 887 insertions, 174 deletions
diff --git a/Master/texmf-dist/doc/latex/pst-optexp/Changes b/Master/texmf-dist/doc/latex/pst-optexp/Changes index f2258cdc26d..ea7c9cbc323 100644 --- a/Master/texmf-dist/doc/latex/pst-optexp/Changes +++ b/Master/texmf-dist/doc/latex/pst-optexp/Changes @@ -1,3 +1,12 @@ +3.1 2012-07-17 + * Added component \fiberbox + * Extended connection macros to not required curly braces around + node parenthesis any more + * Modified \fibercollimator to have allowbeaminside=false by + default + * Extended fiber couplers to allow using only two nodes + * Fixed a bug concerning node expressions with \drawfiber + 3.0 2012-07-09 * Modified beam connections with \drawbeam to support raytracing * Added wide beams with \drawwidebeam diff --git a/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-DE.pdf b/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-DE.pdf Binary files differindex 1bdfdde3dab..4022cfb814c 100644 --- a/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-DE.pdf +++ b/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-DE.pdf diff --git a/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-quickref.pdf b/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-quickref.pdf Binary files differindex 813d8abbcbc..43645f47c05 100644 --- a/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-quickref.pdf +++ b/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-quickref.pdf diff --git a/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp.pdf b/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp.pdf Binary files differindex 1f717e802d6..3009940c96c 100644 --- a/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp.pdf +++ b/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp.pdf diff --git a/Master/texmf-dist/dvips/pst-optexp/pst-optexp.pro b/Master/texmf-dist/dvips/pst-optexp/pst-optexp.pro index 991a54f9652..0deeb3caa0c 100644 --- a/Master/texmf-dist/dvips/pst-optexp/pst-optexp.pro +++ b/Master/texmf-dist/dvips/pst-optexp/pst-optexp.pro @@ -9,7 +9,7 @@ %% This is a generated file. %% %% Project: pst-optexp -%% Version: 3.0 (2012/07/09) +%% Version: 3.1 (2012/07/17) %% %% Copyright (C) 2007-2012 by Christoph Bersch <usenet@bersch.net> %% @@ -29,6 +29,7 @@ %% and the derived files %% pst-optexp.sty, pst-optexp.pro. %% + /tx@OptexpDict 200 dict def tx@OptexpDict begin /DebugOE false def diff --git a/Master/texmf-dist/source/latex/pst-optexp/Makefile b/Master/texmf-dist/source/latex/pst-optexp/Makefile index b14ceed4ba1..c2ab1628a60 100644 --- a/Master/texmf-dist/source/latex/pst-optexp/Makefile +++ b/Master/texmf-dist/source/latex/pst-optexp/Makefile @@ -22,7 +22,9 @@ doc-DE : $(PACKAGE)-DE.pdf quickref: $(PACKAGE)-quickref.pdf dist : doc doc-DE quickref Changes - tar chvzf $(ARCHNAME).tar.gz $(ARCHFILES) + mkdir -p pst-optexp + cp $(ARCHFILES) pst-optexp + tar chvzf $(ARCHNAME).tar.gz pst-optexp @ echo @ echo $(ARCHNAME).tar.gz 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 2ed32458777..b97c1e5af02 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/09 v3.0 Optical experimental setups with PSTricks] + [2012/07/17 v3.1 Optical experimental setups with PSTricks] %</stylefile> % %<*driver> @@ -107,10 +107,9 @@ polarization, mirror, beamsplitter, optgrating, optprism, rightangleprism, pentaprism, optdipole, optripole, optfiber, optamp, optmzm, optfilter, polcontrol, optisolator, optswitch, fiberdelayline, optfiberpolarizer, - fibercollimator, optcoupler, wdmcoupler, wdmsplitter, optcirculator, + fibercollimator, optcoupler, wdmcoupler, wdmsplitter, optcirculator, fiberbox, drawbeam, drawwidebeam, drawfiber, frontlayer, backlayer, newOptexpDipole, newOptexpTripole, newOptexpFiberDipole,optplane}, % - morekeywords = [22] {optexp}, explpreset={% pos=l, width=-99pt, hsep=5mm, overhang=\codeoverhang, varwidth, vsep=\bigskipamount, rframe={}}, @@ -450,7 +449,7 @@ %</driver> % \fi % -% \CheckSum{0} +% \CheckSum{6209} % % \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 @@ -642,11 +641,11 @@ % \pstVerb{^^A % \i\space 650 400 sub 39 div mul 400 add % tx@addDict begin wavelengthToRGB end }^^A -% \drawbeam[n={-0.002 \i\space mul n add}]{(In)}{3-5}{2}{1}{6-7} +% \drawbeam[n={-0.002 \i\space mul n add}](In){3-5}{2}{1}{6-7} % }^^A % \newpsstyle{Beam}{linecolor=red} % \backlayer{\psline[style=Beam,ArrowInside=->, linewidth=2\pslinewidth, arrowinset=0](In)(\oenodeIn{3})(\oenodeOut{4})} -% \drawbeam[linewidth=2\pslinewidth, arrows=->, arrowinset=0, loadbeampoints, beaminsidefirst, n=1.9325]{7-8}{(Out)} +% \drawbeam[linewidth=2\pslinewidth, arrows=->, arrowinset=0, loadbeampoints, beaminsidefirst, n=1.9325]{7-8}(Out) % \end{optexp} % \rput(4,4.5){^^A % \psframe[fillstyle=solid,fillcolor=gray!70](-0.1, -0.6)(0.1, 0.7) @@ -998,7 +997,7 @@ \pnode(0,2.5){A}\pnode(2,2.5){B}\pnode(2,1.5){C} \mirror[labelangle=-45](A)(B)(C){M} \optbox[position=start, labeloffset=0, labelref=relative](C)(B){box} - \drawbeam{(A)}{1}{2} + \drawbeam(A){1}{2} \psset{style=Refline}\color{Refline} \psdot(A)\uput[90](A){A}\psdot(B)\uput[-135](B){B}\psdot(C)\uput[45](C){C} \end{pspicture} @@ -1048,8 +1047,8 @@ \pnode(1.5,1){A}\pnode(3,1){B} \optbox[position=start](A)(B) \lens[n=2](A)(B) - \drawbeam{1}{2}{(B)} - \drawbeam[beampos=0.2, linecolor=red]{1}{2}{(B)} + \drawbeam{1}{2}(B) + \drawbeam[beampos=0.2, linecolor=red]{1}{2}(B) \end{pspicture} \end{LTXexample} % \iffalse @@ -1069,7 +1068,7 @@ \pnode(1.5,1){A}\pnode(3,1){B} \optbox[position=start](A)(B) \lens[n=2](A)(B) - \drawbeam[beamangle=10, ArrowInside=->, arrows=-|, beaminside=false]{1}{2}{(B)} + \drawbeam[beamangle=10, ArrowInside=->, arrows=-|, beaminside=false]{1}{2}(B) \end{pspicture} \end{LTXexample} % \iffalse @@ -1091,7 +1090,7 @@ \pnode(1.5,1){A}\pnode(3,1){B} \optbox[position=start](A)(B) \lens[n=2](A)(B) - \drawwidebeam[beamwidth=0.2, fillstyle=solid, fillcolor=green!40]{1}{2}{(B)} + \drawwidebeam[beamwidth=0.2, fillstyle=solid, fillcolor=green!40]{1}{2}(B) \end{pspicture} \end{LTXexample} % \iffalse @@ -1116,7 +1115,7 @@ \begin{optexp} \optbox[position=start](A)(B) \lens[n=2](A)(B) - \drawwidebeam[beamwidth=0.2, fillstyle=solid, fillcolor=green!40]{1}{2}{(B)} + \drawwidebeam[beamwidth=0.2, fillstyle=solid, fillcolor=green!40]{1}{2}(B) \end{optexp} \end{pspicture} \end{LTXexample} @@ -1379,7 +1378,7 @@ \lens[lensradius=2.3, lensheight=1.3, abspos=2.6](A)(B){convex} \optbox[position=end, labeloffset=0](A)(B){CCD}*\OFF* - \drawwidebeam[beamwidth=0.2]{(A)}{1}{2}{3}*\ON* + \drawwidebeam[beamwidth=0.2](A){1}{2}{3}*\ON* \end{pspicture}*\OFF* \end{LTXexample} \endgroup @@ -1412,7 +1411,7 @@ \optbox[position=end, labeloffset=0](A)(B){CCD}*\OFF* \addtopsstyle{Beam}{fillstyle=solid, fillcolor=green, opacity=0.2} - *\ON*\drawwidebeam[beamwidth=0.2]{(A)}{1}{2}{3} + *\ON*\drawwidebeam[beamwidth=0.2](A){1}{2}{3} \end{pspicture}*\OFF* \end{LTXexample} \endgroup @@ -1659,7 +1658,7 @@ \lens[compname=L](BS)(PD)*\label{l:ex2-l}* \optdetector[compname=Det, dettype=diode](BS)(PD)*\label{l:ex2-det}* \addtopsstyle{Beam}{beamwidth=0.2, fillstyle=solid, fillcolor=green!20!white}*\label{l:ex2-style}* - \drawwidebeam{(A)}{BS}{M1}{BS}{M2}{BS}{L}{Det}*\label{l:ex2-beam}* + \drawwidebeam(A){BS}{M1}{BS}{M2}{BS}{L}{Det}*\label{l:ex2-beam}* \end{optexp} \end{pspicture} \end{LTXexample} @@ -1809,7 +1808,7 @@ \begin{optexp} \optbox[position=end, labelangle=90](1,1)(1,2){Box} \beamsplitter[labelangle=-90](1,2)(1,1)(2,1){BS} - \drawbeam[arrows=->]{1}{2}{(2,1)} + \drawbeam[arrows=->]{1}{2}(2,1) \frontlayer{% \psdot[style=CenterNode](\oenodeCenter{1}) \psdot[style=CenterNode](\oenodeCenter{2}) @@ -2070,6 +2069,10 @@ % \iffalse %</ignore> % \fi +% +% \boolitem{endbox} +% \ifGERMAN Dieser Parameter ist äquivalent zu \Lkeyword{position}\opt{=end}.\fi +% \ifENGLISH This parameter is equivalent to \Lkeyword{position}\opt{=end}.\fi % \end{optionlist} % % @@ -3178,7 +3181,7 @@ \psset{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){1}{2}(2.5,3) \end{pspicture} \end{LTXexample} % \iffalse @@ -3246,9 +3249,9 @@ \psset{unit=1.5} \begin{pspicture}(2,2) \mirror[mirrortype=semitrans](0,1)(1,1)(1,0) - \drawbeam{(0,1)}{}{(1,0)} - \drawbeam[linecolor=red]{(2,1)}{}{(1,2)} - \drawbeam[beampos=0.05, linecolor=blue]{(0,1)}{}{(2,1)} + \drawbeam(0,1){}(1,0) + \drawbeam[linecolor=red](2,1){}(1,2) + \drawbeam[beampos=0.05, linecolor=blue](0,1){}(2,1) \end{pspicture} \end{LTXexample} @@ -3256,9 +3259,9 @@ \psset{unit=1.5} \begin{pspicture}(2,2) \mirror[mirrortype=semitrans, mirrordepth=-0.15](0,1)(1,1)(1,0) - \drawbeam{(0,1)}{}{(1,0)} - \drawbeam[linecolor=red]{(2,1)}{}{(1,2)} - \drawbeam[beampos=0.05, linecolor=blue]{(0,1)}{}{(2,1)} + \drawbeam(0,1){}(1,0) + \drawbeam[linecolor=red](2,1){}(1,2) + \drawbeam[beampos=0.05, linecolor=blue](0,1){}(2,1) \end{pspicture} \end{LTXexample} % \iffalse @@ -4372,7 +4375,40 @@ % The style of the arrow of the variable coupler. % \fi % \end{stylelist} -% +% +% \ifGERMAN +% Jeder Koppler hat eine Variante, die nur zwei Knoten benötigt, einen Eingangs- +% und einen Ausgangsknoten. \Lcs{optcoupler} verwendet jeden dieser Knoten +% zweimal, \Lcs{wdmsplitter} verwendet den Knoten \prm{out} zweimal und +% \Lcs{wdmcoupler} verwendet \prm{in} zweimal. Das kann sehr praktisch sein, +% wenn man für einen Koppler die automatischen Verbindungen nicht verwendet, +% sondern die Komponente manuell verbindet. +% \fi +% \ifENGLISH +% Every coupler has a variant which needs only two nodes, one input and one +% output node. For \Lcs{optcoupler}, both nodes are used twice, +% \Lcs{wdmsplitter} uses node \prm{out} twice, and \Lcs{wdmcoupler} uses node +% \prm{in} twice. This can be very useful if you do not use the automatic +% connections but connect the components manually. +% \fi +% +% \iffalse +%<*ignore> +% \fi +\begin{LTXexample} +\begin{pspicture}(4,2) + \pnode(0,1){A}\pnode(4,1){B} + \psset[optexp]{fiber=none} + \wdmsplitter[position=0.2, coupleralign=b](A)(B) + \wdmcoupler[position=0.8, coupleralign=t](A)(B) + \drawfiber{(A)}{1}{2}{(B)} + \drawfiber{1}{([offset=0.5, Xnodesep=1]\oenodeIfc{2}{1})} + \drawfiber{([offset=-0.5, Xnodesep=-1]\oenodeIfc{2}{2})}{2} +\end{pspicture} +\end{LTXexample} +% \iffalse +%</ignore> +% \fi % \ifGERMAN\subsection{Eingangs- und Ausgangsknoten}\fi % \ifENGLISH\subsection{Input and output nodes}\fi % \label{sec:coupler-nodes} @@ -4439,6 +4475,169 @@ % \rput[b](10.5,0){\opt{coupleralign=bottom}} % \end{pspicture} % \end{center} +% +% +% \ifGERMAN\section{Faserbox}\fi +% \ifENGLISH\section{Fiber box}\fi +% +% \begin{ltxsyntax} +% \xLfmultipole{fiberbox}% +% \cmditem{fiberbox}(in)(out){label} +% \cmditem*{fiberbox}(tl)(bl)(tr)(br){label} +% \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. +% +% Werden nur zwei Knoten verwendet, dann sind das die Referenzknoten und +% der Abstand zwischen zwei benachbarten Eingangs- oder Ausgangsknoten +% muss manuell angegeben werden (siehe \Lkeyword{fiberboxsepin} und +% \Lkeyword{fiberboxsepout}). Nur die Seiten der Komponente wird +% automatische mit Fasern verbunden, die nur einen einzigen Knoten hat +% (siehe \Lkeyword{fiberboxcount} und das folgende Beispiel). +% \fi +% \ifENGLISH +% A \Lcs{fiberbox} can be positioned either with two, or four nodes which +% affects the positioning of the component and the interface nodes, and the +% automatic fiber connections. +% +% If only two nodes are used these are the reference nodes and the separation +% between the components input and output nodes must be specified manually (see +% \Lkeyword{fiberboxsepin} and \Lkeyword{fiberboxsepout}). Only the side of the +% component is connected automatically which has a single node only (see +% \Lkeyword{fiberboxcount} and the following example). +% \fi +% +% \iffalse +%<*ignore> +% \fi +\begin{LTXexample}[linerange={1-2,5-5}] +\begin{pspicture}(3,2) + \fiberbox[fiberboxcount=1x2, showifcnodes](0,1)(3,1) + \psdot(\oenodeRefA{})\uput[90](\oenodeRefA{}){RefA} + \psdot(\oenodeRefB{})\uput[90](\oenodeRefB{}){RefB} +\end{pspicture} +\end{LTXexample} +% \iffalse +%</ignore> +% \fi +% +% \ifGERMAN +% Werden vier Knoten verwendet, dann wird die Lage der Komponentenknoten +% und deren Abstand automatisch bestimmt. Die Komponente wird zwischen +% der Mitte der beiden Eingangsknoten und der Mitte der beiden +% Ausgangsknoten positioniert. Der erste Eingangsknoten wird an dem +% \prm{tl}-Knoten ausgerichtet, der letzte Eingangsknoten an dem +% \prm{bl}-Knoten. Die übrigen Eingangsknoten werden dazwischen +% gleichverteilt. Die Ausgangsknoten werden entsprechend behandelt. Die +% vier angegebenen Knoten werden automatisch mit den jeweils +% zugeordneten Komponentenknoten verbunden. +% \fi +% \ifENGLISH +% When four nodes are used the interface nodes and their separation are +% determined automatically. The component is positioned between the +% center of the two input and the center of the two output nodes. The +% first input interface node is aligned with the \prm{tl} node, the last +% input node is aligned with \prm{bl}, all other input nodes are equally +% distributed between these. The output nodes are handled +% accordingly. The four specified nodes are connected automatically to +% the component, each with the interface node it is aligned to. +% \fi +% \iffalse +%<*ignore> +% \fi +\begin{LTXexample}[linerange={1-2,5-5}] +\begin{pspicture}(3,2) + \fiberbox[fiberboxcount=3x4, showifcnodes](0.5,1.6)(0,0.4)(2.5,2)(3,0) + \psdot(\oenodeRefA{})\uput[90](\oenodeRefA{}){RefA} + \psdot(\oenodeRefB{})\uput[90](\oenodeRefB{}){RefB} +\end{pspicture} +\end{LTXexample} +% \iffalse +%</ignore> +% \fi +% +% \begin{optionlist} +% \numitem[1]{fiberboxwidth} +% \ifGERMAN Die Breite der Faserbox.\fi +% \ifENGLISH The width of the fiber box.\fi +% +% \numitem[0]{fiberboxheight} +% \ifGERMAN Die Höhe der Faserbox. Ist die Höhe kleiner als der Platz +% der von den Eingangs- oder Ausgangsknoten benötigt wird, dann wird +% die Höhe automatisch berechnet. Die berechnete Höhe ist +% $\text{max}\,(\text{sepin}\times(\text{N}-1), +% \text{sepout}\times(\text{M}-1))$. +% \fi +% \ifENGLISH The height of the fiber box. If the height is lower than +% the space required by the input or output nodes, it is calculated +% automatically. The calculated height is +% $\text{max}\,(\text{sepin}\times(\text{N}-1), +% \text{sepout}\times(\text{M}-1))$. +% \fi +% \iffalse +%<*ignore> +% \fi +\begin{LTXexample} +\begin{pspicture}(3,2.8) + \psset[optexp]{innerlabel, fiberboxwidth=1, fiberboxcount=1x2} + \fiberbox(0,2)(0,2)(3,2.5)(3,1.5){auto} + \fiberbox[fiberboxheight=1.05](0,0.5)(0,0.5)(3,1)(3,0){fix} +\end{pspicture} +\end{LTXexample} +% \iffalse +%</ignore> +% \fi +% +% \optitem{fiberboxsize}{\prm{width} \prm{height}} +% \ifGERMAN Die Breite und Höhe der Faserbox, ist äquivalent zum Aufruf von +% \Lkeyword{fiberboxwidth} und \Lkeyword{fiberboxheight}. +% \fi +% \ifENGLISH The width and height of the fiber box, is equivalent to calling +% both \Lkeyword{fiberboxwidth} and \Lkeyword{fiberboxheight}. +% \fi +% +% \numitem[0.2]{fiberboxsepin} +% \ifGERMAN Der Abstand zwischen zwei Eingangsknoten. Dieser Wert wird nur +% verwendet, falls die Faserbox mit zwei Knoten positioniert wird. Ansonsten +% wird der Abstand automatisch ermittelt wird. +% \fi +% \ifENGLISH The separation between two input nodes. This value is +% used only if the fiber box is positioned with two nodes. Otherwise +% the separation is calculated automatically. +% \fi +% +% \numitem[0.2]{fiberboxsepout} +% \ifGERMAN Analog zu \Lkeyword{fiberboxsepin}, aber für die Ausgangsknoten.\fi +% \ifENGLISH Equivalent to \Lkeyword{fiberboxsepout}, but for the output nodes.\fi +% +% \optitem[2x2]{fiberboxcount}{\prm{N}x\prm{M}} +% \ifGERMAN Anzahl der Eingangs- (\prm{N}) und Ausgangsknoten (\prm{M}).\fi +% \ifENGLISH Number of input (\prm{N}) and output nodes (\prm{M}).\fi +% \end{optionlist} +% +% \ifGERMAN Für bestimmte Parameterkombinationen ist eine \Lcs{fiberbox} +% äquivalent zu einer \Lcs{optbox}. +% \fi +% \ifENGLISH For certain parameter configurations a \Lcs{fiberbox} is +% equivalent to an \Lcs{optbox}. +% \fi +% \iffalse +%<*ignore> +% \fi +\begin{LTXexample} +\begin{pspicture}(0,0.3)(3,2.6) + \psset[optexp]{label=0.6} + \fiberbox[fiberboxsize=1.2 0.6, fiberboxcount=1x1](0,2.5)(3,2.5){fiberbox} + \optbox[optboxsize=1.2 0.6, fiber](0,1)(3,1){optbox} +\end{pspicture} +\end{LTXexample} +% \iffalse +%</ignore> +% \fi % \psset{usefiberstyle=false} % % \ifGERMAN\chapter{Hybridkomponenten}\fi @@ -4555,7 +4754,7 @@ \optfilter[fiber=none](0,1)(3,1) \addtopsstyle{Beam}{beamwidth=0.3, fillstyle=solid, fillcolor=green, opacity=0.2} - \drawwidebeam{(0,1)}{}{(3,1)} + \drawwidebeam(0,1){}(3,1) \end{pspicture} \end{LTXexample} % \iffalse @@ -5130,7 +5329,7 @@ \begin{LTXexample} \begin{pspicture}(2.8,3) \pentaprism[pentaprismsize=1.3](0,1.5)(1.5,1.5)(1.5,0) - \drawbeam[arrows=->, arrowinset=0, arrowscale=1.5]{(0,1.5)}{}{(1.5,0)} + \drawbeam[arrows=->, arrowinset=0, arrowscale=1.5](0,1.5){}(1.5,0) \psdot(\oenodeIn{})\uput[135](\oenodeIn{}){1} \psdot(\oenodeIfc{2}{})\uput[0](\oenodeIfc{2}{}){2} \psdot(\oenodeIfc{3}{})\uput[90](\oenodeIfc{3}{}){3} @@ -5228,7 +5427,7 @@ \begin{pspicture}(0,0)(3,2) \pnode(0,1){A}\pnode(1.6,1){B} \optbox[position=end](A)(B) - \drawbeam[beaminsidelast=false]{(A)}{1} + \drawbeam[beaminsidelast=false](A){1} \psdot(\oenodeBeam{}) \end{pspicture} \end{LTXexample} @@ -5264,7 +5463,7 @@ \lens[abspos=1, lensradius=-2](A)(B) \addtopsstyle{Beam}{% fillstyle=solid, fillcolor=green, opacity=0.3} - \drawwidebeam[beamwidth=0.5]{(A)}{}{(B)} + \drawwidebeam[beamwidth=0.5](A){}(B) \psdot(\oenodeBeamUp{})\psdot(\oenodeBeamLow{}) \uput[90](\oenodeBeamUp{}){\rput[rb](0,0){BeamUp}} \uput[-90](\oenodeBeamLow{}){\rput[rt](0,0){BeamLow}} @@ -5296,11 +5495,11 @@ \lens[abspos=1, n=2](A)(B) \addtopsstyle{Beam}{% fillstyle=solid, fillcolor=green, opacity=0.3} - \drawwidebeam[beamwidth=0.5]{(A)}{} + \drawwidebeam[beamwidth=0.5](A){} \psdot(\oenodeBeamUp{})\psdot(\oenodeBeamLow{}) \uput[90](\oenodeBeamUp{}){\rput[rb](0,0){BeamUp}} \uput[-90](\oenodeBeamLow{}){\rput[rt](0,0){BeamLow}} - \drawwidebeam[loadbeam, beaminsidefirst]{}{(B)} + \drawwidebeam[loadbeam, beaminsidefirst]{}(B) \psdot(\oenodeBeamUp{})\psdot(\oenodeBeamLow{}) \uput[90](\oenodeBeamUp{}){\rput[rb](0,0){BeamUp}} \uput[-90](\oenodeBeamLow{}){\rput[rt](0,0){BeamLow}} @@ -5348,9 +5547,9 @@ \pnode(0,1){A}\pnode(1.6,1){B} \optbox[position=end](A)(B) \psset{beaminsidelast=false} - \drawbeam[linecolor=red, beampos=0.3]{(A)}{1} + \drawbeam[linecolor=red, beampos=0.3](A){1} \psdot(\oenodeBeam{}) - \drawbeam[stopinside]{(A)}{1} + \drawbeam[stopinside](A){1} \psdot(\oenodeBeam{}) \end{pspicture} \end{LTXexample} @@ -5426,16 +5625,20 @@ % \ifENGLISH % All macros for connections can take either an ID, a \Lkeyword{compname} % identifier (see \prettyref{sec:namingobj}) or PSTricks nodes as arguments, -% which are denoted with \prm{obj$_1$}, \prm{obj$_2$}, \ldots. To -% distinguish between nodes and components, the nodes must be enclosed in -% parenthesis within the brackets. +% which are denoted with \prm{obj$_1$}, \prm{obj$_2$}, \ldots. To distinguish +% between nodes and components, nodes must be either enclosed in parenthesis +% within the brackets, or enclosed only in parenthesis: +% \Lcs{drawbeam}\opt{\{(node)\}\{comp\}}, or \Lcs{drawbeam}\opt{(node)\{comp\}}. % \fi % \ifGERMAN -% Alle Makros für Verbindungen akzeptieren entweder eine ID, ein \Lkeyword{compname} Bezeichner (siehe -% \prettyref{sec:namingobj}) oder einen PSTricks-Knoten als Argument, die als -% \prm{obj$_1$}, \prm{obj$_2$}, \ldots{} bezeichnet werden. Um -% zwischen Knoten und Komponenten unterscheiden zu können, müssen Knoten in -% runde Klammern innerhalb der geschweiften Klammern eingeschlossen werden. +% Alle Makros für Verbindungen akzeptieren entweder eine ID, ein +% \Lkeyword{compname} Bezeichner (siehe \prettyref{sec:namingobj}) oder einen +% PSTricks-Knoten als Argument, die als \prm{obj$_1$}, \prm{obj$_2$}, \ldots{} +% bezeichnet werden. Um zwischen Knoten und Komponenten unterscheiden zu können, +% müssen Knoten entweder in runde Klammern innerhalb der geschweiften Klammern +% eingeschlossen werden oder dürfen nur runde Klammern haben: +% \Lcs{drawbeam}\opt{\{(node)\}\{comp\}}, oder +% \Lcs{drawbeam}\opt{(node)\{comp\}}. % \fi % % \begin{enumerate} @@ -5451,7 +5654,7 @@ \begin{pspicture}(3,1.5) \pnode(0,1){A}\pnode(1.5,1){B} \optbox[position=end, labeloffset=0](A)(B){1} - \drawbeam{(A)}{1} + \drawbeam(A){1} \end{pspicture} \end{LTXexample} % \iffalse @@ -5472,7 +5675,7 @@ \begin{pspicture}(3,2) \psset{position=end, labeloffset=0} \optbox[compname=obj](0,1)(1.5,1){obj} - \drawbeam{(0,1)}{obj} + \drawbeam(0,1){obj} \end{pspicture} \end{LTXexample} % \iffalse @@ -5493,7 +5696,7 @@ \psset{position=end, labeloffset=0} \optbox(0,0.5)(1.5,0.5){1} \optbox(0,1.5)(1.5,1.5){2} - \drawbeam{(0,1)}{} + \drawbeam(0,1){} \end{pspicture} \end{LTXexample} % \iffalse @@ -5565,15 +5768,20 @@ % These are the two macros for beam connections; they can take a variable % number of arguments (minimum of two) which can be either an ID, a % \Lkeyword{compname}, or a PSTricks nodes. To distinguish between nodes and -% components, the nodes must be enclosed in parenthesis within the -% brackets. +% components, nodes must be either enclosed in parenthesis within the +% brackets, or enclosed only in parenthesis: +% \Lcs{drawbeam}\opt{\{(node)\}\{comp\}}, or +% \Lcs{drawbeam}\opt{(node)\{comp\}}. % \fi -% \ifGERMAN Diese beiden Makros sind für die Strahlverbindungen zuständig, sie +% \ifGERMAN +% Diese beiden Makros sind für die Strahlverbindungen zuständig, sie % akzeptieren eine variable Anzahl an Argumenten (mindestens zwei), die % entweder eine ID, ein \Lkeyword{compname}, oder ein PSTricks-Knoten sein % können. Um zwischen Knoten und Komponenten unterscheiden zu können, müssen -% Knoten in runde Klammern innerhalb der geschweiften Klammern eingeschlossen -% werden. +% Knoten entweder in runde Klammern innerhalb der geschweiften Klammern +% eingeschlossen werden oder dürfen nur runde Klammern haben: +% \Lcs{drawbeam}\opt{\{(node)\}\{comp\}}, oder +% \Lcs{drawbeam}\opt{(node)\{comp\}}. % \fi % \end{ltxsyntax} % @@ -5653,9 +5861,9 @@ \pnode(0,1.5){A}\pnode(1,1.5){B}\pnode(3,1){C} \optprism[prismsize=1.2](A)(B)(C) \optplane(C) - \drawbeam[n=1, linecolor=blue]{(A)}{1}{2} - \drawbeam[n=1.5, linecolor=red]{(A)}{1}{2} - \drawbeam[raytrace=false, linecolor=DGreen]{(A)}{1}{2} + \drawbeam[n=1, linecolor=blue](A){1}{2} + \drawbeam[n=1.5, linecolor=red](A){1}{2} + \drawbeam[raytrace=false, linecolor=DGreen](A){1}{2} \psdot(\oenodeIn{1})\psdot(\oenodeOut{1}) \end{pspicture} \end{LTXexample} @@ -5685,9 +5893,9 @@ \begin{pspicture}(4,2) \pnode(0,1){A}\pnode(4,1){B} \doveprism[doveprismsize=1](A)(B) - \drawbeam[n=1, linecolor=blue, beampos=0.1]{(A)}{1}{(B)} - \drawbeam[n=1.5, linecolor=red]{(A)}{1}{(B)} - \drawbeam[raytrace=false, linecolor=DGreen]{(A)}{1}{(B)} + \drawbeam[n=1, linecolor=blue, beampos=0.1](A){1}(B) + \drawbeam[n=1.5, linecolor=red](A){1}(B) + \drawbeam[raytrace=false, linecolor=DGreen](A){1}(B) \psdot(\oenodeIn{1})\psdot(\oenodeIfc{2}{1})\psdot(\oenodeOut{1}) \end{pspicture} \end{LTXexample} @@ -5711,9 +5919,9 @@ \pnode(0,1){A}\pnode(4,1){B} \doveprism[doveprismsize=1](A)(B) \psset[optexp]{raytrace=false} - \drawbeam[linecolor=blue, beampos=0.2, beamangle=-10]{(A)}{1}{(B)} - \drawbeam[raytrace=false, linecolor=DGreen]{(A)}{1}{(B)} - \drawbeam[linecolor=red, beampos=-0.2, beamangle=10]{(A)}{1}{(B)} + \drawbeam[linecolor=blue, beampos=0.2, beamangle=-10](A){1}(B) + \drawbeam[raytrace=false, linecolor=DGreen](A){1}(B) + \drawbeam[linecolor=red, beampos=-0.2, beamangle=10](A){1}(B) \psdot(\oenodeIn{1})\psdot(\oenodeIfc{2}{1})\psdot(\oenodeOut{1}) \end{pspicture} \end{LTXexample} @@ -5722,9 +5930,9 @@ \pnode(0,1){A}\pnode(4,1){B} \doveprism[doveprismsize=1](A)(B) \psset[optexp]{raytrace=false} - \drawbeam[linecolor=blue, beampos=0.2]{(A)}{1}{(B)} - \drawbeam[linecolor=DGreen]{(A)}{1}{(B)} - \drawbeam[linecolor=red, beampos=-0.2]{(A)}{1}{(B)} + \drawbeam[linecolor=blue, beampos=0.2](A){1}(B) + \drawbeam[linecolor=DGreen](A){1}(B) + \drawbeam[linecolor=red, beampos=-0.2](A){1}(B) \psdot(\oenodeIn{1})\psdot(\oenodeIfc{2}{1})\psdot(\oenodeOut{1}) \end{pspicture} \end{LTXexample} @@ -5754,8 +5962,8 @@ \pnode(0,0.5){A}\pnode(2.5,0.5){B}\pnode(2.5,2){C} \mirror(A)(B)(C) \psset{useNA=false} - \drawbeam{(A)}{}{(C)} - \drawbeam[linecolor=red, beamangle=10]{(A)}{}{(C)} + \drawbeam(A){}(C) + \drawbeam[linecolor=red, beamangle=10](A){}(C) \end{pspicture} \end{LTXexample} % \iffalse @@ -5868,7 +6076,7 @@ \begin{pspicture}(3,1.5) \pnode(0,1){A}\pnode(3,1){B} \doveprism[n=*sqrt(5)](A)(B) - \drawbeam{(A)}{}{(B)} + \drawbeam(A){}(B) \end{pspicture} \end{LTXexample} % \iffalse @@ -5922,8 +6130,8 @@ \lens[lens=4 4 3, n=2, abspos=0.3](A)(B) \optplane[compname=Plane](B) \psset{beampos=0.6} - \drawbeam[linecolor=red]{(A)}{1}{Plane} - \drawbeam[linecolor=yellow, n=*(n+0.5)]{(A)}{1}{Plane} + \drawbeam[linecolor=red](A){1}{Plane} + \drawbeam[linecolor=yellow, n=*(n+0.5)](A){1}{Plane} \end{pspicture} \end{LTXexample} % \iffalse @@ -6137,8 +6345,8 @@ \begin{pspicture}(3,1.5) \pnode(0,0.75){A}\pnode(3,0.75){B} \optbox[angle=10, showifcnodes](A)(B) - \drawbeam{(A)}{}{(B)} - \drawbeam[linecolor=red, beamalign=abs]{(A)}{}{(B)} + \drawbeam(A){}(B) + \drawbeam[linecolor=red, beamalign=abs](A){}(B) \end{pspicture} \end{LTXexample} % \iffalse @@ -6266,7 +6474,7 @@ \optbox[position=0.4, allowbeaminside=false](A)(B) \optbox[position=0.6](A)(B) \optbox[position=0.8](A)(B) - \drawbeam{(A)}{-}{(B)} + \drawbeam(A){-}(B) \end{pspicture} \end{LTXexample} % \iffalse @@ -6303,7 +6511,7 @@ \pnode(0,1){A}\pnode(2.5,1){B} \lens[lens=3 3 2, n=2.5, abspos=0.5](A)(B) \multido{\r=-0.3+0.3}{3}{% - \drawbeam[beampos=\r]{(A)}{}{(B)}} + \drawbeam[beampos=\r](A){}(B)} \end{pspicture} \end{LTXexample} % \iffalse @@ -6345,7 +6553,7 @@ \lens[lens=3 3 2, n=2.5, abspos=0.5](A)(B) \optplane[angle=-30](B) \multido{\r=-0.3+0.3}{3}{% - \drawbeam[beampos=\r]{(A)}{-}} + \drawbeam[beampos=\r](A){-}} \end{pspicture} \end{LTXexample} % \iffalse @@ -6374,7 +6582,7 @@ % statement % \fi % \begin{lstlisting}[gobble=2] -% \drawbeam[raytrace=false]{(\oenodeRefA{})}{}{(\oenodeRefB{})} +% \drawbeam[raytrace=false](\oenodeRefA{}){}(\oenodeRefB{}) % \end{lstlisting} % \ifENGLISH which draws a beam from one reference node via the component to the % other reference node. @@ -6443,7 +6651,7 @@ \begin{LTXexample}[morekeywords={[21]{ArrowInsideMinLength}}] \begin{pspicture}(3,2) \optprism(0,1)(2,1)(3,0.5) - \drawwidebeam[beamwidth=0.4, ArrowInside=->, ArrowInsideMinLength=0.5, arrowscale=1.5, raytrace=false]{(0,1)}{}{(3,0.5)} + \drawwidebeam[beamwidth=0.4, ArrowInside=->, ArrowInsideMinLength=0.5, arrowscale=1.5, raytrace=false](0,1){}(3,0.5) \end{pspicture} \end{LTXexample} % \iffalse @@ -6565,7 +6773,7 @@ \begin{pspicture}(3,2) \pnode(0,0.5){A}\pnode(1,0.5){B}\pnode(2.8,2){C} \mirror[mirrorwidth=1.5](A)(B)(C) - \drawwidebeam[beamwidth=0.4]{(A)}{}{(C)} + \drawwidebeam[beamwidth=0.4](A){}(C) \end{pspicture} \end{LTXexample} % \iffalse @@ -6584,7 +6792,7 @@ \pnode(0,0.5){A}\pnode(1,0.5){B}\pnode(2.8,2){C} \mirror[mirrorwidth=1.5](A)(B)(C) \addtopsstyle{Beam}{fillstyle=solid, fillcolor=red!50!white, linecolor=red} - \drawwidebeam[beamwidth=0.4]{(A)}{}{(C)} + \drawwidebeam[beamwidth=0.4](A){}(C) \end{pspicture} \end{LTXexample} % \iffalse @@ -6603,7 +6811,7 @@ \pnode(0,0.5){A}\pnode(1,0.5){B}\pnode(2.8,2){C} \mirror[mirrorwidth=1.5](A)(B)(C) \addtopsstyle{Beam}{fillstyle=solid, fillcolor=red, opacity=0.3, linestyle=none} - \drawwidebeam[beamwidth=0.4]{(A)}{}{(C)} + \drawwidebeam[beamwidth=0.4](A){}(C) \end{pspicture} \end{LTXexample} % \iffalse @@ -6775,9 +6983,9 @@ \addtopsstyle{Beam}{% fillstyle=solid, fillcolor=green, opacity=0.3} \psset{loadbeampoints} - \drawwidebeam[beamwidth=0.2, stopinside]{(A)}{1} + \drawwidebeam[beamwidth=0.2, stopinside](A){1} \drawwidebeam[beamdiv=-60]{1}{2} - \drawwidebeam{2}{(B)} + \drawwidebeam{2}(B) \end{optexp} \end{pspicture} \end{LTXexample} @@ -6806,11 +7014,11 @@ \optgrating(A)(B)(C) \addtopsstyle{Beam}{% fillstyle=solid, fillcolor=green, opacity=0.3} - \drawwidebeam[beamwidth=0.3]{(A)}{1} + \drawwidebeam[beamwidth=0.3](A){1} \psset{savebeampoints=false, loadbeampoints} - \drawwidebeam{1}{(C)} - \drawwidebeam{1}{(C')} - \drawwidebeam{1}{(C'')} + \drawwidebeam{1}(C) + \drawwidebeam{1}(C') + \drawwidebeam{1}(C'') \rput[b]([offset=0.2]C){0th} \rput[b]([offset=0.2]C'){1st} \rput[b]([offset=0.2]C''){-1st} @@ -6858,11 +7066,11 @@ \optgrating(A)(B)(C) \addtopsstyle{Beam}{% fillstyle=solid, fillcolor=green, opacity=0.3} - \drawwidebeam[savebeam, beamwidth=0.3]{(A)}{1} + \drawwidebeam[savebeam, beamwidth=0.3](A){1} \psset{savebeam=false, loadbeam} - \drawwidebeam[beamangle=-20]{1}{(C)} - \drawwidebeam{1}{(C)} - \drawwidebeam[beamangle=20]{1}{(C)} + \drawwidebeam[beamangle=-20]{1}(C) + \drawwidebeam{1}(C) + \drawwidebeam[beamangle=20]{1}(C) \rput[b]([offset=0.2]C){0th} \rput[b]([Xnodesep=-0.9, offset=0.2]C){1st} \rput[b]([Xnodesep=0.9,offset=0.2]C){-1st} @@ -7031,7 +7239,7 @@ \psdot(\oenodeTrefB{})\uput[0](\oenodeTrefB{}){TrefB}% \psline[style=Refline, linestyle=dashed](\oenodeTrefA{})(\oenodeTrefB{}) \psline[style=Refline, linestyle=dashed](\oenodeRefA{})(\oenodeRefB{}) - \drawfiber{(A)}{}{(B)} + \drawfiber(A){}(B) \end{pspicture} \end{LTXexample} % \iffalse @@ -7071,11 +7279,11 @@ \psline[linestyle=dashed]([Xnodesep=-2]\oenodeIn{})([Xnodesep=2]\oenodeIn{}) \addtopsstyle{Fiber}{linecolor=green!90!black} \multido{\i=10+40}{5}{% - \drawfiber{(2;\i)}{} + \drawfiber(2;\i){} } \addtopsstyle{Fiber}{linecolor=red!90!black} - \drawfiber{(2;-20)}{} - \drawfiber{(2;200)}{} + \drawfiber(2;-20){} + \drawfiber(2;200){} \end{pspicture} \end{LTXexample} % \iffalse @@ -7119,7 +7327,7 @@ \psline[style=Refline, linestyle=dashed](\oenodeTrefA{2})(\oenodeTrefB{2}) \psline[style=Refline, linestyle=dashed](\oenodeRefA{1})(\oenodeRefB{2}) \psdot(\oenodeRefA{1})\psdot(\oenodeRefB{2}) - \drawfiber{(A)}{1}{2}{(D)} + \drawfiber(A){1}{2}(D) \end{pspicture} \end{LTXexample} % \iffalse @@ -7167,7 +7375,7 @@ \psline[style=Refline, linestyle=dashed](\oenodeTrefA{2})(\oenodeTrefB{2}) \psline[style=Refline, linestyle=dashed](\oenodeRefA{1})(\oenodeRefB{2}) \psdot(\oenodeRefA{1})\psdot(\oenodeRefB{2}) - \drawfiber{(A)}{1}{2}{(D)} + \drawfiber(A){1}{2}(D) \end{pspicture} \end{LTXexample} % \iffalse @@ -7197,8 +7405,8 @@ \begin{pspicture}(1,0)(3,2) \addtopsstyle{Fiber}{arrowscale=1.3, arrows=->, arrowinset=0} \optcirculator[fiber=t](0,0.5)(3,2)(1.5,0) - \drawfiber[linecolor=red]{}{(1.5,0)} - \drawfiber[fiberalign=center, linecolor=green]{}{(1.5,0)} + \drawfiber[linecolor=red]{}(1.5,0) + \drawfiber[fiberalign=center, linecolor=green]{}(1.5,0) \end{pspicture} \end{LTXexample} % \iffalse @@ -7223,7 +7431,7 @@ \psline[style=Refline, linestyle=dashed](\oenodeTrefA{})(\oenodeTrefB{}) \psline[style=Refline, linestyle=dashed](\oenodeRefA{})(\oenodeRefB{}) \psdot(\oenodeRefA{})\psdot(\oenodeRefB{}) - \drawfiber[fiberalign=abs, ncurv=1.5]{(A)}{}{(B)} + \drawfiber[fiberalign=abs, ncurv=1.5](A){}(B) \end{pspicture} \end{LTXexample} % \iffalse @@ -8013,11 +8221,11 @@ \MOLensOut[abspos=8](A)(B)\MOLensIn[abspos=9](A)(B) \addtopsstyle{Beam}{n=1, fillstyle=solid, fillcolor=green, opacity=0.3} \psset{loadbeampoints} - \drawwidebeam[beamwidth=0.2, stopinside]{(A)}{1} + \drawwidebeam[beamwidth=0.2, stopinside](A){1} \drawwidebeam[beamdiv=-70]{1}{2} \drawwidebeam[stopinside]{2-4} \drawwidebeam[beamdiv=-70]{4}{5} - \drawwidebeam{5}{(B)} + \drawwidebeam{5}(B) \end{pspicture} \end{LTXexample} % \iffalse @@ -8126,7 +8334,7 @@ }% \makeatother \mydipole(0,1)(3.5,1){\color{spot}label} -\drawbeam{(0,1)}{}{(3.5,1)} +\drawbeam(0,1){}(3.5,1) \end{pspicture} \end{LTXexample} \begin{LTXexample}[morekeywords={[21]{newOptexpTripole}}] @@ -8138,7 +8346,7 @@ }% \makeatother \mytripole(0,1)(2,1.7)(3,0){\color{spot}label} -\drawbeam{(0,1)}{}{(3,0)} +\drawbeam(0,1){}(3,0) \end{pspicture} \end{LTXexample} % \iffalse @@ -8192,7 +8400,7 @@ \mirror[variable, label=0.5](Grat)(Mvar)(Grat){M$_\mathrm{var}$} \optretplate[position=0.3](LOut)(Grat){$\nicefrac{\lambda}{4}$} \optgrating(LOut)(Grat)(Out){grating} - \drawbeam[arrows=->]{1}{3}{4}{(Out)} + \drawbeam[arrows=->]{1}{3}{4}(Out) \drawbeam{2}{4} \end{optexp} \rput[l](-3,2){Littman setup} @@ -8295,7 +8503,7 @@ \drawwidebeam[beamwidth=0.1]{1-4} \drawwidebeam[beamwidth=0.1, beaminsidefirst, beaminsidelast]{3}{5-8} \psset{savebeampoints=false, loadbeampoints} - \drawwidebeam{8-11}{(Out)}\drawwidebeam[beaminsidefirst]{8}{12} + \drawwidebeam{8-11}(Out)\drawwidebeam[beaminsidefirst]{8}{12} \end{optexp} \end{pspicture} \end{LTXexample} @@ -8372,7 +8580,7 @@ \optdetector[compname=Det2](BS)(Det2){PD2} \addtopsstyle{Beam}{beamwidth=0.2, fillstyle=solid, fillcolor=green, opacity=0.2} - \drawwidebeam{(SigIn)}{BS}{L2}{Det2} + \drawwidebeam(SigIn){BS}{L2}{Det2} \drawwidebeam[beaminsidefirst]{BS}{L1}{Det1} \newpsstyle{Beam}{linecolor=red, linestyle=dashed, linewidth=1.5\pslinewidth} \drawbeam{LO}{BS}{L1}{Det1} @@ -8530,7 +8738,7 @@ \pinhole[phwidth=0.05, innerheight=0.05, position=0.8, compshift=0.18](BS)(B) \optplane[angle=90](B) \addtopsstyle{Beam}{linestyle=none, beamwidth=0.2, fillstyle=solid} - \drawwidebeam[fillcolor=red!25!white]{(A)}{1-2}{1}{3-5} + \drawwidebeam[fillcolor=red!25!white](A){1-2}{1}{3-5} \drawwidebeam[fillcolor=red!50!white, beamangle=-5]{2}{1}{3-5} \end{pspicture} \end{LTXexample} @@ -8549,10 +8757,10 @@ \optgrating[reverse, angle=15, variable](B)(C)(D) \mirror(C)(D)(E) \pinhole[position=0.8](D)(E) - \drawwidebeam[ArrowInsidePos=0.3, beamwidth=0.2, linecolor=white, beamdiv=-7.15]{(A)}{1-3} + \drawwidebeam[ArrowInsidePos=0.3, beamwidth=0.2, linecolor=white, beamdiv=-7.15](A){1-3} \psset{loadbeampoints, savebeampoints=false}% \drawwidebeam[ArrowInsidePos=0.6, beamangle=3, linecolor=blue!60!white]{3-6} - \drawwidebeam[ArrowInsidePos=0.7, linecolor=green!60!white, arrows=->, ArrowInsideMinLength=2]{3-5}{(E)} + \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 @@ -8593,8 +8801,8 @@ \mirror[mirrortype=extended](G)(M2)(G) \optplate[position=end](G)(S) \newpsstyle{Beam}{linecolor=red, ArrowInside=->, ArrowInsidePos=0.4, arrowscale=1.3} - \drawbeam{(In)}{1}{4}{1}{5} - \drawbeam{(In)}{1-3}{2}{1}{5} + \drawbeam(In){1}{4}{1}{5} + \drawbeam(In){1-3}{2}{1}{5} \end{pspicture} \end{LTXexample} % \iffalse @@ -8794,6 +9002,7 @@ % \testextnodes{fibercollimator}{(0,1.5)(3,1.5)} % \testextnodes{optcirculator}{(0,1.6)(3,1.6)(1.5,0.9)} % \testextnodes[couplersize=0.5 0.3]{optcoupler}{(0,2)(0,1)(3,2)(3,1)} +% \testextnodes{fiberbox}{(0,1.75)(0,1.25)(3,1.75)(3,1.25)} % % % \ifENGLISH\subsection{Interface nodes}\fi @@ -8817,7 +9026,7 @@ % \begin{pspicture}(0,-0.5)(3,1) % \pnode(0,0.5){A}\pnode(3,0.5){B} % \csname #1\endcsname(A)(B) -% \drawbeam{(A)}{}{(B)} +% \drawbeam(A){}(B) % \psdot(\oenodeIn{})\uput[-135](\oenodeIn{}){1} % \psdot(\oenodeOut{})\uput[-45](\oenodeOut{}){N} % \rput[bl](0,-0.4){\ttfamily\textbackslash #1} @@ -8827,7 +9036,7 @@ % \begin{pspicture}(0,-0.5)(3,1) % \pnode(0,0.5){A}\pnode(3,0.5){B} % \csname #1\endcsname(A)(B) -% \drawbeam{(A)}{}{(B)} +% \drawbeam(A){}(B) % \psdot(\oenodeIn{})\uput[-135](\oenodeIn{}){1, N} % \rput[bl](0,-0.4){\ttfamily\textbackslash #1} % \end{pspicture} @@ -8846,7 +9055,7 @@ % \begin{pspicture}(0, -0.5)(3,1) % \pnode(0,0.5){A}\pnode(2.5,0.5){B} % \optdetector(A)(B) -% \drawbeam{(A)}{} +% \drawbeam(A){} % \psdot(\oenodeIn{})\uput[-135](\oenodeIn{}){1, N} % \rput[bl](0,-0.4){\ttfamily\textbackslash optdetector} % \end{pspicture}% @@ -8858,7 +9067,7 @@ % \begin{pspicture}(0,-0.5)(3,1) % \pnode(0,0.5){A}\pnode(3,0.5){B} % \doveprism(A)(B) -% \drawbeam[raytrace=false]{(A)}{}{(B)} +% \drawbeam[raytrace=false](A){}(B) % \psdot(\oenodeIn{})\uput[135](\oenodeIn{}){1} % \psdot(\oenodeIfc{2}{})\uput[90](\oenodeIfc{2}{}){2} % \psdot(\oenodeOut{})\uput[45](\oenodeOut{}){N} @@ -8868,7 +9077,7 @@ % \begin{pspicture}(3,1.5) % \pnode(0,1){A}\pnode(2.5,1){B}\pnode(2.5,0){C} % \mirror(A)(B)(C) -% \drawbeam{(A)}{}{(C)} +% \drawbeam(A){}(C) % \psdot(\oenodeIn{})\uput[-135](\oenodeIn{}){1, N} % \rput[bl](0,0){\ttfamily\textbackslash mirror} % \end{pspicture}% @@ -8876,7 +9085,7 @@ % \begin{pspicture}(3,1.5) % \pnode(0,1){A}\pnode(1.5,1){B}\pnode(3,0){C} % \optprism(A)(B)(C) -% \drawbeam[raytrace=false]{(A)}{}{(C)} +% \drawbeam[raytrace=false](A){}(C) % \psdot(\oenodeIn{})\uput[135](\oenodeIn{}){1} % \psdot(\oenodeOut{})\uput[45](\oenodeOut{}){N} % \rput[bl](0,0){\ttfamily\textbackslash optprism} @@ -8885,7 +9094,7 @@ % \begin{pspicture}(3,1.5) % \pnode(0,1){A}\pnode(2.5,1){B}\pnode(2.5,0){C} % \optgrating(A)(B)(C) -% \drawbeam{(A)}{}{(C)} +% \drawbeam(A){}(C) % \psdot(\oenodeIn{})\uput[-135](\oenodeIn{}){1, N} % \rput[bl](0,0){\ttfamily\textbackslash optgrating} % \end{pspicture}% @@ -8895,7 +9104,7 @@ % \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) -% \drawbeam{(A)}{}{(C)} +% \drawbeam(A){}(C) % \psdot(\oenodeIfc{1}{})\uput[135](\oenodeIfc{1}{}){1} % \psdot(\oenodeIfc{2}{})\uput[-45](\oenodeIfc{2}{}){2} % \psdot(\oenodeIfc{3}{})\uput[60](\oenodeIfc{3}{}){3,C} @@ -8907,7 +9116,7 @@ % \begin{pspicture}(3,2.5) % \pnode(0,2){A}\pnode(2.5,1.5){B}\pnode(0,1){C} % \rightangleprism[raprismsize=2](A)(B)(C) -% \drawbeam[arrows=->, arrowinset=0, arrowscale=1.5]{(A)}{}{(C)} +% \drawbeam[arrows=->, arrowinset=0, arrowscale=1.5](A){}(C) % \psdot(\oenodeIn{})\uput[135](\oenodeIn{}){1} % \psdot(\oenodeIfc{2}{})\uput[45](\oenodeIfc{2}{}){2} % \psdot(\oenodeIfc{3}{})\uput[-45](\oenodeIfc{3}{}){3} @@ -8918,7 +9127,7 @@ % \begin{pspicture}(3,2.5) % \pnode(0,1.5){A}\pnode(2.1,1.5){B}\pnode(2.1,0.4){C} % \pentaprism[pentaprismsize=1](A)(B)(C) -% \drawbeam[arrows=->, arrowinset=0, arrowscale=1.5]{(A)}{}{(C)} +% \drawbeam[arrows=->, arrowinset=0, arrowscale=1.5](A){}(C) % \psdot(\oenodeIn{})\uput[135](\oenodeIn{}){1} % \psdot(\oenodeIfc{2}{})\uput[0](\oenodeIfc{2}{}){2} % \psdot(\oenodeIfc{3}{})\uput[90](\oenodeIfc{3}{}){3} @@ -8958,7 +9167,7 @@ % \bgroup\psset{beam} % \noindent\showfdipoleifc{fibercollimator}\egroup % \hspace{\fill}% -% \begin{pspicture}(0,-0.5)(3,1.4) +% \begin{pspicture}(0,-0.5)(3,1.5) % \pnode(0,1){A}\pnode(3,1){B}\pnode(1.2,-0.1){C} % \optcirculator(A)(B)(C) % \psdot(\oenodeIn{})\uput[-135](\oenodeIn{}){1} @@ -8966,8 +9175,15 @@ % \psdot(\oenodeOut{})\uput[-45](\oenodeOut{}){N} % \rput[bl](0,-0.4){\ttfamily\textbackslash optcirculator} % \end{pspicture}\hspace{\fill}% -% \begin{pspicture}(3,1) -% \end{pspicture}% +% \begin{pspicture}(0,-0.5)(3,1.5) +% \fiberbox[fiberboxcount=2x3](0,0.95)(0,0.45)(3,1.2)(3,0.2) +% \psdot(\oenodeIn{})\uput[135](\oenodeIn{}){1} +% \psdot(\oenodeIfc{2}{})\uput[-135](\oenodeIfc{2}{}){2} +% \psdot(\oenodeIfc{3}{})\uput[45](\oenodeIfc{3}{}){3} +% \psdot(\oenodeIfc{4}{})\uput[0](\oenodeIfc{4}{}){4} +% \psdot(\oenodeOut{})\uput[-45](\oenodeOut{}){N} +% \rput[bl](0,-0.4){\ttfamily\textbackslash fiberbox} +% \end{pspicture} % \bigskip % % \noindent @@ -9071,6 +9287,28 @@ % war, jetzt aber nur mit \Lkeyword{extnode}\opt{=r}. Alle anderen Werte % setzen den Knoten an andere Stellen. % \fi +% +% \poeitem{\textbackslash optbox} +% \ifENGLISH An \Lcs{optbox} does always have the input and output +% nodes at the respective interfaces, whereas in version 2.1 the input +% and output nodes where at the same position for +% \Lkeyword{endbox}\opt{=true}. +% \fi +% \ifGERMAN Eine \Lcs{optbox} hat immer einen Eingangs- und +% Ausgangsknoten an den entsprechenden Grenzflächen. In Version 2.1 +% fielen Eingangs- und Ausgangsknoten zusammen falls \Lkeyword{endbox} +% auf \opt{true} gesetzt war. +% \fi +% +% \poeitem{\textbackslash fibercollimator} +% \ifENGLISH The \Lcs{fibercollimator} has only a fiber connection by +% default, the beam must be drawn manually or with \Lkeyword{beam} +% option. +% \fi +% \ifGERMAN Der \Lcs{fibercollimator} hat in den Voreinstellungen nur +% eine Faserverbindung, der Strahl muss manuell oder durch Angabe des +% \Lkeyword{beam} Parameters gezeichnet werden. +% \fi % \end{optionlist} % % \ifENGLISH\subsubsection{Beam connections}\fi @@ -9142,7 +9380,7 @@ \begin{pspicture}(3,2) \pnode(0,1){A}\pnode(3,1){B} \optbox(A)(B) - \drawbeam{(A)}{} + \drawbeam(A){} \rput[b]([offset=-0.9]\oenodeCenter{}){\ttfamily conn=o-, conn=a-} \end{pspicture} \end{LTXexample} @@ -9152,7 +9390,7 @@ \pnode(0,1){A}\pnode(3,1){B} \optbox(A)(B) \rput[b]([offset=-0.9]\oenodeCenter{}){\ttfamily conn=-o, conn=-b} - \drawbeam{}{(B)} + \drawbeam{}(B) \end{pspicture} \end{LTXexample} @@ -9162,7 +9400,7 @@ \begin{optexp} \optbox(A)(B) \rput[b]([offset=-0.9]\oenodeCenter{}){\ttfamily conn=i-, A-} - \drawbeam[beaminsidelast]{(A)}{} + \drawbeam[beaminsidelast](A){} \end{optexp} \end{pspicture} \end{LTXexample} @@ -9173,7 +9411,7 @@ \begin{optexp} \optbox(A)(B) \rput[b]([offset=-0.9]\oenodeCenter{}){\ttfamily conn=-i, conn=-B} - \drawbeam[beaminsidefirst]{}{(B)} + \drawbeam[beaminsidefirst]{}(B) \end{optexp} \end{pspicture} \end{LTXexample} @@ -9258,6 +9496,14 @@ % % \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.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} +% \item Modified \cs{fibercollimator} to have \opt{allowbeaminside=false} by default\see{cmd:fibercollimator} +% \item Extended fiber couplers to allow using only two nodes\see{sec:coupler} +% \item Fixed a bug concerning node expressions with \cs{drawfiber} +% \end{release} % \begin{release}{3.0}{2012-07-09} % \item Modified beam connections with \cs{drawbeam} to support raytracing\see{cmd:drawbeam} % \item Added wide beams with \cs{drawwidebeam}\see{cmd:drawwidebeam} @@ -10536,6 +10782,54 @@ couplertype=elliptic }% % \end{macrocode} +% +% \subsection{Fiber box} +% +% \begin{macrocode} +\define@key[psset]{optexp}{fiberboxheight}{% + \pst@checknum{#1}\POE@key@fiberboxheight +}% +\define@key[psset]{optexp}{fiberboxwidth}{% + \pst@checknum{#1}\POE@key@fiberboxwidth +}% +\define@key[psset]{optexp}{fiberboxsize}{% + \pst@expandafter\POE@psset@@fiberboxsize{#1} {} {} {}\@nil +}% +\def\POE@psset@@fiberboxsize#1 #2 #3\@nil{% + \psset[optexp]{fiberboxwidth=#1} + \ifx\\#2\\ + \psset[optexp]{fiberboxheight=0}% + \else + \psset[optexp]{fiberboxheight=#2}% + \fi +}% +\define@key[psset]{optexp}{fiberboxsepin}{% + \def\POE@key@fiberboxsepin{#1} +}% +\define@key[psset]{optexp}{fiberboxsepout}{% + \def\POE@key@fiberboxsepout{#1}% +}% +\define@key[psset]{optexp}{fiberboxcount}{% + \pst@expandafter\POE@psset@@fiberboxcount#1\@nil +}% +\def\POE@psset@@fiberboxcount#1x#2\@nil{% + \ifx\\#1\\ + \def\POE@key@fiberboxcountin{1}% + \else + \def\POE@key@fiberboxcountin{#1}% + \fi + \ifx\\#2\\ + \def\POE@key@fiberboxcountout{1}% + \else + \def\POE@key@fiberboxcountout{#2} + \fi +}% +\psset[optexp]{% + fiberboxsize=1, + fiberboxsepin=0.2, + fiberboxsepout=0.2, + fiberboxcount=2x2} +% \end{macrocode} % \subsection{Beam-connection parameters} % The keys related to the \cs{draw*} macros. % @@ -10925,21 +11219,41 @@ \@ifnextchar[%] {\drawfiber@i}{\drawfiber@i[]}% }% -\def\drawfiber@i[#1]#2{% +\def\drawfiber@i[#1]{% \addafter@par{#1}% - \def\POE@tempe{#2}% - \@ifnextchar\bgroup{\drawfiber@ii}{}% + \drawfiber@ii} + +\def\drawfiber@ii{% + \@ifnextchar(%) + {\drawfiber@iii}% + {\@ifnextchar\bgroup{\drawfiber@iv}{}}% +}% +\def\drawfiber@iii(#1){\drawfiber@iv{(#1)}}% +\def\drawfiber@iv#1{% + \def\POE@tempe{#1}\drawfiber@ii@ }% -\def\drawfiber@ii#1{% - \expandafter\drawfiber@iii\expandafter{\POE@tempe}{#1}% - \def\POE@tempe{#1}% - \@ifnextchar\bgroup{\drawfiber@ii}{}% +\def\drawfiber@ii@{% + \@ifnextchar(%) + {\drawfiber@iii@}% + {\@ifnextchar\bgroup{\drawfiber@iv@}{}}% }% -\def\drawfiber@iii#1#2{% +\def\drawfiber@iii@(#1){\drawfiber@iv@{(#1)}}% +\def\drawfiber@iv@#1{% + \expandafter\drawfiber@v\expandafter{\POE@tempe}{#1}% + \def\POE@tempe{#1}\drawfiber@ii@}% +\def\drawfiber@v#1#2{% \begingroup \let\psk@angleA\relax \let\psk@angleB\relax \use@par + \let\POE@angleA\psk@angleA + \let\POE@angleB\psk@angleB + \ifx\psk@angleA\relax + \def\psk@angleA{0 }%3 + \fi + \ifx\psk@angleB\relax + \def\psk@angleB{0 }% + \fi \def\POE@tempa{#1} \ifx\POE@tempa\@empty \edef\POE@comps{/\oenode{}{}\space} @@ -10982,7 +11296,7 @@ \fi\fi \pst@getcoor{@@A}\POE@tempa \pst@getcoor{@@B}\POE@tempb - \ifx\psk@angleA\relax + \ifx\POE@angleA\relax \ifx\POE@key@fiberalign\POE@str@absolute \psset{angleA=\POE@key@fiberangleA}% \else @@ -10993,7 +11307,7 @@ }% \fi \fi - \ifx\psk@angleB\relax + \ifx\POE@angleB\relax \ifx\POE@key@fiberalign\POE@str@absolute \psset{angleB=\POE@key@fiberangleB}% \else @@ -11531,16 +11845,21 @@ \def\POE@aftercomps{#2}% \fi \def\POE@comps{}% - \POE@@getcomps% + \POE@getcomps@i% +}% +\def\POE@getcomps@i{% + \@ifnextchar(%) + {\POE@getplanenode@i}% + {\POE@getcomps@ii} }% -\def\POE@@getcomps{% - \@ifnextchar\bgroup{\POE@@@getcomps}{\POE@aftercomps}% +\def\POE@getcomps@ii{% + \@ifnextchar\bgroup{\POE@getcomps@iii}{\POE@aftercomps}% }% -\def\POE@@@getcomps#1{% +\def\POE@getcomps@iii#1{% \def\POE@temp{#1\@empty}% - \expandafter\POE@@@@getcomps\POE@temp\@nil + \expandafter\POE@getcomps@iv\POE@temp\@nil }% -\def\POE@@@@getcomps#1#2\@nil{% +\def\POE@getcomps@iv#1#2\@nil{% \edef\POE@temp{#1}% \ifx\POE@temp\@empty \POE@getcomp{(\oenode{}{})}% @@ -11561,7 +11880,7 @@ \else \POE@getcomp{(\oenode{}{#1#2})}% \fi\fi\fi\fi% - \POE@@getcomps% + \POE@getcomps@i% }% % \end{macrocode} % \end{macro} @@ -11582,6 +11901,7 @@ \POE@getcomp{{\pst@coor} }% \fi }% +\def\POE@getplanenode@i(#1){\POE@getplanenode(#1)\POE@getcomps@i}% % \end{macrocode} % \end{macro} % @@ -12455,10 +12775,15 @@ % \begin{macro}{\POE@newfiberquadrupole} % \begin{macrocode} \def\optcoupler{\pst@object{optcoupler}}% -\def\optcoupler@i(#1)(#2)(#3)(#4){% +\def\optcoupler@i(#1)(#2){% + \@ifnextchar(%) + {\optcoupler@@i@(#1)(#2)}% + {\optcoupler@@i@(#1)(#1)(#2)(#2)}% +}% +\def\optcoupler@@i@(#1)(#2)(#3)(#4){% \@ifnextchar\bgroup% - {\@nameuse{optcoupler@i@}(#1)(#2)(#3)(#4)}% - {\@nameuse{optcoupler@i@}(#1)(#2)(#3)(#4){}}% + {\optcoupler@i@(#1)(#2)(#3)(#4)}% + {\optcoupler@i@(#1)(#2)(#3)(#4){}}% }% \def\optcoupler@i@(#1)(#2)(#3)(#4)#5{% \begin@OptexpFiberObj @@ -12521,7 +12846,12 @@ % \begin{macro}{\wdmsplitter} % \begin{macrocode} \def\wdmsplitter{\pst@object{wdmsplitter}}% -\def\wdmsplitter@i(#1)(#2)(#3){% +\def\wdmsplitter@i(#1)(#2){% + \@ifnextchar(%) + {\wdmsplitter@@i@(#1)(#2)}% + {\wdmsplitter@@i@(#1)(#2)(#2)}% +}% +\def\wdmsplitter@@i@(#1)(#2)(#3){% \@ifnextchar\bgroup% {\wdmsplitter@i@(#1)(#2)(#3)}% {\wdmsplitter@i@(#1)(#2)(#3){}}% @@ -12573,7 +12903,12 @@ % \begin{macro}{\wdmcoupler} % \begin{macrocode} \def\wdmcoupler{\pst@object{wdmcoupler}}% -\def\wdmcoupler@i(#1)(#2)(#3){% +\def\wdmcoupler@i(#1)(#2){% + \@ifnextchar(%) + {\wdmcoupler@@i@(#1)(#2)}% + {\wdmcoupler@@i@(#1)(#1)(#2)}% +}% +\def\wdmcoupler@@i@(#1)(#2)(#3){% \@ifnextchar\bgroup% {\wdmcoupler@i@(#1)(#2)(#3)}% {\wdmcoupler@i@(#1)(#2)(#3){}}% @@ -12675,6 +13010,110 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{\optcirculator} +% \begin{macrocode} +\def\fiberbox{\pst@object{fiberbox}}% +\def\fiberbox@i(#1)(#2){% + \@ifnextchar(%) + {\fiberbox@@i@(#1)(#2)}% + {\fiberbox@@i@(#1)(#2)()()}% +}% +\def\fiberbox@@i@(#1)(#2)(#3)(#4){% + \@ifnextchar\bgroup% + {\fiberbox@i@(#1)(#2)(#3)(#4)}% + {\fiberbox@i@(#1)(#2)(#3)(#4){}}% +}% +\def\fiberbox@i@(#1)(#2)(#3)(#4)#5{% + \begin@OptexpFiberObj + \ifnum\POE@key@fiberboxcountin=1 + \ifnum\POE@key@fiberboxcountout=1 + \ifdim\POE@key@fiberboxheight pt=0pt + \PackageError{pst-optexp}{% + Cannot determine fiberboxheight automatically} + \fi + \fi + \fi + \ifPOE@backlayer + \ifx\\#3#4\\ + \POE@regNodes{#1}{#2} + \POE@Verb{/@@inht 0 def /@@outht 0 def}% + \else + \pst@getcoor{#1}\POE@tempa% + \pst@getcoor{#2}\POE@tempb% + \pst@getcoor{#3}\POE@tempc% + \pst@getcoor{#4}\POE@tempd% + \pnode(!\POE@tempa \POE@tempb + \POE@dict{VecAdd 0.5 VecScale} + \tx@UserCoor){\oenodeRefA{}} + \pnode(!\POE@tempc \POE@tempd + \POE@dict{VecAdd 0.5 VecScale} + \tx@UserCoor){\oenodeRefB{}} + \POE@Verb{% + /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 + }% + \fi + \fi + \POE@drawcomponent[fiberbox]{#5}\fiberbox@ii + \ifPOE@backlayer + \ifx\\#3#4\\ +% \end{macrocode} +% Connect only, if the fiberbox has a single related interface node. +% \begin{macrocode} + \ifPOE@fiberpreset@ + \ifnum\POE@key@fiberboxcountin=1 + \ifPOE@fiberpresetin@ + \drawfiber@{FiberIn}{(#1)}{\POE@key@compname} + \fi + \fi + \ifnum\POE@key@fiberboxcountout=1 + \ifPOE@fiberpresetout@ + \drawfiber@{FiberOut}{\POE@key@compname}{(#2)} + \fi + \fi + \fi + \else +% \end{macrocode} +% If four nodes are specified, connect all of them with the respective interface +% nodes they are aligned to. +% \begin{macrocode} + \ifPOE@fiberpreset@ + \ifPOE@fiberpresetin@ + \ifPOE@fiberpresetin@top + \drawfiber@{FiberIn1}{(#1)}{\POE@key@compname} + \fi + \ifPOE@fiberpresetin@bottom + \drawfiber@{FiberIn2}{(#2)}{\POE@key@compname} + \fi + \fi + \ifPOE@fiberpresetout@ + \ifPOE@fiberpresetout@top + \drawfiber@{FiberOut1}{\POE@key@compname}{(#3)} + \fi + \ifPOE@fiberpresetout@bottom + \drawfiber@{FiberOut2}{\POE@key@compname}{(#4)} + \fi + \fi + \fi + \fi + \fi + \end@OptexpObj +}% +\fiberdipole@iimacro{fiberbox}% +% \end{macrocode} +% \end{macro} +% % \begin{macro}{\POE@calcNodes} % Some of the components need three points to be positioned. % These are: @@ -13011,6 +13450,7 @@ \@ifnextchar\bgroup{\fibercollimator@v}{\fibercollimator@v{}}% }% \def\fibercollimator@v#1{% + \addbefore@par{allowbeaminside=false}% \begin@OptexpFiberObj \ifPOE@backlayer \POE@regNodes{\POE@tempa}{\POE@tempb}% @@ -14551,6 +14991,53 @@ % \end{macrocode} % \end{macro} % +% \subsubsection{fiberbox} +% \begin{macro}{fiberbox@ref} +% \begin{macrocode} +\def\fiberbox@ref{% + \POE@setref{% + /@@x \POE@key@fiberboxwidth\space 0.5 mul def + @@inht 0 eq @@outht 0 eq and { + /@@inht \POE@key@fiberboxcountin\space\POE@key@fiberboxsepin\space mul def + /@@outht \POE@key@fiberboxcountout\space\POE@key@fiberboxsepout\space mul def + } if + @@inht \POE@key@fiberboxcountin\space dup 1 add 3 1 roll div mul + @@outht \POE@key@fiberboxcountout\space dup 1 add 3 1 roll div mul + max + \POE@key@fiberboxheight\space dup @@inht @@outht max gt { + exch + } if pop 0.5 mul /@@y exch def + }% +}% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\fiberbox@nodes} +% \begin{macrocode} +\def\fiberbox@nodes{% + \newOptexpFiberComp{% + 0 1 \POE@key@fiberboxcountin\space 1 sub { + \POE@key@fiberboxcountin\space 1 sub 0.5 mul dup 3 -1 roll sub exch + 0 gt { + @@inht \POE@key@fiberboxcountin\space 1 sub div mul + } if + @@x neg exch ToVec + } for + 0 1 \POE@key@fiberboxcountout\space 1 sub { + \POE@key@fiberboxcountout\space 1 sub 0.5 mul dup 3 -1 roll sub exch + 0 gt { + @@outht \POE@key@fiberboxcountout\space 1 sub div mul + } if + @@x exch ToVec + } for + } +}% +\def\fiberbox@comp{% + \psframe[dimen=outer](!\POE@dict{@@x neg @@y neg})(!\POE@dict{@@x @@y}) +}% +% \end{macrocode} +% \end{macro} +% +% % \subsubsection{optcoupler} % \begin{macro}{\optcoupler@nodes} % \begin{macrocode} diff --git a/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.ins b/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.ins index 3b1de09b794..8207d6a34ee 100644 --- a/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.ins +++ b/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.ins @@ -48,7 +48,7 @@ This is a generated file. Project: pst-optexp -Version: 3.0 (2012/07/09) +Version: 3.1 (2012/07/17) Copyright (C) 2007-2012 by Christoph Bersch <usenet@bersch.net> diff --git a/Master/texmf-dist/tex/latex/pst-optexp/pst-optexp.sty b/Master/texmf-dist/tex/latex/pst-optexp/pst-optexp.sty index 015c381ec49..3228e22060e 100644 --- a/Master/texmf-dist/tex/latex/pst-optexp/pst-optexp.sty +++ b/Master/texmf-dist/tex/latex/pst-optexp/pst-optexp.sty @@ -9,7 +9,7 @@ %% This is a generated file. %% %% Project: pst-optexp -%% Version: 3.0 (2012/07/09) +%% Version: 3.1 (2012/07/17) %% %% Copyright (C) 2007-2012 by Christoph Bersch <usenet@bersch.net> %% @@ -31,7 +31,8 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{pst-optexp} - [2012/07/09 v3.0 Optical experimental setups with PSTricks] + [2012/07/17 v3.1 Optical experimental setups with PSTricks] + \RequirePackage{pstricks} \RequirePackage{pst-xkey} \RequirePackage{pst-node} @@ -987,6 +988,49 @@ coupleralign=center, couplertype=elliptic }% +\define@key[psset]{optexp}{fiberboxheight}{% + \pst@checknum{#1}\POE@key@fiberboxheight +}% +\define@key[psset]{optexp}{fiberboxwidth}{% + \pst@checknum{#1}\POE@key@fiberboxwidth +}% +\define@key[psset]{optexp}{fiberboxsize}{% + \pst@expandafter\POE@psset@@fiberboxsize{#1} {} {} {}\@nil +}% +\def\POE@psset@@fiberboxsize#1 #2 #3\@nil{% + \psset[optexp]{fiberboxwidth=#1} + \ifx\\#2\\ + \psset[optexp]{fiberboxheight=0}% + \else + \psset[optexp]{fiberboxheight=#2}% + \fi +}% +\define@key[psset]{optexp}{fiberboxsepin}{% + \def\POE@key@fiberboxsepin{#1} +}% +\define@key[psset]{optexp}{fiberboxsepout}{% + \def\POE@key@fiberboxsepout{#1}% +}% +\define@key[psset]{optexp}{fiberboxcount}{% + \pst@expandafter\POE@psset@@fiberboxcount#1\@nil +}% +\def\POE@psset@@fiberboxcount#1x#2\@nil{% + \ifx\\#1\\ + \def\POE@key@fiberboxcountin{1}% + \else + \def\POE@key@fiberboxcountin{#1}% + \fi + \ifx\\#2\\ + \def\POE@key@fiberboxcountout{1}% + \else + \def\POE@key@fiberboxcountout{#2} + \fi +}% +\psset[optexp]{% + fiberboxsize=1, + fiberboxsepin=0.2, + fiberboxsepout=0.2, + fiberboxcount=2x2} \define@boolkey[psset]{optexp}[POE@]{beam}[true]{} \define@key[psset]{optexp}{refractiveindex}{% \psset[optexp]{n=#1}% @@ -1322,21 +1366,41 @@ \@ifnextchar[%] {\drawfiber@i}{\drawfiber@i[]}% }% -\def\drawfiber@i[#1]#2{% +\def\drawfiber@i[#1]{% \addafter@par{#1}% - \def\POE@tempe{#2}% - \@ifnextchar\bgroup{\drawfiber@ii}{}% -}% -\def\drawfiber@ii#1{% - \expandafter\drawfiber@iii\expandafter{\POE@tempe}{#1}% - \def\POE@tempe{#1}% - \@ifnextchar\bgroup{\drawfiber@ii}{}% -}% -\def\drawfiber@iii#1#2{% + \drawfiber@ii} + +\def\drawfiber@ii{% + \@ifnextchar(%) + {\drawfiber@iii}% + {\@ifnextchar\bgroup{\drawfiber@iv}{}}% +}% +\def\drawfiber@iii(#1){\drawfiber@iv{(#1)}}% +\def\drawfiber@iv#1{% + \def\POE@tempe{#1}\drawfiber@ii@ +}% +\def\drawfiber@ii@{% + \@ifnextchar(%) + {\drawfiber@iii@}% + {\@ifnextchar\bgroup{\drawfiber@iv@}{}}% +}% +\def\drawfiber@iii@(#1){\drawfiber@iv@{(#1)}}% +\def\drawfiber@iv@#1{% + \expandafter\drawfiber@v\expandafter{\POE@tempe}{#1}% + \def\POE@tempe{#1}\drawfiber@ii@}% +\def\drawfiber@v#1#2{% \begingroup \let\psk@angleA\relax \let\psk@angleB\relax \use@par + \let\POE@angleA\psk@angleA + \let\POE@angleB\psk@angleB + \ifx\psk@angleA\relax + \def\psk@angleA{0 }%3 + \fi + \ifx\psk@angleB\relax + \def\psk@angleB{0 }% + \fi \def\POE@tempa{#1} \ifx\POE@tempa\@empty \edef\POE@comps{/\oenode{}{}\space} @@ -1379,7 +1443,7 @@ \fi\fi \pst@getcoor{@@A}\POE@tempa \pst@getcoor{@@B}\POE@tempb - \ifx\psk@angleA\relax + \ifx\POE@angleA\relax \ifx\POE@key@fiberalign\POE@str@absolute \psset{angleA=\POE@key@fiberangleA}% \else @@ -1390,7 +1454,7 @@ }% \fi \fi - \ifx\psk@angleB\relax + \ifx\POE@angleB\relax \ifx\POE@key@fiberalign\POE@str@absolute \psset{angleB=\POE@key@fiberangleB}% \else @@ -1795,16 +1859,21 @@ \def\POE@aftercomps{#2}% \fi \def\POE@comps{}% - \POE@@getcomps% + \POE@getcomps@i% }% -\def\POE@@getcomps{% - \@ifnextchar\bgroup{\POE@@@getcomps}{\POE@aftercomps}% +\def\POE@getcomps@i{% + \@ifnextchar(%) + {\POE@getplanenode@i}% + {\POE@getcomps@ii} }% -\def\POE@@@getcomps#1{% +\def\POE@getcomps@ii{% + \@ifnextchar\bgroup{\POE@getcomps@iii}{\POE@aftercomps}% +}% +\def\POE@getcomps@iii#1{% \def\POE@temp{#1\@empty}% - \expandafter\POE@@@@getcomps\POE@temp\@nil + \expandafter\POE@getcomps@iv\POE@temp\@nil }% -\def\POE@@@@getcomps#1#2\@nil{% +\def\POE@getcomps@iv#1#2\@nil{% \edef\POE@temp{#1}% \ifx\POE@temp\@empty \POE@getcomp{(\oenode{}{})}% @@ -1825,7 +1894,7 @@ \else \POE@getcomp{(\oenode{}{#1#2})}% \fi\fi\fi\fi% - \POE@@getcomps% + \POE@getcomps@i% }% \def\POE@getplanenode(#1){% \pst@@getcoor{#1}% @@ -1841,6 +1910,7 @@ \POE@getcomp{{\pst@coor} }% \fi }% +\def\POE@getplanenode@i(#1){\POE@getplanenode(#1)\POE@getcomps@i}% \def\POE@getcomp#1{% \ifx\POE@comps\@empty \edef\POE@tempc{#1}% @@ -2415,10 +2485,15 @@ }% \ignorespaces}% \def\optcoupler{\pst@object{optcoupler}}% -\def\optcoupler@i(#1)(#2)(#3)(#4){% +\def\optcoupler@i(#1)(#2){% + \@ifnextchar(%) + {\optcoupler@@i@(#1)(#2)}% + {\optcoupler@@i@(#1)(#1)(#2)(#2)}% +}% +\def\optcoupler@@i@(#1)(#2)(#3)(#4){% \@ifnextchar\bgroup% - {\@nameuse{optcoupler@i@}(#1)(#2)(#3)(#4)}% - {\@nameuse{optcoupler@i@}(#1)(#2)(#3)(#4){}}% + {\optcoupler@i@(#1)(#2)(#3)(#4)}% + {\optcoupler@i@(#1)(#2)(#3)(#4){}}% }% \def\optcoupler@i@(#1)(#2)(#3)(#4)#5{% \begin@OptexpFiberObj @@ -2475,7 +2550,12 @@ }% \fiberdipole@iimacro{optcoupler}% \def\wdmsplitter{\pst@object{wdmsplitter}}% -\def\wdmsplitter@i(#1)(#2)(#3){% +\def\wdmsplitter@i(#1)(#2){% + \@ifnextchar(%) + {\wdmsplitter@@i@(#1)(#2)}% + {\wdmsplitter@@i@(#1)(#2)(#2)}% +}% +\def\wdmsplitter@@i@(#1)(#2)(#3){% \@ifnextchar\bgroup% {\wdmsplitter@i@(#1)(#2)(#3)}% {\wdmsplitter@i@(#1)(#2)(#3){}}% @@ -2522,7 +2602,12 @@ }% \fiberdipole@iimacro{wdmsplitter}% \def\wdmcoupler{\pst@object{wdmcoupler}}% -\def\wdmcoupler@i(#1)(#2)(#3){% +\def\wdmcoupler@i(#1)(#2){% + \@ifnextchar(%) + {\wdmcoupler@@i@(#1)(#2)}% + {\wdmcoupler@@i@(#1)(#1)(#2)}% +}% +\def\wdmcoupler@@i@(#1)(#2)(#3){% \@ifnextchar\bgroup% {\wdmcoupler@i@(#1)(#2)(#3)}% {\wdmcoupler@i@(#1)(#2)(#3){}}% @@ -2617,6 +2702,98 @@ \end@OptexpObj }% \fiberdipole@iimacro{optcirculator}% +\def\fiberbox{\pst@object{fiberbox}}% +\def\fiberbox@i(#1)(#2){% + \@ifnextchar(%) + {\fiberbox@@i@(#1)(#2)}% + {\fiberbox@@i@(#1)(#2)()()}% +}% +\def\fiberbox@@i@(#1)(#2)(#3)(#4){% + \@ifnextchar\bgroup% + {\fiberbox@i@(#1)(#2)(#3)(#4)}% + {\fiberbox@i@(#1)(#2)(#3)(#4){}}% +}% +\def\fiberbox@i@(#1)(#2)(#3)(#4)#5{% + \begin@OptexpFiberObj + \ifnum\POE@key@fiberboxcountin=1 + \ifnum\POE@key@fiberboxcountout=1 + \ifdim\POE@key@fiberboxheight pt=0pt + \PackageError{pst-optexp}{% + Cannot determine fiberboxheight automatically} + \fi + \fi + \fi + \ifPOE@backlayer + \ifx\\#3#4\\ + \POE@regNodes{#1}{#2} + \POE@Verb{/@@inht 0 def /@@outht 0 def}% + \else + \pst@getcoor{#1}\POE@tempa% + \pst@getcoor{#2}\POE@tempb% + \pst@getcoor{#3}\POE@tempc% + \pst@getcoor{#4}\POE@tempd% + \pnode(!\POE@tempa \POE@tempb + \POE@dict{VecAdd 0.5 VecScale} + \tx@UserCoor){\oenodeRefA{}} + \pnode(!\POE@tempc \POE@tempd + \POE@dict{VecAdd 0.5 VecScale} + \tx@UserCoor){\oenodeRefB{}} + \POE@Verb{% + /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 + }% + \fi + \fi + \POE@drawcomponent[fiberbox]{#5}\fiberbox@ii + \ifPOE@backlayer + \ifx\\#3#4\\ + \ifPOE@fiberpreset@ + \ifnum\POE@key@fiberboxcountin=1 + \ifPOE@fiberpresetin@ + \drawfiber@{FiberIn}{(#1)}{\POE@key@compname} + \fi + \fi + \ifnum\POE@key@fiberboxcountout=1 + \ifPOE@fiberpresetout@ + \drawfiber@{FiberOut}{\POE@key@compname}{(#2)} + \fi + \fi + \fi + \else + \ifPOE@fiberpreset@ + \ifPOE@fiberpresetin@ + \ifPOE@fiberpresetin@top + \drawfiber@{FiberIn1}{(#1)}{\POE@key@compname} + \fi + \ifPOE@fiberpresetin@bottom + \drawfiber@{FiberIn2}{(#2)}{\POE@key@compname} + \fi + \fi + \ifPOE@fiberpresetout@ + \ifPOE@fiberpresetout@top + \drawfiber@{FiberOut1}{\POE@key@compname}{(#3)} + \fi + \ifPOE@fiberpresetout@bottom + \drawfiber@{FiberOut2}{\POE@key@compname}{(#4)} + \fi + \fi + \fi + \fi + \fi + \end@OptexpObj +}% +\fiberdipole@iimacro{fiberbox}% \def\POE@calcNodes#1#2#3{{% \pst@getcoor{#1}\POE@tempa% \pst@getcoor{#2}\POE@tempb% @@ -2840,6 +3017,7 @@ \@ifnextchar\bgroup{\fibercollimator@v}{\fibercollimator@v{}}% }% \def\fibercollimator@v#1{% + \addbefore@par{allowbeaminside=false}% \begin@OptexpFiberObj \ifPOE@backlayer \POE@regNodes{\POE@tempa}{\POE@tempb}% @@ -3938,6 +4116,42 @@ (! \POE@dict{@@x 0.2 mul @@y 1.3 mul \@arrowshift VecAdd}) \endgroup \ignorespaces}% +\def\fiberbox@ref{% + \POE@setref{% + /@@x \POE@key@fiberboxwidth\space 0.5 mul def + @@inht 0 eq @@outht 0 eq and { + /@@inht \POE@key@fiberboxcountin\space\POE@key@fiberboxsepin\space mul def + /@@outht \POE@key@fiberboxcountout\space\POE@key@fiberboxsepout\space mul def + } if + @@inht \POE@key@fiberboxcountin\space dup 1 add 3 1 roll div mul + @@outht \POE@key@fiberboxcountout\space dup 1 add 3 1 roll div mul + max + \POE@key@fiberboxheight\space dup @@inht @@outht max gt { + exch + } if pop 0.5 mul /@@y exch def + }% +}% +\def\fiberbox@nodes{% + \newOptexpFiberComp{% + 0 1 \POE@key@fiberboxcountin\space 1 sub { + \POE@key@fiberboxcountin\space 1 sub 0.5 mul dup 3 -1 roll sub exch + 0 gt { + @@inht \POE@key@fiberboxcountin\space 1 sub div mul + } if + @@x neg exch ToVec + } for + 0 1 \POE@key@fiberboxcountout\space 1 sub { + \POE@key@fiberboxcountout\space 1 sub 0.5 mul dup 3 -1 roll sub exch + 0 gt { + @@outht \POE@key@fiberboxcountout\space 1 sub div mul + } if + @@x exch ToVec + } for + } +}% +\def\fiberbox@comp{% + \psframe[dimen=outer](!\POE@dict{@@x neg @@y neg})(!\POE@dict{@@x @@y}) +}% \def\optcoupler@nodes{% \edef\@sep{\POE@key@couplersep\space 0.5 mul }% \newOptexpFiberComp{% |