Debian Codegraph @

texmf-dist/source/latex/pst-optexp/pst-optexp.dtx

raw
1 % \iffalse meta-comment
2 %
3 % Copyright (C) 2007-2022 by Christoph Bersch <[email protected]>
4 %
5 % This work may be distributed and/or modified under the
6 % conditions of the LaTeX Project Public License, either version 1.3c
7 % of this license or (at your option) any later version.
8 % The latest version of this license is in
9 % http://www.latex-project.org/lppl.txt
10 % and version 1.3c or later is part of all distributions of LaTeX
11 % version 2008/05/04 or later.
12 % \fi
13 %
14 % \iffalse
15 %<*driver>
16 \ProvidesFile{pst-optexp.dtx}
17 %</driver>
18 %<stylefile>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
19 %<stylefile>\ProvidesPackage{pst-optexp}
20 %<*stylefile>
21 [2022/02/26 v6.1 Optical experimental setups with PSTricks]
22 %</stylefile>
23 %
24 %<*driver>
25 \documentclass[
26 paper=a4,
27 headinclude=false,
28 footinclude=false,
29 oneside,
30 toc=index,
31 headsepline,
32 parskip=half-]{scrreprt}
33 \usepackage{doc}
34 \setcounter{IndexColumns}{2}
35 \usepackage[utf8]{inputenc}
36 \usepackage[T1]{fontenc}
37 \usepackage{lmodern}
38 \usepackage{amsmath, marvosym}
39 \usepackage{bera}
40 \providecommand*\mainlang{}
41 \usepackage[ngerman, english,\mainlang]{babel}
42 \usepackage{prettyref}
43 \usepackage[dvipsnames,x11names,svgnames]{xcolor}
44 \usepackage{array,booktabs,paralist,tabularx}
45 \usepackage{ragged2e, calc}
46 \newlength{\POEcaptionmargin}
47 \newlength{\POEcaptionheight}
48 \usepackage[labelfont={color=DOrange},
49 singlelinecheck=false,
50 justification=raggedright]{caption}
51 \DeclareCaptionFormat{poenocaption}{%
52 \setlength{\POEcaptionmargin}{\widthof{#1}+7pt}%
53 \setlength{\POEcaptionheight}{\heightof{#1}+3pt}%
54 \hspace*{-\POEcaptionmargin}#1\par\vspace*{-\POEcaptionheight}%
55 }%
56 \DeclareCaptionFormat{poecaption}{%
57 \setlength{\POEcaptionmargin}{\widthof{#1}+7pt}%
58 \hspace*{-\POEcaptionmargin}#1#2#3\par
59 }%
60 \captionsetup[lstlisting]{format=poenocaption}
61 \usepackage{nicefrac}
62 \usepackage{pst-func}
63 \usepackage{pst-optexp}
64 \usepackage[makeindex]{splitidx}
65 \usepackage{hypdoc}
66 \hypersetup{%
67 colorlinks=true,
68 urlcolor=DOrange,
69 linkcolor=pdflinkcolor,
70 breaklinks,
71 linktocpage=true}
72 \usepackage{breakurl}
73 \definecolor{DOrange}{rgb}{1,.4,.2}%
74 \definecolor{DDOrange}{rgb}{0.7, 0.23, 0.07}%
75 \colorlet{pdflinkcolor}{DOrange}
76 \colorlet{DGreen}{green!90!black}
77 \usepackage{pst-tree}
78 \usepackage{showexpl}
79 \usepackage{scrhack}
80 \makeatletter\renewcommand*\SX@Info{}\makeatother
81 \usepackage{etoolbox}
82 \undef{\cs}\undef{\cmd}
83 \usepackage{ltxdockit}
84 \newcommand{\poeTR}[1]{\TR{\ttfamily\color{DOrange}#1}}
85 \definecolor{colKeys}{rgb}{0,0,0}
86 \definecolor{colIdentifier}{rgb}{0,0,0}
87 \colorlet{colComments}{green!60!black}
88 \definecolor{colString}{rgb}{0,0.5,0}
89 \newlength{\codeoverhang}
90 \setlength{\codeoverhang}{0.5\marginparwidth+\marginparsep}
91 \lstset{%
92 language=[LaTeX]TeX, identifierstyle=\color{colIdentifier},
93 keywordstyle=\color{colKeys},
94 keywordstyle = [21]\color{DOrange},
95 keywordstyle = [22]\color{DOrange},
96 stringstyle=\color{colString},
97 commentstyle=\color{colComments},
98 alsoletter={12},
99 float=hbp,
100 basicstyle=\ttfamily\small,
101 columns=flexible,
102 tabsize=4,
103 showspaces=false,
104 showstringspaces=false,
105 breaklines=true,
106 breakautoindent=true,
107 breakatwhitespace=true,
108 captionpos=t,
109 belowcaptionskip=0pt,
110 abovecaptionskip=0pt,
111 xleftmargin=1em,
112 prebreak = {\raisebox{-0.5ex}[\ht\strutbox]{\kern0.5ex\large\Righttorque}},
113 rulecolor=\color{black!20},
114 texcsstyle = [20]\color{DDOrange},
115 moretexcs = [20]{lens, optbox, oenode, oenodeIn, oenodeExt, oenodeOut,
116 oenodeRefA, oenodeRefB, oenodeTrefA, oenodeTrefB, oenodeLabel,
117 oenodeRotref, oenodeBeam, oenodeBeamUp, oenodeBeamLow, oenodeCenter,
118 oenodeIfc, oeBeamVec, oeBeamVecUp, oeBeamVecLow, oeBeamVecMedian,
119 oeBeamCenter, optplate, optretplate, pinhole, crystal, optdetector,
120 optdiode, doveprism, glanthompson, polarization, mirror, parabolicmirror,
121 oapmirror, axicon, optwedge, asphericlens,
122 beamsplitter, optgrating, optprism, rightangleprism, pentaprism, optaom,
123 optdipole, opttripole, optfiber, optamp, optmzm, optfilter, optsource,
124 polcontrol, optisolator, optswitch, fiberdelayline,
125 optfiberpolarizer, fibercollimator, optcoupler, wdmcoupler,
126 wdmsplitter, optcirculator, fiberbox, eleccoupler, elecsynthesizer,
127 elecmixer, optarrowcomp, optbarcomp, transmissiongrating, drawbeam, drawwidebeam,
128 drawfiber, drawwire, frontlayer, backlayer, newOptexpDipole,
129 newOptexpTripole, newOptexpFiberDipole, newOptexpComp,
130 newOptexpFiberComp, optplane},
131 explpreset={%
132 pos=l, width=-99pt, hsep=5mm, overhang=\codeoverhang, varwidth,
133 vsep=\bigskipamount, rframe={}}, extendedchars=true
134 }%
135 \lstdefinestyle{example}{explpreset={%
136 escapechar=*, pos=l, width=-99pt, hsep=5mm, overhang=\codeoverhang,
137 varwidth, vsep=\bigskipamount, rframe={}}}
138 \makeatletter
139 \providecommand\ON{%
140 \gdef\lst@alloverstyle##1{\textcolor{black!50}{\strut##1}%
141 }}
142 \providecommand\OFF{\xdef\lst@alloverstyle##1{##1}}
143 \makeatother
144 \colorlet{sectioncolor}{DOrange}
145 \addtokomafont{sectioning}{\color{sectioncolor}}
146 \usepackage[automark,markcase=ignorenouppercase]{scrlayer-scrpage}
147 \pagestyle{scrheadings}
148 \clearmainofpairofpagestyles
149 \clearplainofpairofpagestyles
150 \ohead{\pagemark}
151 \ihead{\headmark}
152 \ofoot[\pagemark]{}
153 \automark[subsection]{section}
154 \setkomafont{headsepline}{\color{DOrange}}
155 \DeclareTOCStyleEntry[level=0, numwidth=2.0em]{default}{chapter}
156 \DeclareTOCStyleEntry[level=1, indent=1.5em, numwidth=3.0em]{default}{section}
157 \DeclareTOCStyleEntry[level=2, indent=3.8em, numwidth=4.0em]{default}{subsection}
158 \makeatletter
159 \newrobustcmd*{\fnurl}[1][]{\hyper@normalise\ltd@fnurl{#1}}
160 \def\ltd@fnurl#1#2{\footnote{#1\hyper@linkurl{\Hurl{#2}}{#2}}}
161 \newrobustcmd*{\arxivurl}[1]{\href{http://arxiv.org/abs/#1}{arXiv:#1}}
162 \newrobustcmd*{\doiurl}[1]{\href{http://dx.doi.org/#1}{DOI:#1}}
163 \makeatother
164 \usepackage{csquotes}
165 \MakeAutoQuote{«}{»}
166 %^^A spot is used in ltxdockit.sty
167 \colorlet{spot}{sectioncolor}
168 \newpsstyle{Refline}{linecolor=gray!70}
169 \newpsstyle{CenterNode}{linecolor=blue, dotstyle=x, dotscale=1.5}
170 \psset[optexp]{usefiberstyle}
171 \colorlet{Refline}{gray!70}
172 %^^A Fonts definitions used in ltxdockit.sty
173 \renewcommand*{\verbatimfont}{\ttfamily}
174 \renewcommand*{\displayverbfont}{\ttfamily}
175 \renewcommand*{\marglistfont}{\spotcolor\sffamily\small}
176 \renewcommand*{\margnotefont}{\sffamily\small}
177 \renewcommand*{\optionlistfont}{\spotcolor\sffamily\displayverbfont}
178 \renewcommand*{\ltxsyntaxfont}{\ttfamily}
179 \renewcommand*{\ltxsyntaxlabelfont}{\spotcolor\displayverbfont}
180 \renewcommand*{\changelogfont}{\normalfont}
181 \renewcommand*{\changeloglabelfont}{\spotcolor\sffamily\bfseries}
182
183 \makeatletter
184 %^^A an idea from GL to provide links inside the listings to the pst-optexp commands:
185 %^^A <https://groups.google.com/groups/search?as_umsgid=4d89ee49%240%2418590%24426a74cc%40news.free.fr>
186 \providerobustcmd*\ifrefundefined [1]{%
187 \begingroup%
188 \csname @safe@activestrue\endcsname%
189 \expandafter\endgroup\csname @\ifodd
190 \ifcsname r@comp:#1\endcsname 1\else
191 \ifcsname r@prm:#1\endcsname 1\else
192 \ifcsname r@cs:#1\endcsname 1\else
193 \ifcsname r@sty:#1\endcsname 1\else 0
194 \fi\fi\fi\fi second\else first\fi oftwo\endcsname
195 }% \ifrefundefined
196 \def\lsthk@OutputBox@H@@k{%
197 \begingroup%
198 \let\lst@UM\@empty%
199 \edef\@tempc{\detokenize\expandafter{\the\lst@token }}%\edef
200 \ifrefundefined{\@tempc}%
201 \endgroup%
202 \sethyperlistings%
203 }% \lsthk@OutputBox@H@@k
204 \def\sethyperlistings {\global\let \hyperlistingsreference =\@tempc
205 \endgroup \aftergroup \dohyperlistings }% after \hbox
206 \def\dohyperlistings {\def\lst@alloverstyle ##1{\hyperlistings ##1}}
207 \def\hyperlistings{%
208 \setbox\@tempboxa\hbox%
209 \bgroup%
210 \rlap{\hypersetup {linkcolor=.}\relax\fboxrule\z@%
211 \ifcsdef{r@prm:\hyperlistingsreference}%
212 {\hyperref[prm:\hyperlistingsreference]{\xLkeyword{\hyperlistingsreference}\boxframe{\wd\@tempboxa}{\ht\@tempboxa}{\dp\@tempboxa}}}%
213 {\ifcsdef{r@comp:\hyperlistingsreference}%
214 {\hyperref[comp:\hyperlistingsreference]{\xLcomp{\hyperlistingsreference}\boxframe{\wd\@tempboxa}{\ht\@tempboxa}{\dp\@tempboxa}}}%
215 {\ifcsdef{r@sty:\hyperlistingsreference}%
216 {\hyperref[sty:\hyperlistingsreference]{\xLstyle{\hyperlistingsreference}\boxframe{\wd\@tempboxa}{\ht\@tempboxa}{\dp\@tempboxa}}}%
217 {\hyperref[cs:\hyperlistingsreference]{\xLcs{\hyperlistingsreference}\boxframe{\wd\@tempboxa}{\ht\@tempboxa}{\dp\@tempboxa}}}}}}%
218 \unhbox\@tempboxa%
219 \egroup%
220 }% \hyperlistings
221 \let\lsthk@OutputBox\lsthk@OutputBox@H@@k
222
223 \renewenvironment*{ltxsyntax}
224 {\list{}{%
225 \setlength{\labelwidth}{\marglistwidth}%
226 \setlength{\labelsep}{0pt}%
227 \setlength{\leftmargin}{0pt}%
228 \renewcommand*{\makelabel}[1]{%
229 \hss\ltxsyntaxfont\ltxsyntaxlabelfont##1}}%
230 \let\cmditem\POE@cmditem
231 \let\envitem\ltd@envitem
232 \let\compitem\POE@compitem}
233 {\endlist}
234
235 \newenvironment*{stylelist}
236 {\list{}{%
237 \setlength{\labelwidth}{\marglistwidth}%
238 \setlength{\labelsep}{0.5\marglistsep}%
239 \setlength{\leftmargin}{0pt}%
240 \renewcommand*{\makelabel}[1]{\hss\optionlistfont##1}}%
241 \let\styleitem\POE@styleitem
242 \let\typeitem\POE@typeitem}%
243 {\endlist}
244
245 \def\ltd@optionlist{%
246 \let\optitem\POE@optitem
247 \let\valitem\POE@valitem
248 \let\choitem\POE@choitem
249 \let\boolitem\POE@boolitem
250 \let\intitem\POE@intitem
251 \let\numitem\POE@numitem
252 \let\psnumitem\POE@psnumitem
253 \let\poeitem\ltd@item
254 \let\styleitem\POE@styleitem
255 \let\typeitem\POE@typeitem}
256
257 \def\POE@styleitem{%
258 \@ifnextchar[%]
259 {\POE@styleitem@i}
260 {\POE@styleitem@i[]}}
261 \def\POE@styleitem@i[#1]#2{%
262 \item[{#2}]%
263 \label{sty:#2}\xdefLstyle{#2}%
264 \begingroup\raggedright
265 \prm{psstyle}%
266 \settowidth\@tempdimb{\prm{psstyle}}%
267 \settowidth\@tempdimc{#2}%
268 \@tempdimc=\dimexpr\@tempdimc+\labelsep-\labelwidth\relax
269 \ifdim\@tempdimc>0pt%
270 \@tempdima=\dimexpr\linewidth-\@tempdimb-\@tempdimc-1em\relax
271 \else
272 \@tempdima=\dimexpr\linewidth-\@tempdimb-1em\relax
273 \fi
274 \ifblank{#1}{}{\hfill\parbox[t]{\@tempdima}{\raggedleft default:~\ltd@textverb{#1}}}%
275 \par\endgroup}
276
277 \def\POE@typeitem#1#2{%
278 \item[{#1}]%
279 \label{prm:#1}\docindexdef{#1=\nxLkeyword{#1}}%
280 \begingroup\raggedright
281 #2%
282 \settowidth\@tempdimb{\prm{psstyle}}%
283 \settowidth\@tempdimc{#1}%
284 \@tempdimc=\dimexpr\@tempdimc+\labelsep-\labelwidth\relax
285 \ifdim\@tempdimc>0pt%
286 \@tempdima=\dimexpr\linewidth-\@tempdimb-\@tempdimc-1em\relax
287 \else
288 \@tempdima=\dimexpr\linewidth-\@tempdimb-1em\relax
289 \fi
290 \par\endgroup}
291
292 \def\POE@option#1#2#3{%
293 \item[#1]%
294 \begingroup\raggedright
295 \ltd@textverb{=}%
296 \settowidth\@tempdimb{\ltd@textverb{=}}%
297 \settowidth\@tempdimc{#1}%
298 \@tempdimc=\dimexpr\labelwidth-\@tempdimc\relax
299 \ifdim\@tempdimc<0pt
300 \@tempdima=\dimexpr\linewidth-\@tempdimb+\@tempdimc-2em\relax
301 \else
302 \@tempdima=\dimexpr\linewidth-\@tempdimb-2em\relax
303 \fi
304 \ifblank{#3}
305 {}
306 {\settowidth\@tempdimb{default: #3}%
307 \@tempdima=\dimexpr\@tempdima-\@tempdimb-2em\relax}%
308 \parbox[t]{\@tempdima}{\raggedright #2}%
309 \ifblank{#3}
310 {}
311 {\hfill default:~#3}%
312 \par\endgroup
313 \nobreak\vspace{\itemsep}}
314
315 \def\POE@optitem{%
316 \@ifstar
317 {\boolfalse{@tempswa}\POE@optitem@i}
318 {\booltrue{@tempswa}\POE@optitem@i}}
319 \newcommand*{\POE@optitem@i}[3][]{%
320 \ifbool{@tempswa}%
321 {\label{prm:#2}\xdefLkeyword{#2}}%
322 {\xLkeyword{#2}}%
323 \ifblank{#1}
324 {\POE@option{#2}{#3}{}}
325 {\POE@option{#2}{#3}{\ltd@textverb{#1}}}}%
326
327 \def\POE@valitem{%
328 \@ifstar
329 {\boolfalse{@tempswa}\POE@valitem@i}
330 {\booltrue{@tempswa}\POE@valitem@i}}
331 \newcommand*{\POE@valitem@i}[3][]{%
332 \ifbool{@tempswa}%
333 {\label{prm:#2}\xdefLkeyword{#2}}%
334 {\xLkeyword{#2}}%
335 \ifblank{#1}
336 {\POE@option{#2}{\prm{#3}}{}}
337 {\POE@option{#2}{\prm{#3}}{\ltd@textverb{#1}}}}%
338
339 \def\POE@choitem{%
340 \@ifstar
341 {\boolfalse{@tempswa}\POE@choitem@i}
342 {\booltrue{@tempswa}\POE@choitem@i}}
343 \newcommand*{\POE@choitem@i}[3][]{%
344 \ifbool{@tempswa}%
345 {\label{prm:#2}\xdefLkeyword{#2}}%
346 {\xLkeyword{#2}}%
347 \ifblank{#1}
348 {\POE@option{#2}{\ltd@verblist{#3}}{}}
349 {\POE@option{#2}{\ltd@verblist{#3}}{\ltd@textverb{#1}}}}%
350
351 \def\POE@boolitem{%
352 \@ifstar
353 {\boolfalse{@tempswa}\POE@boolitem@i}
354 {\booltrue{@tempswa}\POE@boolitem@i}}
355 \newcommand*{\POE@boolitem@i}[2][]{%
356 \ifbool{@tempswa}%
357 {\label{prm:#2}\xdefLkeyword{#2}}%
358 {\xLkeyword{#2}}%
359 \ifblank{#1}
360 {\POE@option{#2}{\ltd@verblist{true,false}}{}}
361 {\POE@option{#2}{\ltd@verblist{true,false}}{\ltd@textverb{#1}}}}%
362
363 \def\POE@intitem{%
364 \@ifstar
365 {\boolfalse{@tempswa}\POE@intitem@i}
366 {\booltrue{@tempswa}\POE@intitem@i}}
367 \newcommand*{\POE@intitem@i}[2][]{%
368 \ifbool{@tempswa}%
369 {\label{prm:#2}\xdefLkeyword{#2}}%
370 {\xLkeyword{#2}}%
371 \ifblank{#1}
372 {\POE@option{#2}{\prm{int}}{}}
373 {\POE@option{#2}{\prm{int}}{\ltd@textverb{#1}}}}%
374
375 \def\POE@numitem{%
376 \@ifstar
377 {\boolfalse{@tempswa}\POE@numitem@i}
378 {\booltrue{@tempswa}\POE@numitem@i}}
379 \newcommand*{\POE@numitem@i}[2][]{%
380 \ifbool{@tempswa}%
381 {\label{prm:#2}\xdefLkeyword{#2}}%
382 {\xLkeyword{#2}}%
383 \ifblank{#1}
384 {\POE@option{#2}{\prm{num}}{}}
385 {\POE@option{#2}{\prm{num}}{\ltd@textverb{#1}}}}%
386
387 \def\POE@psnumitem{%
388 \@ifstar
389 {\boolfalse{@tempswa}\POE@psnumitem@i}
390 {\booltrue{@tempswa}\POE@psnumitem@i}}
391 \newcommand*{\POE@psnumitem@i}[2][]{%
392 \ifbool{@tempswa}%
393 {\label{prm:#2}\xdefLkeyword{#2}}%
394 {\xLkeyword{#2}}%
395 \ifblank{#1}
396 {\POE@option{#2}{\prm{psnum}}{}}
397 {\POE@option{#2}{\prm{psnum}}{\ltd@textverb{#1}}}}%
398
399 \def\ltd@csitem{%
400 \@ifstar
401 {\boolfalse{@tempswa}\ltd@csitem@i}
402 {\booltrue{@tempswa}\ltd@csitem@i}}
403 \def\ltd@csitem@i#1{%
404 \ifbool{@tempswa}
405 {\ltd@item@ii{\textbackslash#1\hspace\marglistsep}{#1}}
406 {\ltd@item@ii{\textbackslash#1\hspace\marglistsep}{}}}
407
408 \def\POE@cmditem{%
409 \@ifstar
410 {\boolfalse{@tempswa}\POE@cmditem@i}
411 {\booltrue{@tempswa}\POE@cmditem@i}}
412 \def\POE@cmditem@i#1{%
413 \ifbool{@tempswa}
414 {\POE@cmditem@ii{\textbackslash#1}{cs:#1}}
415 {\POE@cmditem@ii{\textbackslash#1}{}}}
416 \def\POE@compitem{%
417 \@ifstar
418 {\boolfalse{@tempswa}\POE@compitem@i}
419 {\booltrue{@tempswa}\POE@compitem@i}}
420 \def\POE@compitem@i#1{%
421 \ifbool{@tempswa}
422 {\POE@cmditem@ii{\textbackslash#1}{comp:#1}}
423 {\POE@cmditem@ii{\textbackslash#1}{}}}
424 \def\POE@cmditem@ii#1#2{%
425 \ltd@itemsave
426 \ifhmode
427 \itemsep-\topsep
428 \else
429 \ltd@itembreak
430 \fi
431 \item[#1]%
432 \ltd@itemrest
433 \ifblank{#2}{}{\label{#2}}%
434 \begingroup
435 \ltd@syntaxsetup
436 \ltxsyntaxfont
437 \let\@tempa\@empty
438 \ltd@parseargs}
439
440 \def\ltd@csitem@ii#1#2{%
441 \ltd@itemsave
442 \ifhmode
443 \itemsep-\topsep
444 \else
445 \ltd@itembreak
446 \fi
447 \item[#1]%
448 \ltd@itemrest
449 \ifblank{#2}{}{\label{cs:#2}}%
450 \begingroup
451 \ltd@syntaxsetup
452 \ltxsyntaxfont
453 \let\@tempa\@empty
454 \ltd@parseargs}
455
456
457 \let\plainllap\llap
458 \newrobustcmd\macro@llap[1]{{\global\let\llap\plainllap
459 \setbox0=\hbox\bgroup \macro@font\small\saved@macroname\egroup
460 \ifdim\wd0>30mm
461 \hbox to\z@ \bgroup\hss \hbox to30mm{\unhcopy0\hss}\egroup
462 \edef\@tempa{\hskip\dimexpr\the\wd0-30mm}\global\everypar\expandafter{\the\expandafter\everypar
463 \@tempa \global\everypar{}}%
464 \else \llap{\unhbox0}\fi}}
465 \AtBeginEnvironment{macro}{\let\llap\macro@llap}
466 \makeatother
467
468 \newcommand*{\PSstring}[1]{{\normalfont\small\ttfamily(#1)}}
469 \newcommand*{\PSarray}[1]{{\normalfont\small\ttfamily[#1]}}
470 \newcommand*{\PSname}[1]{{\normalfont\small\ttfamily/#1}}
471 \newcommand*{\PSproc}[1]{{\normalfont\small\ttfamily\textbraceleft #1\textbraceright}}
472 \newcommand*{\PSvar}[1]{{\normalfont\small\ttfamily #1}}
473 \newcommand*{\PSop}[1]{{\normalfont\small\ttfamily\color{DOrange}\hskip 3pt #1\hskip 3pt}}
474
475 \newcommand*{\compref}[1]{\ref{comp:#1}}
476 \newcommand*{\hyperpagedef}[1]{\textbf{\hyperpage{#1}}}
477 \newcommand*{\nodename}[1]{\emph{#1}}
478 \newcommand*{\param}[1]{\normalfont\texttt{#1}}
479 \newcommand*{\paramvalue}[1]{\texttt{#1}}
480 \newcommand*{\styleshape}[1]{\texttt{#1}}
481 \newcommand{\docindex}[1]{\sindex[doc]{#1|hyperpage}}
482 \newcommand{\docindexdef}[1]{\sindex[doc]{#1|hyperpagedef}}
483 \makeatletter
484 \def\Lcs{\@ifstar{\Lcs@nobm}{\Lcs@bm}}
485 \def\Lcs@nobm#1{\nxLcs{#1}\xLcs{#1}}
486 \def\Lcs@bm#1{\hyperref[cs:#1]{\Lcs@nobm{#1}}}
487 \def\xLcs#1{\docindex{#1=\nxLcs{#1}}\docindex{\POEindexMacro!#1=\nxLcs{#1}}}
488 \def\nxLcs#1{\texttt{\textbackslash#1}}
489
490 \def\Lcomp{\@ifstar{\Lcomp@nobm}{\Lcomp@bm}}
491 \def\Lcomp@nobm#1{\nxLcomp{#1}\xLcomp{#1}}
492 \def\Lcomp@bm#1{\hyperref[comp:#1]{\Lcomp@nobm{#1}}}
493 \def\xLcomp#1{\docindex{#1=\nxLcomp{#1}}\docindex{\POEindexComp!#1=\nxLcomp{#1}}}
494 \def\nxLcomp#1{\texttt{\textbackslash#1}}
495
496 \def\LPack#1{\nxLPack{#1}\docindex{#1=\nxLPack{#1}}\docindex{\POEindexPack!#1=\nxLPack{#1}}}
497 \def\nxLPack#1{\texttt{#1}}
498
499 \def\Lenv{\@ifstar{\Lenv@nobm}{\Lenv@bm}}
500 \def\Lenv@nobm#1{\nxLenv{#1}\xLenv{#1}}
501 \def\Lenv@bm#1{\hyperref[env:#1]{\Lenv@nobm{#1}}}
502 \def\xLenv#1{\docindex{#1=\nxLenv{#1}}\docindex{\POEindexEnv!#1=\nxLenv{#1}}}
503 \def\nxLenv#1{\texttt{#1}}
504 \let\orig@ltd@envitem\ltd@envitem
505 \def\ltd@envitem#1{\orig@ltd@envitem{#1}\label{env:#1}\xLenv{#1}}
506
507 \def\Lkeyword{\@ifstar{\Lkeyword@nobm}{\Lkeyword@bm}}
508 \def\Lkeyword@nobm#1{\nxLkeyword{#1}\xLkeyword{#1}}
509 \def\Lkeyword@bm#1{\hyperref[prm:#1]{\Lkeyword@nobm{#1}}}
510 \def\xLkeyword#1{\docindex{#1=\nxLkeyword{#1}}\docindex{\POEindexKeyword!#1=\nxLkeyword{#1}}}
511 \def\xdefLkeyword#1{\docindexdef{#1=\nxLkeyword{#1}}\docindexdef{\POEindexKeyword!#1=\nxLkeyword{#1}}}
512 \def\nxLkeyword#1{\texttt{#1}}
513
514 \def\xLoption#1{\docindex{#1=\texttt{#1}}}
515 \def\Loption#1{\texttt{#1}\xLoption{#1}}
516 \def\nxLoption#1{\texttt{#1}}
517
518 \def\Lstyle{\@ifstar{\Lstyle@nobm}{\Lstyle@bm}}
519 \def\Lstyle@nobm#1{\nxLstyle{#1}\xLstyle{#1}}
520 \def\Lstyle@bm#1{\hyperref[sty:#1]{\Lstyle@nobm{#1}}}
521 \def\xLstyle#1{\docindex{#1=\nxLstyle{#1}}\docindex{\POEindexStyle!#1=\nxLstyle{#1}}}
522 \def\xdefLstyle#1{\docindexdef{#1=\nxLstyle{#1}}\docindexdef{\POEindexStyle!#1=\nxLstyle{#1}}}
523 \def\nxLstyle#1{\texttt{#1}}
524
525 \def\Ldipole#1{\nxLcs{#1}\xLdipole{#1}}
526 \def\xLdipole#1{\docindexdef{#1=\nxLcs{#1}}\docindexdef{\POEindexComp!#1=\nxLcs{#1}}}
527
528 \def\Ltripole#1{\nxLcs{#1}\xLtripole{#1}}
529 \def\xLtripole#1{\docindexdef{#1=\nxLcs{#1}}\docindexdef{\POEindexComp!#1=\nxLcs{#1}}}
530
531 \def\Lfdipole#1{\nxLcs{#1}\xLfdipole{#1}}
532 \def\xLfdipole#1{\docindexdef{#1=\nxLcs{#1}}\docindexdef{\POEindexComp!#1=\nxLcs{#1}}}
533
534 \def\Lfmultipole#1{\nxLcs{#1}\xLfmultipole{#1}}
535 \def\xLfmultipole#1{\docindexdef{#1=\nxLcs{#1}}\docindexdef{\POEindexComp!#1=\nxLcs{#1}}}
536
537 \def\Lemultipole#1{\nxLcs{#1}\xLemultipole{#1}}
538 \def\xLemultipole#1{\docindexdef{#1=\nxLcs{#1}}\docindexdef{\POEindexComp!#1=\nxLcs{#1}}}
539 \makeatother
540
541 \newcommand{\dipoledesc}[1]{%
542 \xLdipole{#1}%
543 \compitem{#1}[options](in)(out){label}%
544 }
545 \newcommand{\tripoledesc}[1]{%
546 \xLtripole{#1}%
547 \compitem{#1}[options](in)(center)(out){label}%
548 }
549
550 \newcommand{\fiberdipoledesc}[1]{%
551 \xLfdipole{#1}%
552 \compitem{#1}[options](in)(out){label}%
553 }
554
555 \newenvironment*{pssyntax}
556 {\list{}{\small
557 \setlength{\labelsep}{0pt}%
558 \setlength{\leftmargin}{10pt}%
559 \item[]}}
560 {\endlist}
561
562 \newcommand{\psarglistfont}{\small}
563 \newenvironment*{psarglist}
564 {\list{}{%
565 \setlength{\labelwidth}{10pt}%
566 \setlength{\labelsep}{0pt}%
567 \setlength{\leftmargin}{0pt}%
568 \setlength{\itemsep}{\parsep}%
569 \setlength{\parsep}{0pt}%
570 \renewcommand*{\makelabel}[1]{\hss\psarglistfont##1}}}
571 {\endlist}
572
573 \makeatletter
574 \renewenvironment{theglossary}{\GlossaryParms \let\item\@idxitem \ignorespaces}{}
575 \makeatother
576 \def\psargitem#1{\item[#1]\hfill\par\nobreak}
577
578 \addtopsstyle{Fiber}{linecolor=DOrange,linewidth=1.5\pslinewidth}
579 \addtopsstyle{Beam}{linewidth=1.5\pslinewidth}
580 \EnableCrossrefs
581 \CodelineIndex
582 \OnlyDescription
583 \begin{document}
584 \DocInput{pst-optexp.dtx}
585 \end{document}
586 %</driver>
587 % \fi
588 %
589 % \CheckSum{0}
590 %
591 % \CharacterTable
592 % {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
593 % Lower-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
594 % Digits \0\1\2\3\4\5\6\7\8\9
595 % Exclamation \! Double quote \" Hash (number) \#
596 % Dollar \$ Percent \% Ampersand \&
597 % Acute accent \' Left paren \( Right paren \)
598 % Asterisk \* Plus \+ Comma \,
599 % Minus \- Point \. Solidus \/
600 % Colon \: Semicolon \; Less than \<
601 % Equals \= Greater than \> Question mark \?
602 % Commercial at \@ Left bracket \[ Backslash \\
603 % Right bracket \] Circumflex \^ Underscore \_
604 % Grave accent \` Left brace \{ Vertical bar \|
605 % Right brace \} Tilde \~}
606 %
607 % \GetFileInfo{pst-optexp.dtx}
608 %
609 % \DoNotIndex{\@,\g@addto@macro,\newif,\gdef,\xdef,\newcounter,\or,\ifcase,\\}
610 % \DoNotIndex{\newcommand,\newenvironment,\def,\edef,\let,\if,\ifx,\else,\fi,\@ifnextchar}
611 % \DoNotIndex{\space,\relax,\nr,\val,\ignorespaces,\ifdim,\ifcat,\@nil,\@none,\@empty}
612 % \DoNotIndex{\PackageError,\PackageWarning,\advance,\csname,\endcsname,\bgroup,\egroup}
613 % \DoNotIndex{\expandafter,\POE@comp,\@postcode}
614 % \DoNotIndex{\psset}
615 % \DoNotIndex{\@wd,\@sz,\@ht,\@yshift,\@step,\@xl,\@sep,\@r,\@dp,\@altan,\@extpostcode}
616 % \DoNotIndex{\@f@cnt,\@f@r,\@f@sep,\@hshift,\@bs@wd,\@c@caxisL,\@cnt,\@pstfalse,\@psttrue}
617 % \DoNotIndex{\@th,\@rL,\@rR,\i,\long,\optexp@nodeA,\optexp@nodeB}
618 % \DoNotIndex{\POE@temp,\POE@tempa,\POE@tempb,\POE@tempc,\POE@tempd}
619 % \DoNotIndex{\POE@getref@b,\POE@getref@c,\POE@getref@l,\POE@getref@r,\POE@getref@t}
620 % \DoNotIndex{\the,\toks@}
621 %
622 % \newif\ifGERMAN \GERMANfalse
623 % \newif\ifENGLISH \ENGLISHfalse
624 % \iflanguage{ngerman}{\GERMANtrue}{%
625 % \iflanguage{german}{\GERMANtrue}{\GERMANfalse}}
626 % \iflanguage{english}{\ENGLISHtrue}{\ENGLISHfalse}
627 %
628 % \ifGERMAN
629 % \newrefformat{chap}{Kap.~\ref{#1}}
630 % \newrefformat{sec}{Kap.~\ref{#1}}
631 % \newrefformat{l}{Zeile~\ref{#1}}
632 % \newrefformat{ex}{Bsp.~\ref{#1}}
633 % \newrefformat{tab}{Tab.~\ref{#1}}
634 % \newrefformat{fig}{Abb.~\ref{#1}}
635 % \newindex[Quelltextindex]{idx}
636 % \newindex[Dokumentationsindex]{doc}
637 % \newcommand{\POEindexComp}{Komponenten}
638 % \newcommand{\POEindexStyle}{Stile}
639 % \newcommand{\POEindexMacro}{Makros}
640 % \newcommand{\POEindexKeyword}{Parameter}
641 % \newcommand{\POEindexEnv}{Umgebungen}
642 % \newcommand{\POEindexPack}{Pakete}
643 % \renewcommand*\lstlistingname{Bsp.}
644 % \fi
645 % \ifENGLISH
646 % \newrefformat{chap}{Sec.~\ref{#1}}
647 % \newrefformat{sec}{Sec.~\ref{#1}}
648 % \newrefformat{l}{Line~\ref{#1}}
649 % \newrefformat{ex}{Ex.~\ref{#1}}
650 % \newrefformat{tab}{Tab.~\ref{#1}}
651 % \newrefformat{fig}{Fig.~\ref{#1}}
652 % \newindex[Code index]{idx}
653 % \newindex[Documentation index]{doc}
654 % \newcommand{\POEindexComp}{components}
655 % \newcommand{\POEindexStyle}{styles}
656 % \newcommand{\POEindexMacro}{macros}
657 % \newcommand{\POEindexKeyword}{parameters}
658 % \newcommand{\POEindexEnv}{environments}
659 % \newcommand{\POEindexPack}{packages}
660 % \renewcommand*\lstlistingname{Ex.}
661 % \fi
662 %
663 % \newcommand{\refpointexplanation}{%
664 % \ifGERMAN
665 % Analog zum Referenzpunkt von \nxLcs{rput}, kann jede Kombination von
666 % \opt{c} (mittig), \opt{t} (oben), \opt{b} (unten), \opt{l} (links) und
667 % \opt{r} (rechts) sein.
668 % \fi
669 % \ifENGLISH
670 % Like the reference point of \nxLcs{rput}, can be any comination of
671 % \opt{c} (center), \opt{t} (top), \opt{b} (bottom), \opt{l} (left), and
672 % \opt{r} (right).
673 % \fi}
674 %
675 % \newcommand*{\linewidthexplanation}[2]{%
676 % \ifGERMAN
677 % Die Linienbreite #1. Diese könnte ebenfalls über den
678 % \opt{linewidth} Parameter gesetzt werden. Mit diesem Parameter kann
679 % aber die Linienbreite aller #2 global eingestellt werden.
680 % \fi
681 % \ifENGLISH
682 % The linewidth of the #1. This could be defined also with the
683 % generic \opt{linewidth} option. But this parameter allows setting
684 % globally the linewidth of all #2.
685 % \fi
686 % }
687 %
688 % \newcommand*{\deprecatedmsg}[2][3.0]{%
689 % \ifGERMAN Dieser Parameter ist seit Version #1 veraltet, verwenden Sie stattdessen #2. \fi
690 % \ifENGLISH This parameter is deprecated since version #1, use #2 instead.\fi
691 % }
692 %
693 % \newcommand*{\addtostylemsg}[1]{%
694 % \ifGERMAN Der vorhandene \Lstyle{#1}-Stil wird lokal um die Parameter in
695 % \prm{list} erweitert, \prm{list} muss mit geschweiften Klammern gekapselt
696 % werden.
697 % \fi
698 % \ifENGLISH
699 % The \Lstyle{#1} style is extended by locally adding the
700 % parameters contained in \prm{list}. The \prm{list} must be surrounded
701 % by curly braces.
702 % \fi
703 % }
704 % \newcommand*{\newstylemsg}[1]{%
705 % \ifGERMAN Ähnlich wie \Lkeyword{addto#1}, nur wird der
706 % \Lstyle{#1}-Stil mit den neuen Parametern überschrieben.
707 % \fi
708 % \ifENGLISH Similar to \Lkeyword{addto#1}, but an existing
709 % \Lstyle{#1} style is overwritten with the new parameter set.
710 % \fi
711 % }
712 %
713 % \makeatletter
714 % \renewcommand\maketitle{^^A
715 % \thispagestyle{empty}^^A
716 % \begin{titlepage}
717 % \begin{pspicture}(1.6in,0.685in)(10,20.5)
718 % \psframe[fillstyle=solid,linecolor=lightgray,fillcolor=lightgray,linestyle=solid](0,-5.75)(21.5,10)
719 % \psframe[fillstyle=solid,linecolor=Orange!85!Red,fillcolor=Orange!85!Red,linestyle=solid](0,10)(21.5,10.5)
720 % \psframe[fillstyle=solid,linecolor=Orange!85!Red,fillcolor=Orange!85!Red,linestyle=solid](0,21.1)(21.5,21.2)
721 % \rput[lb](3,22){\Huge\sffamily\color{Orange!65!Red}\psscalebox{2}{\textbf{PSTricks}}}
722 % \rput[lb](3,14.1){\parbox{15cm}{\sffamily\RaggedRight\bfseries\huge\@title}}
723 % \rput[lb](3,7.6){\parbox{13cm}{\sffamily\@date}}
724 % \rput[lb](3,-2.6){\parbox[b]{17cm}{\sffamily\RaggedRight
725 % ~\hfill\makebox[7cm][l]{\ifGERMAN Paketautor:\fi\ifENGLISH Package author:\fi}\\
726 % ~\hfill\makebox[7cm][l]{^^A
727 % \bfseries\tabular[t]{@{}l@{}}\@author\endtabular}}}
728 % \rput[C](11,4){\bgImage}
729 % \end{pspicture}^^A
730 % \end{titlepage}}
731 % \makeatother
732 %
733 % \ifGERMAN
734 % \title{\texttt{pst-optexp}\\ Optische Versuchsaufbauten\\[0.5ex] \small \fileversion}
735 % \hypersetup{pdftitle={Optische Versuchsaufbauten}}
736 % \fi
737 % \ifENGLISH
738 % \title{\texttt{pst-optexp}\\ Drawing optical experimental setups\\[0.5ex] \small \fileversion}
739 % \hypersetup{pdftitle={Optical experimental setups}}
740 % \fi
741 % \author{Christoph Bersch}
742 % \date{\filedate}
743 % \def\bgImage{\psset{unit=1.3}
744 % \begin{pspicture}(-0.2,0.1)(8.2,5.3)
745 % \pnode(0,3){M1}
746 % \pnode(8,3){M2}
747 % \pnode(8,0.5){In}
748 % \pnode(6.5,0.5){Min}
749 % \pnode(6.5,3){Pin}
750 % \pnode(4.5,3){Min2}
751 % \pnode(1.3, 0.5){Mout}
752 % \pnode(1.3,3){Pout}
753 % \pnode(3.5,3){Mout2}
754 % \pnode(0,0.5){Out}
755 % \definecolor[ps]{bl}{rgb}{tx@addDict begin Red Green Blue end}
756 % \addtopsstyle{Beam}{linecolor=bl, linejoin=1}
757 % \psset{mirrortype=extended, mirrordepth=0.15}
758 % \newpsstyle{ExtendedMirror}{linestyle=none, hatchwidth=0.5\pslinewidth, hatchsep=1.2\pslinewidth,
759 % fillstyle=hlines}
760 % \begin{optexp}
761 % \mirror[mirrorwidth=4, mirrorradius=11.](M2)(M1)(M2)
762 % \mirror[mirrorwidth=4, mirrorradius=10.4](M1)(M2)(M1)
763 % \mirror(In)(Min)(Pin)
764 % \optprism[n=1.85, addtoOptComp={linewidth=1.5\pslinewidth}](Min)(Pin)(Min2)
765 % \mirror[compshift=-0.4](Pin)(Min2)(Pin)
766 % \mirror[compshift=0.4](Pout)(Mout2)(Pout)
767 % \optprism[n=1.85, linewidth=1.5\pslinewidth](Mout2)(Pout)(Mout)
768 % \mirror(Pout)(Mout)(Out)
769 % \multido{\i=0+1}{40}{^^A
770 % \pstVerb{^^A
771 % \i\space 650 400 sub 39 div mul 400 add
772 % tx@addDict begin wavelengthToRGB end }^^A
773 % \drawbeam[n={-0.002 \i\space mul n add}](In){3-5}{2}{1}{6-7}
774 % }^^A
775 % \newpsstyle{Beam}{linecolor=red}
776 % \backlayer{\psline[style=Beam,ArrowInside=->, linewidth=2\pslinewidth, arrowinset=0](In)(\oenodeIn{3})(\oenodeOut{4})}
777 % \drawbeam[linewidth=2\pslinewidth, arrows=->, arrowinset=0, loadbeampoints, beaminsidefirst, n=1.9325]{7-8}(Out)
778 % \end{optexp}
779 % \rput(4,4.5){^^A
780 % \psframe[fillstyle=solid,fillcolor=gray!70](-0.1, -0.6)(0.1, 0.7)
781 % \multido{\r=-0.5+0.1}{12}{^^A
782 % \psline[linewidth=0.5\pslinewidth](-0.1,\r)(0.1,\r)
783 % }^^A
784 % }
785 % \end{pspicture}}
786 %
787 % \maketitle
788 %
789 % \clearpage
790 % \tableofcontents
791 % \clearpage
792 %
793 % \ifGERMAN
794 % \chapter{Einführung}
795 % \fi
796 % \ifENGLISH
797 % \chapter{Introduction}
798 % \fi
799 %
800 % \ifGERMAN
801 % \section{Über das Paket}
802 %
803 % \LPack{pst-optexp} ist ein PSTricks-Paket zum Skizzieren optischer
804 % Versuchsaufbauten. Dafür werden viele unterschiedliche Freistrahl- und
805 % Faserkomponenten bereitgestellt, deren Ausrichtung, Positionierung und
806 % Beschriftung einfach und flexibel eingestellt werden kann. Die Komponenten
807 % können dann mit Fasern oder Lichtstrahlen verbunden werden, wobei auch
808 % realistische Strahlengänge mit Raytracing möglich sind.
809 % \fi
810 % \ifENGLISH
811 % \section{About the package}
812 % The package \LPack{pst-optexp} is a collection of optical components that
813 % facilitate easy sketching of optical experimental setups. A lot of different
814 % free-ray and fiber components are provided, which alignment, positioning and
815 % labelling can be achieved in very simple and flexible ways. The components
816 % can be connected with fibers or beams, realistic raytraced beam paths are
817 % also possible.
818 % \fi
819 %
820 % \ifGERMAN
821 % \section{Anforderungen}
822 % \LPack{pst-optexp} benötigt \LaTeX{} und aktuelle Versionen der
823 % Pakete \LPack{pstricks} ($\geq 2.53$), \LPack{pst-plot} ($\geq
824 % 1.6.1$), \LPack{pst-node}, \LPack{pstricks-add}, \LPack{multido},
825 % \LPack{pst-eucl}, \LPack{pst-intersect} ($\geq 0.4$) und
826 % \LPack{environ}.
827 %
828 % Alle PSTricks-Pakete machen regen Gebrauch von der Postscript-Sprache, so
829 % dass der typische Arbeitsfluss \opt{latex}, \opt{dvips} und
830 % ggf. \opt{ps2pdf} umfasst. Es gibt viele alternative Methoden um die
831 % Dokumente zu
832 % kompilieren.\fnurl{http://tug.org/PSTricks/main.cgi?file=pdf/pdfoutput}
833 % \fi
834 % \ifENGLISH
835 % \section{Requirements}
836 % \LPack{pst-optexp} requires \LaTeX{} and recent versions of
837 % \LPack{pstricks} ($\geq 2.53$), \LPack{pst-plot} ($\geq 1.61$),
838 % \LPack{pst-node}, \LPack{multido}, \LPack{pstricks-add},
839 % \LPack{pst-eucl}, \LPack{pst-intersect} ($\geq 0.4$) and
840 % \LPack{environ}.
841 %
842 % All PSTricks package rely heavily on the Postscript language so that the
843 % typical workflow involves \opt{latex}, \opt{dvips}, and \opt{ps2pdf}. Of
844 % course there are several alternative ways to compile your
845 % documents.\fnurl{http://tug.org/PSTricks/main.cgi?file=pdf/pdfoutput}
846 % \fi
847 %
848 % \ifGERMAN
849 % \section{Verbreitung und Installation}
850 % Dieses Paket ist auf
851 % CTAN\fnurl{http://mirror.ctan.org/help/Catalogue/entries/pst-optexp.html}
852 % erhältlich und in \TeX Live and MiK\TeX{} enthalten.
853 %
854 % Das \LPack{pst-optexp}-Paket umfasst die zwei Hauptdateien
855 % \texttt{pst-optexp.ins} und \texttt{pst-optexp.dtx}. Durch Aufrufen
856 % von \texttt{tex pst-optexp.ins} werden die beiden folgenden
857 % Dateien erzeugt:
858 % \begin{itemize}
859 % \item \texttt{pst-optexp.pro}: die Postscript Prologdatei
860 % \item \texttt{pst-optexp.sty}: die \LaTeX{} Stildatei
861 % \end{itemize}
862 % Speichern Sie diese Dateien in einem Verzeichnis der Teil Ihres
863 % lokalen \TeX-Baums ist.
864 %
865 % Vergessen Sie nicht \texttt{texhash} aufzurufen um den Baum zu
866 % aktualisieren. MiK\TeX{}-Benutzer müssen die Dateinamen-Datenbank
867 % (FNDB) aktualisieren.
868 %
869 % Detailliertere Information finden Sie in der Dokumentation Ihrer
870 % \LaTeX-Distribution über die Installation in den lokalen
871 % \TeX{}-Baum.
872 % \fi
873 % \ifENGLISH
874 % \section{Distribution and installation}
875 % This package is available on
876 % CTAN\fnurl{http://mirror.ctan.org/help/Catalogue/entries/pst-optexp.html} and
877 % is included in \TeX Live and MiK\TeX.
878 %
879 % The \LPack{pst-optexp} package consists of the two main files
880 % \texttt{pst-optexp.ins} and \texttt{pst-optexp.dtx}. By running \texttt{tex
881 % pst-optexp.ins} the following derived files are generated:
882 % \begin{itemize}
883 % \item \texttt{pst-optexp.pro}: the Postscript prolog file
884 % \item \texttt{pst-optexp.sty}: the \LaTeX{} style file
885 % \end{itemize}
886 % Save the files in a directory which is part of your local \TeX{} tree.
887 %
888 % Do not forget to run \texttt{texhash} to update this tree. For MiK\TeX{}
889 % users, do not forget to update the file name database (FNDB).
890 %
891 % For more detailed information see the documentation of your personal
892 % \LaTeX{} distribution on installing packages to your local \TeX{}
893 % system.
894 % \fi
895 %
896 % \ifGERMAN\section{Lizenz}\fi
897 % \ifENGLISH\section{License}\fi
898 % \ifGERMAN
899 % Es wird die Erlaubnis gewährt, dieses Dokument zu kopieren, zu verteilen
900 % und\slash oder zu modifizieren, unter den Bestimmungen der \LaTeX{} Project
901 % Public License, Version
902 % 1.3c.\fnurl{http://www.latex-project.org/lppl.txt}. Dieses
903 % Paket wird vom Autor betreut (author-maintained).
904 % \fi
905 % \ifENGLISH
906 % Permission is granted
907 % to copy, distribute and\slash or modify this software under the terms of the
908 % \LaTeX{} Project Public License, version
909 % 1.3c.\fnurl{http://www.latex-project.org/lppl.txt} This
910 % package is author-maintained.
911 % \fi
912 %
913 % \ifGERMAN
914 % \section{Abwärtskompatibilität}
915 % \fi
916 % \ifENGLISH
917 % \section{Backward compatibility}
918 % \fi
919 % \ifGERMAN In Version 3.0 wurde dem Paket erheblich fortgeschrittenere
920 % Funktionalität hinzugefügt, die es zu schwierig machte zur
921 % Vorgängerversion 2.1 vollständig abwärtskompatibel zu
922 % bleiben. Insbesondere war die Funktionsweise des \Lcs{drawbeam}
923 % Makros grundlegend falsch konzipiert, so dass ein Wechsel zur neuen
924 % Funktionalität so schnell wie möglich erfolgen sollte.
925 %
926 % Eine genauere Zusammenstellung der nicht-kompatiblen Änderungen und Hinweise
927 % zur Migration von älteren Dokumenten finden Sie in \prettyref{sec:bwd-comp}.
928 % \fi
929 % \ifENGLISH
930 % Version 3.0 introduced a lot of advanced features which made it too difficult
931 % to maintain full backward compatibility with version 2.1. Especially the
932 % \Lcs{drawbeam} macro was broken by design, so that it was best to drop the old
933 % flaw as early as possible.
934 %
935 % You find a more detailled list of changes and information for migration of old
936 % documents in \prettyref{sec:bwd-comp}.
937 % \fi
938 %
939 % \section{Notation}\label{sec:notation}
940 % \ifGERMAN
941 % Die meisten Parametertypen, die im Laufe des Dokuments verwendet werden, sind
942 % selbsterklärend, andere bedürfen einer genaueren Erläuterung (z.B. der
943 % Unterschied zwischen \prm{num} und \prm{psnum}). \prettyref{tab:paramref}
944 % erklärt die geläufigsten Typen.
945 % \fi
946 % \ifENGLISH
947 % Often the parameter types are self-explanatory, but in some cases a clear
948 % distinction is needed, e.g. between \prm{num} and
949 % \prm{psnum}. \prettyref{tab:paramref} explains some commonly used types.
950 % \fi
951 %
952 % \begin{table}\centering
953 % \begin{tabularx}{0.9\linewidth}{>{\itshape}lX} \toprule
954 % Name & \ifENGLISH description\fi\ifGERMAN Beschreibung\fi\\ \midrule
955 % num & \ifENGLISH float number\fi\ifGERMAN Gleitkommazahl\fi \\
956 % psnum & \ifENGLISH Postscript code which evaluates to a number\fi
957 % \ifGERMAN Postscript-Kode der zu einer Zahl auswertet\fi\\
958 % int & \ifENGLISH integer number\fi\ifGERMAN Ganzzahl\fi\\
959 % dimen & \ifENGLISH dimension\fi\ifGERMAN Länge\fi\\
960 % psstyle & \ifENGLISH custom graphics parameter configuration defined with \Lcs*{newpsstyle}\fi
961 % \ifGERMAN Benutzerdefinierte Parameterkonfiguration definiert mit \Lcs*{newpsstyle}\fi\\
962 % refpoint & \refpointexplanation\\ \bottomrule
963 % \end{tabularx}
964 % \ifGERMAN
965 % \caption{Parametertypen die in den Parameterdefinitionen verwendet werden.}
966 % \fi
967 % \ifENGLISH
968 % \caption{Parameter types used in the parameter reference.}
969 % \fi
970 % \label{tab:paramref}
971 % \end{table}
972 %
973 % \ifGERMAN
974 % \section{Danksagung}
975 % \fi
976 % \ifENGLISH
977 % \section{Acknowledgements}
978 % \fi
979 % \ifGERMAN
980 % Ich danke allen Aktiven auf der PSTricks-Mailingliste für ihre Hilfe,
981 % insbesondere Herbert Voß. Mein Dank gilt ebenfalls unterschiedlichen
982 % Paketautoren, von denen ich Code kopiert und viel gelernt habe: David
983 % Carlisle, Florent Chervet, Enrico Gregorio, Rolf Niepraschk und Heiko
984 % Oberdiek. Christine Römer hat mich mit ihrem Artikel in der
985 % DTK\footnote{Pakete in Deutsch dokumentieren. in Die TeXnische
986 % Komödie. Heft 2/2011, S. 28-35.} überzeugt, ebenfalls eine deutsche
987 % Dokumentation bereitzustellen. Der Dokumentationsstil ist eine
988 % Mischung aus der \opt{pst-doc} Klasse (Herbert Voß) und dem
989 % \opt{ltxdockit} Paket für die \opt{biblatex} Dokumentation (Philipp
990 % Lehmann).
991 % \fi
992 % \ifENGLISH
993 % I thank all the people of the PSTricks mailinglist for the continuous
994 % help, especially Herbert Voß. Thanks also to various package authors
995 % from which I learned and adopted code for this package: David
996 % Carlisle, Florent Chervet, Enrico Gregorio, Rolf Niepraschk and Heiko
997 % Oberdiek. Christine Römer convinced me with her article in the german
998 % DTK\footnote{Pakete in Deutsch dokumentieren. in Die TeXnische
999 % Komödie. Heft 2/2011, S. 28-35.} to provide a german translation of
1000 % the documentation. The documentation style is a mixture of the
1001 % \opt{pst-doc} class (Herbert Voß) and the \opt{ltxdockit} package for
1002 % the \opt{biblatex} documentation (Philipp Lehman).
1003 % \fi
1004 %
1005 % \ifGERMAN
1006 % \chapter{Grundlegende Ideen}
1007 % \fi
1008 % \ifENGLISH
1009 % \chapter{Basic ideas}
1010 % \fi\label{chap:basics}
1011 %
1012 % \ifGERMAN Dieses Kapitel zeigt die grundlegenden Ideen und Konzepte, die in
1013 % diesem Paket stecken. Anhand von elementaren Beispielen werden die
1014 % Grundfunktionen wie Ausrichtung, Positionierung (\ref{sec:intro-comp}) und
1015 % Beschriftung (\ref{sec:intro-label}) von Komponenten beschrieben. Anschließen
1016 % wird deren Verbindung mit Strahlen (\ref{sec:intro-beam}) oder Fasern
1017 % (\ref{sec:intro-fiber}) vorgestellt.
1018 %
1019 % In \prettyref{sec:step-by-step} wird Schritt für Schritt die angedachte
1020 % Vorgehensweise für das Erstellen von umfassenden Experimentskizzen
1021 % erläutert. Eine vollständige Referenz aller Makros und deren Parameter finden
1022 % Sie in \prettyref{chap:generalparam}--\ref{chap:custom}.
1023 %
1024 % Ein Versuchsaufbau besteht aus Komponenten, die anhand ihrer Referenzknoten
1025 % positioniert, verschoben und gedreht werden können und optional eine
1026 % Beschriftung erhalten. Anschließen werden die Komponenten mit Lichtstrahlen
1027 % oder Fasern verbunden.
1028 % \fi
1029 % \ifENGLISH
1030 % This chapter shows the basic ideas and concepts of this package. Starting with
1031 % simple examples, basic functionality such as alignment, positioning
1032 % (\ref{sec:intro-comp}) and labelling (\ref{sec:intro-label}) of components is
1033 % presented. Following, the connection of components with beam rays
1034 % (\ref{sec:intro-beam}) or fiber (\ref{sec:intro-fiber}) is demonstrated.
1035 %
1036 % In \prettyref{sec:step-by-step} several propositions for preparing large
1037 % experimental sketches are illustrated step by step. For a complete reference
1038 % of all macros and their parameters, see
1039 % \prettyref{chap:generalparam}--\ref{chap:custom}.
1040 %
1041 % A drawing consists of components, which can be positioned, shifted and rotated
1042 % based on their reference nodes, and may have an optional label. Then, the
1043 % components are connected with beam rays or fibers.
1044 % \fi
1045 %
1046 % \ifGERMAN\section{Die Komponenten}\fi
1047 % \ifENGLISH\section{The components}\fi
1048 % \label{sec:intro-comp}
1049 %
1050 % \ifGERMAN Eine Komponente wird anhand der Knoten, die bei ihrere Definition
1051 % angegeben werden -- den Referenzknoten -- platziert. Im folgenden Beispiel
1052 % wird eine Linse mittig auf die Verbindungslinie zwischen den Knoten
1053 % \prm{A} und \prm{B} gesetzt:
1054 % \fi
1055 % \ifENGLISH
1056 % A component is positioned according to the nodes which are used for its
1057 % definition---the reference nodes. In the following examples, the lens is
1058 % placed centered between nodes \prm{A} and \prm{B}:
1059 % \fi
1060 %\iffalse
1061 %<*ignore>
1062 %\fi
1063 \begin{LTXexample}[linerange={1-3,6-6}]
1064 \begin{pspicture}[showgrid](0,-0.3)(3,2.3)
1065 \pnodes(0,1){A}(3,1){B}
1066 \lens(A)(B)
1067 \psset{style=Refline}\color{Refline}
1068 \psdot(A)\uput[90](A){A}\psdot(B)\uput[90](B){B}
1069 \end{pspicture}
1070 \end{LTXexample}
1071 %\iffalse
1072 %</ignore>
1073 %\fi
1074 %
1075 % \ifGERMAN
1076 % Diese Positionierung kann anhand von unterschiedlichen Parametern, wie
1077 % z.B. \Lkeyword{abspos} beinflusst werden (siehe dazu
1078 % \prettyref{sec:positioning} und \prettyref{sec:rotshift}). Im
1079 % folgenden Beispiel wird die Linse \opt{0.5} Einheiten vom Knoten
1080 % \prm{A} entfernt platziert, die Box sitzt am Ende der Referenzlinie
1081 % $\overline{AB}$.
1082 % \fi
1083 % \ifENGLISH
1084 % This position can be changed with a number of parameters, such as
1085 % \Lkeyword{abspos} (see \prettyref{sec:positioning} and
1086 % \prettyref{sec:rotshift}). In the next example, the lens is positioned
1087 % \opt{0.5} units apart from node \prm{A}, the box is placed at the end
1088 % of the reference line $\overline{AB}$.
1089 % \fi
1090 %\iffalse
1091 %<*ignore>
1092 %\fi
1093 \begin{LTXexample}[morekeywords={[21]{abspos, position}}, linerange={1-4,7-7}]
1094 \begin{pspicture}[showgrid](0,-0.3)(3,2.3)
1095 \pnode(0,1){A}\pnode(1.5,1){B}
1096 \lens[abspos=0.5](A)(B)
1097 \optbox[position=end](A)(B)
1098 \psset{style=Refline}\color{Refline}
1099 \psdot(A)\uput[90](A){A}\psdot(B)\uput[135](B){B}
1100 \end{pspicture}
1101 \end{LTXexample}
1102 %\iffalse
1103 %</ignore>
1104 %\fi
1105 %
1106 % \ifGERMAN Die Komponenten lassen sich allgemein in zwei Kategorien
1107 % unterteilen: Faser- und Freistrahlkomponenten. Diese unterscheiden sich in
1108 % erster Linie bezüglich ihrer Verbindungsmöglichkeiten: Freistrahlkomponenten
1109 % können sowohl mit Lichtstrahlen als auch mit Fasern verbunden werden,
1110 % wohingegen Faserkomponenten nur Faserverbindungen erlauben.
1111 % \fi
1112 % \ifENGLISH
1113 % The components can be divided in two categories: free-ray and fiber
1114 % components. These differ only in their connection possibilities: Free-ray
1115 % components can have fiber or free-ray connections, whereas fiber components
1116 % support fiber connections only.
1117 % \fi
1118 %
1119 % \ifGERMAN\section{Beschriftungen}\fi
1120 % \ifENGLISH\section{Labels}\fi
1121 % \label{sec:intro-label}
1122 %
1123 % \ifGERMAN Jede Komponente kann optional eine Beschriftung erhalten, die
1124 % relativ zur Komponente platziert wird.
1125 % \fi
1126 % \ifENGLISH Every component can have an optional label, which is positioned
1127 % relative to the component.
1128 % \fi
1129 %\iffalse
1130 %<*ignore>
1131 %\fi
1132 \begin{LTXexample}[morekeywords={[21]{labelangle, labelref, labeloffset}}, linerange={1-5,8-8}]
1133 \begin{pspicture}[showgrid](0,-0.3)(3,3.3)
1134 \pnode(0,2.5){A}\pnode(2,2.5){B}\pnode(2,1.5){C}
1135 \mirror[labelangle=-45](A)(B)(C){M}
1136 \optbox[position=start, labeloffset=0, labelref=relative](C)(B){box}
1137 \drawbeam(A){1}{2}
1138 \psset{style=Refline}\color{Refline}
1139 \psdot(A)\uput[90](A){A}\psdot(B)\uput[-135](B){B}\psdot(C)\uput[45](C){C}
1140 \end{pspicture}
1141 \end{LTXexample}
1142 %\iffalse
1143 %</ignore>
1144 %\fi
1145 %
1146 % \ifGERMAN\section{Freistrahl-Verbindungen}\fi
1147 % \ifENGLISH\section{Free-ray connections}\fi
1148 % \label{sec:intro-beam}
1149 %
1150 % \ifGERMAN
1151 % Freistrahlkomponenten können mit Lichtstrahlen verbunden werden, deren Weg mit
1152 % Raytracing berechnet werden kann. Da es sich um ein Paket zum
1153 % \emph{Skizzieren} experimenteller Aufbauten handelt, werden hier trotz der
1154 % realistischen Berechnungen viele Möglichkeiten offen gehalten den Strahlengang
1155 % zu manipulieren.
1156 %
1157 % Im einfachsten Fall wird eine einzelne Linie gezeichnet, deren optischer Weg
1158 % über den Brechungsindex \Lkeyword{n} und das Snelliussche Brechungsgesetz
1159 % bestimmt wird.
1160 %
1161 % Das Beispiel zeigt zwei Strahlen, die mit unterschiedlichen Anfangsbedingungen
1162 % auf die Linse treffen, der rote Strahl startet mit einem Abstand von \opt{0.2}
1163 % von der optischen Achse (\Lkeyword{beampos}) und wird entsprechend von der
1164 % Linse abgelenkt.
1165 % \fi
1166 % \ifENGLISH
1167 % Free-ray components can be connected with beam rays, which path can be
1168 % calculated by raytracing. Besides the realistic tracing possibilities, there
1169 % are many ways to manipulate the beam paths because you are dealing with a
1170 % package for \emph{sketching} experimental setups.
1171 %
1172 % In the simplest case a single line is drawn, which optical path is determined
1173 % by the refractive index \Lkeyword{n} and Snell's law.
1174 %
1175 % The example shows two beams which hit the lens with different initial
1176 % conditions. The red beam starts at a distance of \opt{0.2} from the optical
1177 % axis (\Lkeyword{beampos}) and is deflected by the lens accordingly.
1178 % \fi
1179 % \iffalse
1180 %<*ignore>
1181 % \fi
1182 \begin{LTXexample}[linerange={1-5,8-8}]
1183 \begin{pspicture}[showgrid](0,-0.3)(3,2.3)
1184 \pnode(0,1){A}\pnode(3,1){B}
1185 \lens[n=2, lensradius=2 2, lensheight=1.5](A)(B)
1186 \drawbeam(A){1}(B)
1187 \drawbeam[beampos=0.4, linecolor=red](A){1}(B)
1188 \psset{style=Refline}\color{Refline}
1189 \psdot(A)\uput[-90](A){A}\psdot(B)\uput[90](B){B}
1190 \end{pspicture}
1191 \end{LTXexample}
1192 % \iffalse
1193 %</ignore>
1194 % \fi
1195 %
1196 % \ifGERMAN Die Strahlen können mit beliebigen Strichlierungen und Pfeilen
1197 % dekoriert werden.
1198 % \fi
1199 % \ifENGLISH The beams can be decorated with arbitrary dashs and arrows.
1200 % \fi
1201 % \iffalse
1202 %<*ignore>
1203 % \fi
1204 \begin{LTXexample}[linerange={1-4,7-7}]
1205 \begin{pspicture}[showgrid](0,-0.3)(3,2.3)
1206 \pnode(0,1){A}\pnode(3,1){B}
1207 \lens[n=2, lens=2 2 1.5](A)(B)
1208 \drawbeam[beamangle=10, ArrowInside=->, arrows=-|, beaminside=false](A){1}(B)
1209 \psset{style=Refline}\color{Refline}
1210 \psdot(A)\uput[90](A){A}\psdot(B)\uput[-90](B){B}
1211 \end{pspicture}
1212 \end{LTXexample}
1213 % \iffalse
1214 %</ignore>
1215 % \fi
1216 %
1217 % \ifGERMAN Ebenfalls können ausgedehnte Strahlen gezeichnet werden deren
1218 % Randstrahlen mit \Lkeyword*{linestyle} etc. und deren Füllung über
1219 % \Lkeyword*{fillstyle} geändert werden können.
1220 % \fi
1221 % \ifENGLISH You can also draw wide beams. The marginal rays can be changed with
1222 % \Lkeyword*{linestyle} etc. and the filling with \Lkeyword*{fillstyle} etc.
1223 % \fi
1224 % \iffalse
1225 %<*ignore>
1226 % \fi
1227 \begin{LTXexample}[linerange={1-5,8-8}]
1228 \begin{pspicture}[showgrid](0,-0.3)(3,2.3)
1229 \pnode(0.5,1){A}\pnode(3,1){B}
1230 \optbox[position=start, optboxsize=0.5 1](A)(B)
1231 \lens[n=2](A)(B)
1232 \drawwidebeam[beamwidth=0.2, fillstyle=solid, fillcolor=green!40]{1-2}(B)
1233 \psset{style=Refline}\color{Refline}
1234 \psdot(A)\uput[45](A){A}\psdot(B)\uput[135](B){B}
1235 \end{pspicture}
1236 \end{LTXexample}
1237 % \iffalse
1238 %</ignore>
1239 % \fi
1240 %
1241 % \ifGERMAN Die Strahlen können auch hinter die Komponenten gelegt werden. Dafür
1242 % müssen alle beteiligten Komponenten und Strahlen in eine
1243 % \Lenv{optexp}-Umgebung gepackt werden (vergleiche das folgende Beispiel mit
1244 % dem vorangegangenen).
1245 % \fi
1246 % \ifENGLISH The beams can also lay behind the components. For this you must
1247 % enclose all respective components and rays in a \Lenv{optexp} environment
1248 % (compare the previous example with the following one).
1249 % \fi
1250 % \iffalse
1251 %<*ignore>
1252 % \fi
1253 \begin{LTXexample}
1254 \begin{pspicture}[showgrid](0,-0.3)(3,2.3)
1255 \pnode(1.5,1){A}\pnode(3,1){B}
1256 \begin{optexp}
1257 \optbox[position=start](A)(B)
1258 \lens[n=2](A)(B)
1259 \drawwidebeam[beamwidth=0.2, fillstyle=solid, fillcolor=green!40]{1}{2}(B)
1260 \end{optexp}
1261 \end{pspicture}
1262 \end{LTXexample}
1263 % \iffalse
1264 %</ignore>
1265 % \fi
1266 %
1267 % \ifGERMAN\section{Faserverbindungen}\fi
1268 % \ifENGLISH\section{Fiber connections}\fi
1269 % \label{sec:intro-fiber}
1270 %
1271 % \ifGERMAN
1272 % Eine andere Möglichkeit, Komponenten zu verbinden, sind Fasern
1273 % (\Lcs{drawfiber}). Hiermit bestehen weitreichende Möglichkeiten die Fasern
1274 % automatisch an die Komponentenausrichtung anzupassen.
1275 % \fi
1276 % \ifENGLISH
1277 % Fibers (\Lcs{drawfiber}) are another possibility of connecting
1278 % components. Here, you have several way of automatically adapting the fiber
1279 % connection to the component alignment.
1280 % \fi
1281 % \iffalse
1282 %<*ignore>
1283 % \fi
1284 \begin{LTXexample}
1285 \begin{pspicture}[showgrid](0,-0.3)(3,3.3)
1286 \pnode(1,2.5){A}\pnode(2.5,1){B}
1287 \psset{optboxsize=1 0.6}
1288 \optbox[position=start](A)(B|A)
1289 \optbox[position=end](B|A)(B)
1290 \drawfiber{1}{2}
1291 \drawfiber[linecolor=blue, ncurv=1.2]{1}{2}
1292 \end{pspicture}
1293 \end{LTXexample}
1294 % \iffalse
1295 %</ignore>
1296 % \fi
1297 %
1298 % \ifGERMAN Üblicherweise werden Fasern mit einer \Lcs*{nccurve}-Verbindung
1299 % gezeichnet, jede andere Knotenverbindung ist aber ebenfalls möglich
1300 % (\Lkeyword{fiberstyle}).
1301 % \fi
1302 % \ifENGLISH Usually, the fibers are drawn as \Lcs*{nccurve} connections, other
1303 % node connections are possible as well (\Lkeyword{fiberstyle}).
1304 % \fi
1305 % \iffalse
1306 %<*ignore>
1307 % \fi
1308 \begin{LTXexample}
1309 \begin{pspicture}[showgrid](0,-0.3)(3,3.3)
1310 \pnode(1,2.5){A}\pnode(2.5,1){B}
1311 \psset{optboxsize=1 0.6}
1312 \optbox[position=start](A)(B|A)
1313 \optbox[position=end](B|A)(B)
1314 \drawfiber[fiberstyle=angle, linearc=0.5]{1}{2}
1315 \end{pspicture}
1316 \end{LTXexample}
1317 % \iffalse
1318 %</ignore>
1319 % \fi
1320 %
1321 % \newpage
1322 % \ifGERMAN\section{Schritt-für-Schritt-Beispiele}\fi
1323 % \ifENGLISH\section{Step-by-step examples}\fi
1324 % \label{sec:step-by-step}
1325 %
1326 % \ifGERMAN
1327 % \subsection{Freistrahlaufbau}
1328 % In diesem ersten Beispiel werden alle Komponenten auf eine Verbindungslinie
1329 % verteilt und mit einem Strahl verbunden.
1330 %
1331 % Zuerst werden Anfangsknoten \prm{A} und Endknoten \prm{B} definiert. Die erste
1332 % \Lcomp{optbox} wird an den Anfang platziert, die Wellenplatte und der
1333 % Polarisator werden innerhalb der Verbindungslinie positioniert. Der Parameter
1334 % \Lkeyword{position} erwartet Werte zwischen \opt{0} und \opt{1}, die relativ
1335 % zur Länge der Verbindungslinie sind, oder \opt{start}/\opt{end}. Der Detektor
1336 % wird immer an das Ende der Linie gesetzt.
1337 %
1338 % Zuletzt werden alle Komponenten mit einem einfachen Lichtstrahl verbunden.
1339 % \fi
1340 % \ifENGLISH
1341 % In this first example, all components are distributed on a single line and
1342 % connected with a beam.
1343 %
1344 % First we define the start node \prm{A} and the stop node \prm{B}. The first
1345 % \Lcomp{optbox} is positioned at the start, the wave plate and the polarizer are
1346 % positioned between the nodes. The parameter \Lkeyword{position} expects a
1347 % value between \opt{0} and \opt{1} which is relative to the length of the
1348 % reference line, or \opt{start}/\opt{end}. The detector is always positioned at
1349 % the end of its reference line.
1350 %
1351 % Finally, all components are connected with a simple beam ray.
1352 % \fi
1353 % \iffalse
1354 %<*ignore>
1355 % \fi
1356 \begin{LTXexample}[linerange={1-7,10-10}]
1357 \begin{pspicture}[showgrid](4,2)
1358 \pnode(1,1){A}\pnode(3,1){B}
1359 \optbox[position=start, optboxwidth=1.2, labeloffset=0](A)(B){Laser}
1360 \optretplate[position=0.3](A)(B){$\nicefrac{\lambda}{2}$}
1361 \optplate[position=0.7](A)(B){pol}
1362 \optdetector[dettype=diode](A)(B){PD}
1363 \drawbeam{1}{2}{3}{4}
1364 \psset{style=Refline, dotscale=1.5}\psdot(A)\psdot(B)
1365 \uput[45](A){\color{Refline}A}\uput[135](B){\color{Refline}B}
1366 \end{pspicture}
1367 \end{LTXexample}
1368 % \iffalse
1369 %</ignore>
1370 % \fi
1371 %
1372 % \ifGERMAN\subsection{Galilei-Fernrohr}\fi
1373 % \ifENGLISH\subsection{Galilean telescope}\fi
1374 %
1375 % \ifGERMAN
1376 % Im Folgenden wird ein sehr einfacher Aufbau mit einer konkaven und
1377 % einer konvexen Linse schrittweise erläutert.
1378 %
1379 % Zuerst werden die Referenzknoten \prm{A} und \prm{B} definiert, die für die
1380 % Ausrichtung der Komponenten verwendet werden. Zur besseren Übersicht werden
1381 % beide Knoten gekennzeichnet, desweiteren dient ein Koordinatengitter der
1382 % Orientierung.
1383 %
1384 % Die erste Linse soll konkav gekrümmte Grenzflächen haben. Mit
1385 % \Lkeyword{lensradius} werden die Radien der linken und rechten Fläche auf
1386 % negative Werte gesetzt, was eine konkave Krümmung ergibt. Die Linse wird mit
1387 % \Lkeyword{abspos} eine Einheit vom \prm{A}-Knoten entfernt positioniert.
1388 % \fi
1389 % \ifENGLISH
1390 % This example describes a simple setup with a concave and a convex lens and the
1391 % raytracing through them.
1392 %
1393 % First, we define the reference nodes \prm{A} and \prm{B} which are used for
1394 % alignment of the components. For better overview, these nodes are highlighted
1395 % and a grid is drawn.
1396 %
1397 % The first lens should have concave interfaces. With \Lkeyword{lensradius} the
1398 % interface radii are set to negative values, which correspond to concave
1399 % curvatures. With \Lkeyword{abspos} the lens is positioned one unit from
1400 % \prm{A} node.
1401 % \fi
1402 % \iffalse
1403 %<*ignore>
1404 % \fi
1405 \begingroup
1406 \catcode`\*=13
1407 \def*{}%
1408 \begin{LTXexample}[style=example, linerange={1-4,6-6}]
1409 *\ON*\begin{pspicture}[showgrid](0,-0.3)(5,2.3)
1410 \pnode(0,1){A}\pnode(3.5,1){B}*\OFF*
1411 \lens[lensradius=-0.7,
1412 abspos=1](A)(B){concave}*\ON*
1413 \psset{style=Refline}\psdot(A)\psdot(B)
1414 \end{pspicture}*\OFF*
1415 \end{LTXexample}
1416 \endgroup
1417 % \iffalse
1418 %</ignore>
1419 % \fi
1420 %
1421 % \ifGERMAN
1422 % Die zweite Linse bekommt eine konvexe Krümmung (\Lkeyword{lensradius}
1423 % ist positiv) und wird \opt{2.6} Einheiten von \prm{A}
1424 % positioniert. Die Linsenhöhe wird mit \Lkeyword{lensheight}
1425 % eingestellt.
1426 % \fi
1427 % \ifENGLISH
1428 % The second lens has a convex curvature (\Lkeyword{lensradius} is positive) and
1429 % is positioned \opt{2.6} units apart from \prm{A}. Parameter
1430 % \Lkeyword{lensheight} sets the total height of the lens.
1431 % \fi
1432 % \iffalse
1433 %<*ignore>
1434 % \fi
1435 \begingroup
1436 \catcode`\*=13
1437 \def*{}%
1438 \begin{LTXexample}[style=example, linerange={1-6,9-9}]
1439 *\ON*\begin{pspicture}[showgrid](0,-0.3)(5,2.3)
1440 \pnode(0,1){A}\pnode(3.5,1){B}
1441 \lens[lensradius=-0.7,
1442 abspos=1](A)(B){concave}*\OFF*
1443 \lens[lensradius=2.3, lensheight=1.3,
1444 abspos=2.6](A)(B){convex}*\ON*
1445 \psset{style=Refline}\psdot(A)\psdot(B)
1446 \uput[45](A){\color{Refline}A}\uput[135](B){\color{Refline}B}
1447 \end{pspicture}*\OFF*
1448 \end{LTXexample}
1449 \endgroup
1450 % \iffalse
1451 %</ignore>
1452 % \fi
1453 %
1454 % \ifGERMAN
1455 % Die Lichtstrahlen sollen auf einer CCD-Kamera enden, die mit einer
1456 % \Lcomp{optbox} gezeichnet wird. Mit \Lkeyword{position}\opt{=end} wird die Box
1457 % ans Ende der Referenzlinie von \prm{A} nach \prm{B} gesetzt, die
1458 % Beschriftung wird mit \Lkeyword{labeloffset} in die Mitte der Komponente
1459 % gelegt.
1460 % \fi
1461 % \ifENGLISH
1462 % The beam rays are supposed to end at the CCD camera which is drawn as a
1463 % \Lcomp{optbox}. With \Lkeyword{position}\opt{=end} the box is positioned at
1464 % the end of the reference line from \prm{A} to \prm{B}. The label is put at
1465 % the center of the component with \Lkeyword{labeloffset}.
1466 % \fi
1467 % \iffalse
1468 %<*ignore>
1469 % \fi
1470 \begingroup
1471 \catcode`\*=13
1472 \def*{}%
1473 \begin{LTXexample}[style=example, linerange={1-7,10-10}]
1474 *\ON*\begin{pspicture}[showgrid](0,-0.3)(5,2.3)
1475 \pnode(0,1){A}\pnode(3.5,1){B}
1476 \lens[lensradius=-0.7,
1477 abspos=1](A)(B){concave}
1478 \lens[lensradius=2.3, lensheight=1.3,
1479 abspos=2.6](A)(B){convex}*\OFF*
1480 \optbox[position=end, labeloffset=0](A)(B){CCD}*\ON*
1481 \psset{style=Refline}\psdot(A)\psdot(B)
1482 \uput[45](A){\color{Refline}A}\uput[135](B){\color{Refline}B}
1483 \end{pspicture}*\OFF*
1484 \end{LTXexample}
1485 \endgroup
1486 % \iffalse
1487 %</ignore>
1488 % \fi
1489 %
1490 % \ifGERMAN
1491 % Zum Schluß wird ein aufgeweiteter Strahl mit einer Strahlbreite von \opt{0.2}
1492 % und ohne anfängliche Divergenz durch die Komponenten geschickt. Der
1493 % Strahlengang wird mittels Raytracing berechnet. Die Linsenparameter in diesem
1494 % Beispiel wurden so gewählt das bei kollimiertem Eingangsstrahl der
1495 % Ausgangsstrahl ebenfalls kollimiert ist.
1496 % \fi
1497 % \ifENGLISH
1498 % Finally, a wide beam with an initial beam width of \opt{0.2} without
1499 % divergence is sent through the components. The beam path is calculated by
1500 % raytracing. The lens parameters in this example were set such, that for a
1501 % collimated input beam also the output beam is collimated.
1502 % \fi
1503 % \iffalse
1504 %<*ignore>
1505 % \fi
1506 \begingroup
1507 \catcode`\*=13
1508 \def*{}%
1509 \begin{LTXexample}[style=example]
1510 *\ON*\begin{pspicture}(5,2)
1511 \pnode(0,1){A}\pnode(3.5,1){B}
1512 \lens[lensradius=-0.7,
1513 abspos=1](A)(B){concave}
1514 \lens[lensradius=2.3, lensheight=1.3,
1515 abspos=2.6](A)(B){convex}
1516 \optbox[position=end, labeloffset=0](A)(B){CCD}*\OFF*
1517 \drawwidebeam[beamwidth=0.2](A){1}{2}{3}*\ON*
1518 \end{pspicture}*\OFF*
1519 \end{LTXexample}
1520 \endgroup
1521 % \iffalse
1522 %</ignore>
1523 % \fi
1524 %
1525 % \ifGERMAN
1526 % Das Aussehen des Lichtstrahls wird über den \Lstyle{Beam}-Stil
1527 % eingestellt, und kann z.B. mit einer halbtransparenten Füllung
1528 % versehen werden.
1529 % \fi
1530 % \ifENGLISH
1531 % The appearance of the beam can be changed via the \Lstyle{Beam} style, and may
1532 % have e.g. a semitransparent fill pattern.
1533 % \fi
1534 % \iffalse
1535 %<*ignore>
1536 % \fi
1537 \begingroup
1538 \catcode`\*=13
1539 \def*{}%
1540 \begin{LTXexample}[style=example, label=ex:galileo, caption={caption}]
1541 *\ON*\begin{pspicture}(5,2)
1542 \pnode(0,1){A}\pnode(3.5,1){B}
1543 \lens[lensradius=-0.7,
1544 abspos=1](A)(B){concave}
1545 \lens[lensradius=2.3, lensheight=1.3,
1546 abspos=2.6](A)(B){convex}
1547 \optbox[position=end, labeloffset=0](A)(B){CCD}*\OFF*
1548 \addtopsstyle{Beam}{fillstyle=solid,
1549 fillcolor=green, opacity=0.2}
1550 *\ON*\drawwidebeam[beamwidth=0.2](A){1}{2}{3}
1551 \end{pspicture}*\OFF*
1552 \end{LTXexample}
1553 \endgroup
1554 % \iffalse
1555 %</ignore>
1556 % \fi
1557 %
1558 % \ifGERMAN\subsection{Faseraufbau}\fi
1559 % \ifENGLISH\subsection{Fiber setup}\fi
1560 % \label{sec:fiber-setup}
1561 %
1562 % \ifGERMAN
1563 % Dieses Beispiel zeigt, wie ein faseroptischer Aufbau mit automatisch
1564 % gezeichneten Faserverbindungen konstruiert werden kann.
1565 %
1566 % Auch hier werden die Referenzknoten zur besseren Orientierung
1567 % eingezeichnet. Im Gegensatz zum vorhergehenden Beispiel benötigen wir
1568 % mehr Referenzknoten, da die Faserkomponenten direkt mit diesen
1569 % verbunden werden.
1570 %
1571 % Der Laser wird wieder an den Anfang gesetzt. Der Abstand
1572 % der Beschriftung wird mit dem Parameter \Lkeyword{label} eingestellt,
1573 % mit dem alle Beschriftungsparameter gesammelt eingestellt werden
1574 % können. Da eine \Lcomp{optbox} sowohl als Freistrahl- als auch als
1575 % Faserkomponente verwendet werden kann, wird in der Standardeinstellung
1576 % keine Faser gezeichnet, was mit \Lkeyword{fiber} geändert werden
1577 % kann. Die Breite dieser und aller folgenden \Lcomp{optbox} wird auf
1578 % \opt{0.7} geändert.
1579 % \fi
1580 % \ifENGLISH
1581 % This example shows how to setup a fiber drawing with automatic fiber
1582 % connections.
1583 %
1584 % Again, the reference nodes are shown for better orientation. In contrast to
1585 % the previous example, here, we need more reference nodes because the
1586 % components are connected directly with them.
1587 %
1588 % The laser is set at the start. The label offset is set with the
1589 % \Lkeyword{label} parameter, which would allow setting all label parameters at
1590 % once. A \Lcomp{optbox} is originally a free-ray component, so that for it the
1591 % fiber connection must be enabled with \Lkeyword{fiber}. The width of all
1592 % \Lcomp{optbox} is changed to \opt{0.7}.
1593 % \fi
1594 % \iffalse
1595 %<*ignore>
1596 % \fi
1597 % \begingroup
1598 % \catcode`\*=13
1599 % \def*{}%
1600 \begin{LTXexample}[style=example, linerange={1-4,6-6}]
1601 *\ON*\begin{pspicture}[showgrid](4.7,2)
1602 \pnodes(0.7,1){A}(1,1){B}(2.8,1){C}(4,1.5){D}(4,0.5){E}*\OFF*
1603 \psset{optboxwidth=0.7, labelstyle=\scriptsize}
1604 \optbox[position=start, label=0, fiber](A)(B){LD}*\ON*
1605 \psset{style=Refline}\psdot(A)\psdot(B)\psdot(C)\psdot(D)\psdot(E)
1606 \end{pspicture}*\OFF*
1607 \end{LTXexample}
1608 % \iffalse
1609 %</ignore>
1610 % \fi
1611 %
1612 % \ifGERMAN
1613 % Als nächstes wird ein Mach-Zehnder-Modulator ohne Beschriftung gezeichnet, der
1614 % automatisch mit Fasern mit seinen Referenzknoten verbunden wird.
1615 % \fi
1616 % \ifENGLISH The Mach--Zehner modulator is drawn without label and connected
1617 % automatically with fibers to its reference nodes.
1618 % \fi
1619 % \iffalse
1620 %<*ignore>
1621 % \fi
1622 \begin{LTXexample}[style=example, linerange={1-5,7-7}]
1623 *\ON*\begin{pspicture}[showgrid](4.7,2)
1624 \pnodes(0.7,1){A}(1,1){B}(2.8,1){C}(4,1.5){D}(4,0.5){E}
1625 \psset{optboxwidth=0.7, labelstyle=\scriptsize}
1626 \optbox[position=start, label=0, fiber](A)(B){LD}*\OFF*
1627 \optmzm(B)(C)*\ON*
1628 \psset{style=Refline}\psdot(A)\psdot(B)\psdot(C)\psdot(D)\psdot(E)
1629 \end{pspicture}*\OFF*
1630 \end{LTXexample}
1631 % \iffalse
1632 %</ignore>
1633 % \fi
1634 %
1635 % \ifGERMAN
1636 % Danach wird ein Faserkoppler mit einem Eingang und zwei Ausgängen
1637 % gezeichnet. Der Koppler wird zwischen dem Eingangsknoten und dem
1638 % Mittelpunkt der beiden Ausgangsknoten ausgerichtet.
1639 % \fi
1640 % \ifENGLISH Then, we draw a fiber coupler with one input and two output
1641 % fibers. The coupler is positioned between the input node and the center of the
1642 % two output nodes.
1643 % \fi
1644 % \iffalse
1645 %<*ignore>
1646 % \fi
1647 \begin{LTXexample}[style=example, linerange={1-6,8-8}]
1648 *\ON*\begin{pspicture}[showgrid](4.7,2)
1649 \pnodes(0.7,1){A}(1,1){B}(2.8,1){C}(4,1.5){D}(4,0.5){E}
1650 \psset{optboxwidth=0.7, labelstyle=\scriptsize}
1651 \optbox[position=start, label=0, fiber](A)(B){LD}
1652 \optmzm(B)(C)*\OFF*
1653 \wdmsplitter(C)(D)(E){50\%}*\ON*
1654 \psset{style=Refline}\psdot(A)\psdot(B)\psdot(C)\psdot(D)\psdot(E)
1655 \end{pspicture}*\OFF*
1656 \end{LTXexample}
1657 % \iffalse
1658 %</ignore>
1659 % \fi
1660 %
1661 % \ifGERMAN
1662 % An die Enden des Kopplers wird ein optischer Spektrumanalysator (OSA)
1663 % und eine Leistungsmessgerät (PD) gesetzt. Der \Lcomp{optdetector} wird
1664 % nach Voreinstellung ans Ende der Referenzlinie gesetzt
1665 % (\Lkeyword{position}\opt{=end}). Diese beiden Komponenten werden ohne
1666 % weitere Einstellungen ohne Faserverbindungen gezeichnet. Das passt, da
1667 % ihre jeweiligen Endpunkte mit den Ausgängen des Kopplers
1668 % zusammenfallen.
1669 %
1670 % Die Schreibweise \opt{(A|E)} nimmt die $x$-Koordinate von \prm{A} und die
1671 % $y$-Koordinate von \prm{E}.
1672 % \fi
1673 % \ifENGLISH
1674 % At the ends of the coupler we put an optical spectrum analyzer (OSA)
1675 % and a power meter (PD). The \Lcomp{optdetector} is set by default at the
1676 % end of the reference line, it has \Lkeyword{position} preset to
1677 % \opt{end}. These two components are drawn without fibers, because
1678 % their end nodes coincide with the two outputs of the coupler.
1679 %
1680 % The notation \opt{(A|E)} uses the $x$-coordinate of \prm{A} and the
1681 % $y$-coordinate of \prm{E}.
1682 % \fi
1683 % \iffalse
1684 %<*ignore>
1685 % \fi
1686 \begin{LTXexample}[style=example, caption={caption}, label={ex:fiber-setup}, linerange={1-8,10-10}]
1687 *\ON*\begin{pspicture}[showgrid](4.7,2)
1688 \pnodes(0.7,1){A}(1,1){B}(2.8,1){C}(4,1.5){D}(4,0.5){E}
1689 \psset{optboxwidth=0.7, labelstyle=\scriptsize}
1690 \optbox[position=start, label=0, fiber](A)(B){LD}
1691 \optmzm(B)(C)
1692 \wdmsplitter[abspos=0.3, label=0.4](C)(D)(E){50\%}*\OFF*
1693 \optbox[position=end, label=0](A|D)(D){OSA}
1694 \optdetector(A|E)(E){PD}*\ON*
1695 \psset{style=Refline}\psdot(A)\psdot(B)\psdot(C)\psdot(D)\psdot(E)
1696 \end{pspicture}*\OFF*
1697 \end{LTXexample}
1698 % \iffalse
1699 %</ignore>
1700 % \fi
1701 %
1702 % \ifGERMAN\subsection{Faseraufbau (Alternative)}\fi
1703 % \ifENGLISH\subsection{Fiber setup (alternative)}\fi
1704 %
1705 % \ifGERMAN
1706 % Dieses Beispiel ist vom Ergebnis her identisch mit dem vorangegangenen
1707 % (\prettyref{ex:fiber-setup}), wird aber anders angegangen.
1708 %
1709 % Hier verwenden wir nicht die automatischen Faserverbindungen sondern zeichnen,
1710 % wie bei Freistrahlaufbauten, zuerst die Komponenten und verbinden diese zum
1711 % Schluß explizit mit Fasern (\Lcs{drawfiber}). Daher benötigen wir weniger
1712 % Referenzknoten, die Faserverbindungen werden mit \Lkeyword{fiber}\opt{=none}
1713 % global unterdrückt.
1714 %
1715 % Welche Herangehensweise verwendet wird ist meistens Geschmackssache, bei
1716 % Ringstrukturen wie z.B. Faserlasern kann das nachträgliche Verbinden mit
1717 % \Lcs{drawfiber} von Vorteil sein.
1718 % \fi
1719 %
1720 % \ifENGLISH
1721 % This example has the same result as the previous one
1722 % (\prettyref{ex:fiber-setup}), but is constructed differently.
1723 %
1724 % This time we do not use the automatic fiber connections, but draw all
1725 % components first and connect them afterwards with fibers
1726 % (\Lcs{drawfiber}). This requires less reference nodes, the fiber connections
1727 % are suppressed globally with \Lkeyword{fiber}\opt{=none}.
1728 %
1729 % The choice of the procedure depends on personal preferences, for loop setups,
1730 % like for fiber lasers, it looks better if the fibers are drawn after the
1731 % components with \Lcs{drawfiber}.
1732 % \fi
1733 % \iffalse
1734 %<*ignore>
1735 % \fi
1736 \begin{LTXexample}[caption={caption}, label={ex:fiber-setup-alt}, linerange={1-10,13-13}]
1737 \begin{pspicture}[showgrid](4.9,2)
1738 \pnode(0.7,1){A}\pnode(4,1){B}
1739 \psset{optboxwidth=0.7, labelstyle=\scriptsize, fiber=none}
1740 \optbox[position=start, labeloffset=0](A)(B){LD}
1741 \optmzm[abspos=1.1](A)(B)
1742 \wdmsplitter[abspos=2.25, label=0.4](A)(B)(B){50\%}
1743 \optbox[position=end,label=0, compshift=0.5](A)(B){OSA}
1744 \optdetector[compshift=-0.5](A)(B){PD}
1745 \drawfiber{1-4}
1746 \drawfiber{3}{5}
1747 \psset{style=Refline}\psdot(A)\psdot(B)
1748 \color{Refline}\uput[45](A){A}\uput[135](B){B}
1749 \end{pspicture}
1750 \end{LTXexample}
1751 % \endgroup
1752 % \iffalse
1753 %</ignore>
1754 % \fi
1755 %
1756 % \ifGERMAN
1757 % \newpage
1758 % \subsection{Michelson-Interferometer}
1759 % \fi
1760 % \ifENGLISH
1761 % \subsection{Michelson-Interferometer}
1762 % \fi
1763 %
1764 % \ifGERMAN
1765 % In diesem Beispiel werden neben Linsen auch reflektierende Elemente
1766 % (Spiegel) eingesetzt sowie Elemente, die sowohl transmittieren als
1767 % auch reflektieren (Strahlteiler).
1768 % \fi
1769 % \ifENGLISH
1770 % In this example we use lenses, reflective elements (mirrors) and components
1771 % which can be either transmittive or reflective (beamsplitter).
1772 % \fi
1773 %
1774 % \iffalse
1775 %<*ignore>
1776 % \fi
1777 \begingroup
1778 \catcode`\*=13
1779 \def*{}%
1780 \begin{LTXexample}[style=example, hsep=8mm, numbers=left, numberstyle=\footnotesize, caption={caption}, label=ex:michelson]
1781 \begin{pspicture}(3.2,5)
1782 \pnodes(0,3){A}(1,3){BS}(3,3){M1}(1,5){M2}(1,1){PD}*\label{l:ex2-nodes}*
1783 \psset{mirrortype=extended, mirrordepth=0.2}*\label{l:ex2-set}*
1784 \begin{optexp}*\label{l:ex2-begin}*
1785 \beamsplitter[bsstyle=plate, compname=BS](A)(BS)(PD)*\label{l:ex2-bs}*
1786 \mirror[compname=M1](BS)(M1)(BS)*\label{l:ex2-m1}*
1787 \mirror[compname=M2, variable](BS)(M2)(BS)*\label{l:ex2-m2}*
1788 \lens[compname=L](BS)(PD)*\label{l:ex2-l}*
1789 \optdetector[compname=Det, dettype=diode](BS)(PD)*\label{l:ex2-det}*
1790 \addtopsstyle{Beam}{beamwidth=0.2, fillstyle=solid, fillcolor=green!20!white}*\label{l:ex2-style}*
1791 \drawwidebeam(A){BS}{M1}{BS}{M2}{BS}{L}{Det}*\label{l:ex2-beam}*
1792 \end{optexp}
1793 \end{pspicture}
1794 \end{LTXexample}
1795 \endgroup
1796 % \iffalse
1797 %</ignore>
1798 % \fi
1799 %
1800 % \ifGERMAN
1801 % Wir beginnen wieder, indem wir die Referenzknoten definieren
1802 % (\prettyref{l:ex2-nodes}) und ein paar
1803 % grundlegende Einstellungen setzen (\prettyref{l:ex2-set}).
1804 %
1805 % Dann werden der Reihe nach alle Komponenten platziert
1806 % (\prettyref{l:ex2-bs}--\ref{l:ex2-det}). Die reflektierenden benötigen
1807 % drei Referenzknoten: den Eingangsknoten, den Knoten an dem die
1808 % reflektierende Grenzfläche ist und den Ausgangsknoten. Anschließend
1809 % wird noch das Aussehen des Lichtstrahls festgelegt
1810 % (\prettyref{l:ex2-style}) und der Strahl gezeichnet
1811 % (\prettyref{l:ex2-beam}).
1812 %
1813 % Diese Mal haben wir den Komponenten Namen gegeben (\Lkeyword{compname}) die
1814 % beim Raytracing anstelle der IDs -- der automatisch vergebenen Nummern --
1815 % verwendet werden können. Dies kann die Nachverfolgung des Strahlengangs
1816 % erleichtern.
1817 %
1818 % Alle Komponenten und Strahlen wurden zusätzlich in eine
1819 % \Lenv{optexp}-Umgebung gekapselt. Innerhalb dieser werden alle
1820 % Lichtstrahlen hinter die Komponenten gelegt, sodass diese nicht
1821 % verdeckt werden.
1822 % \fi
1823 % \ifENGLISH
1824 % We start with definition of the reference nodes
1825 % (\prettyref{l:ex2-nodes}) and setting some basic
1826 % parameters (\prettyref{l:ex2-set}).
1827 %
1828 % Following, all components are positioned
1829 % (\prettyref{l:ex2-bs}--\ref{l:ex2-det}). The reflective ones need three
1830 % reference nodes, the input node, the node where the reflective interface is
1831 % situated, and the output node. Then, the appearance of the beam is set
1832 % (\prettyref{l:ex2-style}), and the beam is drawn (\prettyref{l:ex2-beam}).
1833 %
1834 % In this example, all components have a name (\Lkeyword{compname}), which can
1835 % be used instead of the numerical IDs---automatically assigned, unique
1836 % numbers---for the raytracing. This can simplify follwing the beam path.
1837 %
1838 % All components and beams are enclosed in a \Lenv{optexp} environment. Inside
1839 % of this, all beams are drawn behind the components.
1840 % \fi
1841 %
1842 %
1843 % \ifGERMAN\chapter{Allgemeine Komponentenparameter}\fi
1844 % \ifENGLISH\chapter{General component parameters}\fi
1845 % \label{chap:generalparam}
1846 %
1847 % \ifGERMAN Dieses Kapitel enthält alle Informationen zu allgemeinen Parametern
1848 % und Konzepten. Das beinhaltet das Setzen von Beschriftungen
1849 % (\ref{sec:labels}), Positionierung (\ref{sec:positioning}), Drehen und
1850 % Verschieben von Komponenten (\ref{sec:rotshift}) und Anpassen der Aussehens
1851 % (\ref{sec:styles} und \ref{sec:appearance}).
1852 % \fi
1853 % \ifENGLISH This chapter introduces generic parameters and concepts such as
1854 % labels (\ref{sec:labels}), positioning (\ref{sec:positioning}), rotating and
1855 % shifting of components (\ref{sec:rotshift}) and changing the appearance of
1856 % components (\ref{sec:styles} and \ref{sec:appearance}).
1857 % \fi
1858 %
1859 % \ifGERMAN\section{Beschriftungen}\fi
1860 % \ifENGLISH\section{Labels}\fi
1861 % \label{sec:labels}
1862 %
1863 % \ifGERMAN Alle Komponenten können mit einer Beschriftung versehen werden,
1864 % deren Position und Ausrichtung genau angepasst werden kann. Die Beschriftung
1865 % ist für jede Komponente optional. Sollten die vielfältigen Parameter nicht
1866 % ausreichend sein, können Sie den Beschriftungsknoten -- in einigen Beispielen
1867 % mit einem roten Punkt gekennzeichnet -- auch direkt verwenden (siehe auch
1868 % \prettyref{sec:labelnode}).
1869 % \fi
1870 % \ifENGLISH All components may have a label which position and alignment can be
1871 % adjusted at will. The label is optional for every component. If the various
1872 % parameters are not sufficient, you can access the label node---marked as red
1873 % dot in some examples---directly (see also \prettyref{sec:labelnode}).
1874 % \fi
1875 %
1876 % \begin{optionlist}
1877 % \numitem[0.8]{labeloffset}
1878 % \ifGERMAN Der Abstand des Referenzknotens für die Beschriftung (roter
1879 % Punkt) zur Komponentenmitte (blaues Kreuz).
1880 % \fi
1881 % \ifENGLISH The offset of the label reference node (red dot) from the
1882 % component center (blue cross).
1883 % \fi
1884 % \iffalse
1885 %<*ignore>
1886 % \fi
1887 \begin{LTXexample}[linerange={1-2,6-6}, morekeywords={[21]{labeloffset}}]
1888 \begin{pspicture}(3,1.8)
1889 \optbox[beam, labeloffset=1](0,1.5)(3,0.8){label}
1890 \psdot[style=CenterNode](\oenodeCenter{})
1891 \psdot[linecolor=red](\oenodeLabel{})
1892 \ncline[arrows=<->, style=Refline, arrowinset=0, arrowscale=1.5]{\oenodeCenter{}}{\oenodeLabel{}}
1893 \end{pspicture}
1894 \end{LTXexample}
1895 % \iffalse
1896 %</ignore>
1897 % \fi
1898 %
1899 % \valitem{labelstyle}{macros}
1900 % \ifGERMAN Der Schriftstil der Beschriftungen.\fi
1901 % \ifENGLISH The text style that is used to typeset the label.\fi
1902 %
1903 % \valitem[c]{labelalign}{refpoint}
1904 % \ifGERMAN Definiert die Ausrichtung der Beschriftung bezüglich des
1905 % Beschriftungsknotens.
1906 % \fi
1907 % \ifENGLISH Defines the alignment of the label relative to the label node.
1908 % \fi
1909 % \iffalse
1910 %<*ignore>
1911 % \fi
1912 \begin{LTXexample}[linerange={1-3,6-6}, morekeywords={[21]{labeloffset, labelalign}}]
1913 \begin{pspicture}(3,1.8)
1914 \psset{beam, labeloffset=1}
1915 \optbox[labelalign=bl](0,1.5)(3,0.8){label}
1916 \psdot[style=CenterNode](\oenodeCenter{})
1917 \psdot[linecolor=red](\oenodeLabel{})
1918 \end{pspicture}
1919 \end{LTXexample}
1920 % \iffalse
1921 %</ignore>
1922 % \fi
1923 % \numitem[0]{labelangle}
1924 % \ifGERMAN
1925 % Der Rotationswinkel des Beschriftungsknotens um die Mitte. Der Nullpunkt hängt
1926 % sowohl von der jeweiligen Komponenten und dem gewählten Referenzsystem ab
1927 % (siehe \Lkeyword{labelref}).
1928 % \fi
1929 % \ifENGLISH
1930 % The rotation angle of the label node around the component center. The origin
1931 % depends both on the component and the choosen reference system (see
1932 % \Lkeyword{labelref}).
1933 % \fi
1934 %
1935 % \iffalse
1936 %<*ignore>
1937 % \fi
1938 \begin{LTXexample}[linerange={1-2,4-6,27-27}, morekeywords={[21]{labelangle}}]
1939 \begin{pspicture}(-0.3,0)(2,3.7)
1940 \psset{labeloffset=1, optboxwidth=1, arrowscale=1.5, arrowinset=0}
1941 \begin{optexp}
1942 \optbox[position=end, labelangle=90](1,1)(1,2){Box}
1943 \beamsplitter[labelangle=-90](1,2)(1,1)(2,1){BS}
1944 \drawbeam[arrows=->]{1}{2}(2,1)
1945 \frontlayer{%
1946 \psdot[style=CenterNode](\oenodeCenter{1})
1947 \psdot[style=CenterNode](\oenodeCenter{2})
1948 \psdot[linecolor=red](\oenodeLabel{1})
1949 \psdot[linecolor=red](\oenodeLabel{2})
1950 }
1951 \backlayer{%
1952 \bgroup
1953 \psset{style=Refline}
1954 \psline(\oenodeCenter{2})([offset=-1]\oenodeCenter{2})
1955 \psline(\oenodeCenter{2})([Xnodesep=-1]\oenodeCenter{2})
1956 \psarc[arrows=<-](\oenodeCenter{2}){0.7}{180}{270}
1957 \uput{0.9}[-135](\oenodeCenter{2}){\small $-90$\textdegree}
1958 \psline(\oenodeCenter{1})([Xnodesep=1]\oenodeCenter{1})
1959 \psline(\oenodeCenter{1})([offset=1]\oenodeCenter{1})
1960 \psarc[arrows=->](\oenodeCenter{1}){0.7}{0}{90}
1961 \uput{0.9}[45](\oenodeCenter{1}){\small $90$\textdegree}
1962 \egroup
1963 }
1964 \end{optexp}
1965 \end{pspicture}
1966 \end{LTXexample}
1967 % \iffalse
1968 %</ignore>
1969 % \fi
1970 %
1971 % \choitem[relgrav]{labelref}{relative, relgrav, global, absolute}
1972 % \ifGERMAN
1973 % Wählt das Bezugssystem für \Lkeyword{labelangle} und die Orientierung der
1974 % Beschriftung.
1975 % \fi
1976 % \ifENGLISH
1977 % Set the reference coordinate system for the \Lkeyword{labelangle} and the
1978 % orientation of the label text.
1979 % \fi
1980 %
1981 % \begin{valuelist}
1982 % \item[relative]
1983 % \ifGERMAN Die Beschriftung ist parallel zu der Referenzlinie der
1984 % Komponente und der Winkel wird immer auf den Bereich zwischen $-90$° und
1985 % $+90$° zurückgerechnet.
1986 % \fi
1987 % \ifENGLISH The label is parallel to the component reference line and the
1988 % actual angle is always projected to the range between $-90$° and $+90$°.
1989 % \fi
1990 % \iffalse
1991 %<*ignore>
1992 % \fi
1993 \begin{LTXexample}[morekeywords={[21]{labelref}}]
1994 \begin{pspicture}(0,-2.2)(2,2.2)
1995 \psset{position=end, optboxsize=1 0.6, labeloffset=0, labelref=relative}
1996 \multido{\i=0+45}{8}{%
1997 \optbox(0,0)(1;\i){\i}
1998 }
1999 \end{pspicture}
2000 \end{LTXexample}
2001 % \iffalse
2002 %</ignore>
2003 % \fi
2004 %
2005 % \item[relgrav]
2006 % \ifGERMAN Die Beschriftung ist immer horizontal, lediglich der
2007 % Beschriftungsknoten wird zusammen mit der Komponente gedreht.
2008 % \fi
2009 % \ifENGLISH The label itself is always horizontal, only the label node is
2010 % rotated together with the component.
2011 % \fi
2012 % \iffalse
2013 %<*ignore>
2014 % \fi
2015 \begin{LTXexample}[morekeywords={[21]{labelref}}]
2016 \begin{pspicture}(0,-2.2)(2,2.2)
2017 \psset{position=end, optboxsize=1 0.6, labelref=relgrav}
2018 \multido{\i=0+72}{5}{%
2019 \optbox(0,0)(1;\i){\i}
2020 }
2021 \end{pspicture}
2022 \end{LTXexample}
2023 % \iffalse
2024 %</ignore>
2025 % \fi
2026 %
2027 % \item[global, absolute]
2028 % \ifGERMAN Die Beschriftung ist unabhängig von der Komponentenausrichtung.\fi
2029 % \ifENGLISH The label is independent of the component alignment.\fi
2030 % \iffalse
2031 %<*ignore>
2032 % \fi
2033 \begin{LTXexample}[morekeywords={[21]{labelref}}]
2034 \begin{pspicture}(0,-2.2)(2,2.2)
2035 \psset{position=end, optboxsize=1 0.6, labelref=global}
2036 \multido{\i=0+72}{5}{%
2037 \optbox(0,0)(1;\i){\i}
2038 }
2039 \end{pspicture}
2040 \end{LTXexample}
2041 % \iffalse
2042 %</ignore>
2043 % \fi
2044 % \end{valuelist}
2045 %
2046 % \optitem{label}{\prm{offset}[ \prm{angle}[ \prm{refpoint}[ \prm{labelref}]]]}
2047 % \ifGERMAN
2048 % Diese Option erlaubt die kompakte Definition mehrerer
2049 % Beschriftungsparameter. Es können bis zu vier Leerzeichen-getrennte
2050 % Argumente übergeben werden (\Lkeyword{labeloffset},
2051 % \Lkeyword{labelangle}, \Lkeyword{labelalign} und
2052 % \Lkeyword{labelref}). Mit einem Punkt kann eine Option übersprungen
2053 % werden.
2054 % \fi
2055 % \ifENGLISH
2056 % Allows compact definition of several label parameters. It takes up to
2057 % four space-separated arguments (\Lkeyword{labeloffset},
2058 % \Lkeyword{labelangle}, \Lkeyword{labelalign}, and
2059 % \Lkeyword{labelref}). Unchanged intermediate arguments can be
2060 % skipped with a dot.
2061 % \fi
2062 % \iffalse
2063 %<*ignore>
2064 % \fi
2065 \begin{LTXexample}[morekeywords={[21]{label}}]
2066 \begin{pspicture}(0,0)(4,3)
2067 \psset{endbox, beam}
2068 \optbox[label=0.7](1.5,2.5)(2.5,2.5){box}
2069 \optbox[label=1 -45](1.5,1)(2.5,1){$-45$}
2070 \optbox[label=0 . . relative]%
2071 (0.6,0.6)(0.6,1.6){relative}
2072 \end{pspicture}
2073 \end{LTXexample}
2074 % \iffalse
2075 %</ignore>
2076 % \fi
2077 % \choitem{innerlabel}{true}
2078 % \ifGERMAN Das ist ein Alias für \opt{label=0 .\ c relative}\fi
2079 % \ifENGLISH This is an alias for \opt{label=0 .\ c relative}\fi
2080 % \end{optionlist}
2081 %
2082 %
2083 %
2084 % \ifGERMAN\section{Positionierung}\fi
2085 % \ifENGLISH\section{Positioning}\fi
2086 % \label{sec:positioning}
2087 %
2088 % \ifGERMAN
2089 % Alle Komponenten außer den Freistrahl-Dreipolen können zwischen ihren
2090 % beiden Referenzknoten \Lcs{oenodeRefA} und \Lcs{oenodeRefB}
2091 % positioniert werden.
2092 % \fi
2093 % \ifENGLISH
2094 % All components except for the free-ray tripoles can be positioned between
2095 % their two reference nodes \Lcs{oenodeRefA} and \Lcs{oenodeRefB}.
2096 % \fi
2097 % \begin{optionlist}
2098 % \choitem{position}{\prm{num},start,end}
2099 % \ifGERMAN
2100 % Ist der Wert eine Zahl, so wird damit die relative Position der Mitte eines
2101 % Objektes (blaues Kreuz) bezüglich seiner beiden Referenzknoten (schwarze
2102 % Punkte) gesetzt. Das ist äquivalent zum \Lkeyword*{npos} Parameter von
2103 % \Lcs*{ncput}, d.h. eine Zahl im Intervall $[0,1]$ (siehe \LPack{pst-node}
2104 % Dokumentation\fnurl{http://mirror.ctan.org/help/Catalogue/entries/pst-node.html}).
2105 % \fi
2106 % \ifENGLISH Controls the relative position of an object center (blue cross)
2107 % between its two reference points (black dots), if the value is a number. In
2108 % this case it is equivalent to the \Lkeyword*{npos} parameter of
2109 % \Lcs*{ncput}, i.e. a number in the range $[0,1]$ (see \LPack{pst-node}
2110 % documentation\fnurl{http://mirror.ctan.org/help/Catalogue/entries/pst-node.html}).
2111 % \fi
2112 % \iffalse
2113 %<*ignore>
2114 % \fi
2115 \begin{LTXexample}[morekeywords={[21]{position}}, linerange={1-2,5-5}]
2116 \begin{pspicture}(3,1.5)
2117 \lens[beam, position=0.8](0,1)(3,1){L}
2118 \psdot(\oenodeRefA{})\psdot(\oenodeRefB{})
2119 \psdot[style=CenterNode](\oenodeCenter{})
2120 \end{pspicture}
2121 \end{LTXexample}
2122 % \iffalse
2123 %</ignore>
2124 % \fi
2125 %
2126 % \ifGERMAN
2127 % Der Wert \opt{start} setzt ein Objekt an den Anfang, \opt{end} ans Ende der
2128 % Referenzlinie, so dass die entsprechende Grenzfläche auf dem Referenzknoten
2129 % (schwarzer Punkt) liegt, und nicht die Mitte des Objektes (blaues Kreuz), wie
2130 % es mit \opt{position=1} bzw. \opt{position=0} der Fall wäre. Unter Verwendung
2131 % von Zahlen wäre dieses Verhalten deutlich schwieriger und weniger flexibel zu
2132 % erreichen, da die Größe und Form des Objektes berücksichtigt werden muss.
2133 % \fi
2134 % \ifENGLISH
2135 % The values \opt{start} and \opt{end} place an object at the start or end of
2136 % the reference line, respectively. The respective object interface is placed on
2137 % the respective reference node (black dot) instead of the object center (blue
2138 % cross) which would be the case for \opt{position=0} or
2139 % \opt{position=1}. Achieving this with numerical values would me more difficult
2140 % and unflexible, because the object size and shape must be taken into account.
2141 % \fi
2142 % \iffalse
2143 %<*ignore>
2144 % \fi
2145 \begin{LTXexample}[morekeywords={[21]{position}}, linerange={1-4,8-8}]
2146 \begin{pspicture}(3,2)
2147 \pnodes(0.5,1){A}(2.5,1){B}\psdot(A)\psdot(B)
2148 \optbox[optboxsize=0.5 0.5, position=start](A)(B)
2149 \lens[position=end](A)(B)
2150 \psline[style=Refline](A)(B)
2151 \psdot[style=CenterNode](\oenodeCenter{1})
2152 \psdot[style=CenterNode](\oenodeCenter{2})
2153 \end{pspicture}
2154 \end{LTXexample}
2155 % \iffalse
2156 %</ignore>
2157 % \fi
2158 %
2159 % \ifGERMAN Hier ist im Vergleich dazu die Positionierung mit
2160 % \opt{position=0}/\opt{1}.
2161 % \fi
2162 % \ifENGLISH Here is for comparison the positioning with
2163 % \opt{position=0}/\opt{1}.
2164 % \fi
2165 % \iffalse
2166 %<*ignore>
2167 % \fi
2168 \begin{LTXexample}[morekeywords={[21]{position}}, linerange={1-4,8-8}]
2169 \begin{pspicture}(3,2)
2170 \pnodes(0.5,1){A}(2.5,1){B}\psdot(A)\psdot(B)
2171 \optbox[optboxsize=0.5 0.5, position=0](A)(B)
2172 \lens[position=1](A)(B)
2173 \psline[style=Refline](A)(B)
2174 \psdot[style=CenterNode](\oenodeCenter{1})
2175 \psdot[style=CenterNode](\oenodeCenter{2})
2176 \end{pspicture}
2177 \end{LTXexample}
2178 % \iffalse
2179 %</ignore>
2180 % \fi
2181 %
2182 % \choitem{abspos}{\prm{num},start,end}
2183 % \ifGERMAN
2184 % Eine Zahl setzt die absolute Position eines Objektes auf der
2185 % Referenzlinie. Die Werte \opt{start} und \opt{end} werden identisch wie bei
2186 % \Lkeyword{position} behandelt.
2187 % \fi
2188 % \ifENGLISH
2189 % Controls the absolute position of an object on the reference line. The values
2190 % \opt{start} and \opt{end} are handled identically to \Lkeyword{position}.
2191 % \fi
2192 % \iffalse
2193 %<*ignore>
2194 % \fi
2195 \begin{LTXexample}[morekeywords={[21]{abspos}}, linerange={1-2,5-5}]
2196 \begin{pspicture}(3,1.5)
2197 \lens[beam, abspos=1](0,1)(3,1){L}
2198 \psdot(\oenodeRefA{})\psdot(\oenodeRefB{})
2199 \psdot[style=CenterNode](\oenodeCenter{})
2200 \end{pspicture}
2201 \end{LTXexample}
2202 % \iffalse
2203 %</ignore>
2204 % \fi
2205 %
2206 % \boolitem{endbox}
2207 % \ifGERMAN Dieser Parameter sollte nicht mehr verwendet werden, er ist
2208 % äquivalent zu \Lkeyword{position}\opt{=end}.
2209 % \fi
2210 % \ifENGLISH This parameter should not be used any more, it is
2211 % equivalent to \Lkeyword{position}\opt{=end}.
2212 % \fi
2213 % \end{optionlist}
2214 %
2215 %
2216 %
2217 % \ifGERMAN\section{Drehen und Verschieben}\fi
2218 % \ifENGLISH\section{Rotating and shifting}\fi
2219 % \label{sec:rotshift}
2220 %
2221 % \ifGERMAN
2222 % Alle Komponenten können versetzt und um verschiedene Bezugspunkte
2223 % gedreht werden.
2224 %
2225 % Beachten Sie, dass mit den Komponenten auch die Grenzflächenknoten
2226 % (\prettyref{sec:ifcnode}, in den folgenden Beispielen mit blauen Kreuzen
2227 % markiert) transformiert werden, wodurch Verbindungen beinflußt werden. Die
2228 % transformierten Referenzknoten sind als eigene Knoten verfügbar
2229 % (\prettyref{sec:refnode}).
2230 % \fi
2231 % \ifENGLISH
2232 % All components can be shifted and rotated around different reference nodes.
2233 %
2234 % Please note, that together with the components also their interface nodes
2235 % (\prettyref{sec:ifcnode}, marked as blue crosses in the following examples)
2236 % are transformed, which may impact the connections. The transformed reference
2237 % nodes are accessible as new nodes (\prettyref{sec:refnode}).
2238 % \fi
2239 %
2240 % \begin{optionlist}
2241 % \psnumitem[0]{angle}
2242 % \ifGERMAN Dreht eine Komponente um den Winkel \prm{num} (in Grad). Die
2243 % Ausgangsposition ist grau gestrichelt eingezeichnet.
2244 % \fi
2245 % \ifENGLISH Rotate a component by an angle \prm{num} (in degree). The original
2246 % position is drawn gray dashed.
2247 % \fi
2248 % \iffalse
2249 %<*ignore>
2250 % \fi
2251 \begin{LTXexample}[linerange={1-2,4-4,10-10}, morekeywords={[21]{angle}}]
2252 \begin{pspicture}(3,2)
2253 \pnodes(0,1){A}(2.7,1){B}
2254 \optbox[addtoOptComp={style=Refline, linestyle=dashed}](A)(B)
2255 \optbox[angle=20, innerlabel](A)(B){box}
2256 \psline[style=Refline](\oenodeRefA{})(\oenodeRefB{})
2257 \psdot(\oenodeRefA{})\uput[-90](\oenodeRefA{}){RefA}
2258 \psdot(\oenodeRefB{})\uput[-90](\oenodeRefB{}){RefB}
2259 \psdot[style=CenterNode](\oenodeIn{})
2260 \psdot[style=CenterNode](\oenodeOut{})
2261 \end{pspicture}
2262 \end{LTXexample}
2263 %\iffalse
2264 %</ignore>
2265 %\fi
2266 %
2267 % \valitem[c]{rotateref}{refpoint}
2268 % \ifGERMAN
2269 % Setzt den Bezugspunkt für die Drehung der Komponente. Bitte lesen Sie
2270 % \prettyref{sec:rotrefnode} für eine genauere Beschreibung und entnehmen Sie
2271 % \prettyref{sec:overview-extnode} die möglichen Bezugspunkte für alle
2272 % Komponenten. Die Ausgangsposition ist grau gestrichelt eingezeichnet.
2273 % \fi
2274 % \ifENGLISH
2275 % Set the reference point for the rotation of the component. Please see
2276 % \prettyref{sec:rotrefnode} for a detailed explanation and
2277 % \prettyref{sec:overview-extnode} for a list of the possible reference nodes of
2278 % all components. The original position is drawn gray dashed.
2279 % \fi
2280 % \iffalse
2281 %<*ignore>
2282 % \fi
2283 \begin{LTXexample}[linerange={1-2,4-4,10-10}, morekeywords={[21]{angle,rotateref}}]
2284 \begin{pspicture}(3,2)
2285 \pnodes(0,1){A}(2.7,1){B}
2286 \optbox[addtoOptComp={style=Refline, linestyle=dashed}](A)(B)
2287 \optbox[angle=20, rotateref=bl, innerlabel](A)(B){box}
2288 \psline[style=Refline](\oenodeRefA{})(\oenodeRefB{})
2289 \psdot(\oenodeRefA{})\uput[-90](\oenodeRefA{}){RefA}
2290 \psdot(\oenodeRefB{})\uput[-90](\oenodeRefB{}){RefB}
2291 \psdot[style=CenterNode](\oenodeIn{})
2292 \psdot[style=CenterNode](\oenodeOut{})
2293 \end{pspicture}
2294 \end{LTXexample}
2295 %\iffalse
2296 %</ignore>
2297 %\fi
2298 %
2299 % \numitem[0]{compshift}
2300 % \ifGERMAN Verschiebt eine Komponente vertikal bezüglich ihrer Referenzlinie
2301 % (siehe \prettyref{sec:refnode}). Reflektive Komponenten werden entlang der
2302 % reflektiven Grenzfläche verschoben.
2303 % \fi
2304 % \ifENGLISH
2305 % Shift a component perpendicular to its reference line (see
2306 % \prettyref{sec:refnode}). For reflective components it is shifted along the
2307 % reflective interface.
2308 % \fi
2309 % \iffalse
2310 %<*ignore>
2311 % \fi
2312 \begin{LTXexample}[linerange={1-3,10-10}, morekeywords={[21]{compshift}}]
2313 \begin{pspicture}(4,2)
2314 \pnodes(0.4, 0.5){A}(3.6,0.5){B}
2315 \lens[lens=2 2 2, compshift=0.5](A)(B)
2316 \psline[style=Refline, linestyle=dashed](\oenodeRefA{})(\oenodeRefB{})
2317 \psdot(\oenodeRefA{})\uput[-90](\oenodeRefA{}){RefA}
2318 \psdot(\oenodeRefB{})\uput[-90](\oenodeRefB{}){RefB}
2319 \psdot[style=CenterNode](\oenodeIn{})
2320 \psdot[style=CenterNode](\oenodeOut{})
2321 \psline[linecolor=DOrange, arrows=|->, arrowscale=1.5, arrowinset=0](\oenodeCenter{}|A)(\oenodeCenter{})
2322 \end{pspicture}
2323 \end{LTXexample}
2324 \begin{LTXexample}[linerange={1-3,9-9}, morekeywords={[21]{compshift}}]
2325 \begin{pspicture}(4,2)
2326 \pnodes(0.4,1.2){A}(3,0.2){B}
2327 \mirror[compshift=0.5](A)(B|A)(B)
2328 \psline[style=Refline, linestyle=dashed](\oenodeRefA{})(\oenodeRefB{}|\oenodeRefA{})(\oenodeRefB{})
2329 \psdot(\oenodeRefA{})\uput[-90](\oenodeRefA{}){RefA}
2330 \psdot(\oenodeRefB{})\uput[0](\oenodeRefB{}){RefB}
2331 \psdot[style=CenterNode](\oenodeIn{})
2332 \psline[linecolor=DOrange, arrows=|->, arrowscale=1.5, arrowinset=0](B|A)(\oenodeCenter{})
2333 \end{pspicture}
2334 \end{LTXexample}
2335 % \iffalse
2336 %</ignore>
2337 % \fi
2338 %
2339 % \numitem[0]{compoffset}
2340 % \ifGERMAN Verschiebt eine Komponente vertikal bezüglich ihrer
2341 % Referenzlinie (siehe \prettyref{sec:refnode}). Reflektierende
2342 % Komponenten werden entlang der reflektiven Grenzfläche verschoben. Die
2343 % Verschiebung erfolgt also senkrecht zu einer Verschiebung mit
2344 % \Lkeyword{compshift}. Ein Anwendungsbeispiel ist
2345 % \prettyref{ex:autocorrelation}.
2346 % \fi
2347 % \ifENGLISH
2348 % Shift a component perpendicular to its reference line (see
2349 % \prettyref{sec:refnode}). For reflective components it is shifted
2350 % along the reflective interface. The displacement is vertical to a
2351 % displacement with \Lkeyword{compshift}. For an example see
2352 % \prettyref{ex:autocorrelation}.
2353 % \fi
2354 % \iffalse
2355 %<*ignore>
2356 % \fi
2357 \begin{LTXexample}[linerange={1-3,10-10}, morekeywords={[21]{compoffset}}]
2358 \begin{pspicture}(4,2)
2359 \pnodes(0.4, 1){A}(3.6, 1){B}
2360 \lens[lens=2 2 2, compoffset=0.5](A)(B)
2361 \psline[style=Refline, linestyle=dashed](\oenodeRefA{})(\oenodeRefB{})
2362 \psdot(\oenodeRefA{})\uput[-90](\oenodeRefA{}){RefA}
2363 \psdot(\oenodeRefB{})\uput[-90](\oenodeRefB{}){RefB}
2364 \psdot[style=CenterNode](\oenodeIn{})
2365 \psdot[style=CenterNode](\oenodeOut{})
2366 \psline[linecolor=DOrange, arrows=|->, arrowscale=1.5, arrowinset=0]([Xnodesep=-0.5]\oenodeCenter{})(\oenodeCenter{})
2367 \end{pspicture}
2368 \end{LTXexample}
2369 \begin{LTXexample}[linerange={1-3,9-9}, morekeywords={[21]{compoffset}}]
2370 \begin{pspicture}(4,2)
2371 \pnodes(0.4,1.2){A}(3,0.2){B}
2372 \mirror[compoffset=0.5](A)(B|A)(B)
2373 \psline[style=Refline, linestyle=dashed](\oenodeRefA{})(\oenodeRefB{}|\oenodeRefA{})(\oenodeRefB{})
2374 \psdot(\oenodeRefA{})\uput[-90](\oenodeRefA{}){RefA}
2375 \psdot(\oenodeRefB{})\uput[0](\oenodeRefB{}){RefB}
2376 \psdot[style=CenterNode](\oenodeIn{})
2377 \psline[linecolor=DOrange, arrows=|->, arrowscale=1.5, arrowinset=0](B|A)(\oenodeCenter{})
2378 \end{pspicture}
2379 \end{LTXexample}
2380 % \iffalse
2381 %</ignore>
2382 % \fi
2383 % \choitem{innercompalign}{rel, relative, abs, absolute}
2384 % \ifGERMAN Ist dieser Parameter auf \opt{absolute} gesetzt, so wird das
2385 % «Innere» einer Komponente nicht mitgedreht. Diese Option wird derzeit
2386 % von \Lcomp{optfilter}, \Lcomp{elecsynthesizer} und \Lcomp{optdipole} verwendet.
2387 % \fi
2388 % \ifENGLISH If this parameter is set to \opt{absolute}, the «inner»
2389 % component part is not rotated with the component. At the moment, this
2390 % option is used by \Lcomp{optfilter}, \Lcomp{elecsynthesizer}, and \Lcomp{optdipole}.
2391 % \fi
2392 % \iffalse
2393 %<*ignore>
2394 % \fi
2395 \begin{LTXexample}
2396 \begin{pspicture}(3,2)
2397 \psset[optexp]{labelangle=-90}
2398 \elecsynthesizer[innercompalign=rel](0.5,1.2)(0.5,2){rel}
2399 \elecsynthesizer[innercompalign=abs](2.5,1.2)(2.5,2){abs}
2400 \end{pspicture}
2401 \end{LTXexample}
2402 % \iffalse
2403 %</ignore>
2404 % \fi
2405 % \end{optionlist}
2406 %
2407 %
2408 % \ifGERMAN\section{Verwendung von Stilen}\fi
2409 % \ifENGLISH\section{Using psstyles}\fi\label{sec:styles}
2410 %
2411 % \ifGERMAN
2412 % Stile sind benutzerdefinierte Grafik-Konfigurationen für
2413 % PSTricks-Objekte. Das \LPack{pst-optexp}-Paket macht umfangreichen
2414 % Gebrauch von Stilen um einzelne, logische Bereiche von Komponenten
2415 % flexibel gestalten zu können, was über das optionale Argument meistens
2416 % nicht möglich ist.
2417 %
2418 % Vorhandene Stile können mit \Lcs*{addtopsstyle} erweitert und mit
2419 % \Lcs*{newpsstyle} überschrieben werden.
2420 %
2421 % Als Beispiel nehmen wir einen \opt{extended} Spiegel und möchten nur
2422 % den «extended»-Teil verändern. Hierfür wird der Stil
2423 % \Lstyle{ExtendedMirror} bereitgestellt:
2424 % \fi
2425 % \ifENGLISH
2426 % Psstyles are custom graphics parameter configurations for PSTricks
2427 % objects. The \LPack{pst-optexp} package makes extensive use of styles
2428 % to facilitate flexible design of single, logical parts of
2429 % components. This is in general not possible with the optional
2430 % argument.
2431 %
2432 % Existing styles can be extended with \Lcs*{addtopsstyle} and
2433 % overwritten with \Lcs*{newpsstyle}.
2434 %
2435 % As example we consider an \opt{extended} mirror and want to change
2436 % only the «extended» part which is controlable with the
2437 % \Lstyle{ExtendedMirror} style:
2438 % \fi
2439 % \iffalse
2440 %<*ignore>
2441 % \fi
2442 \begin{LTXexample}
2443 \begin{pspicture}(3,2)
2444 \addtopsstyle{ExtendedMirror}{hatchcolor=red}
2445 \mirror[mirrortype=extended, beam](0,0)(2,1.5)(0,2)
2446 \end{pspicture}
2447 \end{LTXexample}
2448 % \iffalse
2449 %</ignore>
2450 % \fi
2451 % \ifGERMAN
2452 % Die veränderbaren Unterbereiche einer Komponente sind in der
2453 % jeweiligen Referenz zu finden.
2454 % \fi
2455 % \ifENGLISH
2456 % The changeable parts of each component are listed in the respective
2457 % reference.
2458 % \fi
2459 %
2460 %
2461 %
2462 % \ifGERMAN\section{Aussehen der Komponenten}\fi
2463 % \ifENGLISH\section{Component appearance}\fi
2464 % \label{sec:appearance}
2465 %
2466 % \begin{stylelist}
2467 % \styleitem{OptComp}
2468 % \ifGERMAN
2469 % Bestimmt das grundlegende Aussehen aller optischen Komponenten. Die
2470 % üblichen Parameter, wie z.B. \opt{linestyle}, würden auch die
2471 % Verbindungen beeinflussen, die mit der Komponente zusammen gezeichnet
2472 % werden (\Lkeyword{beam}, \Lkeyword{fiber} usw.). Mit
2473 % \Lkeyword{newOptComp} und \Lkeyword{addtoOptComp} kann der Stil für
2474 % einzelne Komponenten oder zusammen mit \Lcs*{newpsobject} im optionalen
2475 % Argument verwendet werden.
2476 % \fi
2477 % \ifENGLISH
2478 % Affects the basic appearence of all optical components. Using standard
2479 % graphics parameters like e.g.\ \opt{linestyle} would change also the
2480 % connections that are drawn together with the component
2481 % (\Lkeyword{beam}, \Lkeyword{fiber} etc.). Use the key
2482 % \Lkeyword{newOptComp} and \Lkeyword{addtoOptComp} to change the style
2483 % for single components or for use with \Lcs*{newpsobject} via the
2484 % optional argument.
2485 % \fi
2486 % \iffalse
2487 %<*ignore>
2488 % \fi
2489 \ifGERMAN
2490 \begin{LTXexample}[morekeywords={[21]{addtoOptComp}}]
2491 \begin{pspicture}(2.5,4)
2492 \psset{beam}
2493 % falsch, die Strahlbreite wird auch geaendert
2494 \mirror[linewidth=3\pslinewidth](0,3)(2,3)(2,2)
2495 % korrektes Ergebnis
2496 \addtopsstyle{OptComp}{linewidth=3\pslinewidth}
2497 \mirror(0,1)(2,1)(2,0)
2498 \end{pspicture}
2499 \end{LTXexample}
2500 \fi\ifENGLISH
2501 \begin{LTXexample}[morekeywords={[21]{addtoOptComp}}]
2502 \begin{pspicture}(2.5,4)
2503 \psset{beam}
2504 % wrong, also beam width is changed
2505 \mirror[linewidth=3\pslinewidth](0,3)(2,3)(2,2)
2506 % correct result
2507 \addtopsstyle{OptComp}{linewidth=3\pslinewidth}
2508 \mirror(0,1)(2,1)(2,0)
2509 \end{pspicture}
2510 \end{LTXexample}
2511 \fi
2512 % \iffalse
2513 %</ignore>
2514 % \fi
2515 %
2516 % \styleitem[linestyle=dashed,dash=1.5pt 1pt]{OptionalStyle}
2517 % \ifGERMAN
2518 % Der Stil wird zusätzlich zu \Lstyle{OptComp} auf Komponenten angewendet,
2519 % die als \Lkeyword{optional} markiert sind.
2520 % \fi
2521 % \ifENGLISH
2522 % This style is applied to components marked as \Lkeyword{optional} in addition
2523 % to \Lstyle{OptComp}.
2524 % \fi
2525 % \iffalse
2526 %<*ignore>
2527 % \fi
2528 \begin{LTXexample}[morekeywords={[21]{optional}}]
2529 \begin{pspicture}(3,1.5)
2530 \lens[optional, beam](0,1)(3,1)
2531 \end{pspicture}
2532 \end{LTXexample}
2533 % \iffalse
2534 %</ignore>
2535 % \fi
2536 %
2537 % \ifGERMAN
2538 % \Lstyle{OptionalStyle} wird nach \Lstyle{OptComp} angewendet, so dass
2539 % einzelne Einstellungen überschrieben werden können.
2540 % \fi
2541 % \ifENGLISH
2542 % \Lstyle{OptionalStyle} is applied after \Lstyle{OptComp} so that it
2543 % can overwrite the general settings.
2544 % \fi
2545 %
2546 % \iffalse
2547 %<*ignore>
2548 % \fi
2549 \ifGERMAN
2550 \begin{LTXexample}[morekeywords={[21]{OptComp, OptionalStyle, optional}}]
2551 \begin{pspicture}(3,1.5)
2552 \addtopsstyle{OptComp}{linewidth=3\pslinewidth, linecolor=red}
2553 \newpsstyle{OptionalStyle}{linecolor=blue}
2554 \lens(0,1)(2,1)
2555 % Linienfarbe wird ueberschrieben, die Linienbreite nicht.
2556 \lens[optional](0,1)(3,1)
2557 \end{pspicture}
2558 \end{LTXexample}
2559 \fi\ifENGLISH
2560 \begin{LTXexample}[morekeywords={[21]{OptComp, OptionalStyle, optional}}]
2561 \begin{pspicture}(3,1.5)
2562 \addtopsstyle{OptComp}{linewidth=3\pslinewidth, linecolor=red}
2563 \newpsstyle{OptionalStyle}{linecolor=blue}
2564 \lens(0,1)(2,1)
2565 % linecolor overwritten, linewidth kept
2566 \lens[optional](0,1)(3,1)
2567 \end{pspicture}
2568 \end{LTXexample}
2569 \fi
2570 % \iffalse
2571 %</ignore>
2572 % \fi
2573 %
2574 % \styleitem[linewidth=0.8\cs{pslinewidth}, arrowinset=0, arrowscale=0.8, arrows=<->]{VariableStyle}
2575 % \ifGERMAN Der Stil der Pfeile für verstellbare Komponenten (\Lcomp{mirror} und
2576 % \Lcomp{optgrating}).
2577 % \fi
2578 % \ifENGLISH The style of the arrows of variable components (\Lcomp{mirror} and
2579 % \Lcomp{optgrating}).
2580 % \fi
2581 % \end{stylelist}
2582 %
2583 % \begin{optionlist}
2584 % \valitem{addtoOptComp}{list}
2585 % \addtostylemsg{OptComp}
2586 %
2587 % \valitem{newOptComp}{list}
2588 % \newstylemsg{OptComp}
2589 %
2590 % \iffalse
2591 %<*ignore>
2592 % \fi
2593 \ifGERMAN
2594 \begin{LTXexample}[morekeywords={[21]{addtoOptComp,newOptComp}}]
2595 \begin{pspicture}(3,1.5)
2596 \psset{beam}
2597 \newpsstyle{OptComp}{linewidth=3\pslinewidth}
2598 \mirror[addtoOptComp={linestyle=dotted}](0.5,0)(0.5,1)(1.5,1)
2599 % Ueberschreibt linewidth-Einstellungen
2600 \mirror[newOptComp={linestyle=dotted}](1.5,1)(2.5,1)(2.5,0)
2601 \end{pspicture}
2602 \end{LTXexample}
2603 \fi
2604 \ifENGLISH
2605 \begin{LTXexample}[morekeywords={[21]{addtoOptComp,newOptComp}}]
2606 \begin{pspicture}(3,1.5)
2607 \psset{beam}
2608 \newpsstyle{OptComp}{linewidth=3\pslinewidth}
2609 \mirror[addtoOptComp={linestyle=dotted}](0.5,0)(0.5,1)(1.5,1)
2610 % overwrites the linewidth settings
2611 \mirror[newOptComp={linestyle=dotted}](1.5,1)(2.5,1)(2.5,0)
2612 \end{pspicture}
2613 \end{LTXexample}
2614 \fi
2615 % \iffalse
2616 %</ignore>
2617 % \fi
2618 %
2619 % \boolitem[false]{optional}
2620 % \ifGERMAN
2621 % Markiert eine Komponente als optional indem der Stil
2622 % \Lstyle{OptionalStyle} angewendet wird.
2623 % \fi
2624 % \ifENGLISH
2625 % Mark an object as optional by applying the \Lstyle{OptionalStyle} style.
2626 % \fi
2627 % \end{optionlist}
2628 %
2629 % \ifGERMAN\chapter{Freistrahlkomponenten}\fi
2630 % \ifENGLISH\chapter{Free-ray components}\fi
2631 % \label{chap:freeraycomp}
2632 %
2633 % \ifGERMAN In diesem Kapitel werden alle Freistrahlkomponenten und deren
2634 % Parameter beschrieben. Freistrahlkomponenten können, im Gegensatz zu
2635 % Faserkomponenten, transmittive und reflektive Grenzflächen haben, die für
2636 % Raytracing von Lichtstrahlen verwendet werden können. Es gibt zwei
2637 % unterschiedliche Komponententypen: manche benötigen nur zwei Knoten um
2638 % positioniert zu werden (\compref{lens}--\compref{polarization}), wohingegen
2639 % z.B. Spiegel drei Knoten benötigen um korrekt ausgerichtet zu werden
2640 % (\compref{mirror}--\compref{pentaprism}).
2641 % \fi
2642 % \ifENGLISH This chapter describes all free-ray components and their
2643 % options. Free-ray components differ from fiber components in that they provide
2644 % transmittive or reflective interfaces which can be used to raytrace
2645 % beams. They are divided in two types: some components like lenses need only
2646 % two nodes for positioning (\compref{lens}--\compref{polarization}), whereas
2647 % e.g. mirrors require three nodes to determine the orientation
2648 % (\compref{mirror}--\compref{pentaprism}).
2649 % \fi
2650 %
2651 % \ifGERMAN\section{Linse}\fi
2652 % \ifENGLISH\section{Lens}\fi
2653 % \label{sec:lens}
2654 %
2655 % \begin{ltxsyntax}
2656 % \dipoledesc{lens}
2657 % \iffalse
2658 %<*ignore>
2659 % \fi
2660 \begin{LTXexample}
2661 \begin{pspicture}(3,1.5)
2662 \lens[beam](0,1)(3,1){L}
2663 \end{pspicture}
2664 \end{LTXexample}
2665 % \iffalse
2666 %</ignore>
2667 % \fi
2668 % \end{ltxsyntax}
2669 %
2670 % \ifENGLISH A lens is defined by its height and the radii of the input and
2671 % output interfaces.
2672 % \fi
2673 % \ifGERMAN Eine Linse wird durch ihre Höhe und die beiden Radien der Eingangs-
2674 % und Ausgangsflächen definiert.
2675 % \fi
2676 %
2677 % \begin{optionlist}
2678 % \numitem[1]{lensheight}
2679 % \ifGERMAN Setzt die Höhe der Linse.\fi
2680 % \ifENGLISH Set the height of the lens.\fi
2681 % \iffalse
2682 %<*ignore>
2683 % \fi
2684 \begin{LTXexample}[morekeywords={[21]{lensheight}}]
2685 \begin{pspicture}(3,1.5)
2686 \lens[beam](0,1)(3,1){L1}
2687 \lens[lensheight=0.5](2,1)(3,1){L2}
2688 \end{pspicture}
2689 \end{LTXexample}
2690 % \iffalse
2691 %</ignore>
2692 % \fi
2693 % \numitem[1]{lensradiusleft}
2694 % \ifGERMAN
2695 % Setzt den Radius der linken Linsengrenzfläche. Ein positiver Wert \prm{num}
2696 % ist für eine konvexe, ein negativer für eine konkave Krümmung. Null ergibt
2697 % eine ebene Fläche.
2698 % \fi
2699 % \ifENGLISH
2700 % Set the left radius of the lens. A positive \prm{num} is for convex, a
2701 % negative one for concave curvatures. Use zero for a plain surface.
2702 % \fi
2703 %
2704 % \numitem[1]{lensradiusright}
2705 % \ifGERMAN
2706 % Das Gleiche wie \Lkeyword{lensradiusleft}, nur für die rechte Grenzfläche.
2707 % \fi
2708 % \ifENGLISH
2709 % Same as \Lkeyword{lensradiusleft} but for the right surface.
2710 % \fi
2711 % \iffalse
2712 %<*ignore>
2713 % \fi
2714 \begin{LTXexample}[morekeywords={[21]{lensradiusleft, lensradiusright}}]
2715 \begin{pspicture}(3,1.5)
2716 \psset{lensradiusright=0, beam}
2717 \lens[lensradiusleft=1](0,1)(1.5,1){$R > 0$}
2718 \lens[lensradiusleft=-1](1.5,1)(3,1){$R < 0$}
2719 \end{pspicture}
2720 \end{LTXexample}
2721 % \iffalse
2722 %</ignore>
2723 % \fi
2724 %
2725 % \optitem{lensradius}{\prm{left}[ \prm{right}]}
2726 % \ifGERMAN
2727 % Setzt die linke und rechte Linsenkrümmung. Wird nur ein Wert angegeben, so
2728 % wird dieser für beide Krümmungen verwendet.
2729 % \fi
2730 % \ifENGLISH
2731 % Set the left and right lens curvatures. If only a single value is given, it is
2732 % used for both curvatures.
2733 % \fi
2734 % \iffalse
2735 %<*ignore>
2736 % \fi
2737 \begin{LTXexample}[morekeywords={[21]{lensradius}}]
2738 \begin{pspicture}(3,1.5)
2739 \lens[lensradius=-2, beam](0,1)(3,1)
2740 \end{pspicture}
2741 \end{LTXexample}
2742 % \iffalse
2743 %</ignore>
2744 % \fi
2745 %
2746 % \numitem[0]{lenswidth}
2747 % \ifGERMAN
2748 % Üblicherweise werden nur die Höhe und die beiden Radien für die
2749 % Konstruktion der Linse verwendet, die Mittenbreite wird automatisch
2750 % berechnet. Wenn \Lkeyword{lenswidth} auf einen Wert größer Null gesetzt wird,
2751 % wird diese Breite verwendet. Das ist nur sinnvoll, wenn dicke Linsen
2752 % gezeichnet werden sollen, da es andernfalls für zu kleine Werte zu unschönen
2753 % Ergebnissen führt.
2754 % \fi
2755 % \ifENGLISH
2756 % Usually only the height and the two radii are used to construct the lens,
2757 % the width is calculated automatically. For \Lkeyword{lenswidth} greater
2758 % than zero, this width is used instead. This is only useful if you want to draw
2759 % thick lenses and it can give ugly results if the value is choosen too
2760 % small.
2761 % \fi
2762 % \iffalse
2763 %<*ignore>
2764 % \fi
2765 \begin{LTXexample}[morekeywords={[21]{lenswidth}}]
2766 \begin{pspicture}(3,2)
2767 \lens[lenswidth=0.5, beam](0,1)(2,1){thick lens}
2768 \lens[lenswidth=0.1, beam](2,1)(3,1)
2769 \end{pspicture}
2770 \end{LTXexample}
2771 % \iffalse
2772 %</ignore>
2773 % \fi
2774 % \optitem{lens}{\prm{radiusleft}[ \prm{radiusright}[ \prm{height}[ \prm{width}]]]}
2775 % \ifGERMAN
2776 % Eine Option zum gleichzeitigen Setzen mehrerer Linsenparameter. Werte
2777 % mittendrin können mit einem Punkt übersprungen und Werte am Ende können
2778 % weggelassen werden (z.B. \opt{lens=. 1 1}).
2779 % \fi
2780 % \ifENGLISH
2781 % A convenience option to specify all lens parameters with a single
2782 % option. Intermediate values can be skipped with a dot, values at the end can
2783 % be omitted (e.g. \opt{lens=.\ 1 1}).
2784 % \fi
2785 % \iffalse
2786 %<*ignore>
2787 % \fi
2788 \begin{LTXexample}
2789 \begin{pspicture}(3,1.5)
2790 \lens[lens=1](0,1)(1,1){L1}
2791 \lens[lensradius=-2 1, beam](0,1)(3,1){L2}
2792 \lens[lens=2 -0.7 1.2](2,1)(3,1){L3}
2793 \end{pspicture}
2794 \end{LTXexample}
2795 % \iffalse
2796 %</ignore>
2797 % \fi
2798 %
2799 % \boolitem[false]{thicklens}
2800 % \ifENGLISH
2801 % This option was necessary until version 2.1 in order to draw a thick lens of
2802 % width \Lkeyword{lenswidth} instead of using the calculated lens width. This
2803 % option is superfluous since version 3.0 because setting \Lkeyword{lenswidth}
2804 % to a positive value automatically draws a thick lens.
2805 % \fi
2806 % \ifGERMAN
2807 % Diese Option was bis Version 2.1 notwendig um dicke Linsen der Breite
2808 % \Lkeyword{lenswidth} zu zeichnen, anstatt die berechnete Breite zu
2809 % verwenden. Seit Version 3.0 ist diese Option überflüssig, da dicke Linsen
2810 % gezeichnet werden, sobald \Lkeyword{lenswidth} auf einen positiven Wert
2811 % gesetzt wird.
2812 % \fi
2813 % \end{optionlist}
2814 %
2815 % \ifGERMAN\section{Asphärische Linse}\fi
2816 % \ifENGLISH\section{Aspheric lens}\fi
2817 %
2818 % \begin{ltxsyntax}
2819 % \dipoledesc{asphericlens}
2820 % \end{ltxsyntax}
2821 %
2822 % \ifGERMAN Eine asphärische Linse besitzt eine Oberfläche, deren Form durch die Gleichung
2823 % \begin{equation*}
2824 % z(y) = \frac{y^2}{R(1 + \sqrt{1 - (1+k)y^2/R^2})} + A_4y^4 + A_6y^6 + A_8y^8 + A_{10}y^{10}
2825 % \end{equation*}
2826 % gegeben ist. $z$ ist der Sagittalschnitt parallel zur optischen Achse,
2827 % $y$ der Abstand zur optischen Achse und $R$ der
2828 % Krümmungsradius. Desweiteren ist $k$ die konische Konstante und $A_4$,
2829 % $A_6$, $A_8$ und $A_{10}$ die Asphärenkoeffizienten der 4. bis
2830 % 10. Ordnung.
2831 % \fi
2832 % \begin{optionlist}
2833 % \numitem[1]{asphereheight}
2834 % \ifGERMAN Die Höhe der Linse.\fi
2835 % \ifENGLISH The lens height.\fi
2836 %
2837 % \numitem[0]{aspherewidth}
2838 % \ifGERMAN
2839 % Die Breite der Linse. Wird nur verwendet, wenn der angegebene Wert
2840 % über dem minimal berechneten liegt.
2841 % \fi
2842 % \ifENGLISH
2843 % The lens center thickness. Is use only, if the given value is larger
2844 % than the minimum calculated value.
2845 % \fi
2846 %
2847 % \numitem[1]{asphereradiusleft}
2848 % \ifGERMAN Der Krümmungsradius der linken, asphärischen Oberfläche.\fi
2849 % \ifENGLISH Curvature radius of the left, aspheric surface.\fi
2850 %
2851 % \numitem[0]{asphereradiusright}
2852 % \ifGERMAN
2853 % Der Krümmungsradius der rechten Oberfläche. Ist dieser gleich Null,
2854 % dann ist die Oberfläche plan.
2855 % \fi
2856 % \ifENGLISH
2857 % Curvature radius of the right surface. IF the value is zero, the
2858 % surface is plane.
2859 % \fi
2860 %
2861 % \numitem{asphereconstant}
2862 % \ifGERMAN Die konische Konstante $k$ der linken Oberfläche.\fi
2863 % \ifENGLISH The conic constant $k$ of the left surface.\fi
2864 %
2865 % \optitem{aspherecoefficients}{\prm{$A_4$} [\prm{$A_6$} [\prm{$A_8$} [\prm{$A_{10}$}]]]}
2866 % \ifGERMAN
2867 % Die Asphärenkoeffizienten $A_4$ bis $A_{10}$. Es können ein bis vier
2868 % Zahlen angegeben werden.
2869 % \fi
2870 % \ifENGLISH
2871 % The aspheric terms of fourth to tenth order. One to four values can be
2872 % specified.
2873 % \fi
2874 % \end{optionlist}
2875 %
2876 % \ifGERMAN
2877 % Als Beispiel nehmen wir die Parameter einer kommerziell erhältlichen
2878 % asphärische
2879 % Kondensorlinse\fnurl{http://www.thorlabs.de/thorproduct.cfm?partnumber=ACL25416U}:
2880 % \fi
2881 % \ifENGLISH
2882 % As example we use the parameters of a commercially available condensor
2883 % lens\fnurl{http://www.thorlabs.de/thorproduct.cfm?partnumber=ACL25416U}:
2884 % \fi
2885 % \iffalse
2886 %<*ignore>
2887 % \fi
2888 \begin{LTXexample}
2889 \begin{pspicture}(0,-0.3)(5,2.3)
2890 \pnodes(0,1){A}(5,1){B}
2891 \asphericlens[%
2892 plotstyle=cspline,
2893 asphereheight=2.54,
2894 aspherewidth=1.4,
2895 asphereradiusleft=0.8818197,
2896 aspherecoefficients=8.682e-3 6.376e-3 2.4073e-2 -1.719e-2,
2897 asphereconstant=-0.9992,
2898 asphereradiusright=6.99995](A)(B)
2899 \multido{\r=-1+0.1}{21}{%
2900 \drawbeam[beampos=\r, linewidth=0.3\pslinewidth](A){}(B)}
2901 \end{pspicture}
2902 \end{LTXexample}
2903 % \iffalse
2904 %</ignore>
2905 % \fi
2906 %
2907 % \ifGERMAN Ein weiteres Beispiel zeigt anschaulich den Unterschied
2908 % einer asphärischen Linsen zu einer sphärischen Linse mit gleichem
2909 % Krümmungsradius:
2910 % \fi
2911 % \ifENGLISH
2912 % Another example illustrates the difference between an aspheric lens an
2913 % a spheric lens with equal curvature:
2914 % \fi
2915 % \iffalse
2916 %<*ignore>
2917 % \fi
2918 \begin{LTXexample}[pos=t,linerange={2-11}]
2919 \psset{unit=0.5cm}
2920 \begin{pspicture*}(15,8)
2921 \pnodes(0,4){A}(15,4){B}
2922 \asphericlens[asphereheight=7.5, asphereradiusleft=3.12848,
2923 asphereconstant=-1.991145, aspherecoefficients=4.98e-3](A)(B)
2924 \multido{\r=-3.2+0.8}{9}{%
2925 \drawbeam[beampos=\r, linewidth=0.5\pslinewidth](A){}(B)}
2926 \lens[lens=3.12848 0 6 5.49, abspos=6.13, style=Refline, linestyle=dashed](A)(B)
2927 \multido{\r=-2.8+0.8}{8}{%
2928 \drawbeam[beampos=\r, linewidth=0.5\pslinewidth, linecolor=red](A){}(B)}%
2929 \end{pspicture*}
2930 \end{LTXexample}
2931 % \iffalse
2932 %</ignore>
2933 % \fi
2934 %
2935 % \ifGERMAN\section{Optisches Plättchen}\fi
2936 % \ifENGLISH\section{Optical plate}\fi
2937 %
2938 %
2939 % \begin{ltxsyntax}
2940 % \dipoledesc{optplate}
2941 % \iffalse
2942 %<*ignore>
2943 % \fi
2944 \begin{LTXexample}
2945 \begin{pspicture}(3,1.5)
2946 \optplate[beam](0,1)(3,1){filter}
2947 \end{pspicture}
2948 \end{LTXexample}
2949 % \iffalse
2950 %</ignore>
2951 % \fi
2952 % \end{ltxsyntax}
2953 % \begin{optionlist}
2954 % \numitem[1]{plateheight}
2955 % \ifGERMAN Die Höhe des Plättchens.\fi
2956 % \ifENGLISH The height of the plate.\fi
2957 %
2958 % \optitem[2\nxLcs{pslinewidth}]{platelinewidth}{\prm{num} or \prm{dimen}}
2959 % \ifGERMAN \linewidthexplanation{des Plättchens}{Plättchen}\fi
2960 % \ifENGLISH \linewidthexplanation{plate}{plates}\fi
2961 % \end{optionlist}
2962 %
2963 % \ifGERMAN\section{Verzögerungsplättchen}\fi
2964 % \ifENGLISH\section{Retardation plate}\fi
2965 %
2966 % \begin{ltxsyntax}
2967 % \dipoledesc{optretplate}
2968 % \iffalse
2969 %<*ignore>
2970 % \fi
2971 \begin{LTXexample}
2972 \begin{pspicture}(3,1.5)
2973 \optretplate[beam](0,1)(3,1){$\nicefrac{\lambda}{2}$}
2974 \end{pspicture}
2975 \end{LTXexample}
2976 % \iffalse
2977 %</ignore>
2978 % \fi
2979 % \end{ltxsyntax}
2980 %
2981 % \begin{optionlist}
2982 % \numitem*[1]{plateheight}
2983 % \ifGERMAN Die Höhe des Plättchens.\fi
2984 % \ifENGLISH The height of the plate.\fi
2985 %
2986 % \numitem[0.1]{platewidth}
2987 % \ifGERMAN Die Breite des Plättchens.\fi
2988 % \ifENGLISH The width of the plate.\fi
2989 %
2990 % \optitem{platesize}{\prm{width} \prm{height}}
2991 % \ifGERMAN Die Breite und Höhe des Plättchens, äquivalent zum Aufruf von
2992 % \Lkeyword{platewidth} und \Lkeyword{plateheight}.
2993 % \fi
2994 % \ifENGLISH The width and height of the plate, is equivalent to calling both
2995 % \Lkeyword{platewidth} and \Lkeyword{plateheight}.
2996 % \fi
2997 % \end{optionlist}
2998 %
2999 % \ifGERMAN\section{Lochblende}\fi
3000 % \ifENGLISH\section{Pinhole}\fi
3001 %
3002 % \begin{ltxsyntax}
3003 % \dipoledesc{pinhole}
3004 % \iffalse
3005 %<*ignore>
3006 % \fi
3007 \begin{LTXexample}
3008 \begin{pspicture}(3,1.5)
3009 \pinhole[beam](0,1)(3,1){PH}
3010 \end{pspicture}
3011 \end{LTXexample}
3012 % \iffalse
3013 %</ignore>
3014 % \fi
3015 % \end{ltxsyntax}
3016 %
3017 % \begin{optionlist}
3018 % \numitem[1]{outerheight}
3019 % \ifGERMAN Die Gesamthöhe der Lochblende.\fi
3020 % \ifENGLISH The total height of the pinhole.\fi
3021 %
3022 % \numitem[0.1]{innerheight}
3023 % \ifGERMAN Die Höhe des Lochs.\fi
3024 % \ifENGLISH The height of the hole.\fi
3025 %
3026 % \optitem[2\nxLcs{pslinewidth}]{phlinewidth}{\prm{num} or \prm{dimen}}
3027 % \ifGERMAN \linewidthexplanation{der Lochblende}{Lochblenden}\fi
3028 % \ifENGLISH \linewidthexplanation{pinhole}{pinholes}\fi
3029 %
3030 % \numitem[0]{phwidth}
3031 % \ifGERMAN
3032 % Die Lochblende wird plastischer gezeichnet, falls \Lkeyword{phwidth}
3033 % ungleich Null ist. In diesem Fall wird \Lkeyword{phlinewidth} ignoriert. Bei
3034 % einem negativen Wert wird die Form gespiegelt.
3035 % \fi
3036 % \ifENGLISH
3037 % The pinhole is drawn in a more plastic style if \Lkeyword{phwidth} is
3038 % not zero, in this case the \Lkeyword{phlinewidth} is ignored. For negative
3039 % values the shape is mirrored.
3040 % \fi
3041 % \iffalse
3042 %<*ignore>
3043 % \fi
3044 \begin{LTXexample}[morekeywords={[21]{phwidth}}]
3045 \begin{pspicture}(3,1.5)
3046 \pinhole[beam, phwidth=-0.1](0,1)(1.5,1){neg}
3047 \pinhole[beam, phwidth=0.2](1.5,1)(3,1){pos}
3048 \end{pspicture}
3049 \end{LTXexample}
3050 % \iffalse
3051 %</ignore>
3052 % \fi
3053 % \end{optionlist}
3054 %
3055 %
3056 % \ifGERMAN\section{Box}\fi
3057 % \ifENGLISH\section{Box}\fi
3058 %
3059 % \begin{ltxsyntax}
3060 % \dipoledesc{optbox}
3061 % \iffalse
3062 %<*ignore>
3063 % \fi
3064 \begin{LTXexample}
3065 \begin{pspicture}(3,2)
3066 \optbox[beam](0,0)(3,2){box}
3067 \end{pspicture}
3068 \end{LTXexample}
3069 % \iffalse
3070 %</ignore>
3071 % \fi
3072 % \end{ltxsyntax}
3073 %
3074 % \begin{optionlist}
3075 % \numitem[1.4]{optboxwidth}
3076 % \ifGERMAN Die Breite der Box.\fi
3077 % \ifENGLISH The width of the box.\fi
3078 %
3079 % \numitem[0.8]{optboxheight}
3080 % \ifGERMAN Die Höhe der Box.\fi
3081 % \ifENGLISH The height of the box.\fi
3082 %
3083 % \optitem{optboxsize}{\prm{width} \prm{height}}
3084 % \ifGERMAN Die Breite und Höhe der Box, äquivalent zum Aufruf von
3085 % \Lkeyword{optboxwidth} und \Lkeyword{optboxheight}.
3086 % \fi
3087 % \ifENGLISH The width and height of the box, is equivalent to calling both
3088 % \Lkeyword{optboxwidth} and \Lkeyword{optboxheight}.
3089 % \fi
3090 % \end{optionlist}
3091 %
3092 % \ifGERMAN\section{Pfeilkomponente}\fi
3093 % \ifENGLISH\section{Arrow component}\fi
3094 %
3095 % \begin{ltxsyntax}
3096 % \dipoledesc{optarrowcomp}
3097 % \iffalse
3098 %<*ignore>
3099 % \fi
3100 \begin{LTXexample}
3101 \begin{pspicture}(3,1.7)
3102 \optarrowcomp[wire](0,1)(3,1){box}
3103 \end{pspicture}
3104 \end{LTXexample}
3105 % \iffalse
3106 %</ignore>
3107 % \fi
3108 % \ifENGLISH A general purpose component, similar to \Lcomp{fiberdelayline},
3109 % but much more flexible.
3110 % \fi
3111 % \ifGERMAN Eine Komponente für den allgemeinen, flexiblen Gebrauch
3112 % ähnlich zu \Lcomp{fiberdelayline}, aber deutlich variabler.
3113 % \fi
3114 % \end{ltxsyntax}
3115 %
3116 % \begin{optionlist}
3117 % \numitem[1.4]{arrowcompwidth}
3118 % \ifGERMAN Die Breite der Box.\fi
3119 % \ifENGLISH The width of the box.\fi
3120 %
3121 % \numitem[0.8]{arrowcompheight}
3122 % \ifGERMAN Die Höhe der Komponente.\fi
3123 % \ifENGLISH The height of the Komponente.\fi
3124 %
3125 % \optitem{arrowcompsize}{\prm{size} or \prm{width} \prm{height}}
3126 % \ifGERMAN Die Breite und Höhe der Komponente, äquivalent zum Aufruf von
3127 % \Lkeyword{arrowcompwidth} und \Lkeyword{arrowcompheight}.
3128 % \fi
3129 % \ifENGLISH The width and height of the component, is equivalent to calling both
3130 % \Lkeyword{arrowcompwidth} and \Lkeyword{arrowcompheight}.
3131 % \fi
3132 %
3133 % \numitem[70]{arrowcompangle}
3134 % \ifGERMAN Der Winkel des Pfeils bezüglich der $x$-Achse.\fi
3135 % \ifENGLISH The angle of the arrow with respect to the $x$-axis.\fi
3136 %
3137 % \choitem[rectangle]{arrowcompshape}{rectangle, circle}
3138 % \iffalse
3139 %<*ignore>
3140 % \fi
3141 \begin{LTXexample}[morekeywords={[21]arrowcompshape}]
3142 \begin{pspicture}(3,1)
3143 \optarrowcomp[arrowcompshape=circle, wire](0,0.5)(3,0.5)
3144 \end{pspicture}
3145 \end{LTXexample}
3146 % \iffalse
3147 %</ignore>
3148 % \fi
3149 % \end{optionlist}
3150 % \begin{stylelist}
3151 % \styleitem[arrowinset=0, arrows=->]{ArrowCompStyle}
3152 % \ifGERMAN
3153 % Der Stil für den Pfeil. Das kann insbesonders nützlich sein um die
3154 % Länge und Ausrichtung des Pfeils zu verändern.
3155 % \fi
3156 % \ifENGLISH
3157 % The style of the arrow. This can be especially useful to
3158 % adapt the length and orientation of the arrow.
3159 % \fi
3160 % \iffalse
3161 %<*ignore>
3162 % \fi
3163 \begin{LTXexample}[morekeywords={[21]ArrowCompStyle}]
3164 \begin{pspicture}(3,1.5)
3165 \addtopsstyle{ArrowCompStyle}{xunit=-1, arrowscale=2}
3166 \optarrowcomp[fiber](0,1)(3,1){delay line}
3167 \end{pspicture}
3168 \end{LTXexample}
3169 % \iffalse
3170 %</ignore>
3171 % \fi
3172 % \end{stylelist}
3173 %
3174 % \ifGERMAN\section{Balkenkomponente}\fi
3175 % \ifENGLISH\section{Bar component}\fi
3176 %
3177 % \begin{ltxsyntax}
3178 % \dipoledesc{optbarcomp}
3179 % \iffalse
3180 %<*ignore>
3181 % \fi
3182 \begin{LTXexample}
3183 \begin{pspicture}(3,1.5)
3184 \optbarcomp[fiber](0,1)(3,1){box}
3185 \end{pspicture}
3186 \end{LTXexample}
3187 % \iffalse
3188 %</ignore>
3189 % \fi
3190 % \ifENGLISH A general purpose component, similar to \Lcomp{optfiberpolarizer},
3191 % but much more flexible.
3192 % \fi
3193 % \ifGERMAN Eine Komponente für den allgemeinen, flexiblen Gebrauch
3194 % ähnlich zu \Lcomp{optfiberpolarizer}, aber deutlich variabler.
3195 % \fi
3196 % \end{ltxsyntax}
3197 %
3198 % \begin{optionlist}
3199 % \numitem[1.4]{barcompwidth}
3200 % \ifGERMAN Die Breite der Box.\fi
3201 % \ifENGLISH The width of the box.\fi
3202 %
3203 % \numitem[0.8]{barcompheight}
3204 % \ifGERMAN Die Höhe der Box.\fi
3205 % \ifENGLISH The height of the box.\fi
3206 %
3207 % \optitem{barcompsize}{\prm{size} or \prm{width} \prm{height}}
3208 % \ifGERMAN Die Breite und Höhe der Box, äquivalent zum Aufruf von
3209 % \Lkeyword{barcompwidth} und \Lkeyword{barcompheight}.
3210 % \fi
3211 % \ifENGLISH The width and height of the box, is equivalent to calling both
3212 % \Lkeyword{barcompwidth} and \Lkeyword{barcompheight}.
3213 % \fi
3214 %
3215 % \numitem[70]{barcompangle}
3216 % \ifGERMAN Der Winkel des Balkens bezüglich der $x$-Achse.\fi
3217 % \ifENGLISH The angle of the bar with respect to the $x$-axis.\fi
3218 % \iffalse
3219 %<*ignore>
3220 % \fi
3221 \begin{LTXexample}[morekeywords={[21]barcompangle}]
3222 \begin{pspicture}(3,1)
3223 \optbarcomp[barcompangle=90, fiber](0,0.5)(3,0.5)
3224 \end{pspicture}
3225 \end{LTXexample}
3226 % \iffalse
3227 %</ignore>
3228 % \fi
3229 %
3230 % \choitem[rectangle]{barcompshape}{rectangle, circle}
3231 % \iffalse
3232 %<*ignore>
3233 % \fi
3234 \begin{LTXexample}[morekeywords={[21]barcompshape}]
3235 \begin{pspicture}(3,1)
3236 \optbarcomp[barcompshape=circle, fiber](0,0.5)(3,0.5)
3237 \end{pspicture}
3238 \end{LTXexample}
3239 % \iffalse
3240 %</ignore>
3241 % \fi
3242 % \end{optionlist}
3243 % \begin{stylelist}
3244 % \styleitem{BarCompStyle}
3245 % \ifENGLISH The style of the bar.\fi
3246 % \ifGERMAN Der Stil für den Balken.\fi
3247 % \iffalse
3248 %<*ignore>
3249 % \fi
3250 \begin{LTXexample}[morekeywords={[21]BarCompStyle}]
3251 \begin{pspicture}(3,1)
3252 \newpsstyle{BarCompStyle}{unit=0.7, arrows=->}
3253 \optbarcomp[barcompshape=circle, barcompangle=45, fiber](0,0.5)(3,0.5)
3254 \end{pspicture}
3255 \end{LTXexample}
3256 % \iffalse
3257 %</ignore>
3258 % \fi
3259 % \end{stylelist}
3260 %
3261 % \ifGERMAN\section{Optische Quelle}\fi
3262 % \ifENGLISH\section{Optical source}\fi
3263 %
3264 % \begin{ltxsyntax}
3265 % \dipoledesc{optsource}
3266 % \iffalse
3267 %<*ignore>
3268 % \fi
3269 \begin{LTXexample}
3270 \begin{pspicture}(3,2)
3271 \optsource(1.5,1)(3,1){Laser}
3272 \end{pspicture}
3273 \end{LTXexample}
3274 % \iffalse
3275 %</ignore>
3276 % \fi
3277 %
3278 % \ifENGLISH
3279 % An optical source predefines some properties of any outgoing beam, if
3280 % it is the first component in a beam path. The definable beam
3281 % properties are \Lkeyword{beamangle}, \Lkeyword{beamwidth},
3282 % \Lkeyword{beamdiv} and \Lkeyword{beamalign}. The properties defined by
3283 % the optical source cannot be overwritten by the beam properties. If a
3284 % property wasn't explicitely defined for a source, it is taken from the
3285 % beam properties.
3286 %
3287 % The default settings for the component position are
3288 % \Lkeyword{position}\opt{=start}.
3289 % \fi
3290 % \ifGERMAN
3291 % Eine optische Quelle gibt ein paar Eigenschaften für alle von ihr
3292 % ausgehenden Strahlen vor, falls es die erste Komponente in einem
3293 % Strahlengang ist. Die verwendbaren Eigenschaften sind
3294 % \Lkeyword{beamangle}, \Lkeyword{beamwidth}, \Lkeyword{beamdiv} und
3295 % \Lkeyword{beamalign}. Alle Eigenschaften, die von einer optischen
3296 % Quelle definiert werden, können nicht später durch Strahlparameter
3297 % überschrieben werden. Wird ein Parameter nicht explizit von der Quelle
3298 % definiert, so werden die Parameter von dem Strahl-Stil verwendet.
3299 %
3300 % Die Voreinstellung für die Positionierung ist
3301 % \Lkeyword{position}\opt{=start}.
3302 % \fi
3303 % \end{ltxsyntax}
3304 %
3305 % \iffalse
3306 %<*ignore>
3307 % \fi
3308 \begin{LTXexample}
3309 \begin{pspicture}(5,2)
3310 \pnodes(1.5,1){A}(5,1){B}
3311 \optsource[innerlabel, beamdiv=10, beamangle=10](A)(B){Laser}
3312 \lens[lens=2 2 2](A)(B)
3313 \optplane(B)
3314 \drawwidebeam{-}
3315 \drawbeam[linecolor=red]{-}
3316 \end{pspicture}
3317 \end{LTXexample}
3318 % \iffalse
3319 %</ignore>
3320 % \fi
3321 %
3322 % \begin{optionlist}
3323 % \numitem[1.4]{sourcewidth}
3324 % \ifGERMAN Die Breite der Box.\fi
3325 % \ifENGLISH The width of the box.\fi
3326 %
3327 % \numitem[0.8]{sourceheight}
3328 % \ifGERMAN Die Höhe der Box.\fi
3329 % \ifENGLISH The height of the box.\fi
3330 %
3331 % \optitem{sourcesize}{\prm{width} \prm{height}}
3332 % \ifGERMAN Die Breite und Höhe der Box, äquivalent zum Aufruf von
3333 % \Lkeyword{sourcewidth} und \Lkeyword{sourceheight}.
3334 % \fi
3335 % \ifENGLISH The width and height of the box, is equivalent to calling both
3336 % \Lkeyword{sourcewidth} and \Lkeyword{sourceheight}.
3337 % \fi
3338 % \end{optionlist}
3339 %
3340 % \ifGERMAN\section{Kristall}\fi
3341 % \ifENGLISH\section{Crystal}\fi
3342 %
3343 % \begin{ltxsyntax}
3344 % \dipoledesc{crystal}
3345 % \iffalse
3346 %<*ignore>
3347 % \fi
3348 \begin{LTXexample}
3349 \begin{pspicture}(3,1.3)
3350 \crystal[beam](0,1)(3,1){Crystal}
3351 \end{pspicture}
3352 \end{LTXexample}
3353 % \iffalse
3354 %</ignore>
3355 % \fi
3356 % \end{ltxsyntax}
3357 %
3358 % \begin{optionlist}
3359 % \numitem[1.4]{crystalwidth}
3360 % \ifGERMAN Die Breite des Kristalls.\fi
3361 % \ifENGLISH The width of the crystal.\fi
3362 %
3363 % \numitem[0.6]{crystalheight}
3364 % \ifGERMAN Die Höhe des Kristalls.\fi
3365 % \ifENGLISH The height of the crystal.\fi
3366 %
3367 % \optitem{crystalsize}{\prm{width} \prm{height}}
3368 % \ifGERMAN Die Breite und Höhe des Kristalls, äquivalent zum Aufruf von
3369 % \Lkeyword{crystalwidth} und \Lkeyword{crystalheight}.
3370 % \fi
3371 % \ifENGLISH The width and height of the crystal, is equivalent to calling both
3372 % \Lkeyword{crystalwidth} and \Lkeyword{crystalheight}.
3373 % \fi
3374 %
3375 % \numitem[0.3]{caxislength}
3376 % \ifGERMAN Die zusätzliche Länge des Pfeils für die $c$-Achse, wird weggelassen
3377 % falls die Länge \opt{0} ist und gespiegelt falls der Wert negativ ist. Die
3378 % Gesamtlänge ist \Lkeyword{caxislength} plus \Lkeyword{crystalheight}.
3379 % \fi
3380 % \ifENGLISH The additional length of the $c$-axis, is dropped when set to
3381 % \opt{0} and is mirrored if the values is negative. The total length is
3382 % \Lkeyword{caxislength} plus \Lkeyword{crystalheight}.
3383 % \fi
3384 % \iffalse
3385 %<*ignore>
3386 % \fi
3387 \begin{LTXexample}[morekeywords={[21]{caxislength}}]
3388 \begin{pspicture}(0,0.4)(3,1.5)
3389 \psset{crystalsize=0.5 0.8, label=-45 . l}
3390 \crystal[position=0.2, caxislength=0.5](0,1)(3,1){pos}
3391 \crystal[beam, caxislength=0](0,1)(3,1){0}
3392 \crystal[position=0.8, caxislength=-0.5](0,1)(3,1){neg}
3393 \end{pspicture}
3394 \end{LTXexample}
3395 % \iffalse
3396 %</ignore>
3397 % \fi
3398 %
3399 % \boolitem[false]{caxisinv}
3400 % \ifGERMAN
3401 % Invertiert die Richtung der $c$-Achse, ist äquivalent zu einem
3402 % Vorzeichenwechsel von \Lkeyword{caxislength}.
3403 % \fi
3404 % \ifENGLISH
3405 % Invert the direction of the $c$-axis, this is equivalent to changing the sign
3406 % of \Lkeyword{caxislength}.
3407 % \fi
3408 %
3409 % \boolitem[false]{voltage}
3410 % \ifGERMAN Zeichnet einen Spannungsanschluss und ein Erdungszeichen.\fi
3411 % \ifENGLISH Draw a voltage connection and a ground symbol.\fi
3412 % \iffalse
3413 %<*ignore>
3414 % \fi
3415 \begin{LTXexample}[morekeywords={[21]{voltage}}]
3416 \begin{pspicture}(0,0.4)(3,1.5)
3417 \crystal[voltage, beam](0,1)(3,1)
3418 \end{pspicture}
3419 \end{LTXexample}
3420 % \iffalse
3421 %</ignore>
3422 % \fi
3423 %
3424 % \boolitem[false]{lamp}
3425 % \ifGERMAN Zeichnet eine Lampe neben den Kristall.\fi
3426 % \ifENGLISH Draw a lamp near the crystal.\fi
3427 % \iffalse
3428 %<*ignore>
3429 % \fi
3430 \begin{LTXexample}[morekeywords={[21]{lamp}}]
3431 \begin{pspicture}(0,0.4)(3,1.7)
3432 \crystal[lamp, beam](0,1)(3,1)
3433 \end{pspicture}
3434 \end{LTXexample}
3435 % \iffalse
3436 %</ignore>
3437 % \fi
3438 % \end{optionlist}
3439 %
3440 % \begin{stylelist}
3441 % \styleitem[linewidth=0.7\cs{pslinewidth}, linestyle=dashed, dash=2pt 2pt, arrowinset=0, arrows=->]{CrystalCaxis}
3442 % \ifGERMAN Der Stil für die $c$-Achse inklusive der Pfeilart.\fi
3443 % \ifENGLISH The style of the $c$-axis including the arrow type.\fi
3444 % \iffalse
3445 %<*ignore>
3446 % \fi
3447 \begin{LTXexample}[morekeywords={[21]{CrysalCaxis}}]
3448 \begin{pspicture}(0,0.5)(3,1.6)
3449 \newpsstyle{CrystalCaxis}{linecolor=red, arrows=->>}
3450 \crystal[beam](0,1)(3,1)
3451 \end{pspicture}
3452 \end{LTXexample}
3453 % \iffalse
3454 %</ignore>
3455 % \fi
3456 %
3457 % \styleitem[linewidth=0.6\cs{pslinewidth}]{CrystalLamp}
3458 % \ifGERMAN Der Stil für die Hintergrundlampe.\fi
3459 % \ifENGLISH The style of the crystal background lamp.\fi
3460 % \end{stylelist}
3461 %
3462 % \iffalse
3463 %<*ignore>
3464 % \fi
3465 \begin{LTXexample}[morekeywords={[21]{voltage, lamp}}]
3466 \begin{pspicture}(3,1.7)
3467 \crystal[fillstyle=solid, fillcolor=yellow!90!black,
3468 label=1.2 -45, voltage,
3469 lamp, beam](0,1)(3,1){SBN:Ce}
3470 \end{pspicture}
3471 \end{LTXexample}
3472 % \iffalse
3473 %</ignore>
3474 % \fi
3475 %
3476 % \ifGERMAN\section{Optische Diode}\fi
3477 % \ifENGLISH\section{Optical diode}\fi
3478 %
3479 % \begin{ltxsyntax}
3480 % \dipoledesc{optdiode}
3481 % \iffalse
3482 %<*ignore>
3483 % \fi
3484 \begin{LTXexample}[morekeywords={[21]{optdiode}}]
3485 \begin{pspicture}(3,2)
3486 \optdiode[beam](0,1)(3,1){Diode}
3487 \end{pspicture}
3488 \end{LTXexample}
3489 % \iffalse
3490 %</ignore>
3491 % \fi
3492 % \end{ltxsyntax}
3493 %
3494 % \ifENGLISH The optical diode has a default setting of
3495 % \Lkeyword{allowbeaminside}\opt{=false}.
3496 % \fi
3497 % \ifGERMAN Die optische Diode hat die Voreinstellung
3498 % \Lkeyword{allowbeaminside}\opt{=false}.
3499 % \fi
3500 %
3501 % \begin{optionlist}
3502 % \numitem[0.8]{optdiodesize}
3503 % \ifGERMAN
3504 % Die Seitenlänge der optischen Diode.
3505 % \fi
3506 % \ifENGLISH
3507 % The side length of the optical diode.
3508 % \fi
3509 % \end{optionlist}
3510 %
3511 % \ifGERMAN\section{Doveprisma}\fi
3512 % \ifENGLISH\section{Dove prism}\fi
3513 %
3514 % \begin{ltxsyntax}
3515 % \dipoledesc{doveprism}
3516 % \iffalse
3517 %<*ignore>
3518 % \fi
3519 \begin{LTXexample}[morekeywords={[21]{doveprism}}]
3520 \begin{pspicture}(3,1.5)
3521 \doveprism[beam](0,1)(3,1){Dove}
3522 \end{pspicture}
3523 \end{LTXexample}
3524 % \iffalse
3525 %</ignore>
3526 % \fi
3527 % \end{ltxsyntax}
3528 %
3529 % \begin{optionlist}
3530 % \optitem[0.6]{doveprismsize}{\prm{num} or \prm{width} \prm{height}}
3531 % \ifGERMAN
3532 % Wenn eine Zahl angegeben ist, dann ist das die Höhe des Prismas, die
3533 % Gesamtbreite beträgt das dreifache. Zwei Zahlen geben Breite und Höhe des
3534 % Doveprisma an. Die Winkel an der Eingangs- und Ausgangsfläche betragen immer
3535 % 45\textdegree.
3536 % \fi
3537 % \ifENGLISH
3538 % A single number defines the height of the prism, the total width is set to
3539 % three times the height. Two number define the width and height of the dove
3540 % prism. The angles at the input and output faces are always 45\textdegree.
3541 % \fi
3542 % \end{optionlist}
3543 %
3544 % \iffalse
3545 %<*ignore>
3546 % \fi
3547 \begin{LTXexample}[morekeywords={[21]{doveprism}}]
3548 \begin{pspicture}(4,1.5)
3549 \optplane(0,1)
3550 \doveprism[doveprismsize=1.2](0,1)(4,1)
3551 \optplane(4,1)
3552 \drawbeam[raytrace=false, linecolor=black]{-}
3553 \drawbeam[n=1.5, linecolor=red]{-}
3554 \drawbeam[n=*sqrt(5), linecolor=green, linestyle=dashed]{-}
3555 \end{pspicture}
3556 \end{LTXexample}
3557 % \iffalse
3558 %</ignore>
3559 % \fi
3560 %
3561 % \ifGERMAN\section{Glan-Thompson-Prisma}\fi
3562 % \ifENGLISH\section{Glan--Thompson prism}\fi
3563 %
3564 % \begin{ltxsyntax}
3565 % \dipoledesc{glanthompson}
3566 % \iffalse
3567 %<*ignore>
3568 % \fi
3569 \begin{LTXexample}[morekeywords={[21]{glanthompson}}]
3570 \begin{pspicture}(3,1.5)
3571 \glanthompson[beam](0,1)(3,1){Glan-Thompson}
3572 \end{pspicture}
3573 \end{LTXexample}
3574 % \iffalse
3575 %</ignore>
3576 % \fi
3577 % \end{ltxsyntax}
3578 %
3579 % \begin{optionlist}
3580 % \numitem[1.0]{glanthompsonwidth}
3581 % \ifGERMAN Die Breite des Prisma.\fi
3582 % \ifENGLISH The width of the prism.\fi
3583 %
3584 % \numitem[0.5]{glanthompsonheight}
3585 % \ifGERMAN Die Höhe des Prisma.\fi
3586 % \ifENGLISH The height of the prism.\fi
3587 %
3588 % \optitem{glanthompsonsize}{\prm{width} \prm{height}}
3589 % \ifGERMAN Die Breite und Höhe des Prisma, äquivalent zum Aufruf von
3590 % \Lkeyword{glanthompsonwidth} und \Lkeyword{glanthompsonheight}.
3591 % \fi
3592 % \ifENGLISH The width and height of the prism, is equivalent to calling both
3593 % \Lkeyword{glanthompsonwidth} and \Lkeyword{glanthompsonheight}.
3594 % \fi
3595 %
3596 % \numitem[0]{glanthompsongap}
3597 % \ifGERMAN
3598 % Der Abstand der beiden Teilprismen in $x$-Richtung, die Linienbreiten
3599 % werden nicht berücksichtigt. Die Gesamtbreite ist von diesem Wert
3600 % unabhängig, aber der Winkel der reflektierenden Fläche wird davon beeinflusst.
3601 % \fi
3602 % \ifENGLISH The separation of the two prisms in $x$-direction. The
3603 % total width does not depend on this value, but the angle of the
3604 % reflective plane is affected.
3605 % \fi
3606 %
3607 % \iffalse
3608 %<*ignore>
3609 % \fi
3610 \begin{LTXexample}
3611 \begin{pspicture}(3,1)
3612 \glanthompson[glanthompsongap=0.1, beam](0,0.5)(3,0.5)
3613 \end{pspicture}
3614 \end{LTXexample}
3615 % \iffalse
3616 %</ignore>
3617 % \fi
3618 % \end{optionlist}
3619 %
3620 % \ifGERMAN Von der Implementierung entspricht das Glan-Thompson-Prisma
3621 % für \Lkeyword{glanthompsongap}\opt{=0} einem Strahlteiler, der nur
3622 % zwei Knoten zur Positionierung benötigt und nicht quadratisch ist.
3623 %
3624 % Beachten Sie, dass das Prisma für \Lkeyword{glanthompsongap}\opt{>\,0}
3625 % nicht von beiden Seiten gleich verwendet werden kann, da in der
3626 % derzeitigen Implementierung nur eine uneindeutige Grenzfläche
3627 % (reflektierend oder transmittierend) zugelassen ist. In dem folgenden
3628 % Beispiel sieht man, dass der rote Strahl an der falsche Fläche
3629 % reflektiert wird.
3630 % \fi
3631 % \ifENGLISH
3632 % The implementation of the Glan--Thompson prism for
3633 % \Lkeyword{glanthompsongap}\opt{=0} is equivalent to a beamsplitter
3634 % which is positioned with two nodes only and which is not quadratic.
3635 %
3636 % Please note, that the Prism cannot be used properly from both sides
3637 % for \Lkeyword{glanthompsongap}\opt{>\,0} because the current
3638 % implementation allows only a single ambiguous interface (reflective or
3639 % transmittive). In the following example you see, that the red beam is
3640 % reflected at the wrong interface.
3641 % \fi
3642 %
3643 % \iffalse
3644 %<*ignore>
3645 % \fi
3646 \begin{LTXexample}
3647 \begin{pspicture}(4,2)
3648 \pnodes(0,1){A}(4,1){B}
3649 \glanthompson[glanthompsongap=0.2, glanthompsonsize=2 1](A)(B)
3650 \optplane[angle=90](2,0)\optplane[angle=90](2,2)
3651 \addtopsstyle{Beam}{ArrowInside=->, arrowscale=1.5}
3652 \drawbeam[beampos=0.1](A){1-2}
3653 \drawbeam[beampos=0.1, linecolor=red](B){1}{3}
3654 \end{pspicture}
3655 \end{LTXexample}
3656 % \iffalse
3657 %</ignore>
3658 % \fi
3659 %
3660 % \ifGERMAN \prettyref{ex:glan-thompson} enthält ein weiterführendes
3661 % Beispiel mit einem Glan-Thompson-Prisma.\fi
3662 % \ifENGLISH \prettyref{ex:glan-thompson} shows a further setup with a
3663 % Glan--Thompson prism.\fi
3664 %
3665 % \ifGERMAN\section{Polarisation}\fi
3666 % \ifENGLISH\section{Polarization}\fi
3667 %
3668 % \begin{ltxsyntax}
3669 % \dipoledesc{polarization}
3670 % \iffalse
3671 %<*ignore>
3672 % \fi
3673 \begin{LTXexample}[morekeywords={[21]{polarization}}]
3674 \begin{pspicture}(3,1)
3675 \polarization[beam](0,0.5)(3,0.5)
3676 \end{pspicture}
3677 \end{LTXexample}
3678 % \iffalse
3679 %</ignore>
3680 % \fi
3681 % \end{ltxsyntax}
3682 % \begin{optionlist}
3683 % \numitem[0.6]{polsize}
3684 % \ifGERMAN Die Größe des Polarisationszeichens, der Kreis für \opt{perp} und
3685 % \opt{polmisc} ist halb so groß.
3686 % \fi
3687 % \ifENGLISH The size of the polarization symbol, the circle for \opt{perp} and
3688 % \opt{polmisc} is half of this.
3689 % \fi
3690 %
3691 % \choitem[parallel]{poltype}{parallel, perp, misc, lcirc, rcirc}
3692 % \ifGERMAN Dieser Parameter wählt die Polarizationsart aus.\fi
3693 % \ifENGLISH This parameter choses the polarization type.\fi
3694 % \iffalse
3695 %<*ignore>
3696 % \fi
3697 \begin{LTXexample}[morekeywords={[21]{poltype}}]
3698 \begin{pspicture}(0,-0.3)(3,4.3)
3699 \psset[optexp]{beam}
3700 \begin{optexp}
3701 \polarization[poltype=parallel, abspos=0.5](0,4)(3,4)
3702 \polarization[poltype=perp, abspos=1](0,3)(3,3)
3703 \polarization[poltype=misc, abspos=1.5](0,2)(3,2)
3704 \polarization[poltype=lcirc, abspos=2](0,1)(3,1)
3705 \polarization[poltype=rcirc, abspos=2.5](0,0)(3,0)
3706 \end{optexp}
3707 \end{pspicture}
3708 \end{LTXexample}
3709 % \iffalse
3710 %</ignore>
3711 % \fi
3712 % \end{optionlist}
3713 %
3714 % \begin{stylelist}
3715 % \styleitem[arrowscale=0.8, linewidth=0.7\cs{pslinewidth}, dotsize=3\cs{pslinewidth}]{Polarization}
3716 % \ifGERMAN Bestimmt das Aussehen der Polarisationssymbole.\fi
3717 % \ifENGLISH Affects the style of the polarisation symbols.\fi
3718 % \end{stylelist}
3719 %
3720 % \ifGERMAN\section{Keil}\fi
3721 % \ifENGLISH\section{Wedge}\fi
3722 %
3723 % \begin{ltxsyntax}
3724 % \dipoledesc{optwedge}
3725 % \iffalse
3726 %<*ignore>
3727 % \fi
3728 \begin{LTXexample}
3729 \begin{pspicture}(3,2)
3730 \optwedge[beam](0,1)(3,1){Wedge}
3731 \end{pspicture}
3732 \end{LTXexample}
3733 % \iffalse
3734 %</ignore>
3735 % \fi
3736 % \end{ltxsyntax}
3737 %
3738 % \begin{optionlist}
3739 % \numitem[0.8]{wedgeheight}
3740 % \ifGERMAN Höhe des Keils.\fi
3741 % \ifENGLISH The height of the wedge.\fi
3742 %
3743 % \numitem[10]{wedgeangleright}
3744 % \ifGERMAN Der obere Winkel der rechten Grenzfläche bezogen auf die Vertikale.\fi
3745 % \ifENGLISH The upper angle of the right interface with respect to a vertical line.\fi
3746 %
3747 % \numitem[0]{wedgeangleleft}
3748 % \ifGERMAN Der obere Winkel der linken Grenzfläche bezogen auf die Vertikale.\fi
3749 % \ifENGLISH The upper angle of the left interface with respect to a vertical line.\fi
3750 %
3751 % \optitem{wedgeangles}{\prm{left}[ \prm{right}]}
3752 % \ifGERMAN
3753 % Erlaubt beide Winkel gleichzeitig zu setzen. Wird nur ein Wert
3754 % angegeben, dann wird dieser für beide Winkel verwendet.
3755 % \fi
3756 % \ifENGLISH
3757 % Allows setting both angles at once. If only a single value is given,
3758 % it is used for both angles.
3759 % \fi
3760 % \numitem[0]{wedgewidth}
3761 % \ifGERMAN Ist der Wert größer als die berechnete Grundbreite, dann wird der Keil auf die angegebene Breite vergrößert.\fi
3762 % \ifENGLISH If this value is larger than the calculated base width, then the wedge's width is increase to this value.\fi
3763 % \iffalse
3764 %<*ignore>
3765 % \fi
3766 \begin{LTXexample}
3767 \begin{pspicture}(2,1)
3768 \optwedge[wedgeangles=10 0, wedgewidth=0.4](0,0.5)(2,0.5)
3769 \drawwidebeam[beamwidth=0.5](0,0.5){}(2,0.5)
3770 \end{pspicture}
3771 \end{LTXexample}
3772 % \iffalse
3773 %</ignore>
3774 % \fi
3775 %
3776 % \end{optionlist}
3777 %
3778 % \ifGERMAN\section{Axikon}\fi
3779 % \ifENGLISH\section{Axicon}\fi
3780 %
3781 % \begin{ltxsyntax}
3782 % \dipoledesc{axicon}
3783 % \iffalse
3784 %<*ignore>
3785 % \fi
3786 \begin{LTXexample}
3787 \begin{pspicture}(3,2)
3788 \axicon[label=1](0,1)(3,1){Axicon}
3789 \drawwidebeam[beamwidth=0.5](0,1){}(3,1)
3790 \end{pspicture}
3791 \end{LTXexample}
3792 % \iffalse
3793 %</ignore>
3794 % \fi
3795 % \end{ltxsyntax}
3796 %
3797 % \begin{optionlist}
3798 % \numitem[1.5]{axiconheight}
3799 % \ifGERMAN Die Höhe des Axikons.\fi
3800 % \ifENGLISH The height of the axicon.\fi
3801 %
3802 % \numitem[0.4]{axiconwidth}
3803 % \ifGERMAN Die Breite des Axikons.\fi
3804 % \ifENGLISH The width of the axicon.\fi
3805 %
3806 % \numitem[10]{axiconangle}
3807 % \ifGERMAN Der obere Winkel der rechten Grenzfläche bezogen auf die Vertikale.\fi
3808 % \ifENGLISH The upper angle of the right interface with respect to a vertical line.\fi
3809 %
3810 % \end{optionlist}
3811 %
3812 % \ifGERMAN\section{Spiegel}\fi
3813 % \ifENGLISH\section{Mirror}\fi
3814 %
3815 % \begin{ltxsyntax}
3816 % \tripoledesc{mirror}
3817 % \iffalse
3818 %<*ignore>
3819 % \fi
3820 \begin{LTXexample}
3821 \begin{pspicture}(3,2)
3822 \mirror[beam](0,0)(1.8,1.5)(0,2){M}
3823 \end{pspicture}
3824 \end{LTXexample}
3825 % \iffalse
3826 %</ignore>
3827 % \fi
3828 % \end{ltxsyntax}
3829 %
3830 % \begin{optionlist}
3831 % \numitem[1]{mirrorwidth}
3832 % \ifGERMAN Die Breite des Spiegels.\fi
3833 % \ifENGLISH The width of the mirror.\fi
3834 %
3835 % \optitem[2\nxLcs{pslinewidth}]{mirrorlinewidth}{\prm{num} or \prm{dimen}}
3836 % \ifGERMAN \linewidthexplanation{des Spiegels}{Spiegel}\fi
3837 % \ifENGLISH \linewidthexplanation{mirror}{mirrors}\fi
3838 %
3839 % \optitem[0]{mirrorradius}{\prm{radius}[ 0]}
3840 % \ifGERMAN
3841 % Diese Parameter setzt die Krümmung des Spiegels. Null ergibt einen
3842 % ebenen, ein negativer Radius einen konvexen und ein positiver Radius
3843 % einen konkaven Spiegel.
3844 % \fi
3845 % \ifENGLISH
3846 % This parameter defines the curvature of the mirror. A value of \opt{0}
3847 % is for a plain mirror, a negative radius for a convex mirror and a
3848 % positive radius gives you a concave mirror.
3849 % \fi
3850 %
3851 % \iffalse
3852 %<*ignore>
3853 % \fi
3854 \begin{LTXexample}[morekeywords={[21]{mirrorradius}}]
3855 \begin{pspicture}(3,3)
3856 \psset[optexp]{labeloffset=0.5}
3857 \mirror[mirrorradius=1](0,0)(1,2)(1.8,1){convex}
3858 \mirror[mirrorradius=-1](1,2)(1.8,1)(2.5,3){concave}
3859 \drawbeam(0,0){-}(2.5,3)
3860 \end{pspicture}
3861 \end{LTXexample}
3862 % \iffalse
3863 %</ignore>
3864 % \fi
3865 %
3866 % \ifGERMAN Wird kein zweiter Wert angegeben, so ist die Krümmung der
3867 % zweiten Fläche eines \opt{extended} oder \opt{semitrans} Spiegels die
3868 % Gleiche wie bei der Hauptgrenzfläche (siehe vorheriges Beispiel). Wird
3869 % die Null als zweiter Wert angegeben (andere Werte werden nicht
3870 % unterstützt), so ist die zweite Fläche flach:
3871 % \fi
3872 % \ifENGLISH If no second value is specified, the curvature of the
3873 % second interface of an \opt{extended} or \opt{semitrans} mirror is the
3874 % same as that of the main interface (see previous example). If zero is
3875 % given as second value (other values are not supported), the second
3876 % interface is plain.
3877 % \fi
3878 %
3879 % \iffalse
3880 %<*ignore>
3881 % \fi
3882 \begin{LTXexample}[morekeywords={[21]{mirrorradius}}]
3883 \begin{pspicture}(3,3)
3884 \mirror[mirrorradius=1 0, mirrortype=semitrans](0,0)(1,2)(1.8,1){convex}
3885 \mirror[mirrorradius=-1 0, mirrortype=extended](1,2)(1.8,1)(2.5,3){concave}
3886 \drawbeam(0,0){-}(2.5,3)
3887 \end{pspicture}
3888 \end{LTXexample}
3889 % \iffalse
3890 %</ignore>
3891 % \fi
3892 %
3893 % \ifGERMAN Die Angabe von \Lkeyword{mirrordepth} bezieht sich immer auf
3894 % die Mindesttiefe des Spiegels.
3895 % \fi
3896 % \ifENGLISH The value of \Lkeyword{mirrordepth} always refers to the
3897 % minimum depth of the mirror.
3898 % \fi
3899 %
3900 % \iffalse
3901 %<*ignore>
3902 % \fi
3903 \begin{LTXexample}[morekeywords={[21]{mirrorradius, mirrordepth}}]
3904 \begin{pspicture}(3,3)
3905 \psset[optexp]{mirrordepth=0.2}
3906 \mirror[mirrorradius=1 0, mirrortype=semitrans](0,0)(1,2)(1.8,1){convex}
3907 \mirror[mirrorradius=-1 0, mirrortype=extended](1,2)(1.8,1)(2.5,3){concave}
3908 \drawbeam(0,0){-}(2.5,3)
3909 \end{pspicture}
3910 \end{LTXexample}
3911 % \iffalse
3912 %</ignore>
3913 % \fi
3914 %
3915 % \choitem[plain]{mirrortype}{plain, piezo, extended, semitrans}
3916 % \ifGERMAN
3917 % Diese Parameter wählt die Spiegelart aus. Das Aussehen wird mit
3918 % \Lstyle{PiezoMirror}, \Lstyle{ExtendedMirror} und \Lstyle{SemitransMirror}
3919 % gesteuert.
3920 % \fi
3921 % \ifENGLISH
3922 % The \nxLkeyword{mirrortype} selects between different types of mirrors. The
3923 % style is controlled with \Lstyle{PiezoMirror}, \Lstyle{ExtendedMirror}, and
3924 % \Lstyle{SemitransMirror}.
3925 % \fi
3926 %
3927 % \iffalse
3928 %<*ignore>
3929 % \fi
3930 \begin{LTXexample}[morekeywords={[21]{mirrortype}}]
3931 \begin{pspicture}(3,2)
3932 \mirror[mirrortype=extended,
3933 beam](0,0)(1.8,1.5)(0,2){ext}
3934 \end{pspicture}
3935 \end{LTXexample}
3936 % \iffalse
3937 %</ignore>
3938 % \fi
3939 %
3940 % \ifGERMAN Beachten Sie, dass der Anschlussdraht für den Piezospiegel nicht
3941 % gezeichnet wird, falls \Lkeyword{extnode} verwendet wird.
3942 % \fi
3943 % \ifENGLISH Note, that the default piece of wire is omitted when using
3944 % \Lkeyword{extnode} with a piezo mirror.
3945 % \fi
3946 % \iffalse
3947 %<*ignore>
3948 % \fi
3949 \begin{LTXexample}[morekeywords={[21]{mirrortype}}]
3950 \begin{pspicture}(3,2)
3951 \mirror[mirrortype=piezo,
3952 beam](0,0)(1.8,1.5)(0,2){piezo}
3953 \end{pspicture}
3954 \end{LTXexample}
3955 % \iffalse
3956 %</ignore>
3957 % \fi
3958 %
3959 % \ifGERMAN Ein halbdurchlässiger Spiegel (\opt{semitrans}) hat, im Gegensatz zu
3960 % den anderen Spiegeltypen, zwei Grenzflächen, deren Abstand und Position vom
3961 % Wert und Vorzeichen von \Lkeyword{mirrordepth} abhängt.
3962 % \fi
3963 % \ifENGLISH A semi-transparent mirror (\opt{semitrans}) has two interfaces, in
3964 % contrast to the other mirror types. Their distance and position depends on the
3965 % value and sign of \Lkeyword{mirrordepth}.
3966 % \fi
3967 % \iffalse
3968 %<*ignore>
3969 % \fi
3970 \begin{LTXexample}[morekeywords={[21]{mirrortype, mirrordepth}}]
3971 \psset{unit=1.5}
3972 \begin{pspicture}(2,2)
3973 \mirror[mirrortype=semitrans](0,1)(1,1)(1,0)
3974 \drawbeam(0,1){}(1,0)
3975 \drawbeam[linecolor=red](2,1){}(1,2)
3976 \drawbeam[beampos=0.05, linecolor=blue](0,1){}(2,1)
3977 \end{pspicture}
3978 \end{LTXexample}
3979
3980 \begin{LTXexample}[morekeywords={[21]{mirrortype, mirrordepth}}]
3981 \psset{unit=1.5}
3982 \begin{pspicture}(2,2)
3983 \mirror[mirrortype=semitrans, mirrordepth=-0.15](0,1)(1,1)(1,0)
3984 \drawbeam(0,1){}(1,0)
3985 \drawbeam[linecolor=red](2,1){}(1,2)
3986 \drawbeam[beampos=0.05, linecolor=blue](0,1){}(2,1)
3987 \end{pspicture}
3988 \end{LTXexample}
3989 % \iffalse
3990 %</ignore>
3991 % \fi
3992 %
3993 % \ifGERMAN Eine negative Spiegeltiefe \Lkeyword{mirrordepth} ist
3994 % äquivalent zu einer positiven Tiefe kombiniert mit
3995 % \Lkeyword{angle}\opt{=180}.
3996 % \fi
3997 % \ifENGLISH A negative \Lkeyword{mirrordepth} is equivalent to a
3998 % positive depth combined with \Lkeyword{angle}\opt{=180}.
3999 % \fi
4000 %
4001 % \boolitem[false]{variable}
4002 % \ifGERMAN
4003 % Zeichnet einen verstellbaren Spiegel, der mit zwei zusätzlichen gekrümmten
4004 % Pfeilen an beiden Seiten angedeutet wird. Das Aussehen, inklusive der Pfeile,
4005 % wird von \Lstyle{VariableStyle} vorgegeben.
4006 % \fi
4007 % \ifENGLISH
4008 % Draw an adjustable mirror which has two additional curved arrows on both
4009 % sides. The appearance including the arrow types is determined by
4010 % \Lstyle{VariableStyle}.
4011 % \fi
4012 % \iffalse
4013 %<*ignore>
4014 % \fi
4015 \begin{LTXexample}[morekeywords={[21]{variable}}]
4016 \begin{pspicture}(3,2)
4017 \mirror[beam, variable](0,0)(1.8,1.5)(0,2){var}
4018 \end{pspicture}
4019 \end{LTXexample}
4020 % \iffalse
4021 %</ignore>
4022 % \fi
4023 %
4024 % \numitem[0.1]{mirrordepth}
4025 % \ifGERMAN Die Gesamttiefe eines breiten Spiegels.\fi
4026 % \ifENGLISH The total depth of an extended mirror.\fi
4027 % \iffalse
4028 %<*ignore>
4029 % \fi
4030 \begin{LTXexample}[morekeywords={[21]{mirrortype, mirrordepth}}]
4031 \begin{pspicture}(3,2)
4032 \mirror[mirrortype=extended, mirrordepth=0.2,
4033 beam](0,0)(1.8,1.5)(0,2)
4034 \end{pspicture}
4035 \end{LTXexample}
4036 % \iffalse
4037 %</ignore>
4038 % \fi
4039 % \end{optionlist}
4040 %
4041 % \begin{stylelist}
4042 % \styleitem[linestyle=none, hatchwidth=0.5\cs{pslinewidth}, hatchsep=1.4\cs{pslinewidth}, fillstyle=hlines]{ExtendedMirror}
4043 % \ifGERMAN Der Stil für den \opt{extended} Spiegel.\fi
4044 % \ifENGLISH The style for the \opt{extended} mirror.\fi
4045 % \iffalse
4046 %<*ignore>
4047 % \fi
4048 \begin{LTXexample}[morekeywords={[21]{mirrortype, ExtendedMirror}}]
4049 \begin{pspicture}(3,2)
4050 \newpsstyle{ExtendedMirror}{fillstyle=solid,
4051 fillcolor=Gold,
4052 linestyle=none}
4053 \mirror[mirrortype=extended,
4054 beam](0,0)(1.8,1.5)(0,2){ext}
4055 \end{pspicture}
4056 \end{LTXexample}
4057 % \iffalse
4058 %</ignore>
4059 % \fi
4060 %
4061 % \styleitem[fillstyle=solid, fillcolor=black!30]{PiezoMirror}
4062 % \ifGERMAN
4063 % Der Stil für den \opt{piezo} Spiegel. Dieser kann auch dazu verwendet
4064 % werden, die Größe des Piezos zu verändern, wie in dem folgenden Beispiel zu sehen ist.
4065 % \fi
4066 % \ifENGLISH
4067 % This style defines the appearance of the \opt{piezo} mirror. This can also
4068 % be used to change the size of piezo part, as the example shows.
4069 % \fi
4070 % \iffalse
4071 %<*ignore>
4072 % \fi
4073 \begin{LTXexample}[morekeywords={[21]{mirrortype, PiezoMirror}}]
4074 \begin{pspicture}(3,2)
4075 \addtopsstyle{PiezoMirror}{xunit=2}
4076 \mirror[mirrortype=piezo,
4077 beam](0,0)(1.8,1.5)(0,2){piezo}
4078 \end{pspicture}
4079 \end{LTXexample}
4080 % \iffalse
4081 %</ignore>
4082 % \fi
4083 %
4084 % \styleitem[linestyle=none, fillstyle=solid, fillcolor=black!30]{SemitransMirror}
4085 % \ifGERMAN
4086 % Der Stil für den \opt{semitrans} Spiegel.
4087 % \fi
4088 % \ifENGLISH
4089 % This style defines the appearance of the \opt{semitrans} mirror.
4090 % \fi
4091 % \end{stylelist}
4092 %
4093 % \ifGERMAN\section{Parabolspiegel}\fi
4094 % \ifENGLISH\section{Parabolic mirror}\fi
4095 %
4096 % \begin{ltxsyntax}
4097 % \dipoledesc{parabolicmirror}
4098 % \iffalse
4099 %<*ignore>
4100 % \fi
4101 \begin{LTXexample}
4102 \begin{pspicture}(3,2)
4103 \parabolicmirror(0,1)(2,1){PM}
4104 \end{pspicture}
4105 \end{LTXexample}
4106 % \iffalse
4107 %</ignore>
4108 % \fi
4109 % \end{ltxsyntax}
4110 %
4111 % \begin{optionlist}
4112 % \numitem[1]{parmirrorwidth}
4113 % \ifGERMAN Die Breite des Parabolspiegels.\fi
4114 % \ifENGLISH The width of the parabolic mirror.\fi
4115 %
4116 % \numitem[1]{parmirrorheight}
4117 % \ifGERMAN Die Höhe des Parabolspiegels.\fi
4118 % \ifENGLISH The height of the parabolic mirror.\fi
4119 % \end{optionlist}
4120 %
4121 % \iffalse
4122 %<*ignore>
4123 % \fi
4124 \begin{LTXexample}
4125 \begin{pspicture}(0,-2)(3,2)
4126 \parabolicmirror[parmirrorheight=4, parmirrorwidth=2](0,0)(3,0)
4127 \addtopsstyle{Beam}{beamalign=abs, linewidth=0.2\pslinewidth, beaminsidelast, stopinsidecount=1}
4128 \multido{\r=-1.55+0.1}{33}{%
4129 \drawbeam[beampos=\r](0,0){1}}
4130 \end{pspicture}
4131 \end{LTXexample}
4132
4133 \begin{LTXexample}
4134 \begin{pspicture}(0,-1)(3,1)
4135 \optplane(0,0)
4136 \parabolicmirror[parmirrorheight=2, parmirrorwidth=1.5](0,0)(3,0)
4137 \addtopsstyle{Beam}{arrows=->, beamalign=abs}
4138 \drawbeam[beampos=0.5, linecolor=red]{1}{2}{1}
4139 \end{pspicture}
4140 \end{LTXexample}
4141 % \iffalse
4142 %</ignore>
4143 % \fi
4144 %
4145 % \ifGERMAN\section{Off-axis-Parabolspiegel}\fi
4146 % \ifENGLISH\section{Off-axis parabolic mirror}\fi
4147 %
4148 % \begin{ltxsyntax}
4149 % \xLtripole{oapmirror}%
4150 % \compitem{oapmirror}[options](in)(center)(focus){label}%
4151 % \iffalse
4152 %<*ignore>
4153 % \fi
4154 \begin{LTXexample}
4155 \begin{pspicture}(3,2.5)
4156 \oapmirror(3,2)(1,2)(2,0){OAP}
4157 \drawwidebeam[beamwidth=0.5](3,2){1}(2,0)
4158 \end{pspicture}
4159 \end{LTXexample}
4160 % \iffalse
4161 %</ignore>
4162 % \fi
4163 % \end{ltxsyntax}
4164 %
4165 % \begin{optionlist}
4166 % \optitem[1]{oapmirroraperture}{\prm{num} or \prm{inner} \prm{outer}}
4167 % \ifGERMAN
4168 % Apertur des Spiegels bezogen auf die Eingangsrichtung. Wird eine
4169 % Zahl angegeben, dann gibt diese die gesamte Apertur an, die vertikal
4170 % und symmetrisch zur Verbindung zwischen \prm{in} und \prm{center}
4171 % gemessen wird. Bei zwei Zahlen geben diese die innere und äußere
4172 % Apertur an.
4173 % \fi
4174 % \ifENGLISH
4175 % Mirror aperture with respect to the input direction. If a single
4176 % number is given, it specifies the whole aperture, measured
4177 % perpendicularly and symmetric to the connection from \prm{in} to
4178 % \prm{center}. Two numbers give the inner and the outer apertures.
4179 % \fi
4180 % \end{optionlist}
4181 %
4182 % \ifGERMAN \newpage
4183 % Die Konstruktion des Spiegels anhand der vorgegebenen Punkte geschieht
4184 % wie folgt: Die Gerade von Knoten \prm{in} zu \prm{center} liegt
4185 % parallel zur optischen Achse, \prm{focus} gibt den Fokuspunkt der
4186 % Parabel an. Die Apertur des Spiegels wird mittels des Parameters
4187 % \Lkeyword{oapmirroraperture} angegeben, gemessen senkrecht zum
4188 % einfallenden Strahl.
4189 %
4190 % Die unterschiedlichen Parameter und die zugrundeliegende ganze Parabel
4191 % sind in der folgenden Skizze dargestellt:
4192 % \fi
4193 % \ifENGLISH
4194 % The mirror construction using the given nodes is done as follows: the
4195 % line from node \prm{in} to \prm{center} is parallel to the optical
4196 % axis, \prm{focus} specifies the focal point of the parabola. The
4197 % mirror aperture is given by the parameter
4198 % \Lkeyword{oapmirroraperture}, measured perpendicular to the incoming
4199 % beam.
4200 %
4201 % The different parameters and the whole original parabola are shown in
4202 % the following illustration:
4203 % \fi
4204 %
4205 % \iffalse
4206 %<*ignore>
4207 % \fi
4208 \ifENGLISH
4209 \begin{LTXexample}[linerange={1-2,4-6,15-15}]
4210 \begin{pspicture}(6,5)
4211 \pnodes(5.5,3){In}(1.5,3){Center}(1.5,1.5){Focus}
4212 \oapmirror[oapmirroraperture=3 2, linestyle=dashed, style=Refline](In)(Center)(Focus)
4213 \oapmirror[oapmirroraperture=1.5, linewidth=3\pslinewidth, plotpoints=200](In)(Center)(Focus){OAP}
4214 \multido{\r=-0.5+0.5}{3}{%
4215 \drawbeam[beampos=\r](In){}(Focus)}
4216 \psset{style=Refline}\color{Refline}
4217 \psdot(In)\uput[0](In){In}\psdot(Center)\uput[180](Center){\rput[r](0,0){Center}}\psdot(Focus)\uput[-90](Focus){Focus}
4218 \pnodes([Xnodesep=1]Center){TmpA}([Xnodesep=1,offset=0.75]Center){TmpB}
4219 \psline[arrowscale=1.5, arrows=<->](TmpA)(TmpB)\rput[l]([Xnodesep=0.3]TmpB){outer aperture}
4220 \pnode([Xnodesep=1,offset=-0.75]Center){TmpB}
4221 \psline[arrowscale=1.5, arrows=<->](TmpA)(TmpB)\rput[l]([Xnodesep=0.3]TmpB){inner aperture}
4222 \pnode(In|Focus){Tmp}
4223 \psline[linestyle=dotted]([Xnodesep=-1.5]Focus)(Tmp)\rput[r]([offset=-0.5]Tmp){optical axis}
4224 \end{pspicture}
4225 \end{LTXexample}
4226 \fi\ifGERMAN
4227 \begin{LTXexample}[linerange={1-2,4-6,15-15}]
4228 \begin{pspicture}(6,5)
4229 \pnodes(5.5,3){In}(1.5,3){Center}(1.5,1.5){Focus}
4230 \oapmirror[oapmirroraperture=3 2, linestyle=dashed, style=Refline](In)(Center)(Focus)
4231 \oapmirror[oapmirroraperture=1.5, linewidth=3\pslinewidth, plotpoints=200](In)(Center)(Focus){OAP}
4232 \multido{\r=-0.5+0.5}{3}{%
4233 \drawbeam[beampos=\r](In){}(Focus)}
4234 \psset{style=Refline}\color{Refline}
4235 \psdot(In)\uput[0](In){In}\psdot(Center)\uput[180](Center){\rput[r](0,0){Center}}\psdot(Focus)\uput[-90](Focus){Focus}
4236 \pnodes([Xnodesep=1]Center){TmpA}([Xnodesep=1,offset=0.75]Center){TmpB}
4237 \psline[arrowscale=1.5, arrows=<->](TmpA)(TmpB)\rput[l]([Xnodesep=0.3]TmpB){aeussere Apertur}
4238 \pnode([Xnodesep=1,offset=-0.75]Center){TmpB}
4239 \psline[arrowscale=1.5, arrows=<->](TmpA)(TmpB)\rput[l]([Xnodesep=0.3]TmpB){innere Apertur}
4240 \pnode(In|Focus){Tmp}
4241 \psline[linestyle=dotted]([Xnodesep=-1.5]Focus)(In|Focus)\rput[r]([offset=-0.5]Tmp){optische Achse}
4242 \end{pspicture}
4243 \end{LTXexample}
4244 \fi
4245 % \iffalse
4246 %</ignore>
4247 % \fi
4248 %
4249 %
4250 % \ifGERMAN\section{Strahlteiler}\fi
4251 % \ifENGLISH\section{Beamsplitter}\fi
4252 %
4253 % \begin{ltxsyntax}
4254 % \tripoledesc{beamsplitter}
4255 % \iffalse
4256 %<*ignore>
4257 % \fi
4258 \begin{LTXexample}
4259 \begin{pspicture}(3,2)
4260 \beamsplitter[beam](0,1)(2,1)(2,0){BS}
4261 \end{pspicture}
4262 \end{LTXexample}
4263 % \iffalse
4264 %</ignore>
4265 % \fi
4266 % \end{ltxsyntax}
4267 %
4268 % \begin{optionlist}
4269 % \numitem[0.8]{bssize}
4270 % \ifGERMAN Die Größe des Strahlteilers.\fi
4271 % \ifENGLISH The beamsplitter size.\fi
4272 %
4273 % \choitem[cube]{bsstyle}{cube, plate}
4274 % \ifGERMAN
4275 % Wählt zwischen zwei Strahlteilertypen: einem Strahlteilerwürfel (\opt{cube})
4276 % und einem halbdurchlässigen Spiegel (\opt{plate}). Dieser halbdurchlässige
4277 % Spiegel ist äquivalent zu \Lcomp{mirror} mit
4278 % \Lkeyword{mirrortype}\opt{=semitrans} für \Lkeyword{mirrordepth}\opt{=0}.
4279 % \fi
4280 % \ifENGLISH
4281 % Selects between two types of beamsplitters: the beamsplitter cube (\opt{cube})
4282 % and the semitransparent mirror (\opt{plate}). This semitransparent mirror ist
4283 % equivalent to \Lcomp{mirror} with \Lkeyword{mirrortype}\opt{=semitrans} and
4284 % \Lkeyword{mirrordepth}\opt{=0}.
4285 % \fi
4286 % \iffalse
4287 %<*ignore>
4288 % \fi
4289 \begin{LTXexample}[morekeywords={[21]{bsstyle}}]
4290 \begin{pspicture}(3,2)
4291 \beamsplitter[bsstyle=plate, beam](0,1)(2,1)(2,0){BS}
4292 \end{pspicture}
4293 \end{LTXexample}
4294 % \iffalse
4295 %</ignore>
4296 % \fi
4297 % \end{optionlist}
4298 %
4299 % \ifGERMAN\section{Optisches Gitter}\fi
4300 % \ifENGLISH\section{Optical grating}\fi
4301 %
4302 % \begin{ltxsyntax}
4303 % \tripoledesc{optgrating}
4304 % \iffalse
4305 %<*ignore>
4306 % \fi
4307 \begin{LTXexample}
4308 \begin{pspicture}(3,2)
4309 \optgrating[beam](0,2)(1.8,1.5)(0,0){G}
4310 \end{pspicture}
4311 \end{LTXexample}
4312 % \iffalse
4313 %</ignore>
4314 % \fi
4315 % \end{ltxsyntax}
4316 %
4317 % \begin{optionlist}
4318 % \numitem[1]{gratingwidth}
4319 % \ifGERMAN Die Breite des Gitters.\fi
4320 % \ifENGLISH The width of the grating.\fi
4321 %
4322 % \numitem[0.15]{gratingheight}
4323 % \ifGERMAN Die Gesamthöhe des Gitters.\fi
4324 % \ifENGLISH The total height of the grating.\fi
4325 %
4326 % \numitem[0.075]{gratingdepth}
4327 % \ifGERMAN
4328 % Die absolute Modulationstiefe der Gitterstruktur. Die Gesamthöhe wird
4329 % an diesen Wert angepasst falls sie kleiner als die Modulationtiefe ist,
4330 % andernfalls wird sie nicht beinflusst.
4331 % \fi
4332 % \ifENGLISH
4333 % The modulation depth of the grating structure. The total height is
4334 % adapted to this value if it is smaller than the modulation
4335 % depth. Otherwise the total height is not affected.
4336 % \fi
4337 % \iffalse
4338 %<*ignore>
4339 % \fi
4340 \begin{LTXexample}[morekeywords={[21]{gratingdepth}}]
4341 \begin{pspicture}(3,2)
4342 \optgrating[gratingdepth=0.05,
4343 beam](0,2)(1.8,1.5)(0,0){G}
4344 \end{pspicture}
4345 \end{LTXexample}
4346 % \iffalse
4347 %</ignore>
4348 % \fi
4349 %
4350 % \intitem[10]{gratingcount}
4351 % \ifGERMAN Die Anzahl der Gitterlinien.\fi
4352 % \ifENGLISH The number of grating grooves.\fi
4353 % \iffalse
4354 %<*ignore>
4355 % \fi
4356 \begin{LTXexample}[morekeywords={[21]{gratingcount}}]
4357 \begin{pspicture}(3,2)
4358 \optgrating[gratingcount=3,
4359 beam](0,2)(1.8,1.5)(0,0){G}
4360 \end{pspicture}
4361 \end{LTXexample}
4362 % \iffalse
4363 %</ignore>
4364 % \fi
4365 %
4366 % \choitem[blazed]{gratingtype}{blazed, binary}
4367 % \ifGERMAN
4368 % Wählt zwischen einem binären Gitter (\opt{binary}) und einem Blazegitter
4369 % (\opt{blazed}).
4370 % \fi
4371 % \ifENGLISH
4372 % Select between a \opt{binary} and a \opt{blazed} grating.
4373 % \fi
4374 % \iffalse
4375 %<*ignore>
4376 % \fi
4377 \begin{LTXexample}[morekeywords={[21]{gratingtype}}]
4378 \begin{pspicture}(3,2)
4379 \optgrating[gratingtype=binary,
4380 beam](0,2)(1.8,1.5)(0,0){G}
4381 \end{pspicture}
4382 \end{LTXexample}
4383 % \iffalse
4384 %</ignore>
4385 % \fi
4386 %
4387 % \choitem[top]{gratingalign}{t, top, c, center}
4388 % \ifGERMAN
4389 % Wählt, ob die Reflektionsebene auf den Gitterspitzen (\opt{top}), oder
4390 % in der Mitte des Gitters (\opt{center}) liegt. Wählt man \opt{center}
4391 % aus, macht es Sinn die \Lenv{optexp}-Umgebung oder eine
4392 % halbtransparente Strahlfüllung zu verwenden.
4393 % \fi
4394 % \ifENGLISH
4395 % Selects if the reflection plane resides on \opt{top} of the grating or
4396 % in its \opt{center}. If you choose \opt{center}, you should use the
4397 % \Lenv{optexp} environment or a semitransparent beam filling.
4398 % \fi
4399 %
4400 % \iffalse
4401 %<*ignore>
4402 % \fi
4403 \begin{LTXexample}[morekeywords={[21]{gratingalign}}]
4404 \begin{pspicture}(3,2)
4405 \pnodes(0.5,0){A}(0.5,1.5){B}(2,1.5){C}(2,0){D}
4406 \psset{unit=1.5, labeloffset=0.4}
4407 \begin{optexp}
4408 \optgrating[gratingalign=top](A)(B)(C){top}
4409 \optgrating[gratingalign=center](B)(C)(D){center}
4410 \drawwidebeam[fillstyle=solid, fillcolor=green!50, beamwidth=0.5](A){-}(D)
4411 \end{optexp}
4412 \end{pspicture}
4413 \end{LTXexample}
4414 % \iffalse
4415 %</ignore>
4416 % \fi
4417 %
4418 % \boolitem[false]{reverse}
4419 % \ifGERMAN
4420 % Invertiert die Steigung des Blazegitters.
4421 % \fi
4422 % \ifENGLISH
4423 % Reverse the slope of the grooves of the \opt{blazed} grating.
4424 % \fi
4425 % \iffalse
4426 %<*ignore>
4427 % \fi
4428 \begin{LTXexample}[morekeywords={[21]{reverse}}]
4429 \begin{pspicture}(3,2)
4430 \optgrating[reverse, beam](0,2)(1.8,1.5)(0,0){grating}
4431 \end{pspicture}
4432 \end{LTXexample}
4433 % \iffalse
4434 %</ignore>
4435 % \fi
4436 %
4437 % \optitem[0.7\nxLcs{pslinewidth}]{gratinglinewidth}{\prm{num} or \prm{dimen}}
4438 % \ifGERMAN \linewidthexplanation{des Gitters}{Gitter}\fi
4439 % \ifENGLISH \linewidthexplanation{grating}{gratings}\fi
4440 % \end{optionlist}
4441 %
4442 % \ifGERMAN\section{Transmissionsgitter}\fi
4443 % \ifENGLISH\section{Transmission grating}\fi
4444 %
4445 % \begin{ltxsyntax}
4446 % \tripoledesc{transmissiongrating}
4447 % \iffalse
4448 %<*ignore>
4449 % \fi
4450 \begin{LTXexample}
4451 \begin{pspicture}(3,2)
4452 \transmissiongrating[beam](0,1)(1.5,1)(3,0.5){TG}
4453 \end{pspicture}
4454 \end{LTXexample}
4455 % \iffalse
4456 %</ignore>
4457 % \fi
4458 % \end{ltxsyntax}
4459 %
4460 % \ifGERMAN
4461 % Das Transmissiongitter unterstützt alle Optionen von
4462 % \Lcomp{optgrating}. Der Strahlengang wird so berechnet, dass der
4463 % Strahl an einer Ebene senkrecht zum dargestellten Gitter reflektiert
4464 % wird. Diese Ebene ist im folgenden Beispiel dargestellt:
4465 % \fi
4466 % \ifENGLISH
4467 % The transmission grating supports all options of
4468 % \Lcomp{optgrating}. The beam path is calculated such, that the beam is
4469 % reflected at an interface which is perpendicular to the drawn
4470 % grating. This virtual interface is shown in the following example:
4471 % \fi
4472 %
4473 % \hspace*{\fill}%
4474 % \begin{pspicture}(3,3)
4475 % \transmissiongrating[beam, label=0 . . relative](0,1)(1.5,1)(3,0.5){\psline[linewidth=0.7\pslinewidth, linestyle=dashed](0,-1)(0,1)}
4476 % \ifENGLISH
4477 % \rput[lB](0,2.4){\parbox{3cm}{virtual reflection interface}}
4478 % \fi
4479 % \ifGERMAN
4480 % \rput[lB](0,2.4){\parbox{3cm}{Virtuelle \\ Reflexionsebene}}
4481 % \fi
4482 % \end{pspicture}
4483 % \hspace*{\fill}%
4484 % \begin{pspicture}(3.5,3)
4485 % \pnodes(0,1.3){A}(2,1.3){B}(1,0.3){C}
4486 % \optgrating[reverse, gratingcount=9](A)(B)(C)
4487 % \optplane[angle=45](C)
4488 % \addtopsstyle{Beam}{ArrowInside=->, ArrowInsidePos=0.8, arrowinset=0, arrowscale=1.5}
4489 % \drawbeam[linecolor=black](A){1}
4490 % \addtopsstyle{Beam}{loadbeam, savebeam=false}
4491 % \drawbeam[linecolor=green]{1-2}
4492 % \drawbeam[linecolor=red, beamangle=15]{1-2}
4493 % \drawbeam[linecolor=blue, beamangle=-15]{1-2}
4494 % \ifENGLISH
4495 % \rput[lB](0,2.4){\parbox{5cm}{reflection grating\\\Lcomp{optgrating}}}
4496 % \fi
4497 % \ifGERMAN
4498 % \rput[lB](0,2.4){\parbox{5cm}{Reflexionsgitter\\\Lcomp{optgrating}}}
4499 % \fi
4500 % \end{pspicture}
4501 % \hspace*{\fill}%
4502 % \begin{pspicture}(4,3)
4503 % \pnodes(0,1.3){A}(2,1.3){B}(4,1){C}
4504 % \transmissiongrating[reverse, gratingcount=9](A)(B)(C)
4505 % \optplane[angle=-30](C)
4506 % \addtopsstyle{Beam}{ArrowInside=->, ArrowInsidePos=0.8, arrowinset=0, arrowscale=1.5}
4507 % \drawbeam[linecolor=black](A){1}
4508 % \addtopsstyle{Beam}{loadbeam, savebeam=false}
4509 % \drawbeam[linecolor=green]{1-2}
4510 % \drawbeam[linecolor=red, beamangle=5]{1-2}
4511 % \drawbeam[linecolor=blue, beamangle=-5]{1-2}
4512 % \ifENGLISH
4513 % \rput[lB](0,2.4){\parbox{5cm}{transmission grating\\\Lcomp{transmissiongrating}}}
4514 % \fi
4515 % \ifGERMAN
4516 % \rput[lB](0,2.4){\parbox{5cm}{Transmissionsgitter\\\Lcomp{transmissiongrating}}}
4517 % \fi
4518 % \end{pspicture}
4519 % \hspace*{\fill}%
4520 %
4521 % \ifENGLISH If this is not what you want, you may e.g. rotate the
4522 % component further with \Lkeyword{angle}, and then adjust also the
4523 % \Lkeyword{beamangle}.
4524 % \fi
4525 % \ifGERMAN Ist dieses Verhalten nicht gewünscht, so kann man z.B. die
4526 % Komponente mit \Lkeyword{angle} weiter drehen, und den Strahlwinkel
4527 % mit \Lkeyword{beamangle} entsprechend korrigieren.
4528 % \fi
4529 %
4530 % \iffalse
4531 %<*ignore>
4532 % \fi
4533 \begin{LTXexample}
4534 \begin{pspicture}(3,1.4)
4535 \pnodes(0,1){A}(1,1){B}(3,0.6){C}
4536 \transmissiongrating[angle=-10, reverse](A)(B)(C){TG}
4537 \addtopsstyle{Beam}{ArrowInside=->, ArrowInsidePos=0.8, arrowinset=0, arrowscale=1.5}
4538 \drawbeam[linecolor=black](A){1}
4539 \drawbeam[linecolor=green, loadbeam, beamangle=20]{1}(C)
4540 \end{pspicture}
4541 \end{LTXexample}
4542 % \iffalse
4543 %</ignore>
4544 % \fi
4545 %
4546 % \ifGERMAN\section{Akustooptischer Modulator}\fi
4547 % \ifENGLISH\section{Acousto-optic modulator}\fi
4548 %
4549 % \begin{ltxsyntax}
4550 % \xLtripole{optaom}\compitem{optaom}[options](in)(trans)(diff){label}
4551 % \end{ltxsyntax}
4552 % \iffalse
4553 %<*ignore>
4554 % \fi
4555 \begin{LTXexample}[linerange={1-3,7-7}]
4556 \begin{pspicture}(3,2)
4557 \pnodes(0,1.5){A}(3,0.5){B}(3,1.5){C}
4558 \optaom[beam](A)(B)(C){AOM}
4559 \psdots(A)(B)(C)
4560 \color{Refline}
4561 \uput[-90](A){A}\uput[-90](B){B}\uput[-90](C){C}
4562 \end{pspicture}
4563 \end{LTXexample}
4564 % \iffalse
4565 %</ignore>
4566 % \fi
4567 %
4568 % \ifGERMAN
4569 % Dieses Makro stellt einen akustooptischen Modulator dar. Dieser kann,
4570 % ähnlich einem \Lcomp{beamsplitter} entweder transmittierend oder
4571 % reflektierend sein. Beachten Sie, dass die Knoten nicht so angeordnet
4572 % sind, wie bei den üblichen Tripolen wie z. B. dem
4573 % \Lcomp{optgrating}. Der mittlere Knoten gibt die Richtung eines
4574 % transmittierten, und der dritte Knoten die Richtung der ersten
4575 % Beugungsordnung an.
4576 %
4577 % Diese erste Umsetzung des AOM in Version 4.8 ist
4578 % noch etwas experimentell, da ich nicht genügend Testfälle hatte um
4579 % alle Eventualitäten zu prüfen. Es könnten sich also noch Änderungen
4580 % ergeben, die nicht abwärts kompatibel sind.
4581 % \fi
4582 % \ifENGLISH
4583 % This macro draw an acousto-optic modulator, which either be
4584 % transmittive or reflective, like a \Lcomp{beamsplitter}. Please note,
4585 % that the nodes do not correspond to those of a usual tripole like an
4586 % \Lcomp{optgrating}. The second node is in the direction of the
4587 % transmitted beam, the third node gives the direction of the first
4588 % diffraction order.
4589 %
4590 % This first implementation in version 4.8 is still experimental,
4591 % because I didn't have enough test cases to check all possible
4592 % cases. Therefore, future versions may have changes, which are not
4593 % backwards compatible.
4594 % \fi
4595 %
4596 % \begin{optionlist}
4597 % \numitem[1]{aomheight}
4598 % \ifGERMAN Die Höhe des Modulators.\fi
4599 % \ifENGLISH The height of the modulator.\fi
4600 %
4601 % \numitem[1.5]{aomwidth}
4602 % \ifGERMAN Die Breite des Modulators.\fi
4603 % \ifENGLISH The width of the modulator.\fi
4604 %
4605 % \optitem{aomsize}{\prm{width} \prm{height}}
4606 % \ifGERMAN Die Breite und Höhe des Modulators, äquivalent zum Aufruf von
4607 % \Lkeyword{aomwidth} und \Lkeyword{aomheight}.
4608 % \fi
4609 % \ifENGLISH The width and height of the modulator, is equivalent to calling both
4610 % \Lkeyword{aomwidth} and \Lkeyword{aomheight}.
4611 % \fi
4612 %
4613 % \intitem[9]{aomgratingcount}
4614 % \ifGERMAN
4615 % Gibt die Anzahl der Gitterlinien an. Werden weitere Änderungen des
4616 % Gitters oder des Modulators allgemein gewünscht, dann muss der Parameter
4617 % \Lkeyword{aomcomp} verwendet werden.
4618 % \fi
4619 % \ifENGLISH
4620 % Changes the number of grating lines. For other changes of the grating
4621 % you must use the \Lkeyword{aomcomp} parameter to redefine the whole grating.
4622 % \fi
4623 %
4624 % \choitem[symmetric]{aomalign}{symmetric, straight}
4625 % \ifGERMAN
4626 % Die Ausrichtung eines \Lcomp{optaom} bezüglich der drei Referenzknoten
4627 % kann mit diesem Parameter eingestellt werden. Die symmetrische
4628 % (\opt{symmetric}) Ausrichtung ist im folgenden Beispiel zu sehen:
4629 % \fi
4630 % \ifENGLISH
4631 % The alignment of an \Lcomp{optaom} with respect to the three reference
4632 % nodes can be set with this option. The \opt{symmetric} alignment is
4633 % shown in the following example:
4634 % \fi
4635 %
4636 % \iffalse
4637 %<*ignore>
4638 % \fi
4639 \begin{LTXexample}[linerange={1-6,11-11}]
4640 \begin{pspicture}(3,2)
4641 \pnodes(0,1.5){A}(3,0.5){B}(3,1.5){C}
4642 \optaom[aomalign=symmetric](A)(B)(C){symmetric}
4643 \addtopsstyle{Beam}{fillstyle=solid, linestyle=none, beamwidth=0.1}
4644 \drawwidebeam[fillcolor=red!50](A){}(C)
4645 \drawwidebeam[fillcolor=red](A){}(B)
4646 \color{Refline}
4647 \psdot(A)\uput[-90](A){A}
4648 \psdot(B)\uput[-90](B){B}
4649 \psdot(C)\uput[90](C){C}
4650 \end{pspicture}
4651 \end{LTXexample}
4652 % \iffalse
4653 %</ignore>
4654 % \fi
4655 %
4656 % \ifGERMAN
4657 % In der geraden (\opt{straight}) Ausrichtung sieht der Strahlengang wie
4658 % folgt aus:
4659 % \fi
4660 % \ifENGLISH
4661 % For \opt{straight} alignment the sketch looks like
4662 % \fi
4663 %
4664 % \iffalse
4665 %<*ignore>
4666 % \fi
4667 \begin{LTXexample}[linerange={1-6,11-11}]
4668 \begin{pspicture}(3,2)
4669 \pnodes(0,1){A}(3,1){B}(3,1.5){C}
4670 \optaom[aomalign=straight](A)(B)(C){straight}
4671 \addtopsstyle{Beam}{fillstyle=solid, linestyle=none, beamwidth=0.1}
4672 \drawwidebeam[fillcolor=red!50](A){}(C)
4673 \drawwidebeam[fillcolor=red](A){}(B)
4674 \color{Refline}
4675 \psdot(A)\uput[-90](A){A}
4676 \psdot(B)\uput[-90](B){B}
4677 \psdot(C)\uput[90](C){C}
4678 \end{pspicture}
4679 \end{LTXexample}
4680 % \iffalse
4681 %</ignore>
4682 % \fi
4683 %
4684 % \choitem[parallel]{aomreflalign}{perp, parallel}
4685 % \ifGERMAN
4686 % Die Ausrichtung der reflektiven Grenzfläche kann entweder
4687 % \opt{parallel} oder senkrecht (\opt{perp}) zur Komponente
4688 % liegen. Diese Option ist lediglich aus technischer Sicht notwendig,
4689 % die Richtung des reflektierten Strahls wird dadurch nicht
4690 % verändert.
4691 % \fi
4692 % \ifENGLISH
4693 % The reflective interface can be oriented either \opt{parallel} or
4694 % \opt{perp}endicular to the component. This option was necessary in
4695 % first place for technical reasons, the direction of the reflected ray
4696 % is not affected by this option.
4697 % \fi
4698 %
4699 % \iffalse
4700 %<*ignore>
4701 % \fi
4702 \begin{LTXexample}[linerange={1-5,10-10}]
4703 \begin{pspicture}(3,2)
4704 \pnodes(0,1.5){A}(3,0.5){B}(3,1.5){C}
4705 \optaom[aomreflalign=parallel](A)(B)(C){parallel}
4706 \addtopsstyle{Beam}{fillstyle=solid, linestyle=none, beamwidth=0.2}
4707 \drawwidebeam[fillcolor=red!50](A){}(C)
4708 \color{Refline}
4709 \psdot(A)\uput[-90](A){A}
4710 \psdot(B)\uput[-90](B){B}
4711 \psdot(C)\uput[90](C){C}
4712 \end{pspicture}
4713 \end{LTXexample}
4714
4715 \begin{LTXexample}[linerange={1-5,10-10}]
4716 \begin{pspicture}(3,2)
4717 \pnodes(0,1.5){A}(3,0.5){B}(3,1.5){C}
4718 \optaom[aomreflalign=perp](A)(B)(C){perp}
4719 \addtopsstyle{Beam}{fillstyle=solid, linestyle=none, beamwidth=0.2}
4720 \drawwidebeam[fillcolor=red!50](A){}(C)
4721 \color{Refline}
4722 \psdot(A)\uput[-90](A){A}
4723 \psdot(B)\uput[-90](B){B}
4724 \psdot(C)\uput[90](C){C}
4725 \end{pspicture}
4726 \end{LTXexample}
4727 % \iffalse
4728 %</ignore>
4729 % \fi
4730 %
4731 % \ifGERMAN
4732 % Das folgende Beispiel zeigt einen Fall, der mit
4733 % \Lkeyword{aomreflalign}\opt{=parallel} nicht funktioniert, da der
4734 % Einfallswinkel so flach ist, dass die Schnittpunkte mit der
4735 % reflektierenden Grenzfläche außerhalb der Komponente liegen:
4736 % \fi
4737 % \ifENGLISH
4738 % The following example show a use case, which doesn't work properly
4739 % with \Lkeyword{aomreflalign}\opt{=parallel}, because the incident
4740 % angle is so shallow, that the intersection points with the interface
4741 % lay outside of the component.
4742 % \fi
4743 % \iffalse
4744 %<*ignore>
4745 % \fi
4746 \begin{LTXexample}
4747 \begin{pspicture}(3,1.5)
4748 \pnodes(0,1.1){A}(3,0.8){B}(3,1.1){C}
4749 \optaom[aomreflalign=parallel](A)(B)(C){parallel}
4750 \addtopsstyle{Beam}{fillstyle=solid, linestyle=none, beamwidth=0.2}
4751 \drawwidebeam[fillcolor=red!50](A){}(C)
4752 \end{pspicture}
4753 \end{LTXexample}
4754 % \iffalse
4755 %</ignore>
4756 % \fi
4757 %
4758 % \choitem[default]{aomcomp}{default, \prm{macro}}
4759 % \ifGERMAN Tauscht die Gitterlinien durch eine beliebige Zeichung aus.\fi
4760 % \ifENGLISH Changes the grating lines to an arbitrary drawing.\fi
4761 %
4762 % \intitem[2]{diffractionorders}
4763 % \ifGERMAN
4764 % Die Anzahl der Beugungsordnungen (positive und negative), die mit
4765 % \Lkeyword{beamdiffractionorder} ausgewählt werden können, also
4766 % $-$\prm{num},$-$\prm{num}$+1$,\ldots ,\prm{num}.
4767 %
4768 % Gleichzeitig werden entsprechende Knoten
4769 % \lstinline!\oenode{DO-1}{<comp>}!, \lstinline!\oenode{DO0}{<comp>}!,
4770 % \lstinline!\oenode{DO1}{<comp>}! usw. definiert.
4771 % \fi
4772 % \ifENGLISH
4773 % The number or diffraction orders (positive and negative) which can be
4774 % selected with \Lkeyword{beamdiffractionorder},
4775 % i.e. $-$\prm{num},$-$\prm{num}$+1$,\ldots ,\prm{num}.
4776 %
4777 % At the same time the nodes \lstinline!\oenode{DO-1}{<comp>}!,
4778 % \lstinline!\oenode{DO0}{<comp>}!, \lstinline!\oenode{DO1}{<comp>}!
4779 % etc. are defined.
4780 % \fi
4781 %
4782 % \iffalse
4783 %<*ignore>
4784 % \fi
4785 \begin{LTXexample}
4786 \begin{pspicture}(0,0.6)(4.3,3.6)
4787 \pnodes(0,2.5){A}(4,2){B}(4,2.5){C}
4788 \optaom[aomsize=1 2, aomreflalign=perp, diffractionorders=3](A)(B)(C)
4789 \addtopsstyle{Beam}{beamwidth=0.2, linestyle=none, fillstyle=solid}
4790 \drawwidebeam[fillcolor=red!40](A){}(C)
4791 \drawwidebeam[fillcolor=red](A){}(B)
4792 \multido{\i=-3+1}{7}{%
4793 \psdot(\oenode{DO\i}{})\uput[0](\oenode{DO\i}{}){\i}}%
4794 \end{pspicture}%
4795 \end{LTXexample}
4796 % \iffalse
4797 %</ignore>
4798 % \fi
4799 %
4800 % \intitem[\{\}]{beamdiffractionorder}
4801 % \ifGERMAN
4802 % Die Beugungsordnung, die für einen reflektierten Strahl durch den AOM
4803 % verwendet wird. Wenn der Wert leer ist, \opt{\{\}} dann wird die
4804 % Option ignoriert.
4805 %
4806 % Mit Verwendung dieser Option wird unmittelbar das Verhalten der
4807 % Grenzfläche festgelegt, hängt also nicht von der relativen Position
4808 % von AOM und der folgenden Komponente ab. Für
4809 % \Lkeyword{beamdiffractionorder}$\neq 0$ wird der Strahl reflektiert,
4810 % für den Wert $0$ hingegen transmittiert. Der Parameter
4811 % \Lkeyword{beammode} wird dann ignoriert.
4812 %
4813 % Es können nur die Beugungsordnungen verwendet werden, die für die
4814 % entsprechende Komponente mit \Lkeyword{diffractionorders} definiert
4815 % wurden. Wird eine nicht-definierte Ordnung verwendet, dann wird die
4816 % nächstliegende verwendet und eine Postscript-Warnung (siehe
4817 % \Lkeyword{pswarning}) ausgegeben.
4818 % \fi
4819 % \ifENGLISH
4820 % The diffraction order, which is used for a reflected beam going
4821 % through the aom. The option is ignored if its value is empty
4822 % \opt{\{\}}.
4823 %
4824 % By using this option you automatically select the behaviour of the
4825 % interface, which then doesn't depend on the relative position of AOM
4826 % and the following component. For \Lkeyword{beamdiffractionorder}$\neq
4827 % 0$ a beam gets reflected, for the value $0$ it gets transmitted. The
4828 % parameter \Lkeyword{beammode} is ignored.
4829 %
4830 % You can select only those orders, where have been defined for the
4831 % respective component with \Lkeyword{diffractionorders}. If an
4832 % undefined order is selected, the closest one is choosen instead and a
4833 % Postscript warning is issued (see \Lkeyword{pswarning}).
4834 % \fi
4835 %
4836 % \iffalse
4837 %<*ignore>
4838 % \fi
4839 \begin{LTXexample}[pos=t, linerange={1-7,12-12}]
4840 \begin{pspicture}(0,-0.2)(4.4,3.8)
4841 \pnodes(0,2.5){A}(4,2){B}(4,2.5){C}
4842 \optaom[aomsize=1 2, aomreflalign=perp, diffractionorders=3](A)(B)(C)
4843 \optplane(B)
4844 \addtopsstyle{Beam}{beamwidth=0.2, linestyle=none, fillstyle=solid}
4845 \multido{\i=-3+1,\r=10+15}{7}{%
4846 \drawwidebeam[fillcolor=red!\r, beamdiffractionorder=\i](A){-}}
4847 \color{Refline}
4848 \uput[90](A){A}\psdot(A)
4849 \uput[0](B){B}\psdot(B)
4850 \uput[0](C){C}\psdot(C)
4851 \end{pspicture}%
4852 \end{LTXexample}
4853 % \iffalse
4854 %</ignore>
4855 % \fi
4856 % \end{optionlist}
4857 %
4858 % \ifGERMAN\section{Prisma}\fi
4859 % \ifENGLISH\section{Prism}\fi
4860 %
4861 % \begin{ltxsyntax}
4862 % \tripoledesc{optprism}
4863 % \iffalse
4864 %<*ignore>
4865 % \fi
4866 \begin{LTXexample}
4867 \begin{pspicture}(3,2)
4868 \optprism[beam](0,1)(2,1)(3,0){Prism}
4869 \end{pspicture}
4870 \end{LTXexample}
4871 % \iffalse
4872 %</ignore>
4873 % \fi
4874 % \end{ltxsyntax}
4875 % \ifGERMAN
4876 % Das Prisma wird immer symmetrisch bezüglich der \prm{in} und \prm{out}
4877 % Knoten ausgerichtet. Für asymmetrischen Strahlengang siehe
4878 % \prettyref{chap:connecting}.
4879 % \fi
4880 % \ifENGLISH
4881 % The prism is always placed symmetric between \prm{in} and \prm{out}
4882 % nodes. For asymmetric beam traces see \prettyref{chap:connecting}.
4883 % \fi
4884 %
4885 % \begin{optionlist}
4886 % \numitem[1]{prismsize}
4887 % \ifGERMAN Die Höhe des Prismas.\fi
4888 % \ifENGLISH The height of the prism.\fi
4889 %
4890 % \numitem[60]{prismangle}
4891 % \ifGERMAN Der obere Winkel des Prismas.\fi
4892 % \ifENGLISH The upper angle of the prism.\fi
4893 % \iffalse
4894 %<*ignore>
4895 % \fi
4896 \begin{LTXexample}[morekeywords={[21]prismangle}]
4897 \begin{pspicture}(3,2)
4898 \optprism[prismangle=30, beam](0,1)(2,1)(3,0){Prism}
4899 \end{pspicture}
4900 \end{LTXexample}
4901 % \iffalse
4902 %</ignore>
4903 % \fi
4904 %
4905 % \choitem[transmittive]{prismtype}{transmittive, reflective}
4906 % \ifGERMAN Ist dieser Parameter auf \opt{reflective} gesetzt, so wird
4907 % die Grundfläche als zusätzliche, reflektierende Grenzfläche
4908 % verwendet.
4909 % \fi
4910 % \ifENGLISH If this parameter is set to \opt{reflective}, the prism
4911 % base is used as additional, reflective interface.
4912 % \fi
4913 % \iffalse
4914 %<*ignore>
4915 % \fi
4916 \begin{LTXexample}[morekeywords={[21]prismtype}]
4917 \begin{pspicture}(1.5,0.6)(5.1,2.2)
4918 \optprism[prismtype=reflective](0,1)(3,0.9)(6,1)
4919 \lens(1,2)(\oenodeIfc{2}{1})
4920 \lens(\oenodeIfc{2}{1})(5,2)
4921 \drawwidebeam[beamwidth=0.3, fillstyle=solid, fillcolor=green, opacity=0.3](1,2){2}{1}{3}(5,2)
4922 \end{pspicture}
4923 \end{LTXexample}
4924 % \iffalse
4925 %</ignore>
4926 % \fi
4927 %
4928 % \choitem[auto]{prismalign}{auto,center}
4929 % \ifENGLISH Sets the vertical alignment of the prism with respect to the
4930 % «reflection» node \prm{center}. For \opt{auto}, the prism is shifted such,
4931 % that the interface nodes lay on the connection between the respective
4932 % reference node and the «reflection» node. If the value is \opt{center}, the
4933 % «reflection» node coincides with the component center. See the following
4934 % examples for further explanation.
4935 % \fi
4936 % \ifGERMAN Wählt die vertikale Ausrichtung des Prisma bezüglich des
4937 % «Reflektionsknoten» \prm{center}. Ist der Wert \opt{auto}, so wird das Prisma
4938 % so verschoben, dass die Grenzflächenknoten auf der Verbindungslinie zwischen
4939 % dem entsprechenden Referenzknoten und dem «Reflektionsknoten» liegen. Für
4940 % \opt{center} fällt der «Reflektionsknoten» mit der Komponentenmitte
4941 % zusammen. Siehe die folgende Beispiele zur weiteren Erklärung.
4942 % \fi
4943 %
4944 % \iffalse
4945 %<*ignore>
4946 % \fi
4947 \begin{pspicture}(0,-0.5)(14,3.2)
4948 \footnotesize
4949 \pnodes(0,1){A}(2,2){B}(4,1){C}
4950 \psdot(A)\uput[90](A){A}
4951 \psdot(B)\uput[90](B){B}
4952 \psdot(C)\uput[90](C){C}
4953 \optprism[prismsize=2](A)(B)(C)
4954 \psline[style=Refline, linestyle=dashed](A)(B)(C)
4955 \newpsstyle{IfcDot}{dotstyle=+, linecolor=red, linewidth=1.5\pslinewidth}
4956 \psdot[style=IfcDot](\oenodeCenter{})\uput{0.1}[-90](\oenodeCenter{}){\prm{center}}
4957 \psdot[style=IfcDot](\oenodeIn{})\uput{0.1}[150](\oenodeIn{}){\prm{in}}
4958 \psdot[style=IfcDot](\oenodeOut{})\uput{0.1}[30](\oenodeOut{}){\prm{out}}
4959 \rput[t](\oenodeCenter{}|0,0.2){%
4960 \begin{tabular}{@{}c@{}}\opt{prismalign=auto}\\\opt{prismtype=transmittive}\end{tabular}}
4961
4962 \pnodes(5,1){A}(7,2){B}(9,1){C}
4963 \psdot(A)\uput[90](A){A}
4964 \psdot(B)\uput[90](B){B}
4965 \psdot(C)\uput[90](C){C}
4966 \optprism[prismsize=2, prismalign=center](A)(B)(C)
4967 \psline[style=Refline, linestyle=dashed](A)(B)(C)
4968 \newpsstyle{IfcDot}{dotstyle=+, linecolor=red, linewidth=1.5\pslinewidth}
4969 \psdot[style=IfcDot](\oenodeCenter{})\uput{0.1}[-90](\oenodeCenter{}){\prm{center}}
4970 \psdot[style=IfcDot](\oenodeIn{})\uput{0.1}[150](\oenodeIn{}){\prm{in}}
4971 \psdot[style=IfcDot](\oenodeOut{})\uput{0.1}[30](\oenodeOut{}){\prm{out}}
4972 \rput[t](\oenodeCenter{}|0,0.2){%
4973 \begin{tabular}{@{}c@{}}\opt{prismalign=center}\\\opt{prismtype=transmittive}\end{tabular}}
4974
4975 \pnodes(10,2){A}(12,1){B}(14,2){C}
4976 \psdot(A)\uput[90](A){A}
4977 \psdot(B)\uput[-90](B){B}
4978 \psdot(C)\uput[90](C){C}
4979 \optprism[prismsize=2, prismtype=reflective](A)(B)(C)
4980 \psline[style=Refline, linestyle=dashed](A)(B)(C)
4981 \newpsstyle{IfcDot}{dotstyle=+, linecolor=red, linewidth=1.5\pslinewidth}
4982 \psdot[style=IfcDot](\oenodeCenter{})\uput{0.1}[90](\oenodeCenter{}){\prm{center}}
4983 \psdot[style=IfcDot](\oenodeIn{})\uput{0.1}[-160](\oenodeIn{}){\prm{in}}
4984 \psdot[style=IfcDot](\oenodeOut{})\uput{0.1}[-20](\oenodeOut{}){\prm{out}}
4985 \rput[t](\oenodeCenter{}|0,0.2){%
4986 \begin{tabular}{@{}c@{}}\opt{prismalign=auto}\\\opt{prismtype=reflective}\end{tabular}}
4987 \end{pspicture}
4988 % \iffalse
4989 %</ignore>
4990 % \fi
4991 % \end{optionlist}
4992 %
4993 % \ifGERMAN\section{Umkehrprisma}\fi
4994 % \ifENGLISH\section{Right-angle prism}\fi
4995 %
4996 % \begin{ltxsyntax}
4997 % \tripoledesc{rightangleprism}
4998 % \iffalse
4999 %<*ignore>
5000 % \fi
5001 \begin{LTXexample}
5002 \begin{pspicture}(3,2)
5003 \psdot(1.8,1)
5004 \rightangleprism[beam](0,1.5)(1.8,1)(0,0.5){RA}
5005 \end{pspicture}
5006 \end{LTXexample}
5007 % \iffalse
5008 %</ignore>
5009 % \fi
5010 % \end{ltxsyntax}
5011 % \ifGERMAN
5012 % Das Umkehrprisma wird so ausgerichtet, dass der einfallende und der
5013 % reflektierte Strahl parallel sind und der \prm{center} Knoten vertikal
5014 % zentriert in dem Prisma liegt.
5015 % \fi
5016 % \ifENGLISH
5017 % The right-angle prisms is align such that the incoming and reflected
5018 % beam are parallel and the \prm{center} node is vertically centered in
5019 % the prism.
5020 % \fi
5021 % \iffalse
5022 %<*ignore>
5023 % \fi
5024 \begin{LTXexample}
5025 \begin{pspicture}(3.5,2)
5026 \pnodes(0,2){A}(2.5,0.5){G}(0,1.5){B}
5027 \begin{optexp}
5028 \rightangleprism[beam, showifcnodes, showoptdots](A)(G)(B){RA}
5029 \end{optexp}
5030 \end{pspicture}
5031 \end{LTXexample}
5032 % \iffalse
5033 %</ignore>
5034 % \fi
5035 %
5036 % \begin{optionlist}
5037 % \numitem[1.5]{raprismsize}
5038 % \ifGERMAN Die Länge der Eingangsfläche.\fi
5039 % \ifENGLISH The length of the input plane.\fi
5040 %
5041 % \choitem[auto]{raprismalign}{auto, center}
5042 % \ifGERMAN Schaltet die automatische Positionierung der Komponente
5043 % vertikal zur Eingangsfläche ein oder aus:
5044 % \fi
5045 % \ifENGLISH Switch between automatic and fixed alignment of the
5046 % component vertical to the entrance interface:
5047 % \fi
5048 %
5049 % \begin{pspicture}(0,-0.5)(13,2)
5050 % \pnodes(0,1.6){A}(0,0.4){B}
5051 % \rightangleprism(A)(2,1)(B)\psdot(\oenodeCenter{})
5052 % \drawbeam(A){}(B)
5053 % \pnodes(3,1.2){A}(3,0.8){B}
5054 % \rightangleprism(A)(5,1)(B)\psdot(\oenodeCenter{})
5055 % \drawbeam(A){}(B)
5056 % \rput[t](3,0){\opt{raprismalign=auto}}
5057 % \psset{raprismalign=center}
5058 % \pnodes(7,1.6){A}(7,0.4){B}
5059 % \rightangleprism(A)(9,1)(B)\psdot(\oenodeCenter{})
5060 % \drawbeam(A){}(B)
5061 % \pnodes(10,1.2){A}(10,0.8){B}
5062 % \rightangleprism(A)(12,1)(B)\psdot(\oenodeCenter{})
5063 % \drawbeam(A){}(B)
5064 % \rput[t](10,0){\opt{raprismalign=center}}
5065 % \end{pspicture}
5066 %
5067 % \end{optionlist}
5068 %
5069 % \ifGERMAN\section{Pentaprisma}\fi
5070 % \ifENGLISH\section{Penta prism}\fi
5071 %
5072 % \begin{ltxsyntax}
5073 % \tripoledesc{pentaprism}
5074 % \iffalse
5075 %<*ignore>
5076 % \fi
5077 \begin{LTXexample}
5078 \begin{pspicture}(3,2)
5079 \pentaprism[beam](0,1)(2,1)(2,0){PP}
5080 \end{pspicture}
5081 \end{LTXexample}
5082 % \iffalse
5083 %</ignore>
5084 % \fi
5085 % \end{ltxsyntax}
5086 %
5087 % \begin{optionlist}
5088 % \numitem[0.7]{pentaprismsize}
5089 % \ifGERMAN Die Länge der Eingangs- und Ausgangsfläche.\fi
5090 % \ifENGLISH The length of the input and output plane.\fi
5091 % \end{optionlist}
5092 %
5093 %
5094 % \ifGERMAN\chapter{Faserkomponenten}\fi
5095 % \ifENGLISH\chapter{Fiber components}\fi
5096 % \label{chap:fibercomp}
5097 %
5098 % \ifENGLISH This chapter describes all fiber components and their
5099 % options. They differ from free-ray components in that they are
5100 % connected by default with fibers to their reference nodes, and that
5101 % they cannot be used for raytracing. Instead of automatic fiber
5102 % connections the components can also be connected manually with fibers,
5103 % see \prettyref{sec:drawfiber}.
5104 %
5105 % Most components require only two reference nodes and are handled like
5106 % the free-ray dipoles. Some special components like couplers
5107 % (\prettyref{sec:coupler}) and circulators
5108 % (\prettyref{sec:optcirculator}) are treated differently.
5109 % \fi
5110 % \ifGERMAN In diesem Kapitel werden alle Faserkomponenten und deren
5111 % Parameter beschrieben. Diese werden automatisch über Fasern mit ihren
5112 % Referenzknoten verbunden und unterstützen kein Raytracing. Anstelle
5113 % der automatischen Faserverbindungen können die Komponenten auch
5114 % manuell mit Fasern verbunden werden, siehe \prettyref{sec:drawfiber}.
5115 %
5116 % Die meisten Komponenten benötigen nur zwei Referenzknoten und werden
5117 % wie die Freistrahlzweipole behandelt. Manche spezielle Komponenten wie
5118 % Koppler (\ref{sec:coupler}) und Zirkulatoren (\compref{optcirculator})
5119 % werden anders ausgerichtet.
5120 % \fi
5121 %
5122 % \begin{optionlist}
5123 % \boolitem{usefiberstyle}
5124 % \ifGERMAN
5125 % Bei manchen Komponenten (z.B. \Lcomp{optfilter} oder \Lcomp{optmzm})
5126 % kann es vorteilhaft sein interne Faserteile hervorzuheben. Mit
5127 % diesem Parameter werden z.B. die durchlässigen Teile eines Filter
5128 % angezeigt und mit dem \Lstyle{Fiber}-Stil gezeichnet. In der
5129 % Dokumentation ist dieses Verhalten angeschaltet um die betroffenen
5130 % Bereiche hervorzuheben. Hat Vorrang vor der Option
5131 % \Lkeyword{usewirestyle}, sind beide Optionen gesetzt, dann wird eine
5132 % Faser gezeichnet.
5133 % \fi
5134 % \ifENGLISH
5135 % For some components (e.g. \Lcomp{optfilter} or \Lcomp{optmzm}) it
5136 % can be nice to highlight some internals. For example, if this option
5137 % is enabled the passing parts of the optical filter are drawn with
5138 % the \Lstyle{Fiber} style. In the documentation this parameter is
5139 % enabled to show the parts which are affected. Takes precedence over
5140 % \Lkeyword{usewirestyle}.
5141 % \fi
5142 % \boolitem{usewirestyle}
5143 % \ifGERMAN
5144 % Kann verwendet werden, um interne Verbindungen als \Lstyle{Wire}
5145 % darzustellen. Setzt \Lkeyword{usefiberstyle} auf \opt{false}, daher
5146 % kann es sinnvoll sein, z.B. einen elektrischen Filter zu definieren:
5147 % \fi
5148 % \ifENGLISH
5149 % Can be used to draw internal connections als \Lstyle{Wire}. Sets
5150 % \Lkeyword{usefiberstyle} to \opt{false}, therefore it can be useful
5151 % to define e.g. an electrical filter:
5152 % \fi
5153 %
5154 % \iffalse
5155 %<*ignore>
5156 % \fi
5157 \begin{lstlisting}
5158 \newpsobject{elecfilter}{optfilter}{usewirestyle}
5159 \end{lstlisting}
5160 % \iffalse
5161 %</ignore>
5162 % \fi
5163 % \end{optionlist}
5164 %
5165 % \ifGERMAN\section{Optische Faser}\fi
5166 % \ifENGLISH\section{Optical fiber}\fi
5167 %
5168 % \begin{ltxsyntax}
5169 % \fiberdipoledesc{optfiber}
5170 % \iffalse
5171 %<*ignore>
5172 % \fi
5173 \begin{LTXexample}
5174 \begin{pspicture}(3,1.5)
5175 \optfiber[label=0.3](0,0.5)(3,0.5){SSMF}
5176 \end{pspicture}
5177 \end{LTXexample}
5178 % \iffalse
5179 %</ignore>
5180 % \fi
5181 % \end{ltxsyntax}
5182 % \begin{optionlist}
5183 % \intitem[3]{fiberloops}
5184 % \ifGERMAN Anzahl der Faserschleifen.\fi
5185 % \ifENGLISH Number of the fiber loops.\fi
5186 % \iffalse
5187 %<*ignore>
5188 % \fi
5189 \begin{LTXexample}[morekeywords={[21]fiberloops}]
5190 \begin{pspicture}(3,1.5)
5191 \optfiber[fiberloops=2, label=0.3](0,0.5)(3,0.5){SSMF}
5192 \end{pspicture}
5193 \end{LTXexample}
5194 % \iffalse
5195 %</ignore>
5196 % \fi
5197 %
5198 % \numitem[0.4]{fiberloopradius}
5199 % \ifGERMAN Radius der Faserschleifen.\fi
5200 % \ifENGLISH Radius of the fiber loops.\fi
5201 % \iffalse
5202 %<*ignore>
5203 % \fi
5204 \begin{LTXexample}[morekeywords={[21]fiberloopradius}]
5205 \begin{pspicture}(3,1.5)
5206 \optfiber[fiberloopradius=0.2, label=0.3](0,0.5)(3,0.5){SSMF}
5207 \end{pspicture}
5208 \end{LTXexample}
5209 % \iffalse
5210 %</ignore>
5211 % \fi
5212 %
5213 % \numitem[0.2]{fiberloopsep}
5214 % \ifGERMAN Abstand zwischen zwei aufeinanderfolgenden Faserschleifen.\fi
5215 % \ifENGLISH Separation between two successive fiber loops.\fi
5216 % \iffalse
5217 %<*ignore>
5218 % \fi
5219 \begin{LTXexample}[morekeywords={[21]fiberloopsep}]
5220 \begin{pspicture}(3,1.5)
5221 \optfiber[fiberloopsep=0.6, label=0.3](0,0.5)(3,0.5){SSMF}
5222 \end{pspicture}
5223 \end{LTXexample}
5224 % \iffalse
5225 %</ignore>
5226 % \fi
5227 % \end{optionlist}
5228 %
5229 % \ifGERMAN\section{Optischer Verstärker}\fi
5230 % \ifENGLISH\section{Optical amplifier}\fi
5231 %
5232 % \begin{ltxsyntax}
5233 % \fiberdipoledesc{optamp}
5234 % \iffalse
5235 %<*ignore>
5236 % \fi
5237 \begin{LTXexample}
5238 \begin{pspicture}(3,1.5)
5239 \optamp(0,1)(3,1){EDFA}
5240 \end{pspicture}
5241 \end{LTXexample}
5242 % \iffalse
5243 %</ignore>
5244 % \fi
5245 % \end{ltxsyntax}
5246 %
5247 % \begin{optionlist}
5248 % \optitem[0.8]{optampsize}{\prm{num} or \prm{width} \prm{height}}
5249 % \ifGERMAN
5250 % Eine einzelne Zahl gibt die Seitenlänge des Verstärkers an, zwei Zahlen die
5251 % Breite und Höhe. Beachten Sie, dass \opt{optampsize=1} und \opt{optampsize=1
5252 % 1} nicht dasselbe Ergebnis liefern. Alternativ kann das Verhältnis zwischen
5253 % Höhe und Breite mit \opt{xunit} und \opt{yunit} geändert werden.
5254 % \fi
5255 % \ifENGLISH
5256 % A single number gives the side length of the amplifier, two numbers the width
5257 % and height. Note, that \opt{optampsize=1} and \opt{optampsize=1 1} do not give
5258 % the same result. You may also change the relation of width and height with
5259 % \opt{xunit} and \opt{yunit}.
5260 % \fi
5261 % \end{optionlist}
5262 %
5263 % \ifGERMAN\section{Mach-Zehnder-Modulator}\fi
5264 % \ifENGLISH\section{Mach--Zehnder modulator}\fi
5265 %
5266 % \begin{ltxsyntax}
5267 % \fiberdipoledesc{optmzm}
5268 % \iffalse
5269 %<*ignore>
5270 % \fi
5271 \begin{LTXexample}
5272 \begin{pspicture}(3,1.5)
5273 \optmzm(0,1)(3,1){MZM}
5274 \end{pspicture}
5275 \end{LTXexample}
5276 % \iffalse
5277 %</ignore>
5278 % \fi
5279 % \end{ltxsyntax}
5280 %
5281 % \begin{optionlist}
5282 % \optitem[0.8]{optmzmsize}{\prm{num} or \prm{width} \prm{height}}
5283 % \ifGERMAN
5284 % Eine einzelne Zahl gibt die Höhe des Modulators an, die Breite ist \opt{1.6} mal die
5285 % Höhe. Zwei Zahlen geben Breite und Höhe des Modulators direkt an.
5286 % \fi
5287 % \ifENGLISH
5288 % A single number gives the modulator height, the width is \opt{1.6} times the
5289 % height. Two numbers define width and height directly.
5290 % \fi
5291 % \end{optionlist}
5292 %
5293 % \ifGERMAN\section{Polarisationssteller}\fi
5294 % \ifENGLISH\section{Polarization controller}\fi
5295 %
5296 % \begin{ltxsyntax}
5297 % \fiberdipoledesc{polcontrol}
5298 % \iffalse
5299 %<*ignore>
5300 % \fi
5301 \begin{LTXexample}
5302 \begin{pspicture}(3,1.5)
5303 \polcontrol(0,1)(3,1){PC}
5304 \end{pspicture}
5305 \end{LTXexample}
5306 % \iffalse
5307 %</ignore>
5308 % \fi
5309 % \end{ltxsyntax}
5310 %
5311 % \begin{optionlist}
5312 % \numitem[0.15]{polcontrolsize}
5313 % \ifGERMAN Der Radius der Polarisationssteller-Kreise.\fi
5314 % \ifENGLISH The radius of the polarization controller circles.\fi
5315 %
5316 % \choitem[linear]{polcontroltype}{linear, triangle}
5317 % \ifGERMAN Der Typ des Polarisationsstellers.\fi
5318 % \ifENGLISH The type of polarization controller.\fi
5319 % \iffalse
5320 %<*ignore>
5321 % \fi
5322 \begin{LTXexample}[morekeywords={[21]polcontroltype}]
5323 \begin{pspicture}(3,1.5)
5324 \polcontrol[polcontroltype=triangle](0,1)(3,1){PC}
5325 \end{pspicture}
5326 \end{LTXexample}
5327 % \iffalse
5328 %</ignore>
5329 % \fi
5330 % \end{optionlist}
5331 %
5332 % \ifGERMAN\section{Isolator}\fi
5333 % \ifENGLISH\section{Isolator}\fi
5334 %
5335 % \begin{ltxsyntax}
5336 % \fiberdipoledesc{optisolator}
5337 % \iffalse
5338 %<*ignore>
5339 % \fi
5340 \begin{LTXexample}
5341 \begin{pspicture}(3,1.5)
5342 \optisolator(0,1)(3,1){isolator}
5343 \end{pspicture}
5344 \end{LTXexample}
5345 % \iffalse
5346 %</ignore>
5347 % \fi
5348 % \end{ltxsyntax}
5349 %
5350 % \begin{optionlist}
5351 % \optitem[0.6]{isolatorsize}{\prm{num} or \prm{width} \prm{height}}
5352 % \ifGERMAN
5353 % Eine einzelne Zahl gibt die Höhe des Isolators an, die Breite ist \opt{1.6} mal die
5354 % Höhe. Zwei Zahlen geben Breite und Höhe des Isolators direkt an.
5355 % \fi
5356 % \ifENGLISH
5357 % A single number gives the isolator height, the width is \opt{1.6} times the
5358 % height. Two numbers define width and height directly.
5359 % \fi
5360 % \end{optionlist}
5361 %
5362 % \begin{stylelist}
5363 % \styleitem[linewidth=2\cs{pslinewidth}, arrowinset=0]{IsolatorArrow}
5364 % \ifGERMAN
5365 % Der Stil für den Isolatorpfeil. Das kann insbesondere nützlich sein um
5366 % die Länge des Pfeils zu verändern.
5367 % \fi
5368 % \ifENGLISH
5369 % The style of the isolator arrow. This can be especially useful to
5370 % adapt the length of the arrow.
5371 % \fi
5372 % \iffalse
5373 %<*ignore>
5374 % \fi
5375 \begin{LTXexample}[morekeywords={[21]IsolatorArrow}]
5376 \begin{pspicture}(3,1.5)
5377 \addtopsstyle{IsolatorArrow}{xunit=1.2}
5378 \optisolator(0,1)(3,1){isolator}
5379 \end{pspicture}
5380 \end{LTXexample}
5381 % \iffalse
5382 %</ignore>
5383 % \fi
5384 % \end{stylelist}
5385 %
5386 % \ifGERMAN\section{Optischer Schalter}\fi
5387 % \ifENGLISH\section{Optical switch}\fi
5388 %
5389 % \begin{ltxsyntax}
5390 % \fiberdipoledesc{optswitch}
5391 % \iffalse
5392 %<*ignore>
5393 % \fi
5394 \begin{LTXexample}
5395 \begin{pspicture}(3,1.5)
5396 \optswitch(0,1)(3,1){opened switch}
5397 \end{pspicture}
5398 \end{LTXexample}
5399 % \iffalse
5400 %</ignore>
5401 % \fi
5402 % \end{ltxsyntax}
5403 %
5404 % \begin{optionlist}
5405 % \optitem[0.8]{switchsize}{\prm{num} or \prm{width} \prm{height}}
5406 % \ifGERMAN
5407 % Wird nur eine Zahl angegeben, so ist das die Seitenlänge des
5408 % Schalters, andernfalls können Breite und Höhe getrennt angegeben
5409 % werden.
5410 % \fi
5411 % \ifENGLISH
5412 % A single number defines the side length of the switch, otherwise the
5413 % height and width can be specified separately.
5414 % \fi
5415 %
5416 % \choitem[opened]{switchstyle}{opened, closed}
5417 % \ifGERMAN Der Zustand des Schalters kann geschlossen (\opt{closed}) oder
5418 % geöffnet (\opt{opened}) sein.
5419 % \fi
5420 % \ifENGLISH Indicate the switch as \opt{opened} or \opt{closed}.\fi
5421 % \iffalse
5422 %<*ignore>
5423 % \fi
5424 \begin{LTXexample}[morekeywords={[21]switchstyle}]
5425 \begin{pspicture}(3,1.5)
5426 \optswitch[switchstyle=closed](0,1)(3,1){closed switch}
5427 \end{pspicture}
5428 \end{LTXexample}
5429 % \iffalse
5430 %</ignore>
5431 % \fi
5432 % \end{optionlist}
5433 %
5434 % \ifGERMAN\section{Faserverzögerungstrecke}\fi
5435 % \ifENGLISH\section{Fiber delay-line}\fi
5436 %
5437 % \begin{ltxsyntax}
5438 % \fiberdipoledesc{fiberdelayline}
5439 % \iffalse
5440 %<*ignore>
5441 % \fi
5442 \begin{LTXexample}
5443 \begin{pspicture}(3,1.5)
5444 \fiberdelayline(0,1)(3,1){delay line}
5445 \end{pspicture}
5446 \end{LTXexample}
5447 % \iffalse
5448 %</ignore>
5449 % \fi
5450 % \end{ltxsyntax}
5451 %
5452 % \begin{optionlist}
5453 % \optitem[0.6]{fdlsize}{\prm{num} or \prm{width} \prm{height}}
5454 % \ifGERMAN
5455 % Eine einzelne Zahl gibt die Höhe der Komponente an, die Breite ist \opt{1.6}
5456 % mal die Höhe. Zwei Zahlen geben Breite und Höhe der Komponente direkt an.
5457 % \fi
5458 % \ifENGLISH
5459 % A single number gives the component height, the width is \opt{1.6} times the
5460 % height. Two numbers define width and height directly.
5461 % \fi
5462 % \end{optionlist}
5463 %
5464 % \begin{stylelist}
5465 % \styleitem[arrowinset=0, arrows=->]{FdlArrow}
5466 % \ifGERMAN
5467 % Siehe \Lstyle{ArrowCompStyle}.
5468 % \fi
5469 % \ifENGLISH
5470 % See \Lstyle{ArrowCompStyle}.
5471 % \fi
5472 % \end{stylelist}
5473 %
5474 % \ifGERMAN\section{Polarisator}\fi
5475 % \ifENGLISH\section{Polarizer}\fi
5476 %
5477 % \begin{ltxsyntax}
5478 % \fiberdipoledesc{optfiberpolarizer}
5479 % \iffalse
5480 %<*ignore>
5481 % \fi
5482 \begin{LTXexample}
5483 \begin{pspicture}(3,1.5)
5484 \optfiberpolarizer(0,1)(3,1){polarizer}
5485 \end{pspicture}
5486 \end{LTXexample}
5487 % \iffalse
5488 %</ignore>
5489 % \fi
5490 % \end{ltxsyntax}
5491 %
5492 % \begin{optionlist}
5493 % \optitem[0.6]{fiberpolsize}{\prm{num} or \prm{width} \prm{height}}
5494 % \ifGERMAN
5495 % Eine einzelne Zahl gibt die Höhe der Komponente an, die Breite ist \opt{1.6}
5496 % mal die Höhe. Zwei Zahlen geben Breite und Höhe der Komponente direkt an.
5497 % \fi
5498 % \ifENGLISH
5499 % A single number gives the component height, the width is \opt{1.6} times the
5500 % height. Two numbers define width and height directly.
5501 % \fi
5502 % \end{optionlist}
5503 %
5504 %
5505 % \ifGERMAN\section{Optischer Zirkulator}\fi
5506 % \ifENGLISH\section{Optical circulator}\fi
5507 %
5508 % \label{sec:optcirculator}
5509 % \begin{ltxsyntax}
5510 % \xLfmultipole{optcirculator}%
5511 % \compitem{optcirculator}(left)(right)(bottom){label}%
5512 % \iffalse
5513 %<*ignore>
5514 % \fi
5515 \begin{LTXexample}
5516 \begin{pspicture}(3,2)
5517 \addtopsstyle{Fiber}{arrows=->}
5518 \addtopsstyle{FiberOut1}{linecolor=blue}
5519 \addtopsstyle{FiberOut2}{linecolor=green!80!black}
5520 \optcirculator(0,1)(3,1)(1.5,0){Circulator}
5521 \end{pspicture}
5522 \end{LTXexample}
5523 % \iffalse
5524 %</ignore>
5525 % \fi
5526 % \end{ltxsyntax}
5527 % \begin{optionlist}
5528 % \numitem[0.8]{optcircsize}
5529 % \ifGERMAN Der Durchmesser des Zirkulators.\fi
5530 % \ifENGLISH The diameter of the circulator.\fi
5531 %
5532 % \numitem[-160]{optcircangleA}
5533 % \ifGERMAN Der Startwinkel des internen Pfeils.\fi
5534 % \ifENGLISH The starting angle of the internal arrow.\fi
5535 %
5536 % \numitem[-20]{optcircangleB}
5537 % \ifGERMAN Der Endwinkel des internen Pfeils.\fi
5538 % \ifENGLISH The ending angle of the internal arrow.\fi
5539 %
5540 % \optitem{optcircangle}{\prm{num} \prm{num}}
5541 % \ifGERMAN Kurzschreibweise um beide Winkel gleichzeitig zu setzen.\fi
5542 % \ifENGLISH Short notation to specifying both angles.\fi
5543 % \iffalse
5544 %<*ignore>
5545 % \fi
5546 \begin{LTXexample}[morekeywords={[21]optcircangle}]
5547 \begin{pspicture}(3,1.5)
5548 \optcirculator[optcircangle=0 -90](0,1)(3,1)(1.5,0)
5549 \end{pspicture}
5550 \end{LTXexample}
5551 % \iffalse
5552 %</ignore>
5553 % \fi
5554 % \end{optionlist}
5555 %
5556 % \begin{stylelist}
5557 % \styleitem[unit=0.7, arrows=->, arrowinset=0]{OptCircArrow}
5558 % \ifGERMAN
5559 % Der Stil für den internen Pfeil. Damit wird sowohl die Richtung des Pfeils als
5560 % auch die Größe des Bogens bestimmt.
5561 % \fi
5562 % \ifENGLISH The style of the internal arrow. It specifies the direction of the
5563 % arrow and the size of the arc.
5564 % \fi
5565 % \iffalse
5566 %<*ignore>
5567 % \fi
5568 \begin{LTXexample}[morekeywords={[21]{optcircangle, OptCircArrow}}]
5569 \begin{pspicture}(3,1.5)
5570 \newpsstyle{OptCircArrow}{unit=0.5, arrows=<-, arrowinset=0}
5571 \optcirculator[optcircangle=0 -90](0,1)(3,1)(1.5,0)
5572 \end{pspicture}
5573 \end{LTXexample}
5574 % \iffalse
5575 %</ignore>
5576 % \fi
5577 % \end{stylelist}
5578 %
5579 % \ifENGLISH
5580 % The circulator is positioned by default such that the input and output fibers
5581 % are orthogonal to each other, like shown in the example:
5582 % \fi
5583 % \ifGERMAN
5584 % Der Zirkulator wird so positioniert, dass Eingangs- und Ausgangsverbindung
5585 % senkrecht zueinander stehen, wie das folgende Beispiel verdeutlicht:
5586 % \fi
5587 % \iffalse
5588 %<*ignore>
5589 % \fi
5590 \begin{LTXexample}
5591 \begin{pspicture}(3,2)
5592 \addtopsstyle{Fiber}{arrowscale=1.3, arrows=->, arrowinset=0}
5593 \optcirculator(0,0.5)(3,2)(1.5,0)
5594 \end{pspicture}
5595 \end{LTXexample}
5596 % \iffalse
5597 %</ignore>
5598 % \fi
5599 %
5600 % \ifENGLISH The positioning parameters (\prettyref{sec:positioning}) refer to
5601 % the reference nodes \prm{left} and \prm{right} as usual and are not related
5602 % to the automatic position. This implies, that the default position is not
5603 % equivalent to \Lkeyword{position}\opt{=0.5}.
5604 % \fi
5605 % \ifGERMAN Die Positionierungsparameter (\prettyref{sec:positioning}) beziehen
5606 % sich wie üblich auf die Referenzknoten \prm{left} und \prm{right}, und nicht
5607 % auf die automatisch bestimmte Position. Das bedeutet auch, dass die
5608 % automatische Position i.a. nicht mit \Lkeyword{position}\opt{=0.5}
5609 % übereinstimmt.
5610 % \fi
5611 % \iffalse
5612 %<*ignore>
5613 % \fi
5614 \begin{LTXexample}
5615 \begin{pspicture}(3,2)
5616 \addtopsstyle{Fiber}{arrowscale=1.3, arrows=->, arrowinset=0, ncurv=1.5}
5617 \optcirculator[position=0.5](0,0.5)(3,2)(1.5,0)
5618 \end{pspicture}
5619 \end{LTXexample}
5620 % \iffalse
5621 %</ignore>
5622 % \fi
5623 %
5624 % \ifGERMAN\section{Faserkoppler}\fi
5625 % \ifENGLISH\section{Fiber coupler}\fi
5626 % \label{sec:coupler}
5627 %
5628 % \ifGERMAN Es stehen drei Faserkoppler zur Verfügung, die alle die gleichen
5629 % Formen und Parameter verwenden.
5630 % \fi
5631 % \ifENGLISH The package provides three fiber couplers which all share the same
5632 % shapes and parameters.
5633 % \fi
5634 % \begin{ltxsyntax}
5635 % \xLfmultipole{optcoupler}%
5636 % \compitem{optcoupler}(tl)(bl)(tr)(br){label}
5637 % \iffalse
5638 %<*ignore>
5639 % \fi
5640 \begin{LTXexample}
5641 \begin{pspicture}(0,-0.4)(3,1)
5642 \optcoupler(0,1)(0,0)(3,1)(3,0){optcoupler}
5643 \end{pspicture}
5644 \end{LTXexample}
5645 % \iffalse
5646 %</ignore>
5647 % \fi
5648 %
5649 % \xLfmultipole{wdmcoupler}%
5650 % \compitem{wdmcoupler}(tl)(...)(bl)(r){label}
5651 % \iffalse
5652 %<*ignore>
5653 % \fi
5654 \begin{LTXexample}
5655 \begin{pspicture}(0,-0.4)(3,1)
5656 \wdmcoupler(0,1)(0,0)(3,0.5){wdmcoupler}
5657 \end{pspicture}
5658 \end{LTXexample}
5659 % \iffalse
5660 %</ignore>
5661 % \fi
5662 %
5663 % \xLfmultipole{wdmsplitter}%
5664 % \compitem{wdmsplitter}(l)(tr)(...)(br){label}
5665 % \iffalse
5666 %<*ignore>
5667 % \fi
5668 \begin{LTXexample}
5669 \begin{pspicture}(0,-0.4)(3,1)
5670 \wdmsplitter(0,0.5)(3,1)(3,0){wdmsplitter}
5671 \end{pspicture}
5672 \end{LTXexample}
5673 % \iffalse
5674 %</ignore>
5675 % \fi
5676 % \end{ltxsyntax}
5677 % \begin{optionlist}
5678 % \optitem[0.2]{couplersize}{\prm{num} or \prm{width} \prm{height}}
5679 % \ifGERMAN
5680 % Wird eine Zahl angegeben, so ist die Breite des Kopplers doppelt so groß, die
5681 % Höhe entspricht \opt{0.8} mal dem Wert. Mit zwei Zahlen werden Breite und Höhe
5682 % direkt angegeben.
5683 % \fi
5684 % \ifENGLISH
5685 % For a single number the width is twice this value, the height \opt{0.8} times
5686 % this value. Two numbers define width and height directly.
5687 % \fi
5688 %
5689 % \numitem[0.05]{couplersep}
5690 % \ifGERMAN Der vertikale Abstand zwischen zwei Faserports.\fi
5691 % \ifENGLISH The vertical distance between two fiber ports.\fi
5692 % \iffalse
5693 %<*ignore>
5694 % \fi
5695 \begin{LTXexample}[morekeywords={[21]{couplersep}}]
5696 \begin{pspicture}(0,-0.5)(3,1)
5697 \optcoupler[couplersep=0](0,1)(0,0)(3,1)(3,0){coupler}
5698 \end{pspicture}
5699 \end{LTXexample}
5700 % \iffalse
5701 %</ignore>
5702 % \fi
5703 %
5704 % \ifENGLISH If this value is set to \{\}, the separation is calculated
5705 % automatically according to the \Lkeyword{couplertype} and
5706 % \Lkeyword{couplersize}.
5707 % \fi
5708 % \ifGERMAN Wird dieser Wert auf \{\} gesetzt, dann wird der Abstand
5709 % automatisch berechnet, abhängig von \Lkeyword{couplertype} und
5710 % \Lkeyword{couplersize}.
5711 % \fi
5712 % \iffalse
5713 %<*ignore>
5714 % \fi
5715 \begin{LTXexample}[morekeywords={[21]{couplersep}}]
5716 \begin{pspicture}(3,4.5)
5717 \psset{couplersep={}, couplersize=0.5, labeloffset=0.5}
5718 \optcoupler[couplertype=none]%
5719 (0,4.5)(0,3.5)(3,4.5)(3,3.5){none}
5720 \optcoupler[couplertype=rectangle]%
5721 (0,3)(0,2)(3,3)(3,2){rectangle}
5722 \optcoupler[couplertype=ellipse]%
5723 (0,1.5)(0,0.5)(3,1.5)(3,0.5){ellipse}
5724 \end{pspicture}
5725 \end{LTXexample}
5726 % \iffalse
5727 %</ignore>
5728 % \fi
5729 % \choitem[ellipse]{couplertype}{none, ellipse, rectangle, cross}
5730 % \ifGERMAN Wählt zwischen unterschiedlichen Kopplertypen.\fi
5731 % \ifENGLISH Select between different coupler types.\fi
5732 % \iffalse
5733 %<*ignore>
5734 % \fi
5735 \begin{LTXexample}[morekeywords={[21]{couplertype}}]
5736 \begin{pspicture}(3,4.5)
5737 \psset{labeloffset=0.5}
5738 \optcoupler[couplertype=none]%
5739 (0,4.5)(0,3.5)(3,4.5)(3,3.5){none}
5740 \optcoupler[couplertype=rectangle]%
5741 (0,3)(0,2)(3,3)(3,2){rectangle}
5742 \optcoupler[couplertype=cross]%
5743 (0,1.5)(0,0.5)(3,1.5)(3,0.5){cross}
5744 \end{pspicture}
5745 \end{LTXexample}
5746 % \iffalse
5747 %</ignore>
5748 % \fi
5749 %
5750 % \choitem[center]{coupleralign}{t, top, b, bottom, c, center}
5751 % \ifGERMAN Die Ausrichtung des Kopplers bezüglich der
5752 % Referenzknoten. Beachten Sie, dass die Position der Komponentenmitte
5753 % und damit der Beschriftung von dieser Einstellung abhängt (siehe
5754 % \ref{sec:centernode}).
5755 % \fi
5756 % \ifENGLISH The alignment of the coupler with respect to the reference
5757 % nodes. Note, that the exact position of the coupler center and
5758 % accordingly that of the label depends on this setting (see
5759 % \ref{sec:centernode}).
5760 % \fi
5761 % \iffalse
5762 %<*ignore>
5763 % \fi
5764 \begin{LTXexample}[morekeywords={[21]{coupleralign}}]
5765 \begin{pspicture}(3,3)
5766 \psset{labeloffset=0.4}
5767 \optcoupler[coupleralign=top]%
5768 (0,3)(0,2)(3,3)(3,2){top}
5769 \optcoupler[coupleralign=bottom]%
5770 (0,1.5)(0,0.5)(3,1.5)(3,0.5){bottom}
5771 \end{pspicture}
5772 \end{LTXexample}
5773 % \iffalse
5774 %</ignore>
5775 % \fi
5776 %
5777 % \boolitem*[true]{variable}
5778 % \iffalse
5779 %<*ignore>
5780 % \fi
5781 \begin{LTXexample}[morekeywords={[21]{variable}}]
5782 \begin{pspicture}(3,1)
5783 \optcoupler[variable](0,1)(0,0)(3,1)(3,0)
5784 \end{pspicture}
5785 \end{LTXexample}
5786 % \iffalse
5787 %</ignore>
5788 % \fi
5789 % \end{optionlist}
5790 %
5791 % \begin{stylelist}
5792 % \styleitem[arrowinset=0, arrows=->]{VariableCoupler}
5793 % \ifGERMAN
5794 % Der Stil des Pfeiles des verstellbaren Kopplers.
5795 % \fi
5796 % \ifENGLISH
5797 % The style of the arrow of the variable coupler.
5798 % \fi
5799 % \end{stylelist}
5800 %
5801 % \ifGERMAN\subsection{Variable Knotenanzahl}\fi
5802 % \ifENGLISH\subsection{Variable node count}\fi
5803 % \ifGERMAN
5804 % Jeder Koppler hat eine Variante, die nur zwei Knoten benötigt, einen Eingangs-
5805 % und einen Ausgangsknoten. \Lcomp{optcoupler} verwendet jeden dieser Knoten
5806 % zweimal, \Lcomp{wdmsplitter} verwendet den Knoten \prm{out} zweimal und
5807 % \Lcomp{wdmcoupler} verwendet \prm{in} zweimal. Das kann sehr praktisch sein,
5808 % wenn man für einen Koppler die automatischen Verbindungen nicht verwendet,
5809 % sondern die Komponente manuell verbindet.
5810 % \fi
5811 % \ifENGLISH
5812 % Every coupler has a variant which needs only two nodes, one input and one
5813 % output node. For \Lcomp{optcoupler}, both nodes are used twice,
5814 % \Lcomp{wdmsplitter} uses node \prm{out} twice, and \Lcomp{wdmcoupler} uses node
5815 % \prm{in} twice. This can be very useful if you do not use the automatic
5816 % connections but connect the components manually.
5817 % \fi
5818 %
5819 % \iffalse
5820 %<*ignore>
5821 % \fi
5822 \begin{LTXexample}
5823 \begin{pspicture}(4,2)
5824 \pnodes(0,1){A}(4,1){B}
5825 \psset[optexp]{fiber=none}
5826 \wdmsplitter[position=0.2, coupleralign=b](A)(B)
5827 \wdmcoupler[position=0.8, coupleralign=t](A)(B)
5828 \drawfiber{(A)}{1}{2}{(B)}
5829 \drawfiber{1}{([offset=0.5, Xnodesep=1]\oenodeIfc{2}{1})}
5830 \drawfiber{([offset=-0.5, Xnodesep=-1]\oenodeIfc{2}{2})}{2}
5831 \end{pspicture}
5832 \end{LTXexample}
5833 % \iffalse
5834 %</ignore>
5835 % \fi
5836 %
5837 % \ifGERMAN Des Weiteren kann ein \Lcomp{wdmcoupler} mehr als zwei Eingangsknoten haben, ein
5838 % \Lcomp{wdmsplitter} mehr als zwei Ausgangsknoten.\fi
5839 % \ifENGLISH A \Lcomp{wdmcoupler} can have more than two input nodes, a \Lcomp{wdmsplitter}
5840 % more than two output nodes.\fi
5841 % \iffalse
5842 %<*ignore>
5843 % \fi
5844 \begin{LTXexample}
5845 \begin{pspicture}(4,2)
5846 \pnodes(0,2){A}(0,1.2){B}(0,0.8){C}(0,0){D}(4,1){E}
5847 \wdmcoupler(A)(B)(C)(D)(E){coupler}
5848 \end{pspicture}
5849 \end{LTXexample}
5850 % \iffalse
5851 %</ignore>
5852 % \fi
5853 % \iffalse
5854 %<*ignore>
5855 % \fi
5856 \begin{LTXexample}
5857 \begin{pspicture}(4,2)
5858 \pnodes(0,1){A}(4,2){B}(4,1.2){C}(4,0.8){D}(4,0){E}
5859 \wdmsplitter(A)(B)(C)(D)(E){splitter}
5860 \end{pspicture}
5861 \end{LTXexample}
5862 % \iffalse
5863 %</ignore>
5864 % \fi
5865 %
5866 % \ifGERMAN Die Ausrichtung der Komponente wird anhand des Mittelpunkts aller Eingangs-
5867 % (\Lcomp{wdmcoupler}) bzw. Ausgangsknoten (\Lcomp{wdmsplitter})
5868 % berechnet, falls nicht \Lkeyword{coupleralign} verwendet wird.\fi
5869 % \ifENGLISH The component's orientation is calculated from the median of all input nodes
5870 % (\Lcomp{wdmcoupler}) or all output nodes (\Lcomp{wdmsplitter}), unless \Lkeyword{coupleralign}
5871 % is used.\fi
5872 % \iffalse
5873 %<*ignore>
5874 % \fi
5875 \begin{LTXexample}
5876 \begin{pspicture}(4,2)
5877 \pnodes(0,2){A}(0,0.5){B}(0,0){C}(4,1){D}
5878 \wdmcoupler(A)(B)(C)(D){coupler}
5879 \end{pspicture}
5880 \end{LTXexample}
5881 % \iffalse
5882 %</ignore>
5883 % \fi
5884 %
5885 % \iffalse
5886 %<*ignore>
5887 % \fi
5888 \begin{LTXexample}
5889 \begin{pspicture}(4,2)
5890 \pnodes(0,2){E}(0,0.5){F}(0,0){G}(4,2){H}
5891 \wdmcoupler[coupleralign=t](E)(F)(G)(H){coupler}
5892 \end{pspicture}
5893 \end{LTXexample}
5894 % \iffalse
5895 %</ignore>
5896 % \fi
5897 %
5898 % \iffalse
5899 %<*ignore>
5900 % \fi
5901 \begin{LTXexample}
5902 \begin{pspicture}(4,2)
5903 \pnodes(0,1){A}(4,2){B}(4,0.5){C}(4,0){D}
5904 \wdmsplitter(A)(B)(C)(D){splitter}
5905 \end{pspicture}
5906 \end{LTXexample}
5907 % \iffalse
5908 %</ignore>
5909 % \fi
5910 %
5911 % \iffalse
5912 %<*ignore>
5913 % \fi
5914 \begin{LTXexample}
5915 \begin{pspicture}(4,2)
5916 \pnodes(0,0.5){E}(4,2){F}(4,1.5){G}(4,0){H}
5917 \wdmsplitter[coupleralign=b](E)(F)(G)(H){splitter}
5918 \end{pspicture}
5919 \end{LTXexample}
5920 % \iffalse
5921 %</ignore>
5922 % \fi
5923 % \ifGERMAN\subsection{Eingangs- und Ausgangsknoten}\fi
5924 % \ifENGLISH\subsection{Input and output nodes}\fi
5925 % \label{sec:coupler-nodes}
5926 %
5927 % \ifGERMAN
5928 % Die Definition der Eingangs- und Ausgangsknoten aus \prettyref{sec:ifcnode}
5929 % ist für Koppler nicht anwendbar. Hier werden die Knoten einfach von \opt{1}
5930 % (links oben) bis \opt{N} (rechts unten) durchnummeriert.
5931 % \fi
5932 % \ifENGLISH
5933 % The definition of input and output nodes from \prettyref{sec:ifcnode} cannot
5934 % be applied to couplers. Here, the nodes are simply numbered from \opt{1} (left
5935 % top) to \opt{N} (right bottom).
5936 % \fi
5937 % \begin{center}
5938 % \begin{pspicture}(11,2)
5939 % \psset{couplersize=0.6, couplertype=rectangle, couplersep=0.25}
5940 % \wdmsplitter(0,1.25)(3,2)(3,1.25)(3,0.5)
5941 % \psdot(\oenodeIfc{1}{})\uput[120](\oenodeIfc{1}{}){1}
5942 % \psdot(\oenodeIfc{2}{})\uput[90](\oenodeIfc{2}{}){2}
5943 % \psdot(\oenodeIfc{3}{})\uput[180](\oenodeIfc{3}{}){3}
5944 % \psdot(\oenodeIfc{N}{})\uput[-90](\oenodeIfc{N}{}){N}
5945 % \wdmcoupler(4,2)(4,1.25)(4,0.5)(7,1.25)
5946 % \psdot(\oenodeIfc{1}{})\uput[90](\oenodeIfc{1}{}){1}
5947 % \psdot(\oenodeIfc{2}{})\uput[0](\oenodeIfc{2}{}){2}
5948 % \psdot(\oenodeIfc{3}{})\uput[-90](\oenodeIfc{3}{}){3}
5949 % \psdot(\oenodeIfc{N}{})\uput[60](\oenodeIfc{N}{}){N}
5950 % \optcoupler(8,2)(8,0.5)(11,2)(11,0.5)
5951 % \psdot(\oenodeIfc{1}{})\uput[90](\oenodeIfc{1}{}){1}
5952 % \psdot(\oenodeIfc{2}{})\uput[-90](\oenodeIfc{2}{}){2}
5953 % \psdot(\oenodeIfc{3}{})\uput[90](\oenodeIfc{3}{}){3}
5954 % \psdot(\oenodeIfc{N}{})\uput[-90](\oenodeIfc{N}{}){N}
5955 % \rput[b](1.5,0){\nxLcomp{wdmsplitter}}
5956 % \rput[b](5.5,0){\nxLcomp{wdmcoupler}}
5957 % \rput[b](9.5,0){\nxLcomp{optcoupler}}
5958 % \end{pspicture}
5959 % \end{center}
5960 %
5961 %
5962 % \ifGERMAN\subsection{Referenzknoten}\fi
5963 % \ifENGLISH\subsection{Reference nodes}\fi
5964 % \label{sec:coupler-refnodes}
5965 %
5966 % \ifGERMAN
5967 % Die Definition der Referenzknoten aus \prettyref{sec:refnode} ist für Koppler
5968 % nicht anwendbar und hängt von \Lkeyword{coupleralign} ab.
5969 % \fi
5970 % \ifENGLISH
5971 % The definition of reference nodes from \prettyref{sec:refnode} cannot be
5972 % applied to couplers and depends on \Lkeyword{coupleralign}.
5973 % \fi
5974 % \begin{center}
5975 % \begin{pspicture}(12,2)
5976 % \psset{couplersize=0.5, couplertype=rectangle, couplersep=0.2}
5977 % \optcoupler(0, 2)(0,0.7)(3,2)(3,0.7)
5978 % \psdot(\oenodeRefA{})\uput[90](\oenodeRefA{}){RefA}
5979 % \psdot(\oenodeRefB{})\uput[90](\oenodeRefB{}){RefB}
5980 % \optcoupler[coupleralign=top](4.5, 2)(4.5,0.7)(7.5,2)(7.5,0.7)
5981 % \psdot(\oenodeRefA{})\uput[-90](\oenodeRefA{}){RefA}
5982 % \psdot(\oenodeRefB{})\uput[-90](\oenodeRefB{}){RefB}
5983 % \optcoupler[coupleralign=bottom](9, 2)(9,0.7)(12,2)(12,0.7)
5984 % \psdot(\oenodeRefA{})\uput[90](\oenodeRefA{}){RefA}
5985 % \psdot(\oenodeRefB{})\uput[90](\oenodeRefB{}){RefB}
5986 % \rput[b](1.5,0){\opt{coupleralign=none}}
5987 % \rput[b](6,0){\opt{coupleralign=top}}
5988 % \rput[b](10.5,0){\opt{coupleralign=bottom}}
5989 % \end{pspicture}
5990 % \end{center}
5991 %
5992 %
5993 % \ifGERMAN\section{Faserbox}\fi
5994 % \ifENGLISH\section{Fiber box}\fi
5995 %
5996 % \begin{ltxsyntax}
5997 % \xLfmultipole{fiberbox}%
5998 % \compitem{fiberbox}(in)(out){label}
5999 % \compitem*{fiberbox}(tl)(bl)(tr)(br){label}
6000 % \end{ltxsyntax}
6001 %
6002 % \ifGERMAN
6003 % Eine \Lcomp{fiberbox} kann entweder mit zwei, oder mit vier Knoten
6004 % positioniert werden. Die Wahl beeinflusst die Position der Komponente
6005 % und der Komponentenknoten und die automatischen Faserverbindungen.
6006 %
6007 % Werden nur zwei Knoten verwendet, dann sind das die Referenzknoten und
6008 % der Abstand zwischen zwei benachbarten Eingangs- oder Ausgangsknoten
6009 % muss manuell angegeben werden (siehe \Lkeyword{fiberboxsepin} und
6010 % \Lkeyword{fiberboxsepout}). Nur die Seiten der Komponente wird
6011 % automatische mit Fasern verbunden, die nur einen einzigen Knoten hat
6012 % (siehe \Lkeyword{fiberboxcount} und das folgende Beispiel).
6013 % \fi
6014 % \ifENGLISH
6015 % A \Lcomp{fiberbox} can be positioned either with two, or four nodes which
6016 % affects the positioning of the component and the interface nodes, and the
6017 % automatic fiber connections.
6018 %
6019 % If only two nodes are used these are the reference nodes and the separation
6020 % between the components input and output nodes must be specified manually (see
6021 % \Lkeyword{fiberboxsepin} and \Lkeyword{fiberboxsepout}). Only the side of the
6022 % component is connected automatically which has a single node only (see
6023 % \Lkeyword{fiberboxcount} and the following example).
6024 % \fi
6025 %
6026 % \iffalse
6027 %<*ignore>
6028 % \fi
6029 \begin{LTXexample}[linerange={1-2,5-5}]
6030 \begin{pspicture}(3,2)
6031 \fiberbox[fiberboxcount=1x2, showifcnodes](0,1)(3,1)
6032 \psdot(\oenodeRefA{})\uput[90](\oenodeRefA{}){RefA}
6033 \psdot(\oenodeRefB{})\uput[90](\oenodeRefB{}){RefB}
6034 \end{pspicture}
6035 \end{LTXexample}
6036 % \iffalse
6037 %</ignore>
6038 % \fi
6039 %
6040 % \ifGERMAN
6041 % Werden vier Knoten verwendet, dann wird die Lage der Komponentenknoten
6042 % und deren Abstand automatisch bestimmt. Die Komponente wird zwischen
6043 % der Mitte der beiden Eingangsknoten und der Mitte der beiden
6044 % Ausgangsknoten positioniert. Der erste Eingangsknoten wird an dem
6045 % \prm{tl}-Knoten ausgerichtet, der letzte Eingangsknoten an dem
6046 % \prm{bl}-Knoten. Die übrigen Eingangsknoten werden dazwischen
6047 % gleichverteilt. Die Ausgangsknoten werden entsprechend behandelt. Die
6048 % vier angegebenen Knoten werden automatisch mit den jeweils
6049 % zugeordneten Komponentenknoten verbunden.
6050 % \fi
6051 % \ifENGLISH
6052 % When four nodes are used the interface nodes and their separation are
6053 % determined automatically. The component is positioned between the
6054 % center of the two input and the center of the two output nodes. The
6055 % first input interface node is aligned with the \prm{tl} node, the last
6056 % input node is aligned with \prm{bl}, all other input nodes are equally
6057 % distributed between these. The output nodes are handled
6058 % accordingly. The four specified nodes are connected automatically to
6059 % the component, each with the interface node it is aligned to.
6060 % \fi
6061 % \iffalse
6062 %<*ignore>
6063 % \fi
6064 \begin{LTXexample}[linerange={1-2,5-5}]
6065 \begin{pspicture}(3,2)
6066 \fiberbox[fiberboxcount=3x4, showifcnodes](0.5,1.6)(0,0.4)(2.5,2)(3,0)
6067 \psdot(\oenodeRefA{})\uput[90](\oenodeRefA{}){RefA}
6068 \psdot(\oenodeRefB{})\uput[90](\oenodeRefB{}){RefB}
6069 \end{pspicture}
6070 \end{LTXexample}
6071 % \iffalse
6072 %</ignore>
6073 % \fi
6074 %
6075 % \begin{optionlist}
6076 % \numitem[1]{fiberboxwidth}
6077 % \ifGERMAN Die Breite der Faserbox.\fi
6078 % \ifENGLISH The width of the fiber box.\fi
6079 %
6080 % \numitem[0]{fiberboxheight}
6081 % \ifGERMAN Die Höhe der Faserbox. Ist die Höhe kleiner als der Platz
6082 % der von den Eingangs- oder Ausgangsknoten benötigt wird, dann wird
6083 % die Höhe automatisch berechnet. Die berechnete Höhe ist
6084 % $\text{max}\,(\text{sepin}\times(\text{N}-1),
6085 % \text{sepout}\times(\text{M}-1))$.
6086 % \fi
6087 % \ifENGLISH The height of the fiber box. If the height is lower than
6088 % the space required by the input or output nodes, it is calculated
6089 % automatically. The calculated height is
6090 % $\text{max}\,(\text{sepin}\times(\text{N}-1),
6091 % \text{sepout}\times(\text{M}-1))$.
6092 % \fi
6093 % \iffalse
6094 %<*ignore>
6095 % \fi
6096 \begin{LTXexample}
6097 \begin{pspicture}(3,2.8)
6098 \psset[optexp]{innerlabel, fiberboxwidth=1, fiberboxcount=1x2}
6099 \fiberbox(0,2)(0,2)(3,2.5)(3,1.5){auto}
6100 \fiberbox[fiberboxheight=1.05](0,0.5)(0,0.5)(3,1)(3,0){fix}
6101 \end{pspicture}
6102 \end{LTXexample}
6103 % \iffalse
6104 %</ignore>
6105 % \fi
6106 %
6107 % \optitem{fiberboxsize}{\prm{width} \prm{height}}
6108 % \ifGERMAN Die Breite und Höhe der Faserbox, ist äquivalent zum Aufruf von
6109 % \Lkeyword{fiberboxwidth} und \Lkeyword{fiberboxheight}.
6110 % \fi
6111 % \ifENGLISH The width and height of the fiber box, is equivalent to calling
6112 % both \Lkeyword{fiberboxwidth} and \Lkeyword{fiberboxheight}.
6113 % \fi
6114 %
6115 % \numitem[0.2]{fiberboxsepin}
6116 % \ifGERMAN Der Abstand zwischen zwei Eingangsknoten. Dieser Wert wird nur
6117 % verwendet, falls die Faserbox mit zwei Knoten positioniert wird. Ansonsten
6118 % wird der Abstand automatisch ermittelt wird.
6119 % \fi
6120 % \ifENGLISH The separation between two input nodes. This value is
6121 % used only if the fiber box is positioned with two nodes. Otherwise
6122 % the separation is calculated automatically.
6123 % \fi
6124 %
6125 % \numitem[0.2]{fiberboxsepout}
6126 % \ifGERMAN Analog zu \Lkeyword{fiberboxsepin}, aber für die Ausgangsknoten.\fi
6127 % \ifENGLISH Equivalent to \Lkeyword{fiberboxsepout}, but for the output nodes.\fi
6128 %
6129 % \optitem[2x2]{fiberboxcount}{\prm{N}x\prm{M}}
6130 % \ifGERMAN Anzahl der Eingangs- (\prm{N}) und Ausgangsknoten (\prm{M}).\fi
6131 % \ifENGLISH Number of input (\prm{N}) and output nodes (\prm{M}).\fi
6132 % \end{optionlist}
6133 %
6134 % \ifGERMAN Für bestimmte Parameterkombinationen ist eine \Lcomp{fiberbox}
6135 % äquivalent zu einer \Lcomp{optbox}.
6136 % \fi
6137 % \ifENGLISH For certain parameter configurations a \Lcomp{fiberbox} is
6138 % equivalent to an \Lcomp{optbox}.
6139 % \fi
6140 % \iffalse
6141 %<*ignore>
6142 % \fi
6143 \begin{LTXexample}
6144 \begin{pspicture}(0,0.3)(3,2.6)
6145 \psset[optexp]{label=0.6}
6146 \fiberbox[fiberboxsize=1.2 0.6, fiberboxcount=1x1](0,2.5)(3,2.5){fiberbox}
6147 \optbox[optboxsize=1.2 0.6, fiber](0,1)(3,1){optbox}
6148 \end{pspicture}
6149 \end{LTXexample}
6150 % \iffalse
6151 %</ignore>
6152 % \fi
6153 % \psset{usefiberstyle=false}
6154 %
6155 %
6156 % \ifGERMAN\chapter{Elektrische Komponenten}\fi
6157 % \ifENGLISH\chapter{Electrical components}\fi
6158 % \label{chap:electrcomp}
6159 %
6160 % \ifGERMAN\section{Koppler}\fi
6161 % \ifENGLISH\section{Coupler}\fi
6162 %
6163 % \begin{ltxsyntax}
6164 % \xLemultipole{eleccoupler}%
6165 % \compitem{eleccoupler}(tl)(bl)(tr)(br){label}
6166 % \iffalse
6167 %<*ignore>
6168 % \fi
6169 \begin{LTXexample}
6170 \begin{pspicture}(3,1.5)
6171 \eleccoupler(0,1.5)(0,0)(3,1.5)(3,0)
6172 \end{pspicture}
6173 \end{LTXexample}
6174 % \iffalse
6175 %</ignore>
6176 % \fi
6177 % \end{ltxsyntax}
6178 % \begin{optionlist}
6179 % \optitem[0.8]{eleccouplersize}{\prm{size} or \prm{width} \prm{height}}
6180 % \ifGERMAN Die Breite und Höhe des Kopplers, wird nur ein Wert
6181 % angegeben dann ist die Komponente quadratisch.
6182 % \fi
6183 % \ifENGLISH The width and height of the couplers, if only one value
6184 % is given the component is squared.
6185 % \fi
6186 % \iffalse
6187 %<*ignore>
6188 % \fi
6189 \begin{LTXexample}[morekeywords={[21]eleccouplersize}]
6190 \begin{pspicture}(3,1.5)
6191 \eleccoupler[eleccouplersize=1 0.6](0,1.5)(0,0)(3,1.5)(3,0)
6192 \end{pspicture}
6193 \end{LTXexample}
6194 % \iffalse
6195 %</ignore>
6196 % \fi
6197 % \numitem[\{\}]{eleccouplersep}
6198 % \ifGERMAN Der vertikale Abstand zwischen den beiden Eingangs-
6199 % bzw. Ausgangsanschlüssen. Ist der Wert leer, bzw. gleich \{\}, dann
6200 % wird der Abstand auf 75\% der Höhe gesetzt.
6201 % \fi
6202 % \ifENGLISH The vertical distance between the two input and output
6203 % ports. If the value is empty \{\}, then the separation is set to
6204 % 75\% of the height.
6205 % \fi
6206 %
6207 % \choitem[standard]{eleccouplertype}{standard, directional}
6208 % \ifGERMAN Wählt zwischen unterschiedlichen Kopplertypen.\fi
6209 % \ifENGLISH Select between different coupler types.\fi
6210 % \iffalse
6211 %<*ignore>
6212 % \fi
6213 \begin{LTXexample}[morekeywords={[21]eleccouplertype}]
6214 \begin{pspicture}(3,1.5)
6215 \eleccoupler[eleccouplertype=directional](0,1.5)(0,0)(3,1.5)(3,0)
6216 \end{pspicture}
6217 \end{LTXexample}
6218 % \iffalse
6219 %</ignore>
6220 % \fi
6221 %
6222 % \choitem[left]{eleccouplerinput}{left, right}
6223 % \ifGERMAN Gibt beim direktionalen Koppler die Eingangsseite an.\fi
6224 % \ifENGLISH Selects the input side for the directional coupler.\fi
6225 % \iffalse
6226 %<*ignore>
6227 % \fi
6228 \begin{LTXexample}[morekeywords={[21]eleccouplerinput}]
6229 \begin{pspicture}(3,1.5)
6230 \eleccoupler[eleccouplertype=directional, eleccouplerinput=right](0,1.5)(0,0)(3,1.5)(3,0)
6231 \end{pspicture}
6232 \end{LTXexample}
6233 % \iffalse
6234 %</ignore>
6235 % \fi
6236 % \end{optionlist}
6237 %
6238 % \ifGERMAN Die automatischen Verbindungen des elektrischen Kopplers
6239 % sind, anders als beim optischen Koppler, alle auf die Komponente
6240 % gerichtet. Das ergibt ein symmetrisches Layout der automatischen
6241 % Verbindungen des elektrischen Kopplers bei Verwendung der Vorgabe
6242 % \Lkeyword{wirestyle}\opt{=angle}.
6243 % \fi
6244 % \ifENGLISH The automatic connections of the electrical coupler are all
6245 % directed towards the component, in contrast to the optical
6246 % coupler. This gives a symmetric layout of the automatic electrical coupler
6247 % connections when using the default of
6248 % \Lkeyword{wirestyle}\opt{=angle}.
6249 % \fi
6250 %
6251 % \iffalse
6252 %<*ignore>
6253 % \fi
6254 \begin{LTXexample}
6255 \begin{pspicture}(3,4)
6256 \addtopsstyle{Wire}{arrows=->}
6257 \addtopsstyle{Fiber}{arrows=->, fiberstyle=angle}
6258 \eleccoupler(0,4)(0,2)(3,4)(3,2)
6259 \optcoupler[couplersize=0.8 0.8, couplersep={}, couplertype=rectangle](0,1.5)(0,0)(3,1.5)(3,0)
6260 \end{pspicture}
6261 \end{LTXexample}
6262 % \iffalse
6263 %</ignore>
6264 % \fi
6265 %
6266 % \ifGERMAN\section{Synthesizer}\fi
6267 % \ifENGLISH\section{Synthesizer}\fi
6268 %
6269 % \begin{ltxsyntax}
6270 % \xLemultipole{elecsynthesizer}%
6271 % \compitem{elecsynthesizer}(in)(out){label}
6272 % \iffalse
6273 %<*ignore>
6274 % \fi
6275 \begin{LTXexample}
6276 \begin{pspicture}(3,1.5)
6277 \elecsynthesizer(1,1)(3,1){SYN}
6278 \end{pspicture}
6279 \end{LTXexample}
6280 % \iffalse
6281 %</ignore>
6282 % \fi
6283 % \end{ltxsyntax}
6284 % \iffalse
6285 %<*ignore>
6286 % \fi
6287 \begin{LTXexample}
6288 \begin{pspicture}(3,1.5)
6289 \elecsynthesizer[position=0.5](0,1)(3,1){SYN}
6290 \end{pspicture}
6291 \end{LTXexample}
6292 % \iffalse
6293 %</ignore>
6294 % \fi
6295 % \begin{optionlist}
6296 % \optitem[0.8]{synthsize}{\prm{size} or \prm{width} \prm{height}}
6297 % \ifGERMAN Die Größe der Komponente, ist diese rund und wurden zwei
6298 % Werte angegeben, dann wird der kleinere als Durchmesser verwendet.
6299 % \fi
6300 % \ifENGLISH The size of the component, if this is of circular shape
6301 % and two values were given, the smaller one is used as diameter.
6302 % \fi
6303 %
6304 % \choitem[sine]{synthtype}{sine, pulse, sawtooth, rectangle, triangle, custom}
6305 % \ifGERMAN Wählt zwischen unterschiedlichen Typen.\fi
6306 % \ifENGLISH Select between different synthesizer types.\fi
6307 % \iffalse
6308 %<*ignore>
6309 % \fi
6310 \begin{LTXexample}[morekeywords={[21]synthtype}]
6311 \begin{pspicture}(0,0.6)(3,5.4)
6312 \elecsynthesizer[synthtype=sine](1,5)(3,5)
6313 \elecsynthesizer[synthtype=sawtooth](1,4)(3,4)
6314 \elecsynthesizer[synthtype=triangle](1,3)(3,3)
6315 \elecsynthesizer[synthtype=rectangle](1,2)(3,2)
6316 \elecsynthesizer[synthtype=pulse](1,1)(3,1)
6317 \end{pspicture}
6318 \end{LTXexample}
6319 % \iffalse
6320 %</ignore>
6321 % \fi
6322 %
6323 % \ifGERMAN Es kann auch eine frei wählbare Wellenform gewählt werden.\fi
6324 % \ifENGLISH You can also use a freely customizable waveform.\fi
6325 %
6326 % \iffalse
6327 %<*ignore>
6328 % \fi
6329 \begin{LTXexample}[morekeywords={[21]synthtype}]
6330 \begin{pspicture}(0,0)(3,2)
6331 \makeatletter
6332 \def\elecsynthesizer@custom{%
6333 \psline(-0.25,-0.1)(-0.1,-0.1)(-0.1,0)%
6334 (0.1,0)(0.1,0.1)(0.25,0.1)}
6335 \makeatother
6336 \elecsynthesizer[synthtype=custom](1,1)(3,1)
6337 \end{pspicture}
6338 \end{LTXexample}
6339 % \iffalse
6340 %</ignore>
6341 % \fi
6342 %
6343 % \choitem[circle]{synthshape}{circle, rectangle}
6344 % \ifGERMAN Wählt zwischen kreisförmiger und rechteckiger Außenform.\fi
6345 % \ifENGLISH Select between circular and rectangular outer shape.\fi
6346 %
6347 % \iffalse
6348 %<*ignore>
6349 % \fi
6350 \begin{LTXexample}[morekeywords={[21]synthshape}]
6351 \begin{pspicture}(3,1.5)
6352 \elecsynthesizer[synthshape=rectangle](1,1)(3,1){SYN}
6353 \end{pspicture}
6354 \end{LTXexample}
6355 % \iffalse
6356 %</ignore>
6357 % \fi
6358 % \end{optionlist}
6359 %
6360 % \begin{stylelist}
6361 % \styleitem{SynthStyle}
6362 % \ifGERMAN Beinflusst das Aussehen der internen Symbole.\fi
6363 % \ifENGLISH Change the style of the internal synthesizer symbol.\fi
6364 % \iffalse
6365 %<*ignore>
6366 % \fi
6367 \begin{LTXexample}[morekeywords={[21]SynthStyle}]
6368 \begin{pspicture}(3,1)
6369 \newpsstyle{SynthStyle}{xunit=0.5, yunit=-1}
6370 \elecsynthesizer(1,0.5)(3,0.5)
6371 \end{pspicture}
6372 \end{LTXexample}
6373 % \iffalse
6374 %</ignore>
6375 % \fi
6376 % \end{stylelist}
6377 %
6378 % \ifGERMAN\section{Mixer}\fi
6379 % \ifENGLISH\section{Mixer}\fi
6380 %
6381 % \begin{ltxsyntax}
6382 % \xLemultipole{elecmixer}%
6383 % \compitem{elecmixer}(left)(right)(bottom){label}%
6384 % \iffalse
6385 %<*ignore>
6386 % \fi
6387 \begin{LTXexample}
6388 \begin{pspicture}(3,2)
6389 \newpsstyle{Wire}{arrowscale=1.5, arrowinset=0, arrows=->}
6390 \addtopsstyle{WireOut1}{linecolor=blue}
6391 \addtopsstyle{WireOut2}{linecolor=green!80!black}
6392 \elecmixer(0,1)(3,1)(1.5,0){Mixer}
6393 \end{pspicture}
6394 \end{LTXexample}
6395 % \iffalse
6396 %</ignore>
6397 % \fi
6398 % \end{ltxsyntax}
6399 %
6400 % \begin{optionlist}
6401 % \numitem[0.8]{elecmixersize}
6402 % \ifGERMAN Der Durchmesser des Mixers.\fi
6403 % \ifENGLISH The diameter of the mixer.\fi
6404 % \end{optionlist}
6405 %
6406 % \ifGERMAN Weitere Details bezüglich der Referenzknoten und
6407 % Positionierung finden Sie unter \Lcomp{optcirculator}.
6408 % \fi
6409 % \ifENGLISH For further details about the reference nodes and the
6410 % positioning, please refer to \Lcomp{optcirculator}.
6411 % \fi
6412 %
6413 % \ifGERMAN\chapter{Hybridkomponenten}\fi
6414 % \ifENGLISH\chapter{Hybrid components}\fi
6415 % \label{sec:hybridcomp}
6416 %
6417 % \ifENGLISH This chapter describes the components which can be used both for
6418 % free-ray and fiber optics but which differ from these two categories.
6419 %
6420 % The \Lcomp{optfilter} is connected by default with automatic fiber
6421 % connections, but can likewise be used with free-ray beams, in contrast
6422 % to the fiber components (\prettyref{chap:fibercomp}). The
6423 % \Lcomp{fibercollimator} has one interface only, the other connection is
6424 % a fiber and the \Lcomp{optdetector} has one interface, the other
6425 % connection is a wire.
6426 % \fi
6427 % \ifGERMAN Dieses Kapitel beschreibt die Komponenten, die sowohl für
6428 % Freistrahl- als auch Faseroptik zu verwenden sind, sich von diesen aber etwas
6429 % abgrenzen.
6430 %
6431 % Der \Lcomp{optfilter} wird mit den Voreinstellungen zwar als
6432 % Faserkomponente gehandhabt, kann jedoch im Gegensatz zu den reinen
6433 % Faserkomponenten (\prettyref{chap:fibercomp}) auch als
6434 % Freistrahlkomponente verwendet werden. Der \Lcomp{fibercollimator} hat
6435 % nur eine Faser, die andere Verbindung ist Freistrahl und der
6436 % \Lcomp{optdetector} hat eine Freistrahl- und eine elektrische
6437 % Verbindung.
6438 % \fi
6439 %
6440 % \ifGERMAN\section{Optischer Filter}\fi
6441 % \ifENGLISH\section{Optical filter}\fi
6442 %
6443 % \psset{usefiberstyle}
6444 % \begin{ltxsyntax}
6445 % \fiberdipoledesc{optfilter}
6446 % \iffalse
6447 %<*ignore>
6448 % \fi
6449 \begin{LTXexample}
6450 \begin{pspicture}(3,1.5)
6451 \optfilter(0,1)(3,1){bandpass}
6452 \end{pspicture}
6453 \end{LTXexample}
6454 % \iffalse
6455 %</ignore>
6456 % \fi
6457 % \end{ltxsyntax}
6458 %
6459 % \begin{optionlist}
6460 % \numitem[0.8]{filtersize}
6461 % \ifGERMAN Die Größe des Filters.\fi
6462 % \ifENGLISH The size of the filter.\fi
6463 %
6464 % \choitem[bandpass]{filtertype}{bandpass, bandstop, lowpass, highpass}
6465 % \ifGERMAN Wähle zwischen unterschiedlichen Filtertypen.\fi
6466 % \ifENGLISH Select between different filter types.\fi
6467 % \iffalse
6468 %<*ignore>
6469 % \fi
6470 \begin{LTXexample}[morekeywords={[21]{filtertype}}]
6471 \begin{pspicture}(3,1.5)
6472 \optfilter[filtertype=bandstop](0,1)(3,1){bandstop}
6473 \end{pspicture}
6474 \end{LTXexample}
6475 % \iffalse
6476 %</ignore>
6477 % \fi
6478 % \iffalse
6479 %<*ignore>
6480 % \fi
6481 \begin{LTXexample}[morekeywords={[21]{filtertype}}]
6482 \begin{pspicture}(3,1.5)
6483 \optfilter[filtertype=lowpass](0,1)(3,1){lowpass}
6484 \end{pspicture}
6485 \end{LTXexample}
6486
6487 \begin{LTXexample}[morekeywords={[21]{filtertype}}]
6488 \begin{pspicture}(3,1.5)
6489 \optfilter[filtertype=highpass](0,1)(3,1){highpass}
6490 \end{pspicture}
6491 \end{LTXexample}
6492 % \iffalse
6493 %</ignore>
6494 % \fi
6495 %
6496 % \numitem[0]{filterangle}
6497 % \ifGERMAN Dreht das «Innere» des Filters relativ zum seinem
6498 % Rahmen. Anstattdessn kann auch \Lkeyword{innercompalign} verwendet
6499 % werden.
6500 % \fi
6501 % \ifENGLISH Rotates the «inner» part of the filter relativ to its
6502 % frame. Alternatively \Lkeyword{innercompalign} can be used.
6503 % \fi
6504 % \iffalse
6505 %<*ignore>
6506 % \fi
6507 \begin{LTXexample}[morekeywords={[21]{filterangle}}]
6508 \begin{pspicture}(2,2)
6509 \optfilter(0.5,0)(0.5,2)
6510 \optfilter[filterangle=90](1.5,0)(1.5,2)
6511 \end{pspicture}
6512 \end{LTXexample}
6513 % \iffalse
6514 %</ignore>
6515 % \fi
6516 % \end{optionlist}
6517 %
6518 % \begin{stylelist}
6519 % \styleitem{FilterStyle}
6520 % \ifGERMAN Beinflusst das Aussehen der internen Filterlinien.\fi
6521 % \ifENGLISH Change the style of the internal filter lines.\fi
6522 % \iffalse
6523 %<*ignore>
6524 % \fi
6525 \begin{LTXexample}[morekeywords={[21]FilterStyle}]
6526 \begin{pspicture}(3,1.5)
6527 \newpsstyle{OptComp}{linewidth=2\pslinewidth}
6528 \optfilter(0,1)(1.5,1)
6529 \newpsstyle{FilterStyle}{linewidth=0.5\pslinewidth}
6530 \optfilter(1.5,1)(3,1)
6531 \end{pspicture}
6532 \end{LTXexample}
6533 % \iffalse
6534 %</ignore>
6535 % \fi
6536 % \end{stylelist}
6537 %
6538 % \ifGERMAN Verwendung als Freistrahlkomponenten, \Lkeyword{allowbeaminside} ist
6539 % auf \opt{false} voreingestellt:
6540 % \fi
6541 % \ifENGLISH Usage as free-ray component, \Lkeyword{allowbeaminside} is set to
6542 % \opt{false} by default:
6543 % \fi
6544 % \iffalse
6545 %<*ignore>
6546 % \fi
6547 \begin{LTXexample}
6548 \begin{pspicture}(3,1.5)
6549 \optfilter[fiber=none](0,1)(3,1)
6550 \addtopsstyle{Beam}{beamwidth=0.3,
6551 fillstyle=solid, fillcolor=green, opacity=0.2}
6552 \drawwidebeam(0,1){}(3,1)
6553 \end{pspicture}
6554 \end{LTXexample}
6555 % \iffalse
6556 %</ignore>
6557 % \fi
6558 %
6559 %
6560 % \ifGERMAN\section{Faserkollimator}\fi
6561 % \ifENGLISH\section{Fiber collimator}\fi
6562 %
6563 % \begin{ltxsyntax}
6564 % \xLdipole{fibercollimator}\compitem{fibercollimator}(in)(A)(B)(out){label}%
6565 % \iffalse
6566 %<*ignore>
6567 % \fi
6568 \begin{LTXexample}
6569 \begin{pspicture}(3,1.5)
6570 \fibercollimator[beam](0,1)(3,1){FC}
6571 \end{pspicture}
6572 \end{LTXexample}
6573 % \iffalse
6574 %</ignore>
6575 % \fi
6576 % \end{ltxsyntax}
6577 %
6578 % \ifGERMAN
6579 % Der Faserkollimator kann mit zwei, drei oder vier Punkten verwendet
6580 % werden. Bei zwei Punkten wird der Kollimator wie jeder andere Zweipol zwischen
6581 % \prm{in} und \prm{out} Knoten platziert. Bei drei Punkten wird eine
6582 % \Lcs*{psbezier} Kurve gezeichnet, wobei der mittlere Punkt doppelt verwendet
6583 % wird. Die Positionierungsparameter (siehe \prettyref{sec:positioning}) können
6584 % verwendet werden um den Kollimator zwischen dem \prm{in} und \prm{A} Knoten
6585 % auszurichten.
6586 % \fi
6587 % \ifENGLISH
6588 % The fiber collimator can be used with two, three or four points. With two
6589 % points, the collimator is placed like any other dipole component between
6590 % \prm{in} and \prm{out} node. For three nodes, the fiber is drawn as
6591 % \Lcs*{psbezier} curve for which the central node \prm{A} is used
6592 % twice. Positioning parameters (see \prettyref{sec:positioning}) can be used to
6593 % shift the object between \prm{in} and \prm{A} nodes.
6594 % \fi
6595 % \iffalse
6596 %<*ignore>
6597 % \fi
6598 \begin{LTXexample}
6599 \begin{pspicture}(3,2)
6600 \fibercollimator[beam](0,1)(2,1)(3,2){FC}
6601 \end{pspicture}
6602 \end{LTXexample}
6603 % \iffalse
6604 %</ignore>
6605 % \fi
6606 % \medskip
6607 %
6608 % \ifGERMAN
6609 % Bei vier Knoten wird eine \Lcs*{psbezier} Kurve mit allen vier Knoten
6610 % gezeichnet. Die Positionierungsparameter (siehe \prettyref{sec:positioning})
6611 % können verwendet werden um den Kollimator zwischen den ersten beiden Knoten
6612 % (\prm{in} und \prm{A}) zu verschieben.
6613 % \fi
6614 % \ifENGLISH
6615 % For four nodes, the fiber is drawn as \Lcs*{psbezier} curve with the specified
6616 % nodes. Positioning parameters (siehe \prettyref{sec:positioning}) can be used
6617 % to shift the object between the first two nodes (\prm{in} and \prm{A}).
6618 % \fi
6619 % \iffalse
6620 %<*ignore>
6621 % \fi
6622 \begin{LTXexample}
6623 \begin{pspicture}(3,2)
6624 \fibercollimator[beam](0,1)(2,1)(3,1)(3,2){FC}
6625 \end{pspicture}
6626 \end{LTXexample}
6627 % \iffalse
6628 %</ignore>
6629 % \fi
6630 %
6631 % \begin{optionlist}
6632 % \optitem[0.3]{fibercolsize}{\prm{num} or \prm{width} \prm{height}}
6633 % \ifGERMAN
6634 % Eine einzelne Zahl gibt die Seitenlänge des Kollimators an, zwei Zahlen die Breite und
6635 % Höhe. Beachten Sie, dass \opt{fibercolsize=1} und \opt{fibercolsize=1 1} nicht
6636 % dasselbe Ergebnis liefern. Alternativ kann das Verhältnis zwischen Höhe und
6637 % Breite mit \opt{xunit} und \opt{yunit} geändert werden.
6638 % \fi
6639 % \ifENGLISH
6640 % A single number gives the side length of the collimator, two numbers the width
6641 % and height. Note, that \opt{fibercolsize=1} and \opt{fibercolsize=1 1} do not give
6642 % the same result. You may also change the relation of width and height with
6643 % \opt{xunit} and \opt{yunit}.
6644 % \fi
6645 % \end{optionlist}
6646 %
6647 % \ifGERMAN\section{Detektor}\fi
6648 % \ifENGLISH\section{Detector}\fi
6649 %
6650 % \begin{ltxsyntax}
6651 % \dipoledesc{optdetector}
6652 % \iffalse
6653 %<*ignore>
6654 % \fi
6655 \begin{LTXexample}
6656 \begin{pspicture}(3,1.2)
6657 \optdetector[beam](0,0)(1.5,1){detector}
6658 \end{pspicture}
6659 \end{LTXexample}
6660 % \iffalse
6661 %</ignore>
6662 % \fi
6663 % \end{ltxsyntax}
6664 %
6665 % \ifENGLISH The detector is placed by default at the end of the
6666 % reference line (\Lkeyword{position}\opt{=end}). If this setting is
6667 % overwritten, the output connection is treated like that of an
6668 % electrical component.
6669 % \fi
6670 % \ifGERMAN Der Detektor wird in der Voreinstellung ans Ende der
6671 % Referenzlinie platziert (\Lkeyword{position}\opt{=end}). Wird dieser
6672 % Parameter überschrieben, dann wird die ausgehende Verbindung wie bei
6673 % einer elektrischen Komponente behandelt.
6674 % \fi
6675 % \iffalse
6676 %<*ignore>
6677 % \fi
6678 \begin{LTXexample}
6679 \begin{pspicture}(3,1.2)
6680 \optdetector[position=0.5](0,0)(1.5,1){detector}
6681 \end{pspicture}
6682 \end{LTXexample}
6683 % \iffalse
6684 %</ignore>
6685 % \fi
6686 %
6687 % \begin{optionlist}
6688 % \optitem[0.8]{detsize}{\prm{num} or \prm{width} \prm{height}}
6689 % \ifGERMAN
6690 % Wenn eine einzelne Zahl angegeben ist, dann ist das die Seitenlänge
6691 % (\opt{diode}) bzw. der Durchmesser (\opt{round}) des Detektors. Werden zwei
6692 % Zahlen angegeben, so sind das Breite und Höhe des Detektors. Beachten Sie,
6693 % dass \opt{detsize=1} und \opt{detsize=1 1} für \opt{dettype=round} nicht dasselbe ist.
6694 % \fi
6695 % \ifENGLISH
6696 % If a single number is given it is the side length (\opt{diode}) or the
6697 % diameter (\opt{round}) of the detector. Two numbers define the width and
6698 % height of the detector. Note, that \opt{detsize=1} and \opt{detsize=1 1} are
6699 % not equivalent for \opt{dettype=round}.
6700 % \fi
6701 %
6702 % \choitem[round]{dettype}{round, diode}
6703 % \ifGERMAN
6704 % Dieser Parameter bestimmt den Typ und damit das Aussehen des Detektors.
6705 % \fi
6706 % \ifENGLISH
6707 % This parameter selects between different types of detectors.
6708 % \fi
6709 % \iffalse
6710 %<*ignore>
6711 % \fi
6712 \begin{LTXexample}[morekeywords={[21]{dettype}}]
6713 \begin{pspicture}(3,1.5)
6714 \optdetector[beam, dettype=diode](0,0)(1.5,1){detector}
6715 \end{pspicture}
6716 \end{LTXexample}
6717 % \iffalse
6718 %</ignore>
6719 % \fi
6720 % \end{optionlist}
6721 %
6722 % \begin{stylelist}
6723 % \styleitem{DetectorStyle}
6724 % \ifGERMAN
6725 % Der Stil der Diode für \Lkeyword{dettype}\opt{=diode}.
6726 % \fi
6727 % \ifENGLISH
6728 % The style of the diode for \Lkeyword{dettype}\opt{=diode}.
6729 % \fi
6730 % \iffalse
6731 %<*ignore>
6732 % \fi
6733 \begin{LTXexample}
6734 \begin{pspicture}(3,1.5)
6735 \newpsstyle{OptComp}{linewidth=3\pslinewidth}
6736 \newpsstyle{DetectorStyle}{linewidth=0.333\pslinewidth}
6737 \optdetector[dettype=diode](0,1)(2,1)
6738 \end{pspicture}
6739 \end{LTXexample}
6740 % \iffalse
6741 %</ignore>
6742 % \fi
6743 % \end{stylelist}
6744 %
6745 %
6746 % \ifGERMAN\chapter{Spezielle Knoten}\fi
6747 % \ifENGLISH\chapter{Special nodes}\fi
6748 % \label{sec:objnodes}
6749 %
6750 % \ifGERMAN
6751 % Jedes \nxLPack{pst-optexp}-Objekt stellt mehrere spezielle Knoten zur
6752 % Verfügung, die mit dessen Geometrie und Positionierung zusammenhängen. Diese
6753 % Knoten stehen für weitere Verwendung zur Verfügung.
6754 %
6755 % Sie sollten immer die dafür vorgesehenen Makros verwenden um auf die
6756 % Knotennamen zuzugreifen.
6757 % \fi
6758 % \ifENGLISH
6759 % Every \nxLPack{pst-optexp} object of an experimental setup provides
6760 % several special nodes which are related to its geometry and
6761 % positioning. They can be accessed and used for related positioning and
6762 % drawing.
6763 %
6764 % You should always use the dedicated macros to access these node names.
6765 % \fi
6766 % \begin{ltxsyntax}
6767 % \cmditem{oenode}{node}{comp}
6768 %
6769 % \ifGERMAN
6770 % Das ist das grundlegende Makro mit dem auf die Knotennamen einer Komponente
6771 % zugegriffen werden kann. Das erste Argument \prm{node} ist der Bezeichner des
6772 % angeforderten Knotens. Das zweite Argument \prm{comp} ist der Name der
6773 % Komponente (gemäß \prettyref{sec:namingobj}). Ist dieses leer so wird das
6774 % zuletzt definierte Objekt verwendet.
6775 %
6776 % Für viele der Knoten wird ein eigenes Makro bereitgestellt, das Sie dann auch
6777 % verwenden sollten, da sich die Namenskonventionen ändern könnten. Die Makros
6778 % stellen sicher, dass Sie immer die passenden Knotennamen erhalten. Daher sind
6779 % die verfügbaren Bezeichner auch nicht aufgelistet.
6780 % \fi
6781 % \ifENGLISH
6782 % This is the basic command to access any node associated with a certain
6783 % component. The first argument \prm{node} is the identifier of the requested
6784 % node. The second argument \prm{comp} is the name of the target component
6785 % (according to \prettyref{sec:namingobj}). If left empty, it uses the last
6786 % component defined.
6787 %
6788 % For most special nodes an appropriate macro is provided, which you are
6789 % strongly advised to use, because the naming conventions may change. Using the
6790 % macros makes sure, that you always get the correct node names. Therefore, the
6791 % available identifiers are not listed explicitely.
6792 % \fi
6793 % \end{ltxsyntax}
6794 %
6795 % \begin{optionlist}
6796 % \boolitem[false]{showoptdots}
6797 % \ifGERMAN
6798 % Markiert einige der speziellen Komponentenknoten: die schwarzen Punkte sind
6799 % die normalen und die schwarzen Kreuze die transformierten Referenzknoten
6800 % (\prettyref{sec:refnode}), der rote Punkt ist der Mittelpunktknoten
6801 % (\prettyref{sec:centernode}) und das rote Kreuz der Beschriftungsknoten
6802 % (\prettyref{sec:labelnode}).
6803 % \fi
6804 % \ifENGLISH
6805 % Draw some special component nodes for debugging: The black points are the
6806 % normal and the black crosses are the transformed reference nodes
6807 % (\prettyref{sec:refnode}), the red point is the center node
6808 % (\prettyref{sec:centernode}), and the red cross is the label node
6809 % (\prettyref{sec:labelnode}).
6810 % \fi
6811 % \iffalse
6812 %<*ignore>
6813 % \fi
6814 \begin{LTXexample}
6815 \begin{pspicture}(3,2)
6816 \mirror[showoptdots, angle=10, beam](0,1)(1.9,1)(1.9,0)
6817 \end{pspicture}
6818 \end{LTXexample}
6819 % \iffalse
6820 %</ignore>
6821 % \fi
6822 % \end{optionlist}
6823 %
6824 % \ifGERMAN\section{Komponenten-Bezeichner}\fi
6825 % \ifENGLISH\section{Component identifiers}\fi
6826 % \label{sec:namingobj}
6827 %
6828 % \ifGERMAN
6829 % Alle Komponenten einer Aufbauskizze werden in Reihenfolge ihrer Definition im
6830 % Code aufsteigend nummeriert, angefangen bei \opt{1}. Die Komponenten und deren
6831 % Spezialknoten können immer über diese Nummer (ID) referenziert werden.
6832 %
6833 % IDs können auch relativ zur aktuellen ID über die Syntax
6834 % \opt{<}\prm{num} angegeben werden: \opt{<1} ist die vorletzte ID,
6835 % \opt{<2} die vorvorletzte ID usw. Die vorletzte ID kann abgekürzt auch
6836 % mit \opt{<} erhalten werden, und die aktuelle ID mit \opt{<0}, was
6837 % äquivalent zu einem leeren Parameter ist.
6838 % \fi
6839 % \ifENGLISH
6840 % All components of a setup drawing are numbered automatically in increasing
6841 % order according to their definition in the code, starting with \opt{1}. The
6842 % components as well as their special nodes can always be accessed by this
6843 % number (ID).
6844 %
6845 % ID specifications relative to the current ID can be used with the
6846 % syntax \opt{<}\prm{num}: \opt{<1} is the previous ID, \opt{<2} is the
6847 % current ID minus two etc. The previous ID can also be accessed by only
6848 % \opt{<}, and the current ID is \opt{<0}, which is equivalent to an
6849 % empty parameter.
6850 % \fi
6851 %
6852 % \begin{optionlist}
6853 % \valitem{compname}{string}
6854 % \ifGERMAN
6855 % Weist einer Komponente einen Bezeichner zu. Die Komponente kann nun sowohl
6856 % über diesen Bezeichner als auch über die ID referenziert werden. Dieser
6857 % Parameter kann nur im optionalen Argument einer \nxLPack{pst-optexp}
6858 % Komponente verwendet werden. Der Bezeichner sollte innerhalb einer
6859 % \Lenv*{pspicture}-Umgebung eindeutig sein.
6860 % \fi
6861 % \ifENGLISH
6862 % Assigns a name identifier to a component, which can then be
6863 % referenced both by this name and by its ID. The parameter can be
6864 % assigned only locally, i.e. in the optional argument of a
6865 % \nxLPack{pst-optexp} component, and should be unique within one
6866 % \Lenv*{pspicture} environment.
6867 % \fi
6868 % \end{optionlist}
6869 %
6870 % \ifGERMAN Beispiele für unterschiedliche Methoden auf ein und
6871 % dieselbe Komponente zuzugreifen.
6872 % \fi
6873 % \ifENGLISH Examples for different methods to access the same
6874 % component.
6875 % \fi
6876 %
6877 % \iffalse
6878 %<*ignore>
6879 % \fi
6880 \ifGERMAN
6881 \begin{LTXexample}
6882 \begin{pspicture}(2,2)
6883 \optbox[compname=MyBox](0,1)(2,2)
6884 \psdot[linecolor=red](\oenodeIn{MyBox}) % Verwende den Namen
6885 \psdot[linecolor=blue](\oenodeOut{1}) % Verwende die ID
6886 \psdot[linecolor=green](\oenodeCenter{})% Nimm die letzte Komponente
6887 \end{pspicture}
6888 \end{LTXexample}
6889 \fi\ifENGLISH
6890 \begin{LTXexample}
6891 \begin{pspicture}(2,2)
6892 \optbox[compname=MyBox](0,1)(2,2)
6893 \psdot[linecolor=red](\oenodeIn{MyBox})% use the compname
6894 \psdot[linecolor=blue](\oenodeOut{1}) % use the ID
6895 \psdot[linecolor=green](\oenodeCenter{}) % the last component
6896 \end{pspicture}
6897 \end{LTXexample}
6898 \fi
6899 % \iffalse
6900 %</ignore>
6901 % \fi
6902 %
6903 % \ifGERMAN
6904 % Die Verwendung von relativen IDs ist u.a. nützlich, um eine neue
6905 % Komponente relativ zur vorangegangenen zu definieren. Die Verwendung
6906 % von z.B. \Lcs{oenodeOut}\opt{\{\}} in den Referenzknoten ist nicht
6907 % möglich, da hiermit zum Zeitpunkt der Auswertung der Koordinaten schon
6908 % auf die neue, nicht fertige Komponente referenziert wird. Ein Aufruf
6909 % der Art \lstinline!\optbox(\oenodeOut{})(B)! ist daher nicht möglich,
6910 % und führt zu einem Fehler. Mit relativen IDs kann das allerdings mit
6911 % \lstinline!\optbox(\oenodeOut{<})(B)! erreicht werden:
6912 % \fi
6913 % \ifENGLISH
6914 % Using relative IDs can be very handy to define a component relative to
6915 % the previous one. It is not possible to use
6916 % e.g. \Lcs{oenodeOut}\opt{\{\}} as reference node, because at the time
6917 % these coordinates are evaluated, they reference to the new, not yet
6918 % defined component. A call like \lstinline!\optbox(\oenodeOut{})(B)!
6919 % is, therefore, not possible and gives an error. With relative IDs one
6920 % can achieve that with \lstinline!\optbox(\oenodeOut{<})(B)!:
6921 % \fi
6922 % \iffalse
6923 %<*ignore>
6924 % \fi
6925 \begin{LTXexample}
6926 \begin{pspicture}(4,2)
6927 \psset{optboxsize=0.4 0.8, abspos=0.5}
6928 \optbox(0,1)(4,1)
6929 \multido{}{3}{\optbox(\oenodeOut{<})(4,1)}
6930 \end{pspicture}
6931 \end{LTXexample}
6932 % \iffalse
6933 %</ignore>
6934 % \fi
6935 %
6936 % \ifGERMAN\section{Referenzknoten}\fi
6937 % \ifENGLISH\section{Reference nodes}\fi
6938 % \label{sec:refnode}
6939 %
6940 % \begin{ltxsyntax}
6941 % \cmditem{oenodeRefA}{comp}
6942 % \cmditem{oenodeRefB}{comp}
6943 %
6944 % \ifGERMAN
6945 % Die Eingangs- und Ausgangs-Referenzknoten.
6946 %
6947 % Das sind die ursprünglichen Knoten, die für die Positionierung der Komponente
6948 % benutzt wurden, \nxLcs{oenodeRefA} ist der erste und \nxLcs{oenodeRefB} der
6949 % letzte Knoten. Diese Zuordnung ist nicht gültig für Faserkoppler
6950 % (\ref{sec:coupler-refnodes}) und Zirkulatoren (\compref{optcirculator}).
6951 % \fi
6952 % \ifENGLISH
6953 % The input and output reference nodes.
6954 %
6955 % These are the original nodes which were used for the component positioning,
6956 % \nxLcs{oenodeRefA} is the first and \nxLcs{oenodeRefB} the last node. This
6957 % definition is not valid couplers (\ref{sec:coupler-refnodes}) and circulators
6958 % (\compref{optcirculator}).
6959 % \fi
6960 % \iffalse
6961 %<*ignore>
6962 % \fi
6963 \begin{LTXexample}[pos=t, linerange={1-3, 4-7}]
6964 \begin{pspicture}(5,1)
6965 \pnodes(0.5,0.5){A}(4.5,0.5){B}
6966 \optbox(A)(B)
6967 \psline[style=Refline](\oenodeRefA{})(\oenodeRefB{})
6968 \psdot(\oenodeRefA{})\uput[-90](\oenodeRefA{}){RefA}
6969 \psdot(\oenodeRefB{})\uput[-90](\oenodeRefB{}){RefB}
6970 \end{pspicture}
6971 \end{LTXexample}
6972 % \iffalse
6973 %</ignore>
6974 % \fi
6975 %
6976 % \cmditem{oenodeTrefA}{comp}
6977 % \cmditem{oenodeTrefB}{comp}
6978 %
6979 % \ifGERMAN
6980 % Die transformierten Eingangs- und Ausgangs-Referenzknoten.
6981 %
6982 % Das sind die Referenzknoten nachdem sie zusammen mit der Komponente gemäß
6983 % der \Lkeyword{compshift} und \Lkeyword{angle} Parameter transformiert wurden.
6984 % \fi
6985 % \ifENGLISH
6986 % The transformed input and output reference nodes.
6987 %
6988 % These are the input and output reference nodes which are transformed
6989 % together with the component according to the \Lkeyword{compshift} and
6990 % \Lkeyword{angle} parameters.
6991 % \fi
6992 % \iffalse
6993 %<*ignore>
6994 % \fi
6995 \begin{LTXexample}[pos=t, linerange={1-3,5-9}]
6996 \begin{pspicture}(5,1.8)
6997 \pnodes(0.5,0.5){A}(4.5,0.5){B}
6998 \optbox[compshift=0.5, angle=10](A)(B)
6999 \psline[style=Refline](\oenodeTrefA{})(\oenodeTrefB{})
7000 \psdot(\oenodeRefA{})\uput[-90](\oenodeRefA{}){RefA}
7001 \psdot(\oenodeRefB{})\uput[-90](\oenodeRefB{}){RefB}
7002 \psdot(\oenodeTrefA{})\uput[90](\oenodeTrefA{}){TrefA}
7003 \psdot(\oenodeTrefB{})\uput[90](\oenodeTrefB{}){TrefB}
7004 \end{pspicture}
7005 \end{LTXexample}
7006 % \iffalse
7007 %</ignore>
7008 % \fi
7009 % \end{ltxsyntax}
7010 %
7011 % \ifGERMAN\section{Mittelpunktknoten}\fi
7012 % \ifENGLISH\section{Center node}\fi
7013 % \label{sec:centernode}
7014 %
7015 % \begin{ltxsyntax}
7016 % \cmditem{oenodeCenter}{comp}
7017 %
7018 % \ifGERMAN
7019 % Dieser Knoten liegt, bis auf wenige Ausnahmen, wie
7020 % z.B. \Lcomp{optdetector} und \Lcomp{optcoupler} (siehe unten), im
7021 % Mittelpunkt der Komponente.
7022 % \fi
7023 % \ifENGLISH
7024 % This node lays, except for a few components like
7025 % e.g. \Lcomp{optcirculator} and \Lcomp{optcoupler} (see below), in the
7026 % center of the component.
7027 % \fi
7028 % \iffalse
7029 %<*ignore>
7030 % \fi
7031 \begin{LTXexample}[linerange={1-2, 5-5, 8-8}]
7032 \begin{pspicture}(3,2)
7033 \optbox(0,0.5)(3,0.5)
7034 \psline[style=Refline](\oenodeRefA{})(\oenodeRefB{})
7035 \psdot(\oenodeCenter{})
7036 \optdetector(0,1.5)(2.5,1.5)
7037 \psline[style=Refline](\oenodeRefA{})(\oenodeRefB{})
7038 \psdot(\oenodeCenter{})
7039 \end{pspicture}
7040 \end{LTXexample}
7041 % \iffalse
7042 %</ignore>
7043 % \fi
7044 %
7045 % \ifGERMAN Bei \Lcomp{optcoupler} hängt die Position der Komponentenmitte
7046 % von den \Lkeyword{coupleralign} Einstellungen ab.
7047 % \fi
7048 % \ifENGLISH For \Lcomp{optcoupler} the position of the component center
7049 % depends on the \Lkeyword{coupleralign} settings.
7050 % \fi
7051 % \iffalse
7052 %<*ignore>
7053 % \fi
7054 \begin{LTXexample}
7055 \begin{pspicture}(0,0.3)(3,3)
7056 \psset[optexp]{couplersize=0.6 0.4, couplersep=0.2, couplertype=rectangle}
7057 \optcoupler(0,3)(0,2)(3,3)(3,2)
7058 \psdot(\oenodeCenter{})
7059 \optcoupler[coupleralign=b](0,1.5)(0,0.5)(3,1.5)(3,0.5)
7060 \psdot(\oenodeCenter{})
7061 \end{pspicture}
7062 \end{LTXexample}
7063 % \iffalse
7064 %</ignore>
7065 % \fi
7066 % \end{ltxsyntax}
7067 %
7068 % \ifGERMAN\section{Beschriftungsknoten}\fi
7069 % \ifENGLISH\section{Label node}\fi
7070 % \label{sec:labelnode}
7071 %
7072 % \begin{ltxsyntax}
7073 % \cmditem{oenodeLabel}{comp}
7074 %
7075 % \ifGERMAN
7076 % Auf diesen Knoten wird die Beschriftung platziert. Der Knoten ist auch
7077 % verfügbar wenn keine Beschriftung angegeben wurde. Für
7078 % \Lkeyword{labeloffset}\opt{=0} ist dieser Knoten
7079 % identisch mit dem Mittelpunktsknoten (\prettyref{sec:centernode}).
7080 % \fi
7081 % \ifENGLISH
7082 % The component label is placed at this node. It is also available
7083 % if no label was specified. The label node is identical with the center
7084 % node for \Lkeyword{labeloffset}\opt{=0}.
7085 % \fi
7086 % \iffalse
7087 %<*ignore>
7088 % \fi
7089 \begin{LTXexample}[linerange={1-2,5-5}]
7090 \begin{pspicture}(3,1.5)
7091 \optbox(0,1)(3,1)
7092 \psline[style=Refline](\oenodeTrefA{})(\oenodeTrefB{})
7093 \psdot(\oenodeLabel{})
7094 \end{pspicture}
7095 \end{LTXexample}
7096 % \iffalse
7097 %</ignore>
7098 % \fi
7099 % \end{ltxsyntax}
7100 %
7101 % \ifGERMAN\section{Externe Knoten}\fi
7102 % \ifENGLISH\section{External nodes}\fi
7103 % \label{sec:extnode}
7104 %
7105 % \begin{ltxsyntax}
7106 % \cmditem{oenodeExt}{comp}
7107 %
7108 % \ifGERMAN
7109 % Ein externer Knoten kann an unterschiedliche Positionen entlang des
7110 % Komponentenrandes gesetzt werden. Dieser wird nur für den externen Zugriff
7111 % definiert, und beeinflusst in keiner Weise die Komponente.
7112 % \fi
7113 % \ifENGLISH
7114 % An external node can be placed at different positions along the component
7115 % boundary. It gets defined only for external usage and does not affect the
7116 % component in any way.
7117 % \fi
7118 % \end{ltxsyntax}
7119 % \begin{optionlist}
7120 % \valitem{extnode}{refpoint}
7121 % \ifGERMAN
7122 % Bestimmt die Position des externen Knotens. \refpointexplanation Nicht
7123 % jede Komponente unterstützt alle möglichen Kombinationen, die möglichen
7124 % Positionen jeder Komponente sind in \prettyref{sec:overview-extnode}
7125 % zusammengefasst.
7126 % \fi
7127 % \ifENGLISH
7128 % Set the position of the external node. \refpointexplanation Not all
7129 % components support any possible combination. The allowed positions of each
7130 % component are listed in \prettyref{sec:overview-extnode}.
7131 % \fi
7132 %
7133 % \begin{pspicture}(6,2.5)
7134 % \addtopsstyle{Beam}{beaminside=false, arrows=->, arrowinset=0, arrowscale=1.5}
7135 % \psset{optboxsize=2.5 1.5}\ttfamily
7136 % \pnodes(0,1.25){A}(6,1.25){B}
7137 % \optbox[beam, extnode=tl](A)(B)
7138 % \psdot(\oenodeExt{})\uput[135](\oenodeExt{}){tl}
7139 % \backlayer{%
7140 % \optbox[extnode=t](A)(B)\psdot(\oenodeExt{})\uput[90](\oenodeExt{}){t}
7141 % \optbox[extnode=tr](A)(B)\psdot(\oenodeExt{})\uput[90](\oenodeExt{}){tr}
7142 % \optbox[extnode=r](A)(B)\psdot(\oenodeExt{})\uput[45](\oenodeExt{}){r}
7143 % \optbox[extnode=br](A)(B)\psdot(\oenodeExt{})\uput[-90](\oenodeExt{}){br}
7144 % \optbox[extnode=b](A)(B)\psdot(\oenodeExt{})\uput[-90](\oenodeExt{}){b}
7145 % \optbox[extnode=bl](A)(B)\psdot(\oenodeExt{})\uput[-90](\oenodeExt{}){bl}
7146 % \optbox[extnode=l](A)(B)\psdot(\oenodeExt{})\uput[135](\oenodeExt{}){l}
7147 % \optbox[extnode=c](A)(B)\psdot(\oenodeExt{})\uput[180](\oenodeExt{}){c}
7148 % }
7149 % \end{pspicture}
7150 %
7151 % \choitem[abs]{extnodealign}{rel,relative,abs,absolute}
7152 % \ifGERMAN
7153 % Die Bezeichnung von «oben» (\opt{t}) und den anderen Positionierungsparametern
7154 % von \Lkeyword{extnode} können absolut oder relativ zur Komponente betrachtet
7155 % werden.
7156 %
7157 % In dem folgenden Beispiel ist der externe Knoten immer «oben rechts»
7158 % (\opt{tr}) platziert, unabhängig von der Reihenfolge der Referenzknoten
7159 % (\opt{extnodealign=abs}). Das Verhalten ist identisch zu
7160 % \Lkeyword{labelref}\opt{=relative} für die Ausrichtung der Beschriftung.
7161 % \fi
7162 % \ifENGLISH
7163 % The definition of «top» (\opt{t}) and the other \Lkeyword{extnode} refpoint
7164 % parameters can be absolute or relative to the component.
7165 %
7166 % In the following example the external node is always placed «top right»
7167 % independent of the actual order of the reference nodes
7168 % (\opt{extnodealign=abs}). The behaviour is identical to the label rotation for
7169 % \Lkeyword{labelref}\opt{=relative}.
7170 % \fi
7171 % \iffalse
7172 %<*ignore>
7173 % \fi
7174 \begin{LTXexample}[morekeywords={[21]extnodealign}]
7175 \begin{pspicture}(-2,-2)(2,2)
7176 \psset{endbox, optboxsize=1 0.6, dotscale=1.5}
7177 \psset{extnodealign=abs, extnode=tr}
7178 \multido{\i=0+45}{8}{%
7179 \optbox[innerlabel](0,0)(1;\i){\i}
7180 \psdot(\oenodeExt{})
7181 }%
7182 \end{pspicture}
7183 \end{LTXexample}
7184 \begin{LTXexample}[morekeywords={[21]extnodealign}]
7185 \begin{pspicture}(-2.2,-2.2)(2.2,2.2)
7186 \psset{dotscale=1.5, mirrortype=extended, mirrordepth=0.5, label=0.25 . . relative, extnodealign=abs, extnode=tr}
7187 \newpsstyle{ExtendedMirror}{}
7188 \multido{\i=0+45,\ii=-45+45}{8}{%
7189 \mirror(0,0)(1.5;\i)(2.1212;\ii){\i}
7190 \psdot(\oenodeExt{})
7191 }%
7192 \end{pspicture}
7193 \end{LTXexample}
7194 % \iffalse
7195 %</ignore>
7196 % \fi
7197 %
7198 % \ifGERMAN
7199 % In dem darauffolgenden Beispiel bezieht sich die Positionierung relativ zur
7200 % Verbindung zwischen Eingangs- und Ausgangsreferenzknoten
7201 % (\opt{extnodealign=rel}).
7202 % \fi
7203 % \ifENGLISH
7204 % In the next example the position is relative to the order of input and output
7205 % reference node (\opt{extnodealign=rel}).
7206 % \fi
7207 % \iffalse
7208 %<*ignore>
7209 % \fi
7210 \begin{LTXexample}[morekeywords={[21]extnodealign}]
7211 \begin{pspicture}(-2,-2)(2,2)
7212 \psset{endbox, optboxsize=1 0.6, dotscale=1.5}
7213 \psset{extnodealign=rel, extnode=tr}
7214 \multido{\i=0+45}{8}{%
7215 \optbox[innerlabel](0,0)(1;\i){\i}
7216 \psdot(\oenodeExt{})
7217 }%
7218 \end{pspicture}
7219 \end{LTXexample}
7220 \begin{LTXexample}[morekeywords={[21]extnodealign}]
7221 \begin{pspicture}(-2.2,-2.2)(2.2,2.2)
7222 \psset{dotscale=1.5, mirrortype=extended, mirrordepth=0.5, label=0.25 . . relative, extnodealign=abs, extnode=tr}
7223 \newpsstyle{ExtendedMirror}{}
7224 \multido{\i=0+45,\ii=-45+45}{8}{%
7225 \mirror(0,0)(1.5;\i)(2.1212;\ii){\i}
7226 \psdot(\oenodeExt{})
7227 }%
7228 \end{pspicture}
7229 \end{LTXexample}
7230 % \iffalse
7231 %</ignore>
7232 % \fi
7233 %
7234 % \valitem{extnodes}{list}
7235 % \ifGERMAN Erlaubt die Definition mehrerer externer Knoten, \prm{list}
7236 % ist eine Liste von \prm{refpoint}, wie sie von \Lkeyword{extnode}
7237 % verwendet werden. Der erste Knoten kann wie gewohnt mit
7238 % \Lcs{oenodeExt} angesprochen werden (ist äquivalent zu
7239 % \Lcs{oenode}{\{Ext\}} und \Lcs{oenode}{\{Ext1\}}). Für alle weiteren
7240 % Knoten muss \Lcs{oenode} mit den Knotenbezeichnungen
7241 % \opt{Ext}\prm{num} verwendet werden: \Lcs{oenode}\opt{\{Ext1\}} für den
7242 % ersten, \Lcs{oenode}{\{Ext2\}} für den zweiten usw.
7243 % \fi
7244 % \ifENGLISH
7245 % Define multiple external nodes, with their \prm{refpoints} given in
7246 % the \prm{list} and separated by commas. The first node can be accessed
7247 % as usual with \Lcs{oenodeExt} (is equivalent to \Lcs{oenode}{\{Ext\}}
7248 % and \Lcs{oenode}{\{Ext1\}}). All additional nodes must be accessed
7249 % with \Lcs{oenode} and the node label \opt{Ext}\prm{num}:
7250 % \Lcs{oenode}{\{Ext1\}} for the first one, \Lcs{oenode}{\{Ext2\}} for
7251 % the second, etc.
7252 % \fi
7253 % \iffalse
7254 %<*ignore>
7255 % \fi
7256 \begin{LTXexample}[morekeywords={[21]extnodes}, linerange={1-3,5-5}]
7257 \begin{pspicture}(3,2)
7258 \optbox[extnodes={tl,tr,br,bl}](0,1)(3,1)
7259 \multido{\i=1+1}{4}{\psdot[dotstyle=o](\oenode{Ext\i}{})}%
7260 \multido{\i=1+1,\ii=135+-90}{4}{\uput[\ii](\oenode{Ext\i}{}){Ext\i}}%
7261 \end{pspicture}
7262 \end{LTXexample}
7263 % \iffalse
7264 %</ignore>
7265 % \fi
7266 % \end{optionlist}
7267 %
7268 % \ifGERMAN\section{Grenzflächenknoten}\fi
7269 % \ifENGLISH\section{Interface nodes}\fi
7270 % \label{sec:ifcnode}
7271 %
7272 % \begin{ltxsyntax}
7273 % \cmditem{oenodeIfc}{num}{comp}
7274 %
7275 % \ifGERMAN
7276 % Der Grenzflächenknoten \prm{num}, wobei \prm{num} eine positive
7277 % Ganzzahl oder der Buchstabe \opt{N} ist. Der letzte Knoten ist immer
7278 % \opt{N}, kann aber auch über die entsprechende Zahl angesprochen
7279 % werden.
7280 % \fi
7281 % \ifENGLISH
7282 % The interface node \prm{num}, where the number is a positive integer
7283 % or the character \opt{N}. The last node is always defined as \opt{N}
7284 % but can also be accessed via its number.
7285 % \fi
7286 %
7287 % \cmditem{oenodeIn}{comp}
7288 %
7289 % \ifGERMAN
7290 % Der Knoten \prm{1} ist der Eingangsknoten und sollte immer über
7291 % \nxLcs{oenodeIn} angesprochen werden.
7292 % \fi
7293 % \ifENGLISH
7294 % The interface node \prm{1} is the input node and should always be accessed
7295 % via \nxLcs{oenodeIn}.
7296 % \fi
7297 %
7298 % \cmditem{oenodeOut}{comp}
7299 %
7300 % \ifGERMAN
7301 % Der Knoten \opt{N} ist der Ausgangsknoten und sollte
7302 % immer über \nxLcs{oenodeOut} angesprochen werden.
7303 % \fi
7304 % \ifENGLISH
7305 % The interface node \prm{N} is the output node and should always be accessed
7306 % via \nxLcs{oenodeOut}.
7307 % \fi
7308 %
7309 % \ifGERMAN
7310 % «Eingang» und «Ausgang» können nur anhand einer relativen Orientierung
7311 % definiert werden. Per Definition ist der Eingangsknoten derjenige zu dem ein
7312 % Lichtstrahl ausgehend vom Referenzknoten \Lcs{oenodeRefA} verläuft. Analog
7313 % dazu ist die Definition ds Ausgangsknotens. Diese Bezeichnung kann nur für
7314 % Faserkoppler (siehe \prettyref{sec:coupler-nodes}) und Strahlteiler
7315 % (\compref{beamsplitter}) nicht angewendet werden.
7316 %
7317 % \nxLcs{oenodeIn} ist äquivalent zu \nxLcs{oenodeIfc\{1\}} und
7318 % \nxLcs{oenodeOut} ist äquivalent zu \nxLcs{oenodeIfc\{N\}}. Die Eingangs-
7319 % und Ausgangsknoten sollten über die explizit bereitgestellten Makros
7320 % angesprochen werden, \nxLcs{oenodeIfc} sollte nur für die weiteren
7321 % Grenzflächenknoten, sofern vorhanden, verwendet werden.
7322 % \fi
7323 % \ifENGLISH
7324 % «Input» and «output» can define only relative orientations. The input node
7325 % is by definition the node to which a beam coming from the reference node
7326 % \Lcs{oenodeRefA} is connected to. Correspondingly is the definition of the
7327 % output node. This definition breaks down only for fiber couplers (see
7328 % \prettyref{sec:coupler-nodes}) and beamsplitter (\compref{beamsplitter}).
7329 %
7330 % \nxLcs{oenodeIn} is equivalent to \nxLcs{oenodeIfc\{1\}} and
7331 % \nxLcs{oenodeOut} is equivalent to \nxLcs{oenodeIfc\{N\}}. You should use
7332 % the \nxLcs{oenodeIfc} macro only to access the nodes which are not the input
7333 % and output nodes as for those explicit macros are provided.
7334 % \fi
7335 % \end{ltxsyntax}
7336 % \iffalse
7337 %<*ignore>
7338 % \fi
7339 \begin{LTXexample}
7340 \begin{pspicture}(2.8,3)
7341 \pentaprism[pentaprismsize=1.3](0,1.5)(1.5,1.5)(1.5,0)
7342 \drawbeam[arrows=->, arrowinset=0, arrowscale=1.5](0,1.5){}(1.5,0)
7343 \psdot(\oenodeIn{})\uput[135](\oenodeIn{}){1}
7344 \psdot(\oenodeIfc{2}{})\uput[0](\oenodeIfc{2}{}){2}
7345 \psdot(\oenodeIfc{3}{})\uput[90](\oenodeIfc{3}{}){3}
7346 \psdot(\oenodeOut{})\uput[-45](\oenodeOut{}){N}
7347 \end{pspicture}
7348 \end{LTXexample}
7349 % \iffalse
7350 %</ignore>
7351 % \fi
7352 %
7353 % \ifGERMAN
7354 % In \prettyref{sec:overview-ifcnode} finden Sie eine vollständige Liste aller
7355 % Komponenten mit ihren Grenzflächenknoten.
7356 % \fi
7357 % \ifENGLISH
7358 % See \prettyref{sec:overview-ifcnode} for a complete list of all
7359 % components with their interface nodes.
7360 % \fi
7361 %
7362 % \ifGERMAN\section{Referenzknoten für die Rotation}\fi
7363 % \ifENGLISH\section{Rotation reference node}\fi
7364 % \label{sec:rotrefnode}
7365 %
7366 % \begin{ltxsyntax}
7367 % \cmditem{oenodeRotref}{comp}
7368 %
7369 % \ifGERMAN
7370 % Der Referenzknoten um den eine Komponente mit \Lkeyword{angle} gedreht
7371 % wird. Die Position des Knotens wird mit dem \Lkeyword{rotateref} Parameter
7372 % definiert und kann dieselben Werte annehmen wie \Lkeyword{extnode}. Eine
7373 % vollständige Liste der möglichen Positionen finden Sie in
7374 % \prettyref{sec:overview-extnode}.
7375 % \fi
7376 % \ifENGLISH
7377 % The node around which a component is rotated by \Lkeyword{angle}. The
7378 % position is defined with the \Lkeyword{rotateref} parameter and can take the
7379 % same values as \Lkeyword{extnode}. See \prettyref{sec:overview-extnode} for
7380 % possible rotation reference nodes of all components.
7381 % \fi
7382 % \iffalse
7383 %<*ignore>
7384 % \fi
7385 \begin{LTXexample}[pos=t, linerange={1-2, 6-7, 11-12}]
7386 \begin{pspicture}(0,0.1)(12,1.8)
7387 \optbox[angle=20](0.5,1)(4.5,1)
7388 \psdot(\oenodeRefA{})\uput[-90](\oenodeRefA{}){RefA}
7389 \psdot(\oenodeRefB{})\uput[-90](\oenodeRefB{}){RefB}
7390 \psline[style=Refline](\oenodeRefA{})(\oenodeRefB{})
7391 \psdot(\oenodeRotref{})\uput[-90](\oenodeRotref{}){Rotref}
7392 \optbox[angle=20, rotateref=bl](7.5,1)(11.5,1)
7393 \psdot(\oenodeRefA{})\uput[-90](\oenodeRefA{}){RefA}
7394 \psdot(\oenodeRefB{})\uput[-90](\oenodeRefB{}){RefB}
7395 \psline[style=Refline](\oenodeRefA{})(\oenodeRefB{})
7396 \psdot(\oenodeRotref{})\uput[-90](\oenodeRotref{}){Rotref}
7397 \end{pspicture}
7398 \end{LTXexample}
7399 % \iffalse
7400 %</ignore>
7401 % \fi
7402 % \end{ltxsyntax}
7403 %
7404 % \ifGERMAN\section{Strahlknoten}\fi
7405 % \ifENGLISH\section{Beam nodes}\fi
7406 % \label{sec:beamnode}
7407 %
7408 % \ifGERMAN
7409 % Die Endknoten eines \Lcs{drawbeam} oder \Lcs{drawwidebeam} Kommandos
7410 % können wieder verwendet werden, wenn \Lkeyword{savebeampoints} gesetzt ist.
7411 % \fi
7412 % \ifENGLISH
7413 % The end points of a recent \Lcs{drawbeam} or \Lcs{drawwidebeam} command can
7414 % be reused if \Lkeyword{savebeampoints} is set.
7415 % \fi
7416 % \begin{ltxsyntax}
7417 % \cmditem{oenodeBeam}{num}
7418 %
7419 % \ifGERMAN
7420 % Damit wird der Endknoten eines vorangegangenen \Lcs{drawbeam} Kommandos
7421 % angesprochen. Wird \prm{num} leer gelassen so wird \opt{1} genommen, was in
7422 % der Regel dem letzten Strahlengang entspricht. Auf welchen Strahl genau
7423 % Bezug genommen wird, hängt i.a. von den gewählten Einstellungen von
7424 % \Lkeyword{savebeampoints} und entsprechender Wahl von \prm{num} ab.
7425 % \fi
7426 % \ifENGLISH
7427 % Access the end point of a preceeding \Lcs{drawbeam} command. If \prm{num} is
7428 % left empty it defaults to \opt{1} which usually refers to the last beam
7429 % ray. However, generally it depends on the settings of
7430 % \Lkeyword{savebeampoints} and the choice of \prm{num} which beam you refer
7431 % to.
7432 % \fi
7433 % \iffalse
7434 %<*ignore>
7435 % \fi
7436 \begin{LTXexample}
7437 \begin{pspicture}(0,0)(3,2)
7438 \pnodes(0,1){A}(1.6,1){B}
7439 \optbox[position=end](A)(B)
7440 \drawbeam[beaminsidelast=false](A){1}
7441 \psdot(\oenodeBeam{})
7442 \end{pspicture}
7443 \end{LTXexample}
7444 % \iffalse
7445 %</ignore>
7446 % \fi
7447 %
7448 % \cmditem{oenodeBeamUp}{num}
7449 % \cmditem{oenodeBeamLow}{num}
7450 %
7451 % \ifGERMAN
7452 % Damit wird der obere («upper») oder untere («lower») Endknoten eines
7453 % vorangegangenen \Lcs{drawwidebeam} Kommandos angesprochen. Wird \prm{num}
7454 % leer gelassen so wird \opt{1} genommen, womit man sich in der Regel auf den
7455 % letzten Strahlengang bezieht. Auf welchen Strahl genau Bezug genommen wird,
7456 % hängt i.a. von den gewählten Einstellungen von \Lkeyword{savebeampoints} und
7457 % entsprechender Wahl von \prm{num} ab.
7458 % \fi
7459 % \ifENGLISH
7460 % Access the upper or lower end point of a preceeding \Lcs{drawwidebeam}
7461 % command. If \prm{num} is left empty it defaults to \opt{1}, which usually
7462 % refers to the last beam ray. However, generally it depends on the settings
7463 % of \Lkeyword{savebeampoints} and the choice of \prm{num} which beam you
7464 % refer to.
7465 % \fi
7466 %
7467 % \iffalse
7468 %<*ignore>
7469 % \fi
7470 \begin{LTXexample}[linerange={1-6,10-10}]
7471 \begin{pspicture}(0,0)(3,2)
7472 \pnodes(0,1){A}(3,1){B}
7473 \lens[abspos=1, lensradius=-2](A)(B)
7474 \addtopsstyle{Beam}{%
7475 fillstyle=solid, fillcolor=green, opacity=0.3}
7476 \drawwidebeam[beamwidth=0.5](A){}(B)
7477 \psdot(\oenodeBeamUp{})\psdot(\oenodeBeamLow{})
7478 \uput[90](\oenodeBeamUp{}){\rput[rb](0,0){BeamUp}}
7479 \uput[-90](\oenodeBeamLow{}){\rput[rt](0,0){BeamLow}}
7480 \end{pspicture}
7481 \end{LTXexample}
7482 % \iffalse
7483 %</ignore>
7484 % \fi
7485 %
7486 % \ifGERMAN
7487 % Beachten Sie, dass «oben» («upper») und «unten» («lower») bezüglich der
7488 % Ausbreitungsrichtung des Strahls definiert ist. Ein Randstrahl der als «upper»
7489 % startet can zu «lower» werden, wenn er den anderen Randstrahl kreuzt. Das wird
7490 % in dem folgenden Beispiel erläutert:
7491 % \fi
7492 % \ifENGLISH
7493 % Note, that «upper» and «lower» is defined with respect to the propagation
7494 % direction of the beam. A marginal beam which started as «upper» can change to «lower»
7495 % if it crosses the other marginal beam. This is shown in the following example,
7496 % where the marginal rays exchange their roles:
7497 % \fi
7498 %
7499 % \iffalse
7500 %<*ignore>
7501 % \fi
7502 \begin{LTXexample}[linerange={1-6,10-10,14-14}]
7503 \begin{pspicture}(0,0)(3,2)
7504 \pnodes(0,1){A}(3,1){B}
7505 \lens[abspos=1, n=2](A)(B)
7506 \addtopsstyle{Beam}{%
7507 fillstyle=solid, fillcolor=green, opacity=0.3}
7508 \drawwidebeam[beamwidth=0.5](A){}
7509 \psdot(\oenodeBeamUp{})\psdot(\oenodeBeamLow{})
7510 \uput[90](\oenodeBeamUp{}){\rput[rb](0,0){BeamUp}}
7511 \uput[-90](\oenodeBeamLow{}){\rput[rt](0,0){BeamLow}}
7512 \drawwidebeam[loadbeam, beaminsidefirst]{}(B)
7513 \psdot(\oenodeBeamUp{})\psdot(\oenodeBeamLow{})
7514 \uput[90](\oenodeBeamUp{}){\rput[rb](0,0){BeamUp}}
7515 \uput[-90](\oenodeBeamLow{}){\rput[rt](0,0){BeamLow}}
7516 \end{pspicture}
7517 \end{LTXexample}
7518 % \iffalse
7519 %</ignore>
7520 % \fi
7521 %
7522 % \ifGERMAN Bei einer Reflektion können ebenfalls die Rollen vertauscht werden.\fi
7523 % \ifENGLISH After a reflection the roles can also be exchanged.\fi
7524 %
7525 % \iffalse
7526 %<*ignore>
7527 % \fi
7528 \begin{LTXexample}[linerange={1-6,8-8,15-15}]
7529 \begin{pspicture}(0,-1)(4,2)
7530 \pnodes(0,1.5){A}(2,1.5){B}(2.8,0){C}
7531 \mirror[mirrorwidth=1.2, mirrortype=extended](A)(B)(C)
7532 \addtopsstyle{Beam}{%
7533 fillstyle=solid, fillcolor=green, opacity=0.3}
7534 \drawwidebeam[beamwidth=0.5](A){}
7535 \pnodes(\oenodeBeamUp{}){Up1}(\oenodeBeamLow{}){Low1}
7536 \drawwidebeam[loadbeam]{}(C)
7537 \psdot(\oenodeBeamUp{})\psdot(\oenodeBeamLow{})
7538 \uput[90](\oenodeBeamUp{}){\rput[lb](0,0){BeamUp}}
7539 \uput[-90](\oenodeBeamLow{}){BeamLow}
7540 \psdot(Up1)\psdot(Low1)
7541 \uput[90](Up1){\rput[lb](0,0){BeamUp}}
7542 \uput[0](Low1){\rput[l](0,0){BeamLow}}
7543 \end{pspicture}
7544 \end{LTXexample}
7545 % \iffalse
7546 %</ignore>
7547 % \fi
7548 %
7549 % \ifGERMAN
7550 % Beachten Sie, dass sich die Orientierung von «oben» und «unten» in
7551 % Version 3.3 geändert hat, siehe \prettyref{sec:bwd-comp-3.3}.
7552 % \fi
7553 % \ifENGLISH
7554 % Note, that the orientation of «upper» and «lower» changed with version
7555 % 3.3, for more details see \prettyref{sec:bwd-comp-3.3}.
7556 % \fi
7557 %
7558 % \cmditem{oeBeamCenter}{num}
7559 %
7560 % \ifGERMAN Damit erhält man die Mitte zwischen oberem und unterem
7561 % Endknoten, die Koordinaten sind nur aus Postscript-Ebene verfügbar,
7562 % im Gegensatz zu \Lcs*{oenodeBeam*}, daher auch die an
7563 % \Lcs*{oeBeamVec*} angelehnte Nomenklatur. Ein Anwendungsbeispiel ist
7564 % \prettyref{ex:beamcenter}.
7565 % \fi
7566 % \ifENGLISH Get the mean of upper and lower beam node. The
7567 % coordinates are available only at Postscript level, in contrast to
7568 % the \Lcs*{oenodeBeam*} macros. For an example see
7569 % \prettyref{ex:beamcenter}.
7570 % \fi
7571 % \end{ltxsyntax}
7572 %
7573 % \ifGERMAN
7574 % Die Strahlknoten können nur innerhalb der \Lenv*{pspicture}-Umgebung verwendet
7575 % werden, in der sie definiert wurden. Um auf bestimmte Strahlknoten von
7576 % außerhalb zugreifen zu können müssen diese vorher explizit umdefiniert werden:
7577 % \fi
7578 % \ifENGLISH
7579 % The beam nodes can be accessed only within the \Lenv*{pspicture} environment
7580 % they were defined in. If you want to use one of these nodes from outside, you
7581 % must explicitely redefine them beforehand:
7582 % \fi
7583 %
7584 % \iffalse
7585 %<*ignore>
7586 % \fi
7587 \begin{lstlisting}
7588 \pnode(\oenodeBeam{}){MyBeamNode}
7589 \end{lstlisting}
7590 % \iffalse
7591 %</ignore>
7592 % \fi
7593 %
7594 % \ifGERMAN
7595 % Desweiteren werden die Endknoten durch \Lkeyword{stopinside}
7596 % beeinflusst. Siehe \prettyref{sec:custombeam} für weitere Details.
7597 % \fi
7598 % \ifENGLISH
7599 % The end points are also affected by \Lkeyword{stopinside}. See
7600 % \prettyref{sec:custombeam} for further details.
7601 % \fi
7602 % \iffalse
7603 %<*ignore>
7604 % \fi
7605 \begin{LTXexample}
7606 \begin{pspicture}(0,0)(3,2)
7607 \pnodes(0,1){A}(1.6,1){B}
7608 \optbox[position=end](A)(B)
7609 \psset{beaminsidelast=false}
7610 \drawbeam[linecolor=red, beampos=0.3](A){1}
7611 \psdot(\oenodeBeam{})
7612 \drawbeam[stopinside](A){1}
7613 \psdot(\oenodeBeam{})
7614 \end{pspicture}
7615 \end{LTXexample}
7616 % \iffalse
7617 %</ignore>
7618 % \fi
7619 %
7620 % \ifGERMAN\section{Strahlvektor}\fi
7621 % \ifENGLISH\section{Beam vector}\fi
7622 %
7623 % \ifENGLISH In addition to the beam nodes (see
7624 % \prettyref{sec:beamnode}) also the normalized vectors of the last
7625 % saved beams (see \Lkeyword{savebeam}) can be accessed at Postscript
7626 % level.
7627 %
7628 % These are again separated in single, upper and lower beams. \prm{num}
7629 % has the same meaning as for \Lcs{oenodeBeam}.
7630 % \fi
7631 %
7632 % \ifGERMAN Zusätzlich zu den Strahlknoten (siehe
7633 % \prettyref{sec:beamnode}) kann auf Postscript-Ebene auf die normierten
7634 % Strahlvektoren der letzten gespeicherten Strahlen (siehe
7635 % \Lkeyword{savebeam}) zugegriffen werden.
7636 %
7637 % Auch hier wird zwischen Einzelstrahlen, und oberem bzw. unterem Strahl
7638 % unterschieden. \prm{num} hat dieselbe Bedeutung wie bei \Lcs{oenodeBeam}.
7639 % \fi
7640 % \begin{ltxsyntax}
7641 % \cmditem{oeBeamVec}{num}
7642 % \cmditem{oeBeamVecUp}{num}
7643 % \cmditem{oeBeamVecLow}{num}
7644 % \end{ltxsyntax}
7645 %
7646 % \ifGERMAN Bei den gespeicherten Werten handelt es sich um den
7647 % normierten Richtungsvektor des letzten Strahlsegments, dieser ist nur
7648 % auf Postscript-Ebene verfügbar. Dieser Richtungsvektor ist im
7649 % folgenden Beispiel in rot zu sehen. Im Gegensatz dazu wird mit
7650 % \Lkeyword{savebeam} der Richtungsvektor gespeichert, der nach der
7651 % letzten Grenzfläche gelten würde, also für einen nachfolgenden Strahl
7652 % verwendet würde. Dieser ist im Beispiel in blau eingezeichnet.
7653 % \fi
7654 % \ifENGLISH The saved values are those of the normalized direction
7655 % vector of the last beam segment and are drawn in red in the next example. In contrast
7656 % to this, the vector saved with \Lkeyword{savebeam} is that behind the
7657 % last interface and would be used for a following beam. This is shown
7658 % in blue in the following example.
7659 % \fi
7660 % \iffalse
7661 %<*ignore>
7662 % \fi
7663 \begin{LTXexample}[morekeywords={[21]beaminsidelast}]
7664 \begin{pspicture}(4,2)
7665 \optbox[optboxsize=2 1, angle=20, n=2](0,1)(4,1)
7666 \drawbeam[beaminsidelast, beamalign=abs](0,1){1}
7667 \pnode(\oenodeBeam{}){Out}
7668 \nodexn{(Out)+(!\oeBeamVec{})}{C}
7669 \drawbeam[linecolor=blue, arrows=->, loadbeam]{1}(C)
7670 \drawbeam[linecolor=red, arrows=->](Out)(C)
7671 \end{pspicture}
7672 \end{LTXexample}
7673 % \iffalse
7674 %</ignore>
7675 % \fi
7676 %
7677 % \ifGERMAN Das Verhalten ist unabhängig davon, ob der letzte Strahl nur
7678 % berechnet, oder auch gezeichnet wurde. Das nächste Beispiel verwendet
7679 % \Lkeyword{stopinside} anstelle vom Parameter \Lkeyword{beaminsidelast}
7680 % im vorangegangenen Beispiel; die Strahlvektoren bleiben davon
7681 % unbeeinflusst.
7682 % \fi
7683 % \ifENGLISH This behaviour is independent of whether the last beam was
7684 % only calculated or also drawn. The next example uses
7685 % \Lkeyword{stopinside} instead of \Lkeyword{beaminsidelast} compared to
7686 % the previous example; the beam vectors are not affected by this.
7687 % \fi
7688 % \iffalse
7689 %<*ignore>
7690 % \fi
7691 \begin{LTXexample}[morekeywords={[21]stopinside}]
7692 \begin{pspicture}(4,2)
7693 \optbox[optboxsize=2 1, angle=20, n=2](0,1)(4,1)
7694 \drawbeam[stopinside, beamalign=abs](0,1){1}
7695 \pnode(\oenodeBeam{}){Out}
7696 \nodexn{(Out)+(!\oeBeamVec{})}{C}
7697 \drawbeam[linecolor=blue, arrows=->, loadbeam]{1}(C)
7698 \drawbeam[linecolor=red, arrows=->](Out)(C)
7699 \end{pspicture}
7700 \end{LTXexample}
7701 % \iffalse
7702 %</ignore>
7703 % \fi
7704 %
7705 % \ifGERMAN Das kann dazu genutzt werden, um z.B. die Polarisation eines
7706 % Strahls zu kennzeichnen. Im folgenden Beispiel werden die neuen Knoten
7707 % \prm{U} und \prm{L}definiert, indem mit \Lcs*{nodexn} die Endpunkte
7708 % des oberen bzw. unteren Strahls entlang ihrer Trajektorie zurück
7709 % verschoben werden.
7710 % \fi
7711 % \ifENGLISH A possible application is marking of the polarization of a
7712 % beam. In the following example we define the nodes \prm{U} and \prm{L}
7713 % which are shifted with \Lcs*{nodexn} from the end point of the upper
7714 % and lower beam along the respective beam trajectory.
7715 % \fi
7716 % \iffalse
7717 %<*ignore>
7718 % \fi
7719 \begin{LTXexample}[linerange={1-9,11-11}]
7720 \begin{pspicture}(3,3)
7721 \pnodes(0,1.5){A}(3,1.5){B}
7722 \lens[abspos=1, lens=5 5 3, n=2.0](A)(B)
7723 \optplane[angle=90](B)
7724 \drawwidebeam[beamwidth=2](A){1-2}
7725 \nodexn{(\oenodeBeamUp{})-2(!\oeBeamVecUp{})}{U}
7726 \nodexn{(\oenodeBeamLow{})-2(!\oeBeamVecLow{})}{L}
7727 \polarization(U)(\oenodeBeamUp{})
7728 \polarization(L)(\oenodeBeamLow{})
7729 \psdot(U)\uput[45](U){U}\psdot(L)\uput[-45](L){L}
7730 \end{pspicture}
7731 \end{LTXexample}
7732 % \iffalse
7733 %</ignore>
7734 % \fi
7735 %
7736 % \begin{ltxsyntax}
7737 % \cmditem{oeBeamVecMedian}{num}
7738 % \ifGERMAN Der Mittelwert aus oberem und unterem Strahlvektor.\fi
7739 % \ifENGLISH The mean of upper and lower beam vector.\fi
7740 % \end{ltxsyntax}
7741 %
7742 % \iffalse
7743 %<*ignore>
7744 % \fi
7745 \begin{LTXexample}[caption={caption}, label={ex:beamcenter}]
7746 \begin{pspicture}(3.5,2.6)
7747 \pnodes(0,2){A}(1,2){B}(3,1){C}
7748 \optprism(A)(B)(C)
7749 \newpsstyle{Beam}{linestyle=none, fillstyle=solid, beamwidth=0.2, beamnodealign=vector}
7750 \drawwidebeam[fillcolor=orange](A){}
7751 \psset[optexp]{beampathskip=1}
7752 \drawwidebeam[fillcolor=green, n=1.2, savebeam=2](A){}(C)
7753 \drawwidebeam[fillcolor=red, n=1.4, savebeam=3](A){}(C)
7754 \drawwidebeam[fillcolor=red!50!black, n=1.57, savebeam=4](A){}(C)
7755 \multido{\i=2+1}{3}{%
7756 \backlayer{%
7757 \pnode(!\oeBeamCenter{\i}){Det\i}
7758 \nodexn{(Det\i)-(!\oeBeamVecMedian{\i})}{Det\i'}}
7759 \optdetector[detsize=0.4 0.4](Det\i')(Det\i)}
7760 \end{pspicture}
7761 \end{LTXexample}
7762 % \iffalse
7763 %</ignore>
7764 % \fi
7765 %
7766 % \ifGERMAN Weitere Anwendungsbeispiele sind \prettyref{ex:glan-thompson} und \prettyref{ex:wgm-pdc}.\fi
7767 % \ifENGLISH Further example are \prettyref{ex:glan-thompson} and \prettyref{ex:wgm-pdc}.\fi
7768 %
7769 %
7770 % \ifGERMAN\section{Knotenübersicht}\fi
7771 % \ifENGLISH\section{Node overview}\fi
7772 %
7773 % \ifENGLISH This is an overview of all available component nodes.\fi
7774 % \ifGERMAN Dies ist eine Übersicht über alle verfügbaren Komponentenknoten.\fi
7775 % \iffalse
7776 %<*ignore>
7777 % \fi
7778 \begin{LTXexample}[pos=t, linerange={2-4,17-17}]
7779 \psset{unit=2}
7780 \begin{pspicture}(0.3,0.1)(4.8,1.6)
7781 \pnodes(0.5,0.5){A}(4.5,0.5){B}
7782 \optbox[compshift=0.5, angle=10, rotateref=tr, extnode={-0.5,1}](A)(B)
7783 \psline[style=Refline](\oenodeTrefA{})(\oenodeTrefB{})
7784 \psline[style=Refline, linestyle=dashed](\oenodeRefA{})(\oenodeRefB{})
7785 \psdot(\oenodeRefA{})\uput[-90](\oenodeRefA{}){RefA}
7786 \psdot(\oenodeRefB{})\uput[-90](\oenodeRefB{}){RefB}
7787 \psdot(\oenodeTrefA{})\uput[90](\oenodeTrefA{}){TrefA}
7788 \psdot(\oenodeTrefB{})\uput[90](\oenodeTrefB{}){TrefB}
7789 \psdot(\oenodeOut{})\uput[80](\oenodeOut{}){\rput[l](0,0.1){Out}}
7790 \psdot(\oenodeIn{})\uput[100](\oenodeIn{}){\rput[r](0,0){In}}
7791 \psdot(\oenodeCenter{})\uput[90](\oenodeCenter{}){Center}
7792 \psdot(\oenodeRotref{})\uput[90](\oenodeRotref{}){Rotref}
7793 \psdot(\oenodeExt{})\uput[90](\oenodeExt{}){Ext}
7794 \psdot(\oenodeLabel{})\uput[90](\oenodeLabel{}){Label}
7795 \end{pspicture}
7796 \end{LTXexample}
7797 % \iffalse
7798 %</ignore>
7799 % \fi
7800 %
7801 % \ifGERMAN\chapter{Verbinden von Komponenten}\fi
7802 % \ifENGLISH\chapter{Connecting components}\fi
7803 % \label{chap:connecting}
7804 %
7805 % \ifGERMAN
7806 % Das \nxLPack{pst-optexp}-Paket stellt unterschiedlichen Methoden
7807 % bereit, Komponenten vollautomatisch oder manuell, mit Lichtstrahlen,
7808 % Fasern oder Drähten zu verbinden.
7809 % \begin{compactitem}
7810 % \item In \prettyref{sec:accessobj} wird beschrieben wie Komponenten
7811 % und Knoten für Verbindungen angesprochen werden.
7812 % \item Strahlverbindungen im Allgemeinen und das Verhalten von
7813 % Einzelstrahlen wird in \prettyref{sec:drawbeam} beschrieben.
7814 % \item \prettyref{sec:drawwidebeam} erweitert diese Beschreibung von
7815 % Strahlverbindungen auf ausgedehnte Strahlen und deren Eigenheiten.
7816 % \item In \prettyref{sec:error-handling} wird gezeigt, wie fehlerhafte
7817 % Strahlverbindungen (verfehlen von Grenzflächen) gehandhabt wird).
7818 % \item \prettyref{sec:custombeam} erläutert, wie bestimmte, stückweise
7819 % definierte Strahlengänge, wie z.B. bei eine Teleskop, einfach
7820 % realisiert werden können.
7821 % \item Manuelle Faserverbindungen werden in \prettyref{sec:drawfiber}
7822 % behandelt, manuelle elektrischen Verbindungen, die sehr ähnlich
7823 % funktionieren, in \prettyref{sec:drawwire}.
7824 % \item Automatische Verbindungen werden in
7825 % \prettyref{sec:drawconn-auto} erklärt.
7826 % \item \prettyref{sec:layers} erklärt das Konzept der «front» und
7827 % «back»-Ebene.
7828 % \end{compactitem}
7829 % \fi
7830 % \ifENGLISH
7831 % The \LPack{pst-optexp} package provides several methods for automatic
7832 % and manual connections of components with beams, fibers, or wires.
7833 % \begin{compactitem}
7834 % \item \prettyref{sec:accessobj} describes how to access objects and
7835 % nodes for use with the connection macros.
7836 % \item Beam drawing in general and the behavior of single beams is
7837 % explained in \prettyref{sec:drawbeam}.
7838 % \item \prettyref{sec:drawwidebeam} extends this description of beam
7839 % drawing to wide beams and their special properties.
7840 % \item \prettyref{sec:error-handling} shows how errors in beam
7841 % connections (missed interfaces etc.) are handled.
7842 % \item \prettyref{sec:custombeam} explains how customized, piecewise
7843 % defined beam paths, like e.g. in a telescope, can be easily
7844 % constructed.
7845 % \item Manual fiber connections are described in
7846 % \prettyref{sec:drawfiber}, manual wire connections, which show the
7847 % same behavior, are treated in \prettyref{sec:drawwire}.
7848 % \item Automatic connections are explained in
7849 % \prettyref{sec:drawconn-auto}.
7850 % \item \prettyref{sec:layers} introduces the concept of front and back
7851 % layer for the drawings.
7852 % \end{compactitem}
7853 % \fi
7854 % \ifGERMAN\section{Zugriff auf Komponenten}\fi
7855 % \ifENGLISH\section{Accessing components}\fi\label{sec:accessobj}
7856 %
7857 % \ifENGLISH
7858 % All macros for connections can take either an ID, a \Lkeyword{compname}
7859 % identifier (see \prettyref{sec:namingobj}) or PSTricks nodes as arguments,
7860 % which are denoted with \prm{obj$_1$}, \prm{obj$_2$}, \ldots. To distinguish
7861 % between nodes and components, nodes must be either enclosed in parenthesis
7862 % within the brackets, or enclosed only in parenthesis:
7863 % \Lcs{drawbeam}\opt{\{(node)\}\{comp\}}, or \Lcs{drawbeam}\opt{(node)\{comp\}}.
7864 % \fi
7865 % \ifGERMAN
7866 % Alle Makros für Verbindungen akzeptieren entweder eine ID, ein
7867 % \Lkeyword{compname} Bezeichner (siehe \prettyref{sec:namingobj}) oder einen
7868 % PSTricks-Knoten als Argument, die als \prm{obj$_1$}, \prm{obj$_2$}, \ldots{}
7869 % bezeichnet werden. Um zwischen Knoten und Komponenten unterscheiden zu können,
7870 % müssen Knoten entweder in runde Klammern innerhalb der geschweiften Klammern
7871 % eingeschlossen werden oder dürfen nur runde Klammern haben:
7872 % \Lcs{drawbeam}\opt{\{(node)\}\{comp\}}, oder
7873 % \Lcs{drawbeam}\opt{(node)\{comp\}}.
7874 % \fi
7875 %
7876 % \begin{enumerate}
7877 % \item
7878 % \ifGERMAN Auf alle Komponenten kann immer unter Verwendung der ID
7879 % zugegriffen werden.
7880 % \fi
7881 % \ifENGLISH All components can always be accessed via their ID.\fi
7882 % \iffalse
7883 %<*ignore>
7884 % \fi
7885 \begin{LTXexample}
7886 \begin{pspicture}(3,1.5)
7887 \pnodes(0,1){A}(1.5,1){B}
7888 \optbox[position=end, labeloffset=0](A)(B){1}
7889 \drawbeam(A){1}
7890 \end{pspicture}
7891 \end{LTXexample}
7892 % \iffalse
7893 %</ignore>
7894 % \fi
7895 %
7896 % \item
7897 % \ifGERMAN Wenn eine Komponente mit \Lkeyword{compname} einen zusätzlichen
7898 % Namen erhalten hat, so kann dieser anstelle der ID verwendet werden.
7899 % \fi
7900 % \ifENGLISH A component which has been assigned a name with
7901 % \Lkeyword{compname} can also be accessed via this instead of its ID.
7902 % \fi
7903 % \iffalse
7904 %<*ignore>
7905 % \fi
7906 \begin{LTXexample}[morekeywords={[21]{compname}}]
7907 \begin{pspicture}(3,2)
7908 \psset{position=end, labeloffset=0}
7909 \optbox[compname=obj](0,1)(1.5,1){obj}
7910 \drawbeam(0,1){obj}
7911 \end{pspicture}
7912 \end{LTXexample}
7913 % \iffalse
7914 %</ignore>
7915 % \fi
7916 %
7917 % \item
7918 % \ifGERMAN Wird das Argument leer gelassen, dann greift man auf die zuletzt
7919 % definierte Komponente zu.
7920 % \fi
7921 % \ifENGLISH If the argument is left empty, use the last component defined.
7922 % \fi
7923 % \iffalse
7924 %<*ignore>
7925 % \fi
7926 \begin{LTXexample}
7927 \begin{pspicture}(3,2)
7928 \psset{position=end, labeloffset=0}
7929 \optbox(0,0.5)(1.5,0.5){1}
7930 \optbox(0,1.5)(1.5,1.5){2}
7931 \drawbeam(0,1){}
7932 \end{pspicture}
7933 \end{LTXexample}
7934 % \iffalse
7935 %</ignore>
7936 % \fi
7937 %
7938 % \item
7939 % \ifGERMAN
7940 % Es können auch Zahlintervalle verwendet werden, gültige Intervallangaben sind
7941 % \begin{description}
7942 % \item[\parbox{2em}{\texttt{x-y}}] Von \opt{x} bis \opt{y}, ist \opt{x}
7943 % größer als \opt{y}, so wird heruntergezählt. Ist der gesamte
7944 % Bereich nicht definiert, dann wird ein Fehler ausgegeben.
7945 % \item[\parbox{2em}{\texttt{x-}}] Von \opt{x} bis zur letzten Komponente.
7946 % \item[\parbox{2em}{\texttt{\hphantom{x}-y}}] Von der ersten Komponente
7947 % bis \opt{y}. Ist \opt{y} außerhalb des definierten Bereichs, dann
7948 % wird eine Warnung ausgegeben.
7949 % \item[\parbox{2em}{\texttt{\hphantom{x}-}}] Verbinde alle Komponenten.
7950 % \end{description}
7951 % \fi
7952 % \ifENGLISH You can also use number ranges, valid range specifications are
7953 % \begin{description}
7954 % \item[\parbox{2em}{\texttt{x-y}}] From \opt{x} to \opt{y}, if \opt{x}
7955 % is greater than \opt{y}, the numbers are decremented. If the whole
7956 % range is not defined, an error is raised.
7957 % \item[\parbox{2em}{\texttt{x-}}] From \opt{x} to the last component.
7958 % \item[\parbox{2em}{\texttt{\hphantom{x}-y}}] From the first component
7959 % to \opt{y}. If \opt{y} is outside the valid range, a warning is
7960 % raised.
7961 % \item[\parbox{2em}{\texttt{\hphantom{x}-}}] Connect all components.
7962 % \end{description}
7963 % \fi
7964 % \iffalse
7965 %<*ignore>
7966 % \fi
7967 \begin{LTXexample}
7968 \begin{pspicture}(3,3)
7969 \psset{position=end, optboxsize=0.5 0.5, bssize=0.5}
7970 \optbox[compname=obj](0.5,0.5)(0.5,2.5){obj, 1}
7971 \beamsplitter(0.5,2.5)(0.5,1)(2.5,1){2}
7972 \optbox(0.5,1)(2.5,1){3}
7973 \drawbeam{1-3}
7974 \end{pspicture}
7975 \end{LTXexample}
7976 % \iffalse
7977 %</ignore>
7978 % \fi
7979 % \end{enumerate}
7980 %
7981 % \ifENGLISH\section{Drawing beams}\fi
7982 % \ifGERMAN\section{Strahlen zeichnen}\fi
7983 % \label{sec:drawbeam}
7984 %
7985 % \ifENGLISH
7986 % The package provides several ways to connect components and nodes with beams,
7987 % which can be either single rays or wide beams. Most parameters have the same
7988 % effect on both single and wide beams so most examples will be shown for
7989 % single beams only. For options specific to wide beams please see
7990 % \prettyref{sec:drawwidebeam}.
7991 % \fi
7992 % \ifGERMAN Es gibt mehrere Möglichkeiten Komponenten und Knoten mit Strahlen zu
7993 % verbinden: einfache Linien oder ausgedehnte Strahlen. Die meisten Parameter
7994 % haben für beide Typen dieselbe Bedeutung, daher beschränken sich die
7995 % entsprechenden Beispiele auf die einfachen Strahlen. Die Parameter die nur
7996 % ausgedehnte Strahlen betreffen, werden in \prettyref{sec:drawwidebeam}
7997 % beschrieben.
7998 % \fi
7999 %
8000 % \begin{ltxsyntax}
8001 % \xLcs{drawbeam}\cmditem{drawbeam}[options]{obj$_1$}{obj$_2$}\ldots
8002 % \xLcs{drawwidebeam}\cmditem*{drawwidebeam}[options]{obj$_1$}{obj$_2$}\ldots
8003 %
8004 % \ifENGLISH
8005 % These are the two macros for beam connections; they can take a
8006 % variable number of arguments (minimum of two) which can be either an
8007 % ID, an ID range, a \Lkeyword{compname}, or a PSTricks nodes (see
8008 % \prettyref{sec:accessobj}). To distinguish between nodes and
8009 % components, nodes must be either enclosed in parenthesis within the
8010 % brackets, or enclosed only in parenthesis:
8011 % \Lcs{drawbeam}\opt{\{(node)\}\{comp\}}, or
8012 % \Lcs{drawbeam}\opt{(node)\{comp\}}.
8013 % \fi
8014 % \ifGERMAN
8015 % Diese beiden Makros sind für die Strahlverbindungen zuständig, sie
8016 % akzeptieren eine variable Anzahl an Argumenten (mindestens zwei),
8017 % die entweder eine ID, ein ID-Intervall, ein \Lkeyword{compname} oder
8018 % ein PSTricks-Knoten sein können (siehe \prettyref{sec:accessobj}. Um
8019 % zwischen Knoten und Komponenten unterscheiden zu können, müssen
8020 % Knoten entweder in runde Klammern innerhalb der geschweiften
8021 % Klammern eingeschlossen werden oder dürfen nur runde Klammern haben:
8022 % \Lcs{drawbeam}\opt{\{(node)\}\{comp\}}, oder
8023 % \Lcs{drawbeam}\opt{(node)\{comp\}}.
8024 % \fi
8025 % \end{ltxsyntax}
8026 %
8027 % \subsection{Raytracing}\label{sec:raytracing}
8028 % \ifENGLISH
8029 % The beam connection macros support two modes of tracing the beam across the
8030 % optical components: one is to use refractive indices and Snell's law to
8031 % determine the beam path. The other mode is to connect the components only,
8032 % regardless of their optical properties.
8033 %
8034 % You must always keep in mind, that this is a package for \emph{sketching}
8035 % experimental setups. Therefore, we do not provide a comprehensive raytracing
8036 % framwork, because deviations from the actual physical path are often desired
8037 % for sketches: beam angles and divergences should be in many cases more extreme
8038 % than in the real setup in order to highlight certain aspects. You should also
8039 % consider the refractive index (see \prettyref{sec:n}) only as a tool to
8040 % optimize the visual effects of the beam path, and not stick with its
8041 % physically correct values.
8042 % \fi
8043 % \ifGERMAN
8044 % Der Strahlengang durch die Komponenten kann mit zwei unterschiedlichen
8045 % Methoden ermittelt werden: über den Brechungsindex und das Snelliussche
8046 % Brechungsgesetz, oder indem die Komponenten unabhängig von ihren optischen
8047 % Eigenschaften einfach verbunden werden.
8048 %
8049 % Behalten Sie immer im Hinterkopf, dass dieses Paket für \emph{Skizzen}
8050 % optischer Aufbauten gedacht ist und daher keine vollständige Umgebung zur
8051 % Strahlverfolgung bereitstellt. Abweichungen vom physikalisch richtigen Weg
8052 % können in vielen Fällen erwünscht sein: Winkel und Divergenzen werden häufig
8053 % extremer dargestellt um bestimmte Effekte hervorzuheben. Daher sollten Sie den
8054 % Brechungsindex (siehe \prettyref{sec:n}) lediglich as Mittel zur Optimierung
8055 % des gewünschten Lichtweges sehen und nicht zu sehr an den physikalisch
8056 % richtigen Werten festhalten.
8057 % \fi
8058 %
8059 % \begin{optionlist}
8060 % \boolitem[true]{raytrace}
8061 % \ifENGLISH
8062 % Chooses the mode of tracing the beam path,
8063 % \opt{true} uses the refractive index («raytracing»), \opt{false} selects
8064 % component connection («connect» mode).
8065 %
8066 % In most cases, the «connect» mode is equivalent to «raytracing» with
8067 % \Lkeyword{n}\opt{=1}, except for \Lcomp{optprism} and \Lcomp{doveprism}, where
8068 % the interface nodes (\prettyref{sec:ifcnode}) are simply connected.
8069 % See the following two example for the differences between the tracing modes
8070 % using these two components. The interface nodes are highlighted for clarity.
8071 %
8072 % The raytraced beam with \Lkeyword{n}\opt{=1} (blue) passes the component
8073 % without changing its direction, the refraction for \Lkeyword{n}\opt{=1.5} is
8074 % calculated (red), and the «connect» beam (green) just passes through the two
8075 % interface nodes.
8076 % \fi
8077 % \ifGERMAN
8078 % Wählt die Methode der Strahlverfolgung, mit \opt{true} wird der
8079 % Brechungsindex («raytracing») verwendet, \opt{false} verbindet die
8080 % Komponente lediglich («connect» Variante).
8081 %
8082 % In vielen Fällen ist «connect» identisch mit «raytracing» für
8083 % \Lkeyword{n}\opt{=1}, außer für \Lcomp{optprism} oder \Lcomp{doveprism} bei
8084 % denen die Grenzflächenknoten (\prettyref{sec:ifcnode}) dann einfach nur
8085 % verbunden werden. Die folgenden beiden Beispiele zeigen die Unterschiede
8086 % der beiden Methoden für diese Komponenten. Die Grenzflächenknoten sind zum
8087 % besseren Verständnis hervorgehoben.
8088 %
8089 % Der «raytracing» Strahl mit \Lkeyword{n}\opt{=1} (blau) wird durch die
8090 % Komponente transmittiert ohne die Richtung zu verändern, für
8091 % \Lkeyword{n}\opt{=1.5} (rot) wird die Brechung an den Grenzflächen berechnet,
8092 % und der «connect» Strahl (grün) durchläuft genau die Grenzflächenknoten.
8093 % \fi
8094 %
8095 %\iffalse
8096 %<*ignore>
8097 %\fi
8098 \begin{LTXexample}[linerange={1-7,9-9}]
8099 \begin{pspicture}(3,2.2)
8100 \pnodes(0,1.5){A}(1,1.5){B}(3,1){C}
8101 \optprism[prismsize=1.2](A)(B)(C)
8102 \optplane(C)
8103 \drawbeam[n=1, linecolor=blue](A){1}{2}
8104 \drawbeam[n=1.5, linecolor=red](A){1}{2}
8105 \drawbeam[raytrace=false, linecolor=DGreen](A){1}{2}
8106 \psdot(\oenodeIn{1})\psdot(\oenodeOut{1})
8107 \end{pspicture}
8108 \end{LTXexample}
8109 %\iffalse
8110 %</ignore>
8111 %\fi
8112 %
8113 % \ifENGLISH
8114 % For the \Lcomp{doveprism} the same applies as for the \Lcomp{optprism}, but the
8115 % raytraced beam with \Lkeyword{n}\opt{=1} (blue) misses the second interface
8116 % because it is not refracted and stops therefore at the first interface (see
8117 % \prettyref{sec:error-handling}). Again, the green «connect» ray passes through
8118 % all interface nodes.
8119 % \fi
8120 % \ifGERMAN
8121 % Das \Lcomp{doveprism} wird im Prinzip genauso behandelt wie das \Lcomp{optprism},
8122 % der «raytracing» Strahl mit \Lkeyword{n}\opt{=1} (blau) trifft wegen fehlender
8123 % Brechung die zweite Grenzfläche gar nicht, und endet daher schon an der ersten
8124 % Grenzflächen (siehe \prettyref{sec:error-handling}). Der grüne «connect»
8125 % Strahl verläuft wieder durch die Grenzflächenknoten.
8126 % \fi
8127 %
8128 %\iffalse
8129 %<*ignore>
8130 %\fi
8131 \begin{LTXexample}[linerange={1-6,8-8}]
8132 \begin{pspicture}(4,2)
8133 \pnodes(0,1){A}(4,1){B}
8134 \doveprism[doveprismsize=1](A)(B)
8135 \drawbeam[n=1, linecolor=blue, beampos=0.1](A){1}(B)
8136 \drawbeam[n=1.5, linecolor=red](A){1}(B)
8137 \drawbeam[raytrace=false, linecolor=DGreen](A){1}(B)
8138 \psdot(\oenodeIn{1})\psdot(\oenodeIfc{2}{1})\psdot(\oenodeOut{1})
8139 \end{pspicture}
8140 \end{LTXexample}
8141 % \iffalse
8142 %</ignore>
8143 % \fi
8144 %
8145 % \ifGERMAN
8146 % Für «connect» können auch unterschiedliche Anfangsbedingungen
8147 % (\ref{prm:beampos}) verwendet werden.
8148 % \fi
8149 % \ifENGLISH
8150 % The «connect» mode also supports changing the initial conditions
8151 % (\ref{prm:beampos}).
8152 % \fi
8153 %\iffalse
8154 %<*ignore>
8155 %\fi
8156 \begin{LTXexample}[linerange={1-7,9-9}, morekeywords={[21]beampos,beamangle}]
8157 \begin{pspicture}(3.7,2)
8158 \pnodes(0,1){A}(4,1){B}
8159 \doveprism[doveprismsize=1](A)(B)
8160 \psset[optexp]{raytrace=false}
8161 \drawbeam[linecolor=blue, beampos=0.2, beamangle=-10](A){1}(B)
8162 \drawbeam[raytrace=false, linecolor=DGreen](A){1}(B)
8163 \drawbeam[linecolor=red, beampos=-0.2, beamangle=10](A){1}(B)
8164 \psdot(\oenodeIn{1})\psdot(\oenodeIfc{2}{1})\psdot(\oenodeOut{1})
8165 \end{pspicture}
8166 \end{LTXexample}
8167 \begin{LTXexample}[linerange={1-7,9-9}, morekeywords={[21]beampos,beamangle}]
8168 \begin{pspicture}(3.7,2)
8169 \pnodes(0,1){A}(4,1){B}
8170 \doveprism[doveprismsize=1](A)(B)
8171 \psset[optexp]{raytrace=false}
8172 \drawbeam[linecolor=blue, beampos=0.2](A){1}(B)
8173 \drawbeam[linecolor=DGreen](A){1}(B)
8174 \drawbeam[linecolor=red, beampos=-0.2](A){1}(B)
8175 \psdot(\oenodeIn{1})\psdot(\oenodeIfc{2}{1})\psdot(\oenodeOut{1})
8176 \end{pspicture}
8177 \end{LTXexample}
8178 % \iffalse
8179 %</ignore>
8180 % \fi
8181 %
8182 % \boolitem[true]{useNA}
8183 % \ifGERMAN Ein Strahlengang wird abgebrochen, falls eine Komponente nicht
8184 % getroffen wird. Für manche Zwecke, z.B. zum Ermitteln des richtigen
8185 % Brechungsindex, kann es sinnvoll sein, wenn die numerische Apertur eine
8186 % Komponente nicht berücksichtigt wird. In dem folgenden Beispiel wird der
8187 % rote Strahl gezeichnet, obwohl er außerhalb der gezeichneten Spiegelfläche
8188 % liegt.
8189 % \fi
8190 % \ifENGLISH The beam path is interrupted if an interface is missed. In some
8191 % cases, e.g. to estimate the correct refractive index for a ray trace, it can
8192 % be useful if the numerical aperture of the components is not considered. The
8193 % red beam in the following example is drawn, although it hits the mirror
8194 % outside the drawn mirror surface.
8195 % \fi
8196 % \iffalse
8197 %<*ignore>
8198 % \fi
8199 \begin{LTXexample}
8200 \begin{pspicture}(3,2)
8201 \pnodes(0,0.5){A}(2.5,0.5){B}(2.5,2){C}
8202 \mirror(A)(B)(C)
8203 \psset{useNA=false}
8204 \drawbeam(A){}(C)
8205 \drawbeam[linecolor=red, beamangle=10](A){}(C)
8206 \end{pspicture}
8207 \end{LTXexample}
8208 % \iffalse
8209 %</ignore>
8210 % \fi
8211 %
8212 % \end{optionlist}
8213 %
8214 % \ifENGLISH\subsection{Refractive index}\fi
8215 % \ifGERMAN\subsection{Brechungsindex}\fi
8216 % \label{sec:n}
8217 %
8218 % \ifENGLISH
8219 % The raytracing depends on the refractive index, which may be set for each
8220 % component separately. The refractive index is always relative to the
8221 % background which has a constant value for the whole sketch.
8222 % \fi
8223 % \ifGERMAN
8224 % Das Raytracing wird durch den Brechungsindex bestimmt, der für jede Komponente
8225 % einzeln gesetzt werden kann. Der Wert ist relativ zum Hintergrund, für den ein
8226 % konstanter Wert für die gesamte Skizze angenommen wird.
8227 % \fi
8228 %
8229 % \begin{optionlist}
8230 % \valitem[1.5]{n}{code}
8231 % \ifGERMAN
8232 % Setzt den Brechungsindex relativ zum Hintergrund. Diese Option hat zwei
8233 % Anwendungsbereiche: zum einen kann der Index einer Komponente gesetzt werden,
8234 % zum anderen der Brechungsindex für einen Strahlengang:
8235 % \fi
8236 % \ifENGLISH Sets the relative refractive index respect to the background. This
8237 % parameter has two scopes, you can either set the refractive index of each
8238 % component or of each beam ray:
8239 % \fi
8240 % \end{optionlist}
8241 %
8242 % \ifGERMAN
8243 % \begin{enumerate}
8244 % \item Wird \Lkeyword{n} als globaler Parameter oder als Komponentenparameter
8245 % verwendet, so wird der Index für alle betroffenen Komponenten gesetzt. Ohne
8246 % weitere Änderungen wird jeder Lichtstrahl diese Werte verwenden.
8247 % \item Als Parameter zu \Lcs{drawbeam} oder \Lcs{drawwidebeam} kann der
8248 % Brechungsindex der Komponenten für einzelne Strahlengänge überschrieben oder
8249 % geändert werden. Das kann sehr nützlich sein, um z.B. chromatische
8250 % Dispersion zu illustrieren. Soll die Änderung global für alle oder mehrere
8251 % Lichtstrahlen wirksam sein, so muss der gewünschte Wert dem
8252 % \Lstyle{Beam}-Stil hinzugefügt werden, da globale Definitionen von
8253 % \Lkeyword{n} nur die Komponenten betreffen.
8254 % \end{enumerate}
8255 % \fi
8256 % \ifENGLISH
8257 % \begin{enumerate}
8258 % \item Using \Lkeyword{n} as global parameter or component argument
8259 % sets a fixed refractive index for each affected component. Without further
8260 % actions, all beam paths experience this refractive index.
8261 % \item As parameter for \Lcs{drawbeam} or \Lcs{drawwidebeam} you can overwrite
8262 % or even change the refractive index of the components for specific beam
8263 % paths. This can be very useful e.g. to simulate chromatic dispersion. To set
8264 % this globally for all beams you must add the respective parameter
8265 % definition to the \Lstyle{Beam} style because global definitions of
8266 % \Lkeyword{n} affect only the components and not the beams.
8267 % \end{enumerate}
8268 % \fi
8269 %
8270 % \ifENGLISH
8271 % The \prm{code} can in general be any Postscript code which evaluates to a
8272 % number, e.g. \opt{1.5}, or \opt{5 sqrt}. If the \prm{code} starts with a
8273 % \opt{*}, it will be interpreted as an algebraic
8274 % expression\fnurl{http://mirror.ctan.org/graphics/pstricks/base/doc/pst-news08.pdf},
8275 % e.g. \opt{*sqrt(5)} is equivalent to \opt{5 sqrt}. Inside the \prm{code} you
8276 % can access the predefined refractive index of the component via \opt{n} which
8277 % allows you to change the index relative to its original value. Use
8278 % e.g. \opt{n=n 1.01 mul} to change \opt{n} by one percent.
8279 %
8280 % In the following you find several examples about the different aspects of
8281 % using \Lkeyword{n}.
8282 % \fi
8283 % \ifGERMAN
8284 % Der \prm{code} kann jeglicher Postscript-Kode sein, der zu einer Zahl
8285 % ausgewertet werden kann, also z.B. \opt{1.5} oder \opt{5 sqrt}. Beginnt
8286 % \prm{code} mit einem \opt{*}, so wird der Code als algebraischer
8287 % Ausdruck\fnurl{http://mirror.ctan.org/graphics/pstricks/base/doc/pst-news08.pdf}
8288 % ausgewertet, d.h. \opt{*sqrt(5)} ist äquivalent zu \opt{5 sqrt}. Innerhalb von
8289 % \prm{code} kann mit \opt{n} auf den vordefinierten Brechungsindex der
8290 % Komponenten zugegriffen werden, es kann also eine Änderung relativ zum
8291 % ursprünglichen Wert erzielt werden. Mit \opt{n=n 1.01 mul} kann \opt{n}
8292 % z.B. um ein Prozent geändert werden.
8293 %
8294 % In den folgenden Beispielen werden diese unterschiedlichen Möglichkeiten von
8295 % \Lkeyword{n} gezeigt.
8296 % \fi
8297 %
8298 % \begin{enumerate}
8299 % \item
8300 % \ifENGLISH Set a fixed refractive index for the component. Interestingly,
8301 % for the default shape of the \Lcomp{doveprism} a refractive index of
8302 % $\sqrt{5}$ gives the ideal output direction which is the same as the input
8303 % direction.
8304 % \fi
8305 % \ifGERMAN
8306 % Setze den Brechungsindex einer Komponente. Interessanterweise ist für die
8307 % Standardform des \Lcomp{doveprism} ein Brechungsindex von $\sqrt{5}$ der
8308 % ideale Wert so dass der Ausgangsstrahl parallel zum Eingangsstrahl verläuft.
8309 % \fi
8310 %
8311 % \iffalse
8312 %<*ignore>
8313 % \fi
8314 \begin{LTXexample}
8315 \begin{pspicture}(3,1.5)
8316 \pnodes(0,1){A}(3,1){B}
8317 \doveprism[n=*sqrt(5)](A)(B)
8318 \drawbeam(A){}(B)
8319 \end{pspicture}
8320 \end{LTXexample}
8321 % \iffalse
8322 %</ignore>
8323 % \fi
8324 %
8325 % \item
8326 % \ifENGLISH In this example one beam uses the default refractive index of the
8327 % components (green), the other one overwrites it with a value of \opt{2}
8328 % (red).
8329 % \fi
8330 % \ifGERMAN
8331 % Ein Strahl (grün) verwendet die voreingestellten Werte der Komponenten, der
8332 % rote überschreibt diese mit \opt{2}.
8333 % \fi
8334 % \iffalse
8335 %<*ignore>
8336 % \fi
8337 \begin{LTXexample}[morekeywords = {[21]{n}}]
8338 \begin{pspicture}(3,3)
8339 \pnodes(0,1){A}(3,1){B}
8340 \optplane(A)
8341 \psset{lens=3 3 2, n=1.5}
8342 \lens[abspos=0.5](A)(B)
8343 \lens[abspos=2](A)(B)
8344 \optplane(B)
8345 \addtopsstyle{Beam}{beampos=0.5}
8346 \drawbeam{-}
8347 \drawbeam[linecolor=red, n=2]{-}
8348 \end{pspicture}
8349 \end{LTXexample}
8350 % \iffalse
8351 %</ignore>
8352 % \fi
8353 %
8354 % \item
8355 % \ifENGLISH
8356 % Now, the red beam uses the default refractive index of the component, the
8357 % yellow beam adds \opt{0.5} to the default index.
8358 % \fi
8359 % \ifGERMAN
8360 % Der rote Strahl verwendet die voreingestellten Werte, der grüne ändert diese
8361 % um \opt{0.5}.
8362 % \fi
8363 % \iffalse
8364 %<*ignore>
8365 % \fi
8366 \begin{LTXexample}[morekeywords = {[21]{n}}]
8367 \begin{pspicture}(3,3)
8368 \pnodes(0,1.5){A}(3,1.5){B}
8369 \lens[lens=4 4 3, n=2, abspos=0.3](A)(B)
8370 \optplane[compname=Plane](B)
8371 \psset{beampos=0.6}
8372 \drawbeam[linecolor=red](A){1}{Plane}
8373 \drawbeam[linecolor=yellow, n=*(n+0.5)](A){1}{Plane}
8374 \end{pspicture}
8375 \end{LTXexample}
8376 % \iffalse
8377 %</ignore>
8378 % \fi
8379 %
8380 % \item
8381 % \ifENGLISH
8382 % Dynamically changing the refractive index is very useful to emulate
8383 % chromatic dispersion. Here, we sketch the dispersion of a prism by
8384 % calculating the refractive index with Sellmaier's
8385 % equation\fnurl{http://en.wikipedia.org/wiki/Sellmeier_equation} for
8386 % different wavelengths.
8387 % \fi
8388 % \ifGERMAN
8389 % Mit dynamischer Anpassung von \Lkeyword{n} kann chromatische Dispersion sehr
8390 % gut emuliert werden. Hier wird die Dispersion eines Prisma gezeigt, der
8391 % Brechungsindex wird mit der Sellmaier
8392 % Gleichung\fnurl{http://en.wikipedia.org/wiki/Sellmeier_equation} für die
8393 % unterschiedlichen Wellenlängen berechnet.
8394 % \fi
8395 % \iffalse
8396 %<*ignore>
8397 % \fi
8398 \begin{LTXexample}[morekeywords = {[21]{n}}]
8399 \begin{pspicture}(3,3)
8400 \pnodes(-1,0){A}(1,2.2){B}(3,0){C}
8401 \optplane(0,2.15)
8402 \optprism[prismalign=center, prismangle=59](A)(B)(C)
8403 \optplane(C)
8404 \definecolor[ps]{bl}{rgb}{%
8405 tx@addDict begin tx@OptexpDict begin
8406 Wavelength wavelengthToRGB
8407 Red Green Blue
8408 end end }%
8409 \addtopsstyle{Beam}{linecolor=bl, linewidth=0.4\pslinewidth, beamalign=abs}
8410 \multido{\iLambda=400+4}{60}{%
8411 \pstVerb{/Wavelength \iLambda\space def }%
8412 \drawbeam[n=Wavelength Sellmaier]{-}%
8413 }%
8414 \end{pspicture}
8415 \end{LTXexample}
8416 % \iffalse
8417 %</ignore>
8418 % \fi
8419 %
8420 % \item
8421 % \ifENGLISH Using the numerical aperture of a pinhole as spectral filter.\fi
8422 % \ifGERMAN Die numerische Apertur einer Lochblende als spektraler Filter.\fi
8423 %
8424 % \iffalse
8425 %<*ignore>
8426 % \fi
8427 \begin{LTXexample}[morekeywords = {[21]{n}}]
8428 \begin{pspicture}(0.3,0)(3.3,5.2)
8429 \pnodes(0.3,1){A}(2,1){B}(3,2){C}(2.5,5){D}
8430 \optplane(A)
8431 \optgrating[reverse](A)(B)(C)
8432 \pinhole[phwidth=-0.1, innerheight=0.03, abspos=0.5](D)(B)
8433 \optplate[position=end, plateheight=1.5](B)(D)
8434 \definecolor[ps]{bl}{rgb}{%
8435 tx@addDict begin Red Green Blue end}%
8436 \drawbeam[linecolor=red]{1-2}
8437 \addtopsstyle{Beam}{linecolor=bl, linewidth=0.4\pslinewidth}
8438 \multido{\i=0+1}{60}{%
8439 \pstVerb{%
8440 \i\space 650 400 sub 59 div mul 400 add
8441 tx@addDict begin wavelengthToRGB end }%
8442 \drawbeam[beamangle=\i\space 0.1 mul 3 sub]{2-}%
8443 }%
8444 \end{pspicture}
8445 \end{LTXexample}
8446 % \iffalse
8447 %</ignore>
8448 % \fi
8449 % \end{enumerate}
8450 %
8451 % \begin{optionlist}
8452 % \valitem{refractiveindex}{code}
8453 % \deprecatedmsg{\Lkeyword{n}}
8454 % \end{optionlist}
8455 %
8456 % \ifENGLISH\subsection{Initial conditions}\fi
8457 % \ifGERMAN\subsection{Anfangsbedingungen}\fi
8458 %
8459 % \begin{optionlist}
8460 % \optitem[0]{beampos}{[\prm{x} ]\prm{y}}
8461 % \ifENGLISH
8462 % This is the start position (\prm{x}, \prm{y}) of the beam at the first
8463 % interface. Both values are of \prm{psnum} type. If a single number is given,
8464 % the $x$-coordinate is set to \opt{0}.
8465 % \fi
8466 % \ifGERMAN
8467 % Die Startposition (\prm{x}, \prm{y}) des Strahls an der ersten
8468 % Grenzfläche. Beide Zahlen sind vom Typ \prm{psnum}. Wird eine einzelne Zahl
8469 % angegeben, wird die $x$-Koordinate auf \opt{0} gesetzt.
8470 % \fi
8471 %
8472 % \iffalse
8473 %<*ignore>
8474 % \fi
8475 \begin{LTXexample}[morekeywords = {[21]{beampos}}]
8476 \begin{pspicture}(4,3.8)
8477 \pnodes(1.5,0.5){A}(3.5,0.5){B}(3.5,3.5){C}
8478 \optbox[position=end](B)(A)
8479 \mirror[mirrortype=extended, mirrorradius=3](A)(B)(C)
8480 \optplate[position=end](B)(C)
8481 \drawbeam[linecolor=red, beampos=-0.2]{1-3}
8482 \drawbeam[linecolor=blue, beampos=0]{1-3}
8483 \drawbeam[linecolor=green, beampos=0.2]{1-3}
8484 \end{pspicture}
8485 \end{LTXexample}
8486 % \iffalse
8487 %</ignore>
8488 % \fi
8489 %
8490 % \ifENGLISH The start position is relative to the respective interface node, as
8491 % it is illustrated in the following example. The beam start position is fixed,
8492 % but depending on e.g. the \Lkeyword{beamangle}, the actual intersection with
8493 % the curved interface is at a different position.
8494 % \fi
8495 % \ifGERMAN
8496 % Die Startposition ist relativ zum entsprechenden Grenzflächenknoten, wie im
8497 % folgenden Beispiel gezeigt wird. Die Startposition ist fest, abhängig z.B. von
8498 % \Lkeyword{beamangle} kann der eigentliche Schnittpunkt mit der ersten
8499 % Grenzfläche jedoch anders sein.
8500 % \fi
8501 %
8502 % \iffalse
8503 %<*ignore>
8504 % \fi
8505 \begin{LTXexample}[linerange={1-7,9-9}, morekeywords = {[21]{beampos}}, explpreset={escapeinside={}}]
8506 \begin{pspicture*}(0,2)(3.05,6)
8507 \lens[lens=8 8 8, abspos=0.6](0.5,2)(3,2)
8508 \optplate[position=1, plateheight=6](0.5,2)(3,2)
8509 \psset{beampos=2.1}
8510 \drawbeam[beamangle=-60]{1}{2}
8511 \drawbeam[beamangle=-40]{1}{2}
8512 \drawbeam[beamangle=-20]{1}{2}
8513 \psline[style=Refline, linewidth=3\pslinewidth, arrows=->, arrowinset=0, arrowscale=1.3](\oenodeOut{1})([offset=2.1]\oenodeOut{1})
8514 \end{pspicture*}
8515 \end{LTXexample}
8516 % \iffalse
8517 %</ignore>
8518 % \fi
8519 %
8520 % \ifENGLISH
8521 % Which interface the beam starts at is determined by the options
8522 % \Lkeyword{beaminsidefirst} and \Lkeyword{startinside}.
8523 % \fi
8524 % \ifGERMAN
8525 % An welcher Grenzfläche der ersten Komponente gestartet wird hängt von
8526 % \Lkeyword{beaminsidefirst} und \Lkeyword{startinside} ab.
8527 % \fi
8528 %
8529 % \psnumitem[0]{beamangle}
8530 % \ifGERMAN
8531 % Der Anfangswinkel des Strahls. Dieser ist in der Regel relativ zu der
8532 % Verbindung von der ersten zur zweiten Komponente, mit \Lkeyword{beamalign}
8533 % kann dieses Verhalten verändert werden.
8534 % \fi
8535 % \ifENGLISH
8536 % This is the start angle of the beam. Usually, it is relative to the connection
8537 % between the first two components, use \Lkeyword{beamalign} to change this.
8538 % \fi
8539 % \iffalse
8540 %<*ignore>
8541 % \fi
8542 \begin{LTXexample}[morekeywords = {[21]{beamangle}}]
8543 \begin{pspicture}(4,4)
8544 \pnodes(1.5,0.5){A}(3.5,0.5){B}(3.5,3.5){C}
8545 \optbox[position=end](B)(A)
8546 \mirror[mirrortype=extended](A)(B)(C)
8547 \optplate[position=end](B)(C)
8548 \drawbeam[linecolor=red, beamangle=3]{-3}
8549 \drawbeam[linecolor=blue, beamangle=0]{1-}
8550 \drawbeam[linecolor=green, beamangle=-3]{-}
8551 \end{pspicture}
8552 \end{LTXexample}
8553 % \iffalse
8554 %</ignore>
8555 % \fi
8556 %
8557 % \choitem[relative]{beamalign}{rel, relative, abs, absolute, firstcomp}
8558 % \ifGERMAN
8559 % Gibt vor, ob der Winkel \Lkeyword{beamangle} relativ zu der Verbindung
8560 % zwischen den ersten beiden Komponenten ist, ob es sich um einen
8561 % absoluten Winkel handelt, oder ob der Winkel durch die Ausrichtung der
8562 % ersten Komponente vorgegeben wird.
8563 %
8564 % Ein absoluter Winkel kann sehr hilfreich sein, falls eine der beiden ersten
8565 % Komponenten gedreht oder verschoben wurde. Dabei werden die
8566 % Grenzflächenknoten, auf die sich ein relativer Winkel bezieht, ebenfalls
8567 % transformiert (siehe \prettyref{sec:rotshift}). In dem folgenden Beispiel
8568 % verläuft daher der grüne Strahl mit der relativen Ausrichtung nicht
8569 % horizontal.
8570 % \fi
8571 % \ifENGLISH
8572 % Select whether the \Lkeyword{beamangle} is relative to the connection between
8573 % the first two components, or if it is an absolute angle.
8574 %
8575 % A typical situation where an absolute angle is helpful is with rotated or
8576 % shifted components. By rotating or shifting a component also its interface
8577 % nodes are rotated (see \prettyref{sec:rotshift}) which are then used to
8578 % determine the input angle for relative alignment. Accordingly, in the
8579 % following example, the green beam with the relative alignment is not
8580 % horizontal.
8581 % \fi
8582 % \iffalse
8583 %<*ignore>
8584 % \fi
8585 \begin{LTXexample}[morekeywords = {[21]{beamalign, angle}}]
8586 \begin{pspicture}(3,1.5)
8587 \pnodes(0,0.75){A}(3,0.75){B}
8588 \optbox[angle=10, showifcnodes](A)(B)
8589 \drawbeam(A){}(B)
8590 \drawbeam[linecolor=red, beamalign=abs](A){}(B)
8591 \end{pspicture}
8592 \end{LTXexample}
8593 % \iffalse
8594 %</ignore>
8595 % \fi
8596 %
8597 % \ifGERMAN
8598 % Im folgenden Beispiel liegen beide Komponenten auf der horizontalen
8599 % Linie $\overline{AB}$. Der grüne Strahl, mit
8600 % \Lkeyword{beamalign}\opt{=rel} verläuft daher auch horizontal. Der
8601 % rote Strahl ist hingegen mit \Lkeyword{beamalign}\opt{=firstcomp}
8602 % entsprechend der Drehung der ersten Komponente ausgerichtet.
8603 % \fi
8604 % \ifENGLISH
8605 % Both components in the following example are align on the horizontal
8606 % line $\overline{AB}$. The green beam with
8607 % \Lkeyword{beamalign}\opt{=rel} is accordingly aligned
8608 % horizontally. The red beam with \Lkeyword{beamalign}\opt{=firstcomp}
8609 % is aligned according to the rotation of the first component:
8610 % \fi
8611 %
8612 % \iffalse
8613 %<*ignore>
8614 % \fi
8615 \begin{LTXexample}[morekeywords = {[21]{beamalign, angle}}]
8616 \begin{pspicture}(4,3)
8617 \pnodes(1.5,1.5){A}(4,1.5){B}
8618 \optbox[position=start, rotateref=r, angle=10](A)(B)
8619 \optplate[position=end, plateheight=3](A)(B)
8620 \addtopsstyle{Beam}{beamdiv=20}
8621 \drawwidebeam{-}
8622 \drawwidebeam[beamalign=firstcomp, linecolor=red]{-}
8623 \end{pspicture}
8624 \end{LTXexample}
8625 % \iffalse
8626 %</ignore>
8627 % \fi
8628 %
8629 % \numitem[0]{beampathskip}
8630 % \ifGERMAN
8631 % Überspringt \prm{num} Segmente am Anfang des Strahlengangs. Diese
8632 % Option beinflusst lediglich ab welchem Segment der Strahlgang
8633 % gezeichnet wird, das Raytracing beginnt immer noch an der ersten
8634 % Grenzfläche. Um das zu ändern können Sie \Lkeyword{startinsidecount}
8635 % verwenden.
8636 % \fi
8637 % \ifENGLISH
8638 % Skip \prm{num} segments at the beginning of the beam path. This option
8639 % determines only at which segment the beam is drawn, the ray tracing
8640 % always starts at the first interface. To change this, see option
8641 % \Lkeyword{startinsidecount}.
8642 % \fi
8643 % \iffalse
8644 %<*ignore>
8645 % \fi
8646 \begin{LTXexample}[morekeywords = {[21]{beampathskip}}, pos=t]
8647 \begin{pspicture}(5,2)
8648 \pnodes(0,1){A}(5,1){B}(2,0){C}
8649 \begin{optexp}
8650 \glanthompson(A)(B)
8651 \optplane(B)\optplane[angle=90](C)
8652 \polarization[abspos=1, poltype=misc, linecolor=yellow!80!black](A)(B)
8653 \drawbeam[beaminsidelast, linecolor=yellow!80!black](A){1}
8654 \drawbeam[beampathskip=2](A){1-2}
8655 \drawbeam[beampathskip=2, savebeam, linestyle=dashed, dash=2pt 2pt, linecolor=red,arrowscale=1.5, arrows=->](A){1}{3}
8656 \end{optexp}
8657 \nodexn{(\oenodeBeam{})-1.5(!\oeBeamVec{})}{D}
8658 \polarization[poltype=parallel, linecolor=red](D)(\oenodeBeam{})
8659 \polarization[abspos=4, poltype=perp, linecolor=green, dotscale=1.5](A)(B)
8660 \end{pspicture}
8661 \end{LTXexample}
8662 % \iffalse
8663 %</ignore>
8664 % \fi
8665 %
8666 % \numitem[-1]{beampathcount}
8667 % \ifGERMAN
8668 % Anzahl der Strahlsegmente, die gezeichnet werden sollen. Werden am
8669 % Anfang Segmente mit \Lkeyword{beampathskip} übersprungen, so werden
8670 % diese nicht mitgezählt.
8671 % \fi
8672 % \ifENGLISH
8673 % Number of beam segments, which are drawn. Segments which are skipped
8674 % at the beam start with \Lkeyword{beampathskip} do not count.
8675 % \fi
8676 % \iffalse
8677 %<*ignore>
8678 % \fi
8679 \begin{LTXexample}[morekeywords = {[21]{beampathcount}}]
8680 \begin{pspicture}(3,2)
8681 \pnodes(0,2){A}(2,0.8){B}(4,2){C}
8682 \optprism[compname=P, prismtype=reflective, prismangle=90](A)(B)(C)
8683 \lens[abspos=1.33](\oenodeIfc{2}{P})(A)%
8684 \drawwidebeam[beamwidth=0.2, beaminsidelast, beampathcount=4](A){2}{1}
8685 \end{pspicture}
8686 \end{LTXexample}
8687 % \iffalse
8688 %</ignore>
8689 % \fi
8690 % \end{optionlist}
8691 %
8692 % \ifGERMAN\subsection{Interner Strahlengang}\fi
8693 % \ifENGLISH\subsection{Internal beam path}\fi
8694 %
8695 % \ifENGLISH
8696 % A beam path is composed of rays between components and rays inside the
8697 % components. Depending on some options these internal beams can be drawn or
8698 % not. Generally, the first, the last, and all other components are treated
8699 % separately.
8700 % \fi
8701 % \ifGERMAN
8702 % Ein Strahlengang setzt sich aus Strahlen zwischen den Komponenten und
8703 % innerhalb der Komponenten zusammen. Ob diese internen Strahlen gezeichnet
8704 % werden, kann mit mehreren Parametern festgelegt werden. Die erste, letzte und
8705 % die übrigen Komponenten werden separat gehandhabt.
8706 % \fi
8707 %
8708 % \begin{optionlist}
8709 % \boolitem[true]{beaminside}
8710 % \ifGERMAN
8711 % Zeichnet den Strahlengang innerhalb aller Komponenten mit Ausnahme der
8712 % ersten und letzten, die von dieser Option nicht beeinflusst.
8713 % \fi
8714 % \ifENGLISH
8715 % Draw the internal beams in all intermediate components, the first and last
8716 % components are not affected.
8717 % \fi
8718 % \iffalse
8719 %<*ignore>
8720 % \fi
8721 \begin{LTXexample}[morekeywords = {[21]{beaminside}}]
8722 \begin{pspicture}(0.3,0.3)(3,4)
8723 \psset{optboxwidth=1}
8724 \optbox[position=end](1,1)(1,3)
8725 \optretplate(1,1)(1,3)
8726 \pentaprism(1,3)(1,1)(2,1)
8727 \optbox[position=end](1,1)(2,1)
8728 \drawbeam[beampos=-0.05, linecolor=red]{-}
8729 \drawbeam[beampos=0.05, beaminside=false]{-}
8730 \end{pspicture}
8731 \end{LTXexample}
8732 % \iffalse
8733 %</ignore>
8734 % \fi
8735 %
8736 % \boolitem[false]{beaminsidefirst}
8737 % \ifGERMAN
8738 % Zeichne den Strahlengang innerhalb der ersten Komponenten.
8739 % \fi
8740 % \ifENGLISH
8741 % Draw the internal beams of the first component.
8742 % \fi
8743 % \iffalse
8744 %<*ignore>
8745 % \fi
8746 \begin{LTXexample}[morekeywords = {[21]{beaminsidefirst}}]
8747 \begin{pspicture}(0.3,0.3)(3,4)
8748 \psset{optboxwidth=1}
8749 \optbox[position=end](1,1)(1,3)
8750 \optretplate(1,1)(1,3)
8751 \pentaprism(1,3)(1,1)(2,1)
8752 \optbox[position=end](1,1)(2,1)
8753 \drawbeam[beampos=-0.05, linecolor=red]{-}
8754 \drawbeam[beampos=0.05, beaminsidefirst]{-}
8755 \end{pspicture}
8756 \end{LTXexample}
8757 % \iffalse
8758 %</ignore>
8759 % \fi
8760 %
8761 % \boolitem[false]{beaminsidelast}
8762 % \ifGERMAN
8763 % Zeichne den Strahlengang innerhalb der letzten Komponenten.
8764 % \fi
8765 % \ifENGLISH
8766 % Draw the internal beams of the last component.
8767 % \fi
8768 % \iffalse
8769 %<*ignore>
8770 % \fi
8771 \begin{LTXexample}[morekeywords = {[21]{beaminsidelast}}]
8772 \begin{pspicture}(0.3,0.3)(3,4)
8773 \psset{optboxwidth=1}
8774 \optbox[position=end](1,1)(1,3)
8775 \optretplate(1,1)(1,3)
8776 \pentaprism(1,3)(1,1)(2,1)
8777 \optbox[position=end](1,1)(2,1)
8778 \drawbeam[beampos=-0.05, linecolor=red]{-}
8779 \drawbeam[beampos=0.05, beaminsidelast]{-}
8780 \end{pspicture}
8781 \end{LTXexample}
8782 % \iffalse
8783 %</ignore>
8784 % \fi
8785 %
8786 % \boolitem[true]{allowbeaminside}
8787 % \ifGERMAN
8788 % Damit kann bestimmt werden, ob der Strahlengang innerhalb einer Komponente
8789 % gezeichnet werden darf. Dieser Parameter wirkt nur auf Komponenten und
8790 % überschreibt, falls auf \opt{false} gesetzt, jegliche Strahleinstellungen mit
8791 % \Lkeyword{beaminside}, \Lkeyword{beaminsidefirst} und
8792 % \Lkeyword{beaminsidelast}. Damit kann der Strahlengang in einzelnen
8793 % Komponenten unterdrückt werden, für die es keinen Sinn macht
8794 % (z.B. \Lcomp{optfilter} und \Lcomp{optdiode}, was sonst nicht möglich ist.
8795 % \fi
8796 % \ifENGLISH
8797 % Define whether a beam is drawn inside a component. The option affects
8798 % components only and overwrites all settings of \Lkeyword{beaminside},
8799 % \Lkeyword{beaminsidefirst}, and \Lkeyword{beaminsidelast} if set to
8800 % \opt{false}. With this you can forbid any internal beams for components where
8801 % it does not make any sense (e.g. \Lcomp{optfilter} and \Lcomp{optdiode}).
8802 % \fi
8803 % \iffalse
8804 %<*ignore>
8805 % \fi
8806 \begin{LTXexample}[morekeywords = {[21]{allowbeaminside}}]
8807 \begin{pspicture}(3,2)
8808 \psset{optboxwidth=0.5}
8809 \pnodes(0,1){A}(3,1){B}
8810 \optbox[position=0.2](A)(B)
8811 \optbox[position=0.4, allowbeaminside=false](A)(B)
8812 \optbox[position=0.6](A)(B)
8813 \optbox[position=0.8](A)(B)
8814 \drawbeam(A){-}(B)
8815 \end{pspicture}
8816 \end{LTXexample}
8817 % \iffalse
8818 %</ignore>
8819 % \fi
8820 %
8821 % \boolitem[false]{forcebeaminside}
8822 % \ifGERMAN
8823 % Wenn auf \opt{true} gesetzt, wird der Strahlengang innerhalb der
8824 % betroffenen Komponenten immer gezeichnet wird, unabhängig von allen
8825 % anderen Strahleinstellungen mit \Lkeyword{allowbeaminside},
8826 % \Lkeyword{beaminside}, \Lkeyword{beaminsidefirst} und
8827 % \Lkeyword{beaminsidelast}. Damit kann der Strahl innerhalb einzelner
8828 % Komponenten gezeichnet werden, auch wenn alle anderen Komponenten in
8829 % dem Strahlengang keinen internen Strahl haben sollen.
8830 % \fi
8831 % \ifENGLISH
8832 % Forces to draw a beam inside a component. The option affects
8833 % components only and overwrites all settings of
8834 % \Lkeyword{allowbeaminside}, \Lkeyword{beaminside},
8835 % \Lkeyword{beaminsidefirst}, and \Lkeyword{beaminsidelast} if set to
8836 % \opt{true}. With this you can force an internal beams for single
8837 % components within a beam path.
8838 % \fi
8839 % \iffalse
8840 %<*ignore>
8841 % \fi
8842 \begin{LTXexample}[morekeywords = {[21]{forcebeaminside}}]
8843 \begin{pspicture}(3,2)
8844 \psset{optboxwidth=0.5}
8845 \pnodes(0,1){A}(3,1){B}
8846 \optbox[position=0.2](A)(B)
8847 \optbox[position=0.4, forcebeaminside](A)(B)
8848 \optbox[position=0.6](A)(B)
8849 \optbox[position=0.8](A)(B)
8850 \drawbeam[beaminside=false](A){-}(B)
8851 \end{pspicture}
8852 \end{LTXexample}
8853 % \iffalse
8854 %</ignore>
8855 % \fi
8856 %
8857 % \numitem[-1]{startinsidecount}
8858 % \ifGERMAN
8859 % Anzahl der Segmente, die innerhalb der ersten Komponente verwendet
8860 % werden. Diese Option hat nur eine Wirkung, wenn
8861 % \Lkeyword{beaminsidefirst} oder \Lkeyword{startinside} auf \opt{true}
8862 % gesetzt sind.
8863 % \fi
8864 % \ifENGLISH
8865 % Number of segments, which are used inside the first component. This
8866 % option is in effect only with \Lkeyword{beaminsidefirst} or
8867 % \Lkeyword{startinside} set to \opt{true}.
8868 % \fi
8869 %
8870 % \numitem[-1]{stopinsidecount}
8871 % \ifGERMAN
8872 % Anzahl der Segmente, die innerhalb der letzten Komponente verwendet
8873 % werden. Diese Option hat nur eine Wirkung, wenn
8874 % \Lkeyword{beaminsidelast} oder \Lkeyword{stopinside} auf \opt{true}
8875 % gesetzt sind.
8876 % \fi
8877 % \ifENGLISH
8878 % Number of segments, which are used inside the last component. This
8879 % option is in effect only with \Lkeyword{beaminsidelast} or
8880 % \Lkeyword{stopinside} set to \opt{true}.
8881 % \fi
8882 %
8883 % \iffalse
8884 %<*ignore>
8885 % \fi
8886 \begin{LTXexample}[morekeywords = {[21]{stopinsidecount, startinsidecount}}]
8887 \begin{pspicture}(4,2)
8888 \pnodes(0,2){A}(2,0){B}(4,2){C}
8889 \optprism[compname=P, n=1, prismtype=reflective, prismangle=90](A)(B)(C)
8890 \lens[abspos=1.08](\oenodeIfc{2}{P})(A)
8891 \lens[abspos=1.08](\oenodeIfc{2}{P})(C)
8892 \newpsstyle{Beam}{linestyle=none, fillstyle=solid}
8893 \drawwidebeam[fillcolor=green, beamwidth=0.2, beaminsidelast, stopinsidecount=1](A){2}{1}
8894 \drawwidebeam[fillcolor=orange, beaminsidefirst, startinsidecount=1, loadbeam]{1}{3}(C)
8895 \end{pspicture}
8896 \end{LTXexample}
8897 % \iffalse
8898 %</ignore>
8899 % \fi
8900 %
8901 % \choitem[auto]{beammode}{refl, trans, reflective, transmittive, auto}
8902 % \ifGERMAN
8903 % Mit dieser Option kann das Strahlverhalten bei Komponenten wie
8904 % z. B. dem \Lcomp{beamsplitter} auf reflektierend oder transmittierend
8905 % festgelegt werden, unabhängig von den verwendeten Knoten und deren
8906 % relative Position bezüglich der Komponente.
8907 % \fi
8908 % \ifENGLISH
8909 % With this option one can force the beam path through e.g. a
8910 % \Lcomp{beamsplitter} to \opt{reflective} or \opt{transmittive}
8911 % independent of the choosen nodes and their position relative to the
8912 % component.
8913 % \fi
8914 % \end{optionlist}
8915 %
8916 % \ifENGLISH\subsection{Connecting with nodes}\fi
8917 % \ifGERMAN\subsection{Verbinden mit Knoten}\fi
8918 %
8919 % \ifENGLISH
8920 % As mentioned earlier in this chapter, beams can connect components
8921 % also with nodes. For raytracing you need a plane, which can be created
8922 % automatically or manually in different ways.
8923 % \fi
8924 % \ifGERMAN
8925 % Wie vorher schon einmal erwähnt können Komponenten auch mit Knoten
8926 % verbunden werden. Für Raytracing wird in der Regel eine Ebene
8927 % benötigt, die auf unterschiedliche Weise automatisch oder manuell
8928 % erstellt werden kann.
8929 % \fi
8930 %
8931 % \begin{optionlist}
8932 % \choitem[connection]{beamnodealign}{vec, conn, vector, connection}
8933 % \ifENGLISH
8934 % This parameter controls the alignment of the automatically created
8935 % node interfaces. By default (\opt{connection}) the interface is
8936 % aligned perpendicular to the direct connection between node and the
8937 % previous interface node.
8938 % \fi
8939 % \ifGERMAN
8940 % Dieser Parameter bestimmt die Ausrichtung der automatisch erstellen
8941 % Grenzflächen. In der Voreinstellung (\opt{connection}) wird die Ebene
8942 % vertikal zur direkten Verbindung zwischen dem Knoten und dem
8943 % vorangegangenen Grenzflächenknoten ausgerichtet.
8944 % \fi
8945 % \iffalse
8946 %<*ignore>
8947 % \fi
8948 \begin{LTXexample}
8949 \begin{pspicture}(3,2)
8950 \pnodes(0,1){A}(2.5,1){B}
8951 \lens[lens=3 3 2, n=2.5, abspos=0.5](A)(B)
8952 \multido{\r=-0.3+0.3}{3}{%
8953 \drawbeam[beampos=\r](A){}(B)}
8954 \end{pspicture}
8955 \end{LTXexample}
8956 \begin{LTXexample}
8957 \begin{pspicture}(3,2)
8958 \pnodes(0,1){A}(3,1){B}
8959 \lens[abspos=0.5](A)(B)
8960 \addtopsstyle{Beam}{linecolor=black, fillstyle=solid, beamwidth=0.2, fillcolor=red, opacity=0.5, beaminside=false}
8961 \multido{\r=-0.3+0.3}{3}{\drawwidebeam[beampos=\r](A){}(B)}
8962 \end{pspicture}
8963 \end{LTXexample}
8964 % \iffalse
8965 %</ignore>
8966 % \fi
8967 %
8968 % \ifGERMAN
8969 % Ist der Wert auf \opt{vector} gesetzt, dann wird die Ebene vertikal
8970 % zum einfallenden Strahlvektor ausgerichtet. Bei weiten Strahlen wird
8971 % der gemittelte Strahlenvektor (siehe \Lcs{oeBeamVecMedian}) als
8972 % Referenz verwendet. Beispiele in dem das sehr praktisch ist, sind
8973 % \prettyref{ex:beamcenter} und \prettyref{ex:wgm-pdc}.
8974 % \fi
8975 % \ifENGLISH
8976 % For a value \opt{vector}, the plane is aligned vertical to the
8977 % incoming beam vector. For wide beams the mean beam vector is used (see
8978 % \Lcs{oeBeamVecMedian}). Examples where this is very convenient are
8979 % \prettyref{ex:beamcenter} and \prettyref{ex:wgm-pdc}.
8980 % \fi
8981 % \iffalse
8982 %<*ignore>
8983 % \fi
8984 \begin{LTXexample}[morekeywords={[21]beamnodealign}]
8985 \begin{pspicture}(3,2)
8986 \pnodes(0,1){A}(3,1){B}
8987 \lens[abspos=0.5](A)(B)
8988 \addtopsstyle{Beam}{linecolor=black, fillstyle=solid, beamwidth=0.2, beamnodealign=vector, fillcolor=green, opacity=0.5, beaminside=false}
8989 \multido{\r=-0.3+0.3}{3}{\drawwidebeam[beampos=\r](A){}(B)}
8990 \end{pspicture}
8991 \end{LTXexample}
8992 % \iffalse
8993 %</ignore>
8994 % \fi
8995 % \end{optionlist}
8996 %
8997 % \ifENGLISH
8998 % The automatic alignment is very handy in many cases, but does not
8999 % allow to rotate the node planes to a fixed angle and can give again
9000 % problems with shifted and rotated components (see
9001 % \prettyref{sec:rotshift}). In the following example the green beam is
9002 % with \Lkeyword{beamnodealign} set to \opt{vector}, for the red beam it
9003 % is set to \opt{connection}:
9004 % \fi
9005 % \ifGERMAN
9006 % Die automatische Ausrichtung ist in vielen Fällen sehr praktisch, kann
9007 % aber wiederum unerwünschte Ergebnisse bei gedrehten und verschobenen
9008 % Komponenten ergeben und die Ebenenausrichtung kann nicht beliebig
9009 % gesetzt werden. Im folgenden Beispiel ist beim grünen Strahl
9010 % \Lkeyword{beamnodealign} auf \opt{vector} gesetzt, bei dem roten
9011 % Strahl hingegen auf \opt{connection}:
9012 % \fi
9013 %
9014 % \hspace*{\fill}%
9015 % \begin{pspicture}(4,2.7)
9016 % \pnodes(0,0.5){A}(4,0.5){B}
9017 % \lens[compshift=0.5, abspos=1, lens=1.5 1.5 2](A)(B)
9018 % \drawwidebeam[beamalign=absolute, linecolor=black, fillstyle=solid, beamwidth=0.6, fillcolor=green, opacity=0.5, beamnodealign=vector](A){}(B)
9019 % \rput[rb](4,0){\ttfamily vector}
9020 % \end{pspicture}
9021 % \hspace*{1cm}%
9022 % \begin{pspicture}(5,3)
9023 % \pnodes(0,0.5){A}(4,0.5){B}
9024 % \lens[compshift=0.5, abspos=1, lens=1.5 1.5 2](A)(B)
9025 % \drawwidebeam[beamalign=absolute, linecolor=black, fillstyle=solid, beamwidth=0.6, fillcolor=red, opacity=0.5](A){}(B)
9026 % \rput[rb](5,0){\ttfamily connection}
9027 % \end{pspicture}
9028 % \hspace*{\fill}%
9029 %
9030 % \ifENGLISH
9031 % For more flexibility, the package provides an «invisible» plane which
9032 % can be used for this purpose.
9033 % \fi
9034 % \ifGERMAN
9035 % Das kann mit einer «unsichtbaren» Ebene erreicht werden, die mit
9036 % \Lcomp{optplane} definiert wird.
9037 % \fi
9038 %
9039 % \begin{ltxsyntax}
9040 % \xLcomp{optplane}\compitem{optplane}(center)
9041 %
9042 % \ifENGLISH
9043 % The plane is defined by a single node only, the rotation around this node
9044 % is defined with \Lkeyword{angle}. The angle is with respect to the default
9045 % alignment, which is vertical.
9046 % \fi
9047 % \ifGERMAN Die Ebene wird durch lediglich einen Knoten definiert, die Drehung
9048 % darum kann mit \Lkeyword{angle} angegeben werden. Der Winkel ist relativ zur
9049 % ursprünglichen, vertikalen Ausrichtung.
9050 % \fi
9051 % \iffalse
9052 %<*ignore>
9053 % \fi
9054 \begin{LTXexample}
9055 \begin{pspicture}(3,2)
9056 \pnodes(0,1){A}(2.5,1){B}
9057 \lens[lens=3 3 2, n=2.5, abspos=0.5](A)(B)
9058 \optplane[angle=-30](B)
9059 \multido{\r=-0.3+0.3}{3}{%
9060 \drawbeam[beampos=\r](A){-}}
9061 \end{pspicture}
9062 \end{LTXexample}
9063 % \iffalse
9064 %</ignore>
9065 % \fi
9066 % \end{ltxsyntax}
9067 %
9068 % \ifENGLISH\subsection{Automatic connections}\fi
9069 % \ifGERMAN\subsection{Automatische Verbindungen}\fi
9070 %
9071 % \ifENGLISH
9072 % Beam can also be drawn at definition time of a component, which can be handy,
9073 % but allows only very elemental beams.
9074 % \fi
9075 % \ifGERMAN Lichtstrahlen können auch zusammen mit der Komponentendefinition
9076 % gezeichnet werden. Das kann für einfache Strahlengänge sehr praktisch sein,
9077 % ist aber sehr unflexibel.
9078 % \fi
9079 %
9080 % \begin{optionlist}
9081 % \boolitem[false]{beam}
9082 % \ifGERMAN Kann als Option für jede Komponente verwendet werden, ist äquivalent
9083 % zu
9084 % \fi
9085 % \ifENGLISH Can be used as option for every component, is equivalent to the
9086 % statement
9087 % \fi
9088 % \begin{lstlisting}[gobble=2]
9089 % \drawbeam[raytrace=false](\oenodeRefA{}){}(\oenodeRefB{})
9090 % \end{lstlisting}
9091 % \ifENGLISH which draws a beam from one reference node via the component to the
9092 % other reference node.
9093 % \fi
9094 % \ifGERMAN womit ein Strahl vom ersten Referenzknoten über die Komponente zum
9095 % zweiten Referenzknoten gezeichnet wird.
9096 % \fi
9097 % \end{optionlist}
9098 %
9099 % \ifENGLISH\subsection{Beam appearance}\fi
9100 % \ifGERMAN\subsection{Strahlaussehen}\fi
9101 % \label{sec:beamappearance-single}
9102 %
9103 % \begin{stylelist}
9104 % \styleitem[linecolor=green!90!black, linejoin=1]{Beam}
9105 % \ifENGLISH
9106 % The appearance of beams is controlled with this style. The optional argument
9107 % of \nxLcs{draw*beam} can also be used, these options can overwrite settings from
9108 % the \Lstyle{Beam} style.
9109 % \fi
9110 % \ifGERMAN
9111 % Das Aussehen der Lichtstrahlen kann mit diesem Stil gesteuert werden. Das
9112 % optionale Argument von \nxLcs{draw*beam} kann ebenfalls dafür verwendet
9113 % werden und kann die Einstellungen des \Lstyle{Beam}-Stils überschreiben.
9114 % \fi
9115 % \end{stylelist}
9116 %
9117 % \begin{optionlist}
9118 % \valitem{addtoBeam}{list}
9119 % \addtostylemsg{Beam}
9120 % \valitem{newBeam}{list}
9121 % \newstylemsg{Beam}
9122 %
9123 % \psnumitem[0.2]{ArrowInsideMinLength}
9124 % \ifGERMAN
9125 % \nxLcs{draw*beam} verwendet auch die Option \Lkeyword*{ArrowInside} aus
9126 % \LPack{pstricks-add}. In dem Fall wird für alle Strahlsegmente ein Pfeil
9127 % gezeichnet, was häufig für die internen, kurzen Strahlengänge unerwünscht
9128 % ist. Mit \Lkeyword{ArrowInsideMinLength} kann angegeben werden ab welcher
9129 % Mindestlänge eines Strahlsegmentes die Pfeil gezeichnet werden. In dem
9130 % folgenden Beispiel ist der Wert so gewählt, dass nur der untere interne
9131 % Strahl einen Pfeil hat (siehe auch \prettyref{ex:czerny-turner}).
9132 % \fi
9133 % \ifENGLISH
9134 % \nxLcs{draw*beam} uses also the option \Lkeyword*{ArrowInside} from
9135 % \LPack{pstricks-add}. In this case the arrows would be drawn for every beam
9136 % segment, which is often undesired for the internal, short beam
9137 % paths. \Lkeyword{ArrowInsideMinLength} sets a minimum segment length, below
9138 % which no internal arrows are drawn. In the following example the value is
9139 % selected such that only the lower internal beam has an arrow (see also
9140 % \prettyref{ex:czerny-turner}).
9141 % \fi
9142 % \iffalse
9143 %<*ignore>
9144 % \fi
9145 \begin{LTXexample}[morekeywords={[21]{ArrowInsideMinLength}}]
9146 \begin{pspicture}(3,2)
9147 \optprism(0,1)(2,1)(3,0.5)
9148 \drawwidebeam[beamwidth=0.4, ArrowInside=->, ArrowInsideMinLength=0.5, arrowscale=1.5, raytrace=false](0,1){}(3,0.5)
9149 \end{pspicture}
9150 \end{LTXexample}
9151 % \iffalse
9152 %</ignore>
9153 % \fi
9154 %
9155 % \psnumitem[-1]{ArrowInsideMaxLength}
9156 % \ifGERMAN Gibt analog zu \Lkeyword{ArrowInsideMinLength} die maximale Länge
9157 % eines Segments an, für das Pfeile gezeichnet werden. Ist der Wert negativ,
9158 % dann gibt es keine obere Grenze.
9159 % \fi
9160 % \ifENGLISH Like \Lkeyword{ArrowInsideMaxLength}, but sets the maximum length
9161 % of a segment for which the arrows are drawn. If the value is negative, no
9162 % upper limit is defined.
9163 % \fi
9164 % \end{optionlist}
9165 %
9166 % \ifGERMAN \Lkeyword*{ArrowInside} kann auch verwendet werden ohne dass
9167 % ein Linientyp definiert ist.
9168 % \fi
9169 % \ifENGLISH \Lkeyword*{ArrowInside} can be used also without a
9170 % linestyle.
9171 % \fi
9172 % \iffalse
9173 %<*ignore>
9174 % \fi
9175 \begin{LTXexample}
9176 \begin{pspicture}(0,0)(3.5,2)
9177 \pnodes(0,1.5){A}(2,1.5){B}(2.8,0){C}
9178 \mirror[mirrorwidth=1.2, mirrortype=extended](A)(B)(C)
9179 \newpsstyle{Beam}{linecolor=green, linestyle=none, fillstyle=solid, fillcolor=green, opacity=0.2}
9180 \drawwidebeam[beamwidth=0.5](A){}(C)
9181 \drawbeam[ArrowInside=->, arrowscale=2.5, ArrowFill=false, linewidth=1.5\pslinewidth, ArrowInsidePos=0.9, ArrowInsideMaxLength=1.8](A){}(C)
9182 \end{pspicture}
9183 \end{LTXexample}
9184 % \iffalse
9185 %</ignore>
9186 % \fi
9187 %
9188 % \begin{stylelist}
9189 % \typeitem{fade}{\prm{linestyle}}
9190 % \ifENGLISH
9191 % Fade from the current \opt{linecolor} to another color, defined by
9192 % \Lkeyword{fadeto}. The line style currently works only for line, not
9193 % for curves. The complete path is divided in \Lkeyword{fadepoints}$ -
9194 % 1$ segments.
9195 % \fi
9196 % \ifGERMAN
9197 % Erzeugt einen Farbverlauf von der aktuellen \opt{linecolor} zu einer
9198 % anderen Farbe, definiert durch \Lkeyword{fadeto}. Der Linienstil
9199 % funktioniert momentan nur vernünftig mit Linien, nicht jedoch mit
9200 % Kurven. Der gesamte Pfad wird in \Lkeyword{fadepoints}$- 1$ Segmente
9201 % unterteilt.
9202 % \fi
9203 % \iffalse
9204 %<*ignore>
9205 % \fi
9206 \begin{LTXexample}
9207 \begin{pspicture}(3,1)
9208 \psline[linewidth=0.2, linecolor=red, linestyle=fade, fadepoints=50](0,0.5)(3,0.5)
9209 \end{pspicture}
9210 \end{LTXexample}
9211 % \iffalse
9212 %</ignore>
9213 % \fi
9214 % \end{stylelist}
9215 % \begin{optionlist}
9216 % \choitem[white]{fadeto}{white, black, transparency}
9217 % \ifENGLISH
9218 % The color at the fade end, depends on \Lkeyword{fadefuncname} and
9219 % \Lkeyword{fadefunc}.
9220 % \fi
9221 % \ifGERMAN
9222 % Die Endfarbe des Farbverlaufs, hängt auch von \Lkeyword{fadefuncname}
9223 % und \Lkeyword{fadefunc} ab.
9224 % \fi
9225 % \iffalse
9226 %<*ignore>
9227 % \fi
9228 \begin{LTXexample}
9229 \begin{pspicture}(3,1)
9230 \psset{linewidth=0.2, linecolor=red, linestyle=fade, fadepoints=50}
9231 \psline[fadeto=white](0,0.9)(3,0.9)
9232 \psline[fadeto=black](0,0.5)(3,0.5)
9233 \psline[fadeto=transparency](0,0.1)(3,0.1)
9234 \end{pspicture}
9235 \end{LTXexample}
9236 % \iffalse
9237 %</ignore>
9238 % \fi
9239 %
9240 % \numitem[200]{fadepoints}
9241 % \ifENGLISH
9242 % Number of points used for lines with style \opt{fade}.
9243 % \fi
9244 % \ifGERMAN
9245 % Anzahl der Punkte, die für den Linienstil \opt{fade} verwendet werden.
9246 % \fi
9247 %
9248 % \choitem[linear]{fadefuncname}{gauss, linear, squared, exp, custom}
9249 % \ifENGLISH
9250 % Some predefined fade functions, which determine the color gradient. If
9251 % set to \opt{custom}, the Postscript code in \Lkeyword{fadefunc} is
9252 % used.
9253 % \fi
9254 % \ifGERMAN
9255 % Ein paar vordefinierte Funktionen, die den Farbverlauf bestimmen. Wird
9256 % \opt{custom} angegeben, dann wird der Postscript-Code aus
9257 % \Lkeyword{fadefunc} verwendet.
9258 % \fi
9259 %
9260 % \valitem{fadefunc}{PS code}
9261 % \ifENGLISH
9262 % Define a custom gradient for line style \Lkeyword{fade}. The \prm{PS
9263 % code} must evaluate a number on the stack in the range $[0,1]$ (0:
9264 % path start, 1: path end) to $[0,1]$ (0: \Lkeyword{fadeto} color, 1:
9265 % current line color). The function values are clipped to $[0,1]$.
9266 % \fi
9267 % \ifGERMAN
9268 % Eine benutzerdefinierte Funktion für den Farbverlauf des Linienstils
9269 % \Lkeyword{fade}. Der \prm{PS code} muss eine Zahl auf dem Stack im
9270 % Intervall $[0,1]$ (0: Pfadanfang, 1: Pfadende) auf das Intervall $[0,
9271 % 1]$ abbilden (0: \Lkeyword{fadeto}-Farbe, 1: aktuelle
9272 % Linienfarbe). Die Funktionswerte werden auf das Intervall $[0, 1]$
9273 % abgeschnitten.
9274 % \fi
9275 %
9276 % \iffalse
9277 %<*ignore>
9278 % \fi
9279 \begin{LTXexample}
9280 \begin{pspicture}(3,1)
9281 \psset{linewidth=0.2, linecolor=red, linestyle=fade, fadepoints=50}
9282 \psline[fadefuncname=gauss](0,1)(3,1)
9283 \psline[fadefuncname=exp](0,0.7)(3,0.7)
9284 \psline[fadefuncname=custom, fadefunc={360 mul cos 1 add 0.5 mul}](0,0.4)(3,0.4)
9285 \psline[fadefuncname=custom, fadefunc={neg 1 add 2 mul}](0,0.1)(3,0.1)
9286 \end{pspicture}
9287 \end{LTXexample}
9288 % \iffalse
9289 %</ignore>
9290 % \fi
9291 %
9292 % \ifENGLISH For a nice example see \prettyref{ex:dsotm}.\fi
9293 % \ifGERMAN Ein schönes Beispiel ist \prettyref{ex:dsotm}.\fi
9294 % \end{optionlist}
9295 %
9296 % \ifGERMAN\section{Aufgeweitete Strahlen}\fi
9297 % \ifENGLISH\section{Drawing wide beams}\fi
9298 % \label{sec:drawwidebeam}
9299 %
9300 % \ifENGLISH
9301 % All information about single beams (see \prettyref{sec:drawbeam}) apply to
9302 % wide beams as well. Here, you find all additional information which apply to
9303 % wide beams only.
9304 % \fi
9305 % \ifGERMAN
9306 % Alle Informationen über einfache Strahlen (siehe \prettyref{sec:drawbeam})
9307 % betreffen auch aufgeweitete Strahlen. Hier werden nur zusätzliche
9308 % Einstellmöglichkeiten aufgeweiteter Strahlen behandelt.
9309 % \fi
9310 %
9311 % \begin{ltxsyntax}
9312 % \xLcs{drawwidebeam}\cmditem{drawwidebeam}[options]{obj$_1$}{obj$_2$}\ldots
9313 % \end{ltxsyntax}
9314 %
9315 % \begin{optionlist}
9316 % \psnumitem[0]{beamwidth}
9317 % \ifENGLISH The initial beam width, measured at the initial position (defined
9318 % with \Lkeyword{beampos}) perpendicular to the beam direction.
9319 % \fi
9320 % \ifGERMAN Die Anfangsstrahlbreite an der mit \Lkeyword{beampos} angegebenen
9321 % Position, gemessen vertikal zur Verbindungslinie zur nächsten Komponente.
9322 % \fi
9323 % \iffalse
9324 %<*ignore>
9325 % \fi
9326 \begin{LTXexample}[morekeywords = {[21]{beamwidth}}]
9327 \begin{pspicture}(4,4)
9328 \pnodes(1.5,0.5){A}(3.5,0.5){B}(3.5,3.5){C}
9329 \optbox[position=end](B)(A)
9330 \mirror[mirrortype=extended](A)(B)(C)
9331 \optplate[position=end](B)(C)
9332 \drawwidebeam[beamwidth=0.3]{-}
9333 \end{pspicture}
9334 \end{LTXexample}
9335 % \iffalse
9336 %</ignore>
9337 % \fi
9338 %
9339 % \psnumitem[0]{beamdiv}
9340 % \ifENGLISH The total beam divergence at the starting position, given in
9341 % degree. Positive values give an expanding beam, negative values a contracting
9342 % beam.
9343 % \fi
9344 % \ifGERMAN Die Strahldivergenz an der Startposition, angegeben in
9345 % Grad. Positive Werte ergebenen einen expandierenden Strahl, negative einen
9346 % kontrahierenden.
9347 % \fi
9348 % \iffalse
9349 %<*ignore>
9350 % \fi
9351 \begin{LTXexample}[morekeywords = {[21]{beamdiv}}, linerange={1-8,11-11}]
9352 \begin{pspicture}(3,2)
9353 \pnodes(0,1){A}(3,1){B}
9354 \psset{plateheight=2}
9355 \optplate[position=start](A)(B)
9356 \optplate[position=end](A)(B)
9357 \addtopsstyle{Beam}{beamwidth=0.2}
9358 \drawwidebeam[beampos=0.4, beamdiv=5]{-}
9359 \drawwidebeam[beampos=-0.4, beamdiv=-5, linecolor=red]{-}
9360 \rput[b](1.5,0){\footnotesize\ttfamily beamdiv < 0}
9361 \rput[t](1.5,2){\footnotesize\ttfamily beamdiv > 0}
9362 \end{pspicture}
9363 \end{LTXexample}
9364 % \iffalse
9365 %</ignore>
9366 % \fi
9367 % \end{optionlist}
9368 %
9369 % \ifENGLISH\subsection{Beam appearance}\fi
9370 % \ifGERMAN\subsection{Strahlaussehen}\fi
9371 %
9372 % \ifENGLISH
9373 % The appearance of wide beams can be controlled like that of single beams with
9374 % the optional argument or the \Lstyle{Beam} style (see
9375 % \prettyref{sec:beamappearance-single}).
9376 %
9377 % Wide beams have two marginal rays, which are drawn according to the line
9378 % settings, and may be filled.
9379 % \fi
9380 % \ifGERMAN Das Aussehen aufgeweiteter Strahlen kann genauso wie bei einfachen
9381 % Strahlen über \Lstyle{Beam} oder das optionale Argument vorgegeben werden
9382 % (siehe \prettyref{sec:beamappearance-single}).
9383 %
9384 % Breite Strahlen bestehen aus zwei Randstrahlen, die gemäß der
9385 % Linieneinstellungen gezeichnet werden, und können zusätzlich gefüllt werden.
9386 % \fi
9387 %
9388 % \begin{enumerate}
9389 % \item
9390 % \ifENGLISH Only marginal rays.\fi
9391 % \ifGERMAN Nur die Randstrahlen.\fi
9392 %
9393 % \iffalse
9394 %<*ignore>
9395 % \fi
9396 \begin{LTXexample}
9397 \begin{pspicture}(3,2)
9398 \pnodes(0,0.5){A}(1,0.5){B}(2.8,2){C}
9399 \mirror[mirrorwidth=1.5](A)(B)(C)
9400 \drawwidebeam[beamwidth=0.4](A){}(C)
9401 \end{pspicture}
9402 \end{LTXexample}
9403 % \iffalse
9404 %</ignore>
9405 % \fi
9406 %
9407 % \item
9408 % \ifENGLISH Marginal rays, and with fill style.\fi
9409 % \ifGERMAN Randstrahlen, und Füllstil.\fi
9410 %
9411 % \iffalse
9412 %<*ignore>
9413 % \fi
9414 \begin{LTXexample}[morekeywords={[21]fillstyle, linestyle}]
9415 \begin{pspicture}(3,2)
9416 \pnodes(0,0.5){A}(1,0.5){B}(2.8,2){C}
9417 \mirror[mirrorwidth=1.5](A)(B)(C)
9418 \addtopsstyle{Beam}{fillstyle=solid, fillcolor=red!50!white, linecolor=red}
9419 \drawwidebeam[beamwidth=0.4](A){}(C)
9420 \end{pspicture}
9421 \end{LTXexample}
9422 % \iffalse
9423 %</ignore>
9424 % \fi
9425 %
9426 % \item
9427 % \ifENGLISH Only with fill style.\fi
9428 % \ifGERMAN Nur Füllstil.\fi
9429 %
9430 % \iffalse
9431 %<*ignore>
9432 % \fi
9433 \begin{LTXexample}[morekeywords={[21]fillstyle, linestyle}]
9434 \begin{pspicture}(3,2)
9435 \pnodes(0,0.5){A}(1,0.5){B}(2.8,2){C}
9436 \mirror[mirrorwidth=1.5](A)(B)(C)
9437 \addtopsstyle{Beam}{fillstyle=solid, fillcolor=red, opacity=0.3, linestyle=none}
9438 \drawwidebeam[beamwidth=0.4](A){}(C)
9439 \end{pspicture}
9440 \end{LTXexample}
9441 % \iffalse
9442 %</ignore>
9443 % \fi
9444 % \end{enumerate}
9445 %
9446 % \ifGERMAN\section{Fehlerbehandlung}\fi
9447 % \ifENGLISH\section{Error handling}\fi
9448 % \label{sec:error-handling}
9449 %
9450 % \ifGERMAN
9451 % Alle Strahlen werden direkt mit Postscript berechnet und gezeichnet,
9452 % so dass eine umfassende Fehlerbehandlung zur Zeit der Kompilation
9453 % nicht möglich ist. Um jedoch trotzdem fehlerfreie Bilder zu bekommen,
9454 % wird der Strahlengang abgebrochen, sobald eine Situation eintritt, die
9455 % nicht unterstützt wird. Das kann eintreten, falls der Strahl eine
9456 % Grenzfläche nicht trifft, Totalreflektion auftritt oder wenn die
9457 % folgende Komponente keine Freistrahlverbindungen unterstützt. Die
9458 % folgenden Beispiele zeigen Situationen, in denen diese Fehler
9459 % auftreten:
9460 % \fi
9461 % \ifENGLISH
9462 % All beam are calculated and drawn directly in Postscript, so that a
9463 % comprehensive error handling at compilation time is not possible. If a
9464 % situation arises which is not supported by the drawing algorithm, the beam
9465 % path is truncated at this point. This happens in the following cases:
9466 % \fi
9467 % \begin{enumerate}
9468 % \item
9469 % \ifENGLISH A beam misses an interface. The red beam in the following example
9470 % misses the last plane and is truncated at the last valid interface.
9471 % \fi
9472 % \ifGERMAN Ein Strahl trifft eine Grenzfläche nicht. Der rote Strahl in dem
9473 % folgenden Beispiel verpasst die letzte Grenzfläche und endet daher an der
9474 % vorhergehenden.
9475 % \fi
9476 % \iffalse
9477 %<*ignore>
9478 % \fi
9479 \begin{LTXexample}
9480 \begin{pspicture}(3,2.7)
9481 \pnodes(0,1){A}(3,1){B}
9482 \optplate[position=start](A)(B)
9483 \lens[lens=4 4 2, abspos=0.5, n=2.5](A)(B)
9484 \optplate[position=end, plateheight=0.5](A)(B)
9485 \drawbeam{-}
9486 \drawbeam[beampos=0.2]{-}
9487 \drawbeam[beampos=0.4, linecolor=red]{-}
9488 \end{pspicture}
9489 \end{LTXexample}
9490 % \iffalse
9491 %</ignore>
9492 % \fi
9493 %
9494 % \item
9495 % \ifENGLISH Total internal reflection occurs at an interface which is
9496 % not set up for this. The red beam in the following example would be
9497 % reflected, but this is not supported and the beam is truncated at the
9498 % interface where the total internal reflection occurs.
9499 % \fi
9500 % \ifGERMAN Totale interne Reflektion tritt an einer Grenzfläche auf, die
9501 % nicht dafür vorgesehen ist. Der rote Strahl im folgenden Beispiel würde
9502 % reflektiert werden, aber das wird für diese Komponente nicht unterstützt und
9503 % der Strahl endet an der total reflektierenden Grenzfläche.
9504 % \fi
9505 % \iffalse
9506 %<*ignore>
9507 % \fi
9508 \begin{LTXexample}
9509 \begin{pspicture}(3,2.5)
9510 \pnodes(0,2){A}(3,0){B}
9511 \optplane(A)
9512 \optprism[n=1.8](A)([Xnodesep=1.5]A)(B)
9513 \optplane(B)
9514 \drawbeam[beamangle=5]{-}
9515 \drawbeam[beamangle=-5, linecolor=red]{-}
9516 \end{pspicture}
9517 \end{LTXexample}
9518 % \iffalse
9519 %</ignore>
9520 % \fi
9521 %
9522 % \ifGERMAN Dasselbe gilt ebenfalls für aufgeweitete Strahlen (siehe
9523 % \prettyref{sec:drawwidebeam}). Bei diesen wird der Strahlengang abgebrochen,
9524 % falls einer der beiden Randstrahlen einen Fehler aufweist.
9525 % \fi
9526 % \ifENGLISH These conditions apply to wide beams (see \prettyref{sec:drawwidebeam}) as
9527 % well, the beam path is interrupted as soon as one of the marginal rays has an
9528 % error.
9529 % \fi
9530 % \iffalse
9531 %<*ignore>
9532 % \fi
9533 \begin{LTXexample}
9534 \begin{pspicture}(3,2.5)
9535 \pnodes(0,2){A}(3,0){B}
9536 \optplane(A)
9537 \optprism[n=1.8](A)([Xnodesep=1.5]A)(B)
9538 \optplane(B)
9539 \drawwidebeam[beamdiv=10, linecolor=red]{-}
9540 \end{pspicture}
9541 \end{LTXexample}
9542 % \iffalse
9543 %</ignore>
9544 % \fi
9545 %
9546 % \item
9547 % \ifGERMAN Eine Komponente soll verbunden werden, die jedoch keine
9548 % Freistrahlverbindungen unterstützt. In diesem Fall wird die falsche
9549 % Komponente und alle Folgenden ignoriert.
9550 % \fi
9551 % \ifENGLISH A component is to be connected, which does not support
9552 % free-ray connections. In this case, the wrong component and all
9553 % following ones are ignored.
9554 % \fi
9555 % \iffalse
9556 %<*ignore>
9557 % \fi
9558 \begin{LTXexample}
9559 \begin{pspicture}(3,2.7)
9560 \pnodes(0,1){A}(2,1){B}
9561 \optplate[position=start](A)(B)
9562 \lens[lens=4 4 2, abspos=0.5, n=2.5](A)(B)
9563 \fiberdelayline[fdlsize=1 0.7, position=end, fiber=none](A)(B)
9564 \drawbeam[beampos=0.2, linecolor=red]{-}
9565 \drawbeam[beampos=-0.2, linecolor=blue, beaminsidelast]{-}
9566 \end{pspicture}
9567 \end{LTXexample}
9568 % \iffalse
9569 %</ignore>
9570 % \fi
9571 % \end{enumerate}
9572 %
9573 % \begin{optionlist}
9574 % \boolitem[false]{pswarning}
9575 % \ifENGLISH To simplify debugging, you can have a message printed out
9576 % if any of these situations arises. The message will be printed to
9577 % standard output, when a Postscript interpreter reads the file,
9578 % e.g. when you view the file, or you convert it with \opt{ps2pdf} or
9579 % similar.
9580 % \fi
9581 % \ifGERMAN Um eine Fehlersuche zu vereinfachen kann ein Hinweis
9582 % ausgegeben werden sobald ein Strahlengang vorzeitig beendet. Die
9583 % Fehlermeldung wird auf die Standardausgabe geschrieben, wenn die
9584 % Datei mit einem Postscript-Interpreter gelesen wird, also mit einem
9585 % Betrachter geöffnet oder z.B. mit \opt{ps2pdf} konvertiert wird.
9586 % \fi
9587 % \end{optionlist}
9588 %
9589 % \ifGERMAN\section{Angepasste Strahlen}\fi
9590 % \ifENGLISH\section{Custom beams}\fi
9591 % \label{sec:custombeam}
9592 %
9593 % \ifGERMAN
9594 % Im Prinzip können alle Strahlengänge mit passender Wahl des Brechungsindex und
9595 % der Komponentenparameter (z.B. der Linsenkrümmung) realisiert werden, was
9596 % jedoch sehr aufwendig werden kann. Um das zu vereinfachen, besteht die
9597 % Möglichkeit die Endpunkte eines Strahls als Anfangspunkte für folgende
9598 % Strahlen zu nutzen, so dass man abschnittsweise die Divergenz und die
9599 % Ausbreitungsrichtung definieren kann.
9600 % \fi
9601 % \ifENGLISH
9602 % In principal, all kind of beam paths can be realized with an
9603 % appropriate choice of refractive index and component parameters
9604 % (e.g. lens curvature). This can become very cumbersome, so that the
9605 % package provides the means to simplify this. The end points of one
9606 % beam path can be used as starting points for the next beam, which
9607 % allows piecewise definition of the beam divergence, angle, and
9608 % direction.
9609 % \fi
9610 %
9611 % \begin{optionlist}
9612 % \choitem[true]{savebeampoints}{true,false,\prm{int}}
9613 % \ifGERMAN Speichert die Endpunkte eines \nxLcs{draw*beam} Makros,
9614 % vorangegangene Punkte werden überschrieben. \Lcs{drawbeam} und
9615 % \Lcs{drawwidebeam} werden getrennt behandelt. Wird hier eine Zahl
9616 % \prm{int} $> 0$ angegeben, so können beliebig viele Endpunkte
9617 % separat gespeichert werden, siehe z.B. \prettyref{ex:ratchet}. In
9618 % der Regel reicht an- und abschalten vollkommen aus, was den Zahlen 1
9619 % und 0 entspricht.
9620 % \fi
9621 % \ifENGLISH Saves the end points of a \nxLcs{draw*beam} macro,
9622 % previous points are overwritten. \Lcs{drawbeam} and
9623 % \Lcs{drawwidebeam} are treated separately. If a number \prm{int} $>
9624 % 0$ is given, you can save as many end points as you like, see
9625 % e.g. \prettyref{ex:ratchet}. But in most cases enabling (1) and
9626 % disabling (0) this option is sufficient.
9627 % \fi
9628 %
9629 % \choitem[false]{loadbeampoints}{true,false,\prm{int}}
9630 % \ifGERMAN Verwende die Endpunkte eines vorangegangenen Strahls als
9631 % Startpunkte. Wird keine Zahl \prm{int} angegeben, dann wird \opt{1}
9632 % verwendet.
9633 % \fi
9634 % \ifENGLISH Use the end points of a previous beam as starting points for the
9635 % next beam. If no number \prm{int} is specified, \opt{1} is used.
9636 % \fi
9637 % \end{optionlist}
9638 %
9639 % \ifGERMAN Als Beispiel nehmen wir ein Teleskop, die Strahldivergenz am Eingang
9640 % und am Ausgang ist Null. Anstatt die Linsenparameter und den Brechungsindex
9641 % genau einzustellen, so dass die Ausgangsdivergenz Null ist, zeichnen wir
9642 % einfach die drei Strahlenteile mit den gewünschten Divergenzen, und verwenden
9643 % die Endpunkte des jeweils vorangegangenen Strahls als neue Ausgangspunkte.
9644 % \fi
9645 % \ifENGLISH As example we consider a telescope which has no divergence at the
9646 % input and output. Usually we would need to tweak the refractive index and the
9647 % lens parameters to get an output beam without divergence. Instead, we draw the
9648 % three beam parts separately using the end points of the previous beams as new
9649 % starting points and specifying the divergence for each beam part
9650 % explicitely.
9651 % \fi
9652 % \iffalse
9653 %<*ignore>
9654 % \fi
9655 \begin{LTXexample}[morekeywords={[21]{savebeampoints, loadbeampoints}}]
9656 \begin{pspicture}(4,2)
9657 \pnodes(0,1){A}(4,1){B}
9658 \begin{optexp}
9659 \lens[lens=0.5 0.5 0.5, abspos=0.5](A)(B)
9660 \lens[lens=4 4 2, abspos=2](A)(B)
9661 \addtopsstyle{Beam}{%
9662 fillstyle=solid, fillcolor=green, opacity=0.3}
9663 \psset{loadbeampoints}
9664 \drawwidebeam[beamwidth=0.2, stopinside](A){1}
9665 \drawwidebeam[beamdiv=-60]{1}{2}
9666 \drawwidebeam{2}(B)
9667 \end{optexp}
9668 \end{pspicture}
9669 \end{LTXexample}
9670 % \iffalse
9671 %</ignore>
9672 % \fi
9673 %
9674 % \ifGERMAN Als weiteres Beispiel betrachten wir die Beugung an einem Gittern in
9675 % die nullte und erste Beugungsordnung. Zuerst wird der Strahl von dem Eingang
9676 % bis zum Gitter gezeichnet, die Endpunkte dieses Strahls werden nun für die
9677 % Strahlen in beide Beugungsordnungen verwendet.
9678 % \fi
9679 % \ifENGLISH The next example shows diffraction from a grating in the zeroth and
9680 % first diffraction order. First we draw the beam to the grating, its end points
9681 % are used for the beams into both diffraction orders.
9682 % \fi
9683 % \iffalse
9684 %<*ignore>
9685 % \fi
9686 \begin{LTXexample}[morekeywords={[21]{savebeampoints, loadbeampoints}},
9687 linerange={1-12,16-16}, caption={caption}, label={ex:loadbeampoints}]
9688 \begin{pspicture}(3.5,3.5)
9689 \pnodes(0,0.5){A}(2,0.5){B}(2,3){C}
9690 \nodexn{(C)-(1,0)}{C'}
9691 \nodexn{(C)(1,0)}{C''}
9692 \optgrating(A)(B)(C)
9693 \addtopsstyle{Beam}{%
9694 fillstyle=solid, fillcolor=green, opacity=0.3}
9695 \drawwidebeam[beamwidth=0.3](A){1}
9696 \psset{savebeampoints=false, loadbeampoints}
9697 \drawwidebeam{1}(C)
9698 \drawwidebeam{1}(C')
9699 \drawwidebeam{1}(C'')
9700 \rput[b]([offset=0.2]C){0th}
9701 \rput[b]([offset=0.2]C'){1st}
9702 \rput[b]([offset=0.2]C''){-1st}
9703 \end{pspicture}
9704 \end{LTXexample}
9705 % \iffalse
9706 %</ignore>
9707 % \fi
9708 %
9709 % \begin{optionlist}
9710 % \choitem[true]{savebeam}{true,false,\prm{int}}
9711 % \ifGERMAN Speichert die Endzustände, d.h. Endpunkte und Ausgangsvektoren,
9712 % eines \nxLcs{draw*beam} Makros, vorangegangene Werte werden
9713 % überschrieben. \Lcs{drawbeam} und \Lcs{drawwidebeam} werden getrennt
9714 % behandelt. Wird hier eine Zahl \prm{int} $> 0$ angegeben, so können beliebig
9715 % viele Strahlen separat gespeichert werden. In der Regel reicht an- und
9716 % abschalten vollkommen aus.
9717 % \fi
9718 % \ifENGLISH Saves the end conditions, i.e. end points and output vectors, of
9719 % each \nxLcs{draw*beam} macro, previous values are
9720 % overwritten. \Lcs{drawbeam} and \Lcs{drawwidebeam} are treated
9721 % separately. If a number \prm{int} $> 0$ is given, you can save as many end
9722 % points as you like, but in most use cases enabling and disabling this option
9723 % is sufficient.
9724 % \fi
9725 %
9726 % \choitem[false]{loadbeam}{true,false,\prm{int}}
9727 % \ifGERMAN Verwende den Endzustand (Punkte und Richtung) eines
9728 % vorangegangenen Strahls als Anfangszustand. Der Parameter
9729 % \Lkeyword{beamangle} kann verwendet werden um die Richtung relativ zu der
9730 % geladenen zu verändern (siehe folgendes Beispiel).
9731 % \fi
9732 % \ifENGLISH Use the end condition (points and vectors) of a previous beam as
9733 % starting conditions for the next beam. The parameter \Lkeyword{beamangle}
9734 % can be used to change the direction relative to the loaded one (see
9735 % following example).
9736 % \fi
9737 % \iffalse
9738 %<*ignore>
9739 % \fi
9740 \begin{LTXexample}[morekeywords={[21]{savebeam, loadbeam}},
9741 linerange={1-10,14-14}, caption={caption}, label={ex:loadbeam}]
9742 \begin{pspicture}(3.5,3.5)
9743 \pnodes(0,0.5){A}(2,0.5){B}(2,3){C}
9744 \optgrating(A)(B)(C)
9745 \addtopsstyle{Beam}{%
9746 fillstyle=solid, fillcolor=green, opacity=0.3}
9747 \drawwidebeam[savebeam, beamwidth=0.3](A){1}
9748 \psset{savebeam=false, loadbeam}
9749 \drawwidebeam[beamangle=-20]{1}(C)
9750 \drawwidebeam{1}(C)
9751 \drawwidebeam[beamangle=20]{1}(C)
9752 \rput[b]([offset=0.2]C){0th}
9753 \rput[b]([Xnodesep=-0.9, offset=0.2]C){1st}
9754 \rput[b]([Xnodesep=0.9,offset=0.2]C){-1st}
9755 \end{pspicture}
9756 \end{LTXexample}
9757 % \iffalse
9758 %</ignore>
9759 % \fi
9760 %
9761 % \ifGERMAN Beachten Sie, dass \Lkeyword{loadbeam} und
9762 % \Lkeyword{savebeam} nicht immer funktionieren, wenn der Strahlengang an
9763 % einem halbdurchlässigen Spiegel oder einem Strahlteiler endet. In
9764 % diesen Fällen wird nur der transmittierte Strahlvektor gespeichert,
9765 % soll der Strahlengang über den reflektierenden Weg fortgesetzt werden,
9766 % so ist das nicht möglich.
9767 %
9768 % In den beiden folgenden Beispielen wird demnach der rote Strahl, der
9769 % von der Komponente zum Knoten \prm{B} fortgesetzt werden soll, nicht
9770 % gezeichnet.
9771 % \fi
9772 % \ifENGLISH Please note, that \Lkeyword{loadbeam} and
9773 % \Lkeyword{savebeam} do not always work, if the beam path ends inside a
9774 % semitransparent mirror or a beamsplitter. In these cases only the
9775 % transmitted ray vector is saved and continuing the beam via the
9776 % reflective path is not possible.
9777 %
9778 % Accordingly, in the following examples the red beam is not drawn,
9779 % which should continue the green beam from the component to node
9780 % \prm{B}.
9781 % \fi
9782 % \iffalse
9783 %<*ignore>
9784 % \fi
9785 \begin{LTXexample}[linerange={1-6,9-9}, morekeywords={[21]{savebeam, loadbeam}}]
9786 \begin{pspicture}(3,1.5)
9787 \pnodes(0,0.5){A}(1.5,1.5){B}(3,0.5){C}
9788 \beamsplitter(A)(1.5,0.5)(B)
9789 \drawbeam[beaminsidelast, savebeam](A){}
9790 \drawbeam[linecolor=red, beaminsidefirst, loadbeam]{}(B)
9791 \drawbeam[linecolor=blue, beaminsidefirst, loadbeam]{}(C)
9792 \psdot(B)\uput[-30](B){B}
9793 \psdot(C)\uput[-120](C){C}
9794 \end{pspicture}
9795 \end{LTXexample}
9796
9797 \begin{LTXexample}[linerange={1-6,9-9}, morekeywords={[21]{savebeam, loadbeam}}]
9798 \begin{pspicture}(3,1.5)
9799 \pnodes(0,0.5){A}(1.5,1.5){B}(3,0.5){C}
9800 \mirror[mirrortype=semitrans](A)(1.5,0.5)(B)
9801 \drawbeam[beaminsidelast, savebeam](A){}
9802 \drawbeam[linecolor=red, beaminsidefirst, loadbeam]{}(B)
9803 \drawbeam[linecolor=blue, beaminsidefirst, loadbeam]{}(C)
9804 \psdot(B)\uput[-30](B){B}
9805 \psdot(C)\uput[-120](C){C}
9806 \end{pspicture}
9807 \end{LTXexample}
9808 % \iffalse
9809 %</ignore>
9810 % \fi
9811 % \end{optionlist}
9812 %
9813 %
9814 %
9815 % \begin{optionlist}
9816 % \boolitem[false]{startinside}
9817 % \ifENGLISH
9818 % The parameter \Lkeyword{beaminsidefirst} controls if the internal beams are
9819 % drawn inside the first component. However, for custom beams it can also be
9820 % necessary to trace the internal beam of the first component without drawing
9821 % it, e.g. if the previous beam ended at the first interface.
9822 %
9823 % In the following example the red beam is the wrong continuation of the
9824 % incoming green beam because it assumes that the loaded beam conditions refer
9825 % to the output interface. But the previous beam stopped at the input
9826 % interface, so one needs to set \Lkeyword{startinside} in order to continue
9827 % the beam properly (see blue beam). The dashed line helps to understand the
9828 % correct beam path through the lens.
9829 % \fi
9830 % \ifGERMAN Mit dem Parameter \Lkeyword{beaminsidefirst} kann eingestellt
9831 % werden, ob der interne Strahlengang in der erste Komponente gezeichnet
9832 % wird. Für angepasste Strahlengänge kann es aber notwendig sein dem internen
9833 % Strahlengang in der ersten Komponente zu folgen ohne diesen zu zeichnen,
9834 % z.B. wenn der vorangegangene Strahl an der ersten Grenzfläche schon endet.
9835 %
9836 % Im folgenden Beispiel wird der einfallende grüne Strahl falsch durch den
9837 % roten Strahl fortgesetzt, da der grüne an der linken Grenzfläche endet, der
9838 % rote aber fälschlicherweise annimmt, dass der Endzustand sich auf die rechte
9839 % Grenzfläche bezieht. Dem blauen Strahl wird nun mit \Lkeyword{startinside}
9840 % mitgeteilt, dass der Endzustand sich auf die linke Grenzfläche bezieht.
9841 % \fi
9842 %
9843 % \iffalse
9844 %<*ignore>
9845 % \fi
9846 \begin{LTXexample}[morekeywords = {[21]{startinside}}]
9847 \begin{pspicture*}(0,2)(3.05,6)
9848 \optplane(0,2)
9849 \lens[lens=8 8 8, abspos=0.6, n=1.8](0.5,2)(3,2)
9850 \optplate[position=1, plateheight=6](0.5,2)(3,2)
9851 \psset{savebeam=false}
9852 \drawbeam[beampos=3, linestyle=dashed]{-}
9853 \drawbeam[beampos=3, savebeam]{1-2}
9854 \drawbeam[loadbeam, linecolor=red]{2-3}
9855 \drawbeam[loadbeam, startinside, linecolor=blue]{2-3}
9856 \end{pspicture*}
9857 \end{LTXexample}
9858 % \iffalse
9859 %</ignore>
9860 % \fi
9861 %
9862 % \boolitem[false]{stopinside}
9863 % \ifENGLISH This option is equivalent to \Lkeyword{startinside} but refers
9864 % to the last component.
9865 % \fi
9866 % \ifGERMAN Äquivalent zu \Lkeyword{startinside}, bezieht sich aber auf die
9867 % letzte Komponenten.
9868 % \fi
9869 % \iffalse
9870 %<*ignore>
9871 % \fi
9872 \begin{LTXexample}[morekeywords = {[21]{stopinside}}]
9873 \begin{pspicture*}(0,2)(3.05,6)
9874 \optplane(0,2)
9875 \lens[lens=8 8 8, abspos=0.6, n=1.8](0.5,2)(3,2)
9876 \optplate[position=1, plateheight=6](0.5,2)(3,2)
9877 \psset{savebeam=false}
9878 \drawbeam[beampos=3, linestyle=dashed]{-}
9879 \drawbeam[beampos=3, savebeam, stopinside]{1-2}
9880 \drawbeam[loadbeam, linecolor=blue]{2-3}
9881 \end{pspicture*}
9882 \end{LTXexample}
9883 % \iffalse
9884 %</ignore>
9885 % \fi
9886 % \end{optionlist}
9887 %
9888 %
9889 % \ifGERMAN\section{Faserverbindungen}\fi
9890 % \ifENGLISH\section{Drawing fibers}\fi
9891 % \label{sec:drawfiber}
9892 %
9893 % \ifENGLISH
9894 % All available components can be connected with fiber connections, the
9895 % fiber components in \prettyref{chap:fibercomp} are connected automatically.
9896 % \fi
9897 % \ifGERMAN
9898 % Alle Komponenten können mit Fasern verbunden werden, die Faserkomponenten
9899 % in \prettyref{chap:fibercomp} werden automatisch verbunden.
9900 % \fi
9901 %
9902 % \begin{ltxsyntax}
9903 % \xLcs{drawfiber}\cmditem{drawfiber}[options]{obj$_1$}{obj$_2$}\ldots
9904 % \end{ltxsyntax}
9905 % \ifENGLISH
9906 % This macro draws fiber connections and takes a variable number of
9907 % arguments (minimum of two) which can be either an ID, an ID range, a
9908 % \Lkeyword{compname}, or a PSTricks node (see
9909 % \prettyref{sec:accessobj}). To distinguish between nodes and
9910 % components, nodes must be either enclosed in parenthesis within the
9911 % brackets, or enclosed only in parenthesis:
9912 % \Lcs{drawfiber}\opt{\{(node)\}\{comp\}}, or
9913 % \Lcs{drawfiber}\opt{(node)\{comp\}}. If you specify more than two
9914 % arguments, it draws the connections $1\rightarrow 2$, $2\rightarrow
9915 % 3$, and so on.
9916 %
9917 % The automatic fiber connections are drawn internally with
9918 % \Lcs{drawfiber} commands from each reference node to the component.
9919 % \fi
9920 % \ifGERMAN
9921 % Dieses Makro zeichnet Faserverbindungen und akzeptiert eine variable
9922 % Anzahl an Argumenten (mindestens zwei), die entweder eine ID, ein
9923 % ID-Intervall, ein \Lkeyword{compname} oder ein PSTricks-Knoten sein
9924 % können (siehe \prettyref{sec:accessobj}. Um zwischen Knoten und
9925 % Komponenten unterscheiden zu können, müssen Knoten entweder in runde
9926 % Klammern innerhalb der geschweiften Klammern eingeschlossen werden
9927 % oder dürfen nur runde Klammern haben:
9928 % \Lcs{drawbeam}\opt{\{(node)\}\{comp\}}, oder
9929 % \Lcs{drawbeam}\opt{(node)\{comp\}}. Werden mehr als zwei Argumente
9930 % mitgegeben, werden die Verbindungen $1\rightarrow 2$, $2\rightarrow
9931 % 3$, usw. gezeichnet.
9932 %
9933 % Die automatischen Faserverbindungen werden intern als
9934 % \Lcs{drawfiber} von den Referenzknoten zur Komponente gezeichnet.
9935 % \fi
9936 %
9937 % \ifENGLISH\subsection{Fiber angles}\fi
9938 % \ifGERMAN\subsection{Faserwinkel}\fi
9939 % \label{sec:drawfiber-angles}
9940 %
9941 % \ifENGLISH
9942 % The fibers are usually drawn as \Lcs*{nccurve} connections, the angles at both
9943 % curve ends are automatically determined by the component orientation and
9944 % depend on whether you connect a component with a component, or a component
9945 % with a node.
9946 % \fi
9947 % \ifGERMAN
9948 % Üblicherweise werden Fasern als \Lcs*{nccurve}-Verbindungen gezeichnet, die
9949 % Winkel an beiden Kurvenenden werden automatisch anhand der
9950 % Komponentenausrichtung bestimmt und hängen davon ab, ob eine Komponente mit
9951 % einer anderen Komponente oder einem Knoten verbunden wird.
9952 % \fi
9953 %
9954 % \ifENGLISH\minisec{Component with node}\fi
9955 % \ifGERMAN\minisec{Komponente mit Knoten}\fi
9956 %
9957 % \ifENGLISH
9958 % A connection of a component with a node is what is used for automatic
9959 % connections (see \prettyref{sec:drawconn-auto}). Consider the following
9960 % example for clarification of the curve alignment:
9961 % \fi
9962 % \ifGERMAN
9963 % Eine Verbindung zwischen einer Komponente und einem Knoten ist das, was bei
9964 % automatischen Verbindungen verwendet wird (siehe
9965 % \prettyref{sec:drawconn-auto}). Folgendes Beispiel erläutert die Ausrichtung
9966 % der Kurve:
9967 % \fi
9968 %
9969 % \iffalse
9970 %<*ignore>
9971 % \fi
9972 \begin{LTXexample}[linerange={1-3,10-11}]
9973 \begin{pspicture}(-1,-0.7)(7,2.7)
9974 \pnodes(0,1){A}(6,1){B}
9975 \optbox[angle=30](A)(B)
9976 \psdot(\oenodeRefA{})\uput[180](\oenodeRefA{}){RefA}%
9977 \psdot(\oenodeRefB{})\uput[0](\oenodeRefB{}){RefB}%
9978 \psdot(\oenodeTrefA{})\uput[180](\oenodeTrefA{}){TrefA}%
9979 \psdot(\oenodeTrefB{})\uput[0](\oenodeTrefB{}){TrefB}%
9980 \psline[style=Refline, linestyle=dashed](\oenodeTrefA{})(\oenodeTrefB{})
9981 \psline[style=Refline, linestyle=dashed](\oenodeRefA{})(\oenodeRefB{})
9982 \drawfiber(A){}(B)
9983 \end{pspicture}
9984 \end{LTXexample}
9985 % \iffalse
9986 %</ignore>
9987 % \fi
9988 %
9989 % \ifENGLISH
9990 % The angle at the component itself agrees with the transformed reference line.
9991 % The angle at the node corresponds to the angle of the original reference line
9992 % of the component which it gets connected to. The fiber is always directed to
9993 % the component node.
9994 %
9995 % Considering the following example, this means that the start angles of the red
9996 % fibers are rotated by 180° with respect to the blue fibers. The angles at the
9997 % component do not change.
9998 % \fi
9999 % \ifGERMAN
10000 % Der Winkel an der Komponente entspricht dem der transformierten
10001 % Referenzlinie. Der Winkel an dem Knoten entspricht dem der ursprünglichen
10002 % Referenzlinie der Komponente zu der die Verbindung geht. Die Faser ist in
10003 % Richtung des entsprechenden Komponentenknotens orientiert.
10004 %
10005 % Das führt dazu, dass im folgenden Beispiel die Anfangswinkel der roten Fasern
10006 % um 180° gegenüber den blauen Fasern gedreht sind, die Winkel an der Komponente
10007 % bleiben unverändert.
10008 % \fi
10009 %
10010 % \iffalse
10011 %<*ignore>
10012 % \fi
10013 \begin{LTXexample}[linerange={1-1,4-4,7-14}]
10014 \begin{pspicture}(-2,-1.6)(2,2)
10015 \psset[optexp]{optboxsize=1.6 0.8}
10016 \addtopsstyle{Fiber}{ArrowInside=->, ArrowInsidePos=0.3, arrowscale=1.5}
10017 \optbox[position=end](0,1)(0,0)
10018 \psarc[fillstyle=solid,fillcolor=gray!20, linestyle=none](0,0){2}{0}{180}
10019 \psline[linestyle=dashed]([Xnodesep=-2]\oenodeIn{})([Xnodesep=2]\oenodeIn{})
10020 \addtopsstyle{Fiber}{linecolor=blue}
10021 \multido{\i=10+40}{5}{%
10022 \drawfiber(2;\i){}
10023 }
10024 \addtopsstyle{Fiber}{linecolor=red!90!black}
10025 \drawfiber(2;-20){}
10026 \drawfiber(2;200){}
10027 \end{pspicture}
10028 \end{LTXexample}
10029 % \iffalse
10030 %</ignore>
10031 % \fi
10032 %
10033 % \ifENGLISH\minisec{Component with component}\fi
10034 % \ifGERMAN\minisec{Komponente mit Komponente}\fi
10035 %
10036 % \ifENGLISH
10037 % This variant is very helpful to achieve smoother connections between
10038 % components which are not aligned on the same reference line but are arranged
10039 % maybe in a loop or similar, see \prettyref{ex:nalm} and
10040 % \prettyref{ex:recirc-loop}.
10041 %
10042 % In this case, the curve angles are determined by the orientation of
10043 % the component which the respective curve end is connected to. The
10044 % fibers are always directed away from the component center.
10045 % \fi
10046 % \ifGERMAN
10047 % Diese Variante ist sehr nützlich um glattere Verbindungen zwischen Komponenten
10048 % zu erreichen, die nicht auf derselben Referenzlinie positioniert sind, sondern
10049 % z.B. in einer Schleife angeordnet werden, siehe \prettyref{ex:nalm} und
10050 % \prettyref{ex:recirc-loop}.
10051 %
10052 % In diesem Fall werden die Kurvenwinkel von der Komponente bestimmt, mit der
10053 % das jeweilige Ende verbunden ist. Die Fasern zeigen immer von der
10054 % Komponentenmitte weg.
10055 % \fi
10056 %
10057 % \iffalse
10058 %<*ignore>
10059 % \fi
10060 \begin{LTXexample}[linerange={1-4,9-10}]
10061 \begin{pspicture}(0,-0.8)(7,0.8)
10062 \pnodes(0,0){A}(3,0){B}(4,0){C}(7,0){D}
10063 \optbox[angle=30](A)(B)
10064 \optbox[angle=-30](C)(D)
10065 \psline[style=Refline, linestyle=dashed](\oenodeTrefA{1})(\oenodeTrefB{1})
10066 \psline[style=Refline, linestyle=dashed](\oenodeTrefA{2})(\oenodeTrefB{2})
10067 \psline[style=Refline, linestyle=dashed](\oenodeRefA{1})(\oenodeRefB{2})
10068 \psdot(\oenodeRefA{1})\psdot(\oenodeRefB{2})
10069 \drawfiber(A){1}{2}(D)
10070 \end{pspicture}
10071 \end{LTXexample}
10072 % \iffalse
10073 %</ignore>
10074 % \fi
10075 %
10076 % \ifENGLISH These automatically calculated start and stop angles can be changed
10077 % in a variety of ways, the available parameters are listed in the following.
10078 % \fi
10079 % \ifGERMAN
10080 % Diese automatisch berechneten Winkel können vielfältig manipuliert werden, die
10081 % möglichen Parameter sind im Folgenden aufgelistet.
10082 % \fi
10083 %
10084 % \begin{optionlist}
10085 % \choitem[relative]{fiberalign}{rel,relative,center,abs,absolute}
10086 % \ifENGLISH Set the reference for the fiber angles.
10087 % \fi
10088 % \ifGERMAN
10089 % Wählt die Referenz für die Faserwinkel.
10090 % \fi
10091 % \begin{valuelist}
10092 % \item[relative]
10093 % \ifENGLISH The fiber angles are relative to the component. When
10094 % connecting a node to a component, the angle at the node is that of the
10095 % component reference line. The angle at the component agrees with that of
10096 % its transformed reference line.
10097 % \fi
10098 % \ifGERMAN
10099 % Die Faserwinkel sind relativ zur Komponente. Wird ein Knoten mit der
10100 % Komponente verbunden, so entspricht der Winkel am Knoten dem der
10101 % Referenzlinie der Komponente. Der Winkel an der Komponente entspricht dem
10102 % der transformierten Referenzlinie.
10103 % \fi
10104 % \iffalse
10105 %<*ignore>
10106 % \fi
10107 \begin{LTXexample}[linerange={1-4,9-10}]
10108 \begin{pspicture}(1,-1.7)(7,1.7)
10109 \pnodes(0,0){A}(4,0){B}(3,0){C}(7,0){D}
10110 \optbox[angle=30](A)(B)
10111 \optbox[angle=-30](C)(D)
10112 \psline[style=Refline, linestyle=dashed](\oenodeTrefA{1})(\oenodeTrefB{1})
10113 \psline[style=Refline, linestyle=dashed](\oenodeTrefA{2})(\oenodeTrefB{2})
10114 \psline[style=Refline, linestyle=dashed](\oenodeRefA{1})(\oenodeRefB{2})
10115 \psdot(\oenodeRefA{1})\psdot(\oenodeRefB{2})
10116 \drawfiber(A){1}{2}(D)
10117 \end{pspicture}
10118 \end{LTXexample}
10119 % \iffalse
10120 %</ignore>
10121 % \fi
10122 %
10123 % \item[center]
10124 % \ifENGLISH
10125 % The fiber angles both at the node and the component are relative to
10126 % the connection between the involved interface node and the center
10127 % node of the component. In most cases this is equivalent to
10128 % \opt{relative}, but necessary e.g. for \Lcomp{optcirculator} and
10129 % \Lcomp{elecmixer}. In the example, the green fiber shows the correct
10130 % alignment, while the red one is with \opt{relative} alignment.
10131 % \fi
10132 % \ifGERMAN
10133 % Die Winkel sowohl am Knoten als auch an der Komponente sind relativ
10134 % zu der Verbindung zwischen dem betroffenen Komponentenknoten und der
10135 % Komponentenmitte. Meistens ist das äquivalent zu \opt{relative},
10136 % wird aber z.B. für \Lcomp{optcirculator} und \Lcomp{elecmixer}
10137 % benötigt. In dem Beispiel hat die grüne Faser die korrekte
10138 % Ausrichtung, während die rote \opt{relative} ausgerichtet wird.
10139 % \fi
10140 %
10141 % \iffalse
10142 %<*ignore>
10143 % \fi
10144 \begin{LTXexample}[morekeywords={[21]fiberalign}]
10145 \begin{pspicture}(1,0)(3,2)
10146 \addtopsstyle{Fiber}{arrowscale=1.3, arrows=->, arrowinset=0}
10147 \optcirculator[fiber=t](0,0.5)(3,2)(1.5,0)
10148 \drawfiber[linecolor=red]{}(1.5,0)
10149 \drawfiber[fiberalign=center, linecolor=green]{}(1.5,0)
10150 \end{pspicture}
10151 \end{LTXexample}
10152 % \iffalse
10153 %</ignore>
10154 % \fi
10155 %
10156 % \item[absolute]
10157 % \ifENGLISH The fiber angles are absolute, no automatic values are added.
10158 % \fi
10159 % \ifGERMAN
10160 % Die Faserwinkel werden als absolute Werte angegeben, die automatischen
10161 % Winkel werden nicht berücksichtigt.
10162 % \fi
10163 %
10164 % \iffalse
10165 %<*ignore>
10166 % \fi
10167 \begin{LTXexample}[morekeywords={[21]fiberalign}, linerange={1-3,7-8}]
10168 \begin{pspicture}(1,-1)(4.5,1)
10169 \pnodes(0,0){A}(4,0){B}
10170 \optbox[angle=30](A)(B)
10171 \psline[style=Refline, linestyle=dashed](\oenodeTrefA{})(\oenodeTrefB{})
10172 \psline[style=Refline, linestyle=dashed](\oenodeRefA{})(\oenodeRefB{})
10173 \psdot(\oenodeRefA{})\psdot(\oenodeRefB{})
10174 \drawfiber[fiberalign=abs, ncurv=1.5](A){}(B)
10175 \end{pspicture}
10176 \end{LTXexample}
10177 % \iffalse
10178 %</ignore>
10179 % \fi
10180 % \end{valuelist}
10181 %
10182 % \numitem[0]{fiberangleA}
10183 % \ifENGLISH An additive value for the starting angle, the total angle depends
10184 % on \Lkeyword{fiberalign}. If this parameter is set to \opt{absolute}, then
10185 % \Lkeyword{fiberangleA} is the total angle, otherwise its value is added to
10186 % the calculated angle.
10187 % \fi
10188 % \ifGERMAN
10189 % Ein additiver Wert für den Anfangswinkel, der gesamte Winkel hängt von
10190 % \Lkeyword{fiberalign} ab. Ist dieser auf \opt{absolute} eingestellt, so ist
10191 % \Lkeyword{fiberangleA} der absolute Winkel, andernfalls wird der Wert zu dem
10192 % automatisch berechneten Winkel hinzuaddiert.
10193 % \fi
10194 %
10195 % \numitem[0]{fiberangleB}
10196 % \ifENGLISH Like \Lkeyword{fiberangleA}, but for the end angle.\fi
10197 % \ifGERMAN Wie \Lkeyword{fiberangleB}, aber für den Endwinkel.\fi
10198 %
10199 % \iffalse
10200 %<*ignore>
10201 % \fi
10202 \begin{LTXexample}[morekeywords={[21]fiberangleA, fiberangleB}, linerange={1-3,7-9}]
10203 \begin{pspicture}(0,-1)(4,1)
10204 \pnodes(0,0){A}(4,0){B}
10205 \optbox[angle=30](A)(B)
10206 \psline[style=Refline, linestyle=dashed](\oenodeTrefA{})(\oenodeTrefB{})
10207 \psline[style=Refline, linestyle=dashed](\oenodeRefA{})(\oenodeRefB{})
10208 \psdot(\oenodeRefA{})\psdot(\oenodeRefB{})
10209 \drawfiber[fiberangleA=-90](A){}
10210 \drawfiber[fiberangleB=-90]{}(B)
10211 \end{pspicture}
10212 \end{LTXexample}
10213 % \iffalse
10214 %</ignore>
10215 % \fi
10216 %
10217 % \choitem[auto]{startnode}{auto, N, 1, 2, \ldots}
10218 % \ifGERMAN Für die Verbindungen mit \Lcs{drawfiber} werden die Knoten
10219 % genommen, die sich am nächsten sind. Das passt häufig, aber nicht
10220 % immer. Hiermit kann der Startknoten explizit gewählt werden.
10221 % \fi
10222 % \ifENGLISH The connections with \Lcs{drawfiber} are drawn between the
10223 % two nodes which are nearest to each other. This fits most of the time, but not
10224 % always. With this option you can choose the start node explicitely.
10225 % \fi
10226 %
10227 % \choitem[auto]{stopnode}{auto, N, 1, 2, \ldots}
10228 % \ifGERMAN Genau wie \Lkeyword{startnode}, aber für den Stopknoten.\fi
10229 % \ifENGLISH Like \Lkeyword{startnode}, but for the stop node.\fi
10230 % \end{optionlist}
10231 %
10232 % \ifENGLISH
10233 % The following examples show some use cases for \Lkeyword{startnode} and
10234 % \Lkeyword{stopnode}.
10235 % \fi
10236 % \ifGERMAN
10237 % Die folgenden Beispiele zeigen Anwendungsmöglichkeiten für
10238 % \Lkeyword{startnode} und \Lkeyword{stopnode}.
10239 % \fi
10240 %
10241 % \begin{enumerate}
10242 % \item
10243 % \ifENGLISH This example shows a situation, where choosing the nearest nodes
10244 % is correct.
10245 % \fi
10246 % \ifGERMAN In diesem Fall ist der nächstgelegene Knoten auch der richtige.
10247 % \fi
10248 %
10249 % \iffalse
10250 %<*ignore>
10251 % \fi
10252 \begin{LTXexample}[linerange={1-1,3-6}]
10253 \begin{pspicture}(3,2)
10254 \psset{label=0, optboxwidth=1}
10255 \pnodes(-0.5,1){A}(1.5,1){B}(3.5,1){C}
10256 \optbox(A)(B){Box1}\optbox(B)(C){Box2}
10257 \drawfiber{1}{2}
10258 \end{pspicture}
10259 \end{LTXexample}
10260 % \iffalse
10261 %</ignore>
10262 % \fi
10263 %
10264 % \item
10265 % \ifENGLISH In this case, the nearest connection is not well defined because
10266 % two connections have the same length.
10267 % \fi
10268 % \ifGERMAN
10269 % Hier ist der kürzeste Abstand nicht eindeutig definiert, da es zwei
10270 % Verbindungen mit der gleichen Länge gibt.
10271 % \fi
10272 %
10273 % \iffalse
10274 %<*ignore>
10275 % \fi
10276 \begin{LTXexample}[linerange={1-1,3-6}]
10277 \begin{pspicture}(2,2)
10278 \psset{label=0}
10279 \pnodes(0,0.5){A}(2,0.5){B}([offset=1]B){C}(A|C){D}
10280 \optbox(A)(B){Box1}\optbox(C)(D){Box2}
10281 \drawfiber{1}{2}
10282 \end{pspicture}
10283 \end{LTXexample}
10284 % \iffalse
10285 %</ignore>
10286 % \fi
10287 %
10288 % \item
10289 % \ifENGLISH To select the desired connection it is often enough to set either
10290 % \Lkeyword{startnode} or \Lkeyword{stopnode}. With this you fix one node, the
10291 % other is the one nearest to it. In rare cases it might be necessary to fix
10292 % both nodes.
10293 % \fi
10294 % \ifGERMAN
10295 % Um die gewünschte Verbindung zu wählen ist es meistens ausreichend entweder
10296 % \Lkeyword{startnode} oder \Lkeyword{stopnode} zu setzen. Ist ein Knoten fest
10297 % vorgegeben, wird der anderen wieder als der mit dem kürzesten Abstand
10298 % gewählt. Nur in Ausnahmefällen sollte es notwendig sein beide Knoten
10299 % explizit anzugegeben.
10300 % \fi
10301 %
10302 % \iffalse
10303 %<*ignore>
10304 % \fi
10305 \begin{LTXexample}[morekeywords={[21]startnode}]
10306 \begin{pspicture}(2,2)
10307 \psset{label=0}
10308 \pnodes(0,0.5){A}(2,0.5){B}([offset=1]B){C}(A|C){D}
10309 \optbox(A)(B){Box1}\optbox(C)(D){Box2}
10310 \drawfiber[startnode=1]{1}{2}
10311 \drawfiber[startnode=N, linecolor=black]{1}{2}
10312 \end{pspicture}
10313 \end{LTXexample}
10314 % \iffalse
10315 %</ignore>
10316 % \fi
10317 %
10318 % \item
10319 % \ifENGLISH Another example where you need to specify the
10320 % \Lkeyword{startnode}.
10321 % \fi
10322 % \ifGERMAN Ein weiteres Beispiel, bei dem \Lkeyword{startnode} vorgegeben
10323 % werden muss.
10324 % \fi
10325 %
10326 % \iffalse
10327 %<*ignore>
10328 % \fi
10329 \begin{LTXexample}[morekeywords={[21]startnode}, caption={caption}, label={ex:nalm}]
10330 \begin{pspicture}(2.1,3)
10331 \pnodes(0,0){A}(2,0){B}(0.3,3){C}(1.7,3){D}
10332 \psset{fiber=none, arrowscale=1.2, arrowinset=0}
10333 \optcoupler[fiber=l,
10334 addtoFiberIn1={angleA=0, ArrowInside=->},
10335 addtoFiberIn2={angleA=180, arrows=<-},
10336 abspos=0.5, compname=Cpl](A)(B)(C)(D)
10337 \optfiber[compname=Hnlf, abspos=1](C)(C|A)
10338 \optamp[abspos=2, compname=Amp](D|B)(D)
10339 \drawfiber{Cpl}{Hnlf}
10340 \drawfiber[startnode=1, ncurv=1.2]{Hnlf}{Amp}
10341 \drawfiber{Cpl}{Amp}
10342 \end{pspicture}
10343 \end{LTXexample}
10344 % \iffalse
10345 %</ignore>
10346 % \fi
10347 % \end{enumerate}
10348 %
10349 % \ifENGLISH\subsection{Fiber appearance}\fi
10350 % \ifGERMAN\subsection{Faseraussehen}\fi
10351 % \label{sec:fiberappearance}
10352 %
10353 % \begin{stylelist}
10354 % \styleitem{Fiber}
10355 % \ifENGLISH
10356 % The appearance of fibers is controlled with this style. The optional
10357 % argument of \Lcs{drawfiber} can be used as well, these options can overwrite
10358 % settings from the \Lstyle{Fiber} style.
10359 % \fi
10360 % \ifGERMAN
10361 % Das Aussehen der Fasern wird durch diesen Stil vorgegeben. Das optionale
10362 % Argument von \Lcs{drawfiber} kann ebenfalls verwendet werden, die
10363 % entsprechenden Parameter können die Einstellungen von \Lstyle{Fiber}
10364 % überschreiben.
10365 % \fi
10366 % \end{stylelist}
10367 % \begin{optionlist}
10368 % \valitem{addtoFiber}{list}
10369 % \addtostylemsg{Fiber}
10370 % \ifGERMAN Siehe z.B. \prettyref{ex:recirc-loop}.\fi
10371 % \ifENGLISH See for example \prettyref{ex:recirc-loop}.\fi
10372 %
10373 % \valitem{newFiber}{list}
10374 % \newstylemsg{Fiber}
10375 %
10376 % \valitem[curve]{fiberstyle}{string}
10377 % \ifGERMAN
10378 % Die Fasern werden in der Regel als \Lcs*{nccurve} gezeichnet, aber eine
10379 % beliebige andere Knotenverbindung \nxLcs{nc}\prm{string} des
10380 % \LPack{pst-node} Paketes kann ausgewählt werden, lesen Sie die entsprechende
10381 % Dokumentation\fnurl{http://mirror.ctan.org/help/Catalogue/entries/pst-node.html}
10382 % für mögliche Werte. In den folgenden Beispielen werden
10383 % Anwendungsmöglichkeiten gezeigt, eine weitere ist in
10384 % \prettyref{ex:transmission-loop} zu sehen.
10385 % \fi
10386 % \ifENGLISH
10387 % The fibers are usually drawn as \Lcs*{nccurve}, but any type of node
10388 % connection \nxLcs{nc}\prm{string} from \LPack{pst-node} can be selected with
10389 % this parameter, see the \LPack{pst-node}
10390 % documentation\fnurl{http://mirror.ctan.org/help/Catalogue/entries/pst-node.html}
10391 % for possible values. The following examples show possible use cases,
10392 % \prettyref{ex:transmission-loop} contains another typical use case.
10393 % \fi
10394 % \iffalse
10395 %<*ignore>
10396 % \fi
10397 \begin{LTXexample}[morekeywords={[21]fiberstyle}]
10398 \begin{pspicture}(3,3)
10399 \pnodes(1, 0.5){A}(2.5,0.5){B}(2.5,2){C}
10400 \psset{optboxsize=1 0.6, innerlabel}
10401 \optbox[position=start](A)(B){start}
10402 \optbox[position=end](B)(C){stop}
10403 \drawfiber[fiberstyle=diag, linearc=0.5]{1}{2}
10404 \end{pspicture}
10405 \end{LTXexample}
10406
10407 \begin{LTXexample}[morekeywords={[21]fiberstyle}, label={ex:recirc-loop}, caption={caption}]
10408 \begin{pspicture}(4,2.5)
10409 \pnodes(1,2.5){In}(3,2.5){Out}(0,2){A}(4,2){B}(4,0){C}(0,0){D}
10410 \optcoupler[fiber=t, addtoFiber={ArrowInside=->}, coupleralign=b](In)(A)(Out)(B)
10411 \psset{fiber=none}
10412 \optamp[position=0.35](C)(D)
10413 \optfiber[position=0.35](D)(C)
10414 \drawfiber{2}{3}
10415 \addtopsstyle{Fiber}{fiberstyle=bar, linearc=0.5, armA=1.5}
10416 \drawfiber[stopnode=1]{1}{2}
10417 \drawfiber[stopnode=1]{1}{3}
10418 \end{pspicture}
10419 \end{LTXexample}
10420 % \iffalse
10421 %</ignore>
10422 % \fi
10423 % \end{optionlist}
10424 %
10425 % \ifGERMAN\section{Elektrische Verbindungen}\fi
10426 % \ifENGLISH\section{Drawing wires}\fi
10427 % \label{sec:drawwire}
10428 %
10429 % \ifENGLISH
10430 % All available components can be connected with wire connections, the
10431 % wire components in \prettyref{chap:electrcomp} are connected
10432 % automatically. The \Lkeyword*{wire*} parameters are equivalent to
10433 % their \Lkeyword*{fiber*} counterparts, see their respective
10434 % documentation for details.
10435 % \fi
10436 % \ifGERMAN
10437 % Alle Komponenten können mit Drähten verbunden werden, die elektrischen
10438 % Komponenten in \prettyref{chap:electrcomp} werden automatisch
10439 % verbunden. Die \Lkeyword*{wire*}-Parameter sind äquivalent zu den
10440 % entsprechenden \Lkeyword*{fiber*}-Parametern, die detailliertere
10441 % Informationen enthalten.
10442 % \fi
10443 %
10444 % \begin{ltxsyntax}
10445 % \xLcs{drawwire}\cmditem{drawwire}[options]{obj$_1$}{obj$_2$}\ldots
10446 % \end{ltxsyntax}
10447 % \ifENGLISH
10448 % This command can take a variable number of arguments (minimum of
10449 % two) which can be either an ID, an ID range, a \Lkeyword{compname},
10450 % or a PSTricks nodes (see \prettyref{sec:accessobj}). To distinguish
10451 % between nodes and components, nodes must be either enclosed in
10452 % parenthesis within the brackets, or enclosed only in parenthesis:
10453 % \Lcs{drawwire}\opt{\{(node)\}\{comp\}}, or
10454 % \Lcs{drawwire}\opt{(node)\{comp\}}. If you specify more than two
10455 % arguments, you get connections $1\rightarrow 2$, $2\rightarrow 3$,
10456 % and so on.
10457 %
10458 % The automatic connections are drawn internally with
10459 % \Lcs{drawwire} commands from each reference node to the component.
10460 % \fi
10461 % \ifGERMAN
10462 % Dieses Makro akzeptiert eine variable Anzahl an Argumenten
10463 % (mindestens zwei), die entweder eine ID, ein ID-Intervall, ein
10464 % \Lkeyword{compname} oder ein PSTricks-Knoten sein können (siehe
10465 % \prettyref{sec:accessobj}. Um zwischen Knoten und Komponenten
10466 % unterscheiden zu können, müssen Knoten entweder in runde Klammern
10467 % innerhalb der geschweiften Klammern eingeschlossen werden oder
10468 % dürfen nur runde Klammern haben:
10469 % \Lcs{drawbeam}\opt{\{(node)\}\{comp\}}, oder
10470 % \Lcs{drawbeam}\opt{(node)\{comp\}}. Werden mehr als zwei Argumente
10471 % mitgegeben, werden die Verbindungen $1\rightarrow 2$, $2\rightarrow
10472 % 3$, usw. gezeichnet.
10473 %
10474 % Die automatischen Verbindungen werden intern als
10475 % \Lcs{drawwire} von den Referenzknoten zur Komponente gezeichnet.
10476 % \fi
10477 %
10478 % \begin{optionlist}
10479 % \choitem[relative]{wirealign}{rel,relative,center,abs,absolute}
10480 % \ifGERMAN Siehe \Lkeyword{fiberalign}.\fi
10481 % \ifENGLISH See \Lkeyword{fiberalign}.\fi
10482 %
10483 % \numitem[0]{wireangleA}
10484 % \ifGERMAN Siehe \Lkeyword{fiberangleA}.\fi
10485 % \ifENGLISH See \Lkeyword{fiberangleA}.\fi
10486 %
10487 % \numitem[0]{wireangleB}
10488 % \ifGERMAN Siehe \Lkeyword{fiberangleB}.\fi
10489 % \ifENGLISH See \Lkeyword{fiberangleB}.\fi
10490 %
10491 % \valitem[angle]{wirestyle}{string}
10492 % \ifGERMAN Siehe \Lkeyword{fiberstyle}, der Vorgabewert ist jedoch \opt{angle}.\fi
10493 % \ifENGLISH See \Lkeyword{fiberstyle}, the default value is \opt{angle}.\fi
10494 %
10495 % \valitem{addtoWire}{list}
10496 % \addtostylemsg{Wire}
10497 %
10498 % \valitem{newWire}{list}
10499 % \newstylemsg{Wire}
10500 % \end{optionlist}
10501 % \begin{stylelist}
10502 % \styleitem{Wire}
10503 % \ifENGLISH
10504 % The appearance of wires is controlled with this style, compare with
10505 % \prettyref{sec:fiberappearance}. The optional argument of
10506 % \Lcs{drawwire} can be used as well, these options can overwrite
10507 % settings from the \Lstyle{Wire} style.
10508 % \fi
10509 % \ifGERMAN
10510 % Das Aussehen der elektrischen Verbindungen wird durch diesen Stil
10511 % vorgegeben, analog zu \prettyref{sec:fiberappearance}. Das optionale
10512 % Argument von \Lcs{drawwire} kann ebenfalls verwendet werden, die
10513 % entsprechenden Parameter können die Einstellungen von \Lstyle{Wire}
10514 % überschreiben.
10515 % \fi
10516 % \end{stylelist}
10517 %
10518 % \ifENGLISH\section{Automatic fiber and wire connections}\fi
10519 % \ifGERMAN\section{Automatische Faser- und Drahtverbindungen}\fi
10520 % \label{sec:drawconn-auto}
10521 %
10522 % \ifENGLISH
10523 % All fiber components described in \prettyref{chap:fibercomp} are
10524 % connected automatically to their reference nodes with \Lcs{drawfiber},
10525 % their behaviour is descibed in \prettyref{sec:drawfiber-angles}. The
10526 % electrical components (\prettyref{chap:electrcomp}) are accordingly
10527 % connected with \Lcs{drawwire}. The connections can also be controlled
10528 % in a number of ways, without explicitely using these macros. The style
10529 % of each connection can be configure independently, see
10530 % \prettyref{sec:drawconn-auto-styles}.
10531 % \fi
10532 % \ifGERMAN
10533 % Alle Faserkomponenten, die in \prettyref{chap:fibercomp} beschrieben
10534 % werden, werden automatisch über \Lcs{drawfiber} mit ihren
10535 % Referenzknoten verbunden, das Verhalten ist in
10536 % \prettyref{sec:drawfiber-angles} beschrieben. Entsprechend dazu werden
10537 % die elektrischen Komponenten (\prettyref{chap:electrcomp}) mit
10538 % \Lcs{drawwire} mit Drähten verbunden. Die automatischen Verbindungen
10539 % können umfangreich kontrolliert werden, ohne diese Makros explizit zu
10540 % verwenden. Das Aussehen jeder Verbindung kann ebenfalls separat
10541 % konfiguriert werden, siehe \prettyref{sec:drawconn-auto-styles}.
10542 % \fi
10543 %
10544 % \begin{optionlist}
10545 % \choitem[all]{fiber}{[*+]none,all,i,o,\prm{refpoint}}
10546 % \ifENGLISH This parameter selects which fiber connections are drawn.
10547 % The value of this parameter can affect either only the fiber
10548 % components (if the value is prefixed with \opt{*}), only free-ray
10549 % and electrical components (prefixed with \opt{+}), or all component types
10550 % otherwise. Typical free-ray components which are often used with
10551 % fibers as well are \Lcomp{optbox} and \Lcomp{optdetector}. Please
10552 % note, that electrical components cannot be connected automatically
10553 % with fibers, in these cases you must use \Lcs{drawfiber}
10554 % explicitely.
10555 %
10556 % You can select to connect \opt{all} nodes, \opt{none}, or select distinct
10557 % connections to draw. Value \opt{i} (\opt{l} is equivalent) draws all input
10558 % fibers, \opt{o} (\opt{r} is equivalent) draws all output fibers. These
10559 % values are exclusive, that means \opt{io} does not select all fibers, but
10560 % none.
10561 %
10562 % Components which have more than one input or output fiber
10563 % (\hyperref[sec:coupler]{couplers} and \Lcomp{optcirculator}) allow also
10564 % values \opt{t} and \opt{b}, possibly in combination with \opt{i}, \opt{o},
10565 % \opt{r}, or \opt{l}.
10566 %
10567 % See the following examples for some variants.
10568 % \fi
10569 % \ifGERMAN
10570 % Dieser Parameter gibt an, welche Faserverbindungen gezeichnet
10571 % werden. Der Parameter kann nur die Faserkomponenten betreffen (falls
10572 % ein \opt{*} vorangestellt ist), nur die elektrischen und
10573 % Freistrahlkomponenten (\opt{+} wird vorangestellt), oder alle
10574 % Komponententypen. Typische Freistrahlkomponenten, die häufig als
10575 % Faserkomponenten verwendet werden, sind \Lcomp{optbox} und
10576 % \Lcomp{optdetector}. Beachten Sie, dass elektrische Komponenten
10577 % nicht automatisch mit Fasern verbunden werden können, Sie müssen
10578 % dann explizit \Lcs{drawfiber} verwenden.
10579 %
10580 % Es können alle Verbindungen gezeichnet werden (\opt{all}), keine
10581 % (\opt{none}), oder es können bestimmte ausgewählt werden. Die Werte \opt{i}
10582 % (\opt{l} ist äquivalent) zeichnet nur die Eingangsfasern, \opt{o}
10583 % (bzw. \opt{r}) alle ausgehenden Fasern. Diese Angaben sind ausschließend,
10584 % d.h. mit \opt{io} werden gar keine Verbindungen gezeichnet.
10585 %
10586 % Komponenten, die über mehr als einen Eingang oder Ausgang verfügen
10587 % (\hyperref[sec:coupler]{Koppler} und \Lcomp{optcirculator}) erlauben
10588 % weitergehende Auswahl mit \opt{t} und \opt{b}, möglicherweise in Verbindung
10589 % mit \opt{i}, \opt{o}, \opt{l} und \opt{r}.
10590 %
10591 % Die folgenden Beispiele zeigen einige Möglichkeiten.
10592 % \fi
10593 % \end{optionlist}
10594 %
10595 % \begin{enumerate}
10596 % \item
10597 % \ifENGLISH Enable all fiber connections all components.\fi
10598 % \ifGERMAN Zeichne alle Fasern für alle Komponenten.\fi
10599 %
10600 % \iffalse
10601 %<*ignore>
10602 % \fi
10603 \begin{LTXexample}[morekeywords={[21]{fiber}}]
10604 \begin{pspicture}(3,3)
10605 \psset{fiber}
10606 \optbox(0,2.5)(3,2.5)
10607 \optmzm(0,1.5)(3,1.5)
10608 \elecsynthesizer[position=0.5](0,0.5)(3,0.5)
10609 \end{pspicture}
10610 \end{LTXexample}
10611 % \iffalse
10612 %</ignore>
10613 % \fi
10614 %
10615 % \item
10616 % \ifENGLISH Draw only the input fiber of a fiber component (\Lcomp{optmzm}),
10617 % the other components are not affected.
10618 % \fi
10619 % \ifGERMAN Nur die Eingangsverbindung einer Faserkomponente (\Lcomp{optmzm})
10620 % wird gezeichnet, die anderen Komponenten bleiben unbeeinflusst.
10621 % \fi
10622 %
10623 % \iffalse
10624 %<*ignore>
10625 % \fi
10626 \begin{LTXexample}[morekeywords={[21]{fiber}}]
10627 \begin{pspicture}(3,3)
10628 \psset{fiber=*i}
10629 \optbox(0,2.5)(3,2.5)
10630 \optmzm(0,1.5)(3,1.5)
10631 \elecsynthesizer[position=0.5](1,0.5)(3,0.5)
10632 \end{pspicture}
10633 \end{LTXexample}
10634 % \iffalse
10635 %</ignore>
10636 % \fi
10637 %
10638 % \item
10639 % \ifENGLISH All connections of the fiber component are drawn, the
10640 % other components get only the output fiber.
10641 % \fi
10642 % \ifGERMAN Von der Faserkomponente werden alle Verbindungen
10643 % gezeichnet, die anderen Komponenten erhalten nur eine
10644 % Ausgangsverbindung.
10645 % \fi
10646 %
10647 % \iffalse
10648 %<*ignore>
10649 % \fi
10650 \begin{LTXexample}[morekeywords={[21]{fiber}}]
10651 \begin{pspicture}(3,3)
10652 \psset{fiber=+o}
10653 \optbox(0,2.5)(3,2.5)
10654 \optmzm(0,1.5)(3,1.5)
10655 \elecsynthesizer[position=0.5](1,0.5)(3,0.5)
10656 \end{pspicture}
10657 \end{LTXexample}
10658 % \iffalse
10659 %</ignore>
10660 % \fi
10661 %
10662 % \item
10663 % \ifENGLISH The values \opt{t} and \opt{b} affect only components which have
10664 % more than two fibers, i.e \Lcomp{optcirculator} and the couplers
10665 % (\prettyref{sec:coupler}).
10666 % \fi
10667 % \ifGERMAN
10668 % Die Werte \opt{t} und \opt{b} betreffen nur die Komponenten mit mehr als
10669 % zwei Verbindungen, also \Lcomp{optcirculator} und die Koppler
10670 % (\prettyref{sec:coupler}).
10671 % \fi
10672 %
10673 % \iffalse
10674 %<*ignore>
10675 % \fi
10676 \begin{LTXexample}[morekeywords={[21]{fiber}}]
10677 \begin{pspicture}(3,1)
10678 \optcoupler[fiber=t](0,1)(0,0)(3,1)(3,0)
10679 \end{pspicture}
10680 \end{LTXexample}
10681 \begin{LTXexample}[morekeywords={[21]{fiber}}]
10682 \begin{pspicture}(3,1)
10683 \wdmsplitter[fiber=br](0,0.5)(3,1)(3,0)
10684 \end{pspicture}
10685 \end{LTXexample}
10686 \begin{LTXexample}[morekeywords={[21]{fiber}}]
10687 \begin{pspicture}(3,1)
10688 \optcirculator[fiber=b](0,0.5)(3,1)(1,0)
10689 \end{pspicture}
10690 \end{LTXexample}
10691 % \iffalse
10692 %</ignore>
10693 % \fi
10694 % \end{enumerate}
10695 %
10696 % \begin{optionlist}
10697 % \choitem[all]{wire}{[*+]none,all,i,o,\prm{refpoint}}
10698 % \ifENGLISH
10699 % This parameter selects which wire connections are drawn. The value
10700 % of this parameter can affect either only the electrical components
10701 % (if the value is prefixed with \opt{*}), only free-ray and fiber
10702 % components (prefixed with \opt{+}), or all components otherwise.
10703 % \fi
10704 % \ifGERMAN
10705 % Dieser Parameter gibt an, welche elektrische Verbindungen gezeichnet
10706 % werden. Der Parameter kann nur die elektrischen Komponenten
10707 % betreffen (falls ein \opt{*} vorangestellt ist), nur die Faser- und
10708 % Freistrahlkomponenten (\opt{+} wird vorangestellt), oder alle
10709 % Komponenten.
10710 % \fi
10711 % \end{optionlist}
10712 % \begin{enumerate}
10713 % \item
10714 % \ifENGLISH Enable all wire connections for all components.\fi
10715 % \ifGERMAN Zeichne alle Drähte aller Komponenten.\fi
10716 %
10717 % \iffalse
10718 %<*ignore>
10719 % \fi
10720 \begin{LTXexample}[morekeywords={[21]{wire}}]
10721 \begin{pspicture}(3,3)
10722 \psset{wire}
10723 \optbox(0,2.5)(3,2.5)
10724 \optmzm(0,1.5)(3,1.5)
10725 \elecsynthesizer[position=0.5](0,0.5)(3,0.5)
10726 \end{pspicture}
10727 \end{LTXexample}
10728 % \iffalse
10729 %</ignore>
10730 % \fi
10731 %
10732 % \item
10733 % \ifENGLISH Draw only the input wire of an electrical component
10734 % (\Lcomp{elecsynthesizer}), the other components are not affected.
10735 % \fi
10736 % \ifGERMAN Nur die Eingangsverbindung einer elektrischen Komponente
10737 % (\Lcomp{elecsynthesizer}) wird gezeichnet, die anderen Komponenten
10738 % bleiben unbeeinflusst.
10739 % \fi
10740 %
10741 % \iffalse
10742 %<*ignore>
10743 % \fi
10744 \begin{LTXexample}[morekeywords={[21]{wire}}]
10745 \begin{pspicture}(3,3)
10746 \psset{wire=*i}
10747 \optbox(0,2.5)(3,2.5)
10748 \optmzm(0,1.5)(3,1.5)
10749 \elecsynthesizer[position=0.5](0,0.5)(3,0.5)
10750 \end{pspicture}
10751 \end{LTXexample}
10752 % \iffalse
10753 %</ignore>
10754 % \fi
10755 %
10756 % \item
10757 % \ifENGLISH Draw only the output wire of the free-ray and fiber
10758 % components, but all connections of the wire component.
10759 % \fi
10760 % \ifGERMAN Von der Freistrahl- und Faserkomponente wird nur die Ausgangsverbindung
10761 % gezeichnet, die elektrischen Komponente erhält jedoch alle Verbindungen.
10762 % \fi
10763 %
10764 % \iffalse
10765 %<*ignore>
10766 % \fi
10767 \begin{LTXexample}[morekeywords={[21]{wire}}]
10768 \begin{pspicture}(3,3)
10769 \psset{wire=+o}
10770 \optbox(0,2.5)(3,2.5)
10771 \optmzm(0,1.5)(3,1.5)
10772 \elecsynthesizer[position=0.5](0,0.5)(3,0.5)
10773 \end{pspicture}
10774 \end{LTXexample}
10775 % \iffalse
10776 %</ignore>
10777 % \fi
10778 %
10779 % \item
10780 % \ifENGLISH The values \opt{t} and \opt{b} affect only components which have
10781 % more than two connections, i.e \Lcomp{elecmixer} and \Lcomp{eleccoupler}.
10782 % \fi
10783 % \ifGERMAN
10784 % Die Werte \opt{t} und \opt{b} betreffen nur die Komponenten mit mehr als
10785 % zwei Verbindungen, also \Lcomp{elecmixer} und \Lcomp{eleccoupler}.
10786 % \fi
10787 %
10788 % \iffalse
10789 %<*ignore>
10790 % \fi
10791 \begin{LTXexample}[morekeywords={[21]{wire}}]
10792 \begin{pspicture}(3,1)
10793 \eleccoupler[wire=t](0,1)(0,0)(3,1)(3,0)
10794 \end{pspicture}
10795 \end{LTXexample}
10796 \begin{LTXexample}[morekeywords={[21]{wire}}]
10797 \begin{pspicture}(3,1.5)
10798 \elecmixer[wire=b](0,1)(3,1)(1,0)
10799 \end{pspicture}
10800 \end{LTXexample}
10801 % \iffalse
10802 %</ignore>
10803 % \fi
10804 % \end{enumerate}
10805 %
10806 %
10807 % \ifENGLISH\subsection{Appearance of automatic connections}\fi
10808 % \ifGERMAN\subsection{Aussehen der automatischen Verbindungen}\fi
10809 % \label{sec:drawconn-auto-styles}
10810 %
10811 % \begin{figure}\centering
10812 % \begin{pspicture}(0,-0.2)(12,4.4)
10813 % \rput[lt](0,4.4){%
10814 % \pstree[levelsep=1.5cm, treesep=0.6,
10815 % nodesep=4pt, arrows=<-,
10816 % arrowinset=0, arrowscale=1.5]{\poeTR{Fiber}}{%
10817 % \pstree{\poeTR{FiberIn}}{%
10818 % \poeTR{FiberIn1} \poeTR{FiberIn2}%
10819 % }%
10820 % \pstree{\poeTR{FiberOut}}{%
10821 % \poeTR{FiberOut1} \poeTR{FiberOut2}%
10822 % }%
10823 % }%
10824 % \rput[l](-1,0|T-0){\ifGERMAN Grundstil\fi\ifENGLISH parent style\fi}
10825 % \rput[l](-1,0|T-0-0){%
10826 % \ifGERMAN
10827 % \parbox{\widthof{ausgehende Fasern}}{%
10828 % \RaggedRight eingehende und ausgehende Fasern}%
10829 % \fi
10830 % \ifENGLISH
10831 % \parbox{\widthof{outgoing fibers}}{%
10832 % \RaggedRight incoming and outgoing fibers}%
10833 % \fi
10834 % }
10835 % \rput[t](! \psGetNodeCenter{T-0-0-0} \psGetNodeCenter{T-0-0-1}
10836 % T-0-0-0.x T-0-0-1.x add 2 div T-0-0-0.y 0.4 sub){%
10837 % \ifGERMAN
10838 % \parbox{\widthof{Obere(1) oder untere(2)}}{%
10839 % \RaggedRight Obere(1) oder untere(2) eingehende Faser.}%
10840 % \fi
10841 % \ifENGLISH
10842 % \parbox{\widthof{Upper(1) or lower(2)}}{%
10843 % \RaggedRight Upper(1) or lower(2) incoming fiber.}%
10844 % \fi
10845 % }
10846 % \rput[t](! \psGetNodeCenter{T-0-1-0} \psGetNodeCenter{T-0-1-1}
10847 % T-0-1-0.x T-0-1-1.x add 2 div T-0-1-0.y 0.4 sub){%
10848 % \ifGERMAN
10849 % \parbox{\widthof{Obere(1) oder untere(2)}}{%
10850 % \RaggedRight Obere(1) oder untere(2) ausgehende Faser.}%
10851 % \fi
10852 % \ifENGLISH
10853 % \parbox{\widthof{Upper(1) or lower(2)}}{%
10854 % \RaggedRight Upper(1) or lower(2) outgoing fiber.}%
10855 % \fi
10856 % }
10857 % }%
10858 % \end{pspicture}
10859 % \ifGERMAN
10860 % \caption{Vererbungsdiagramm der PS-Stile für die automatischen
10861 % Faserverbindungen. Sie sollten diese Stile mit \protect\Lcs*{addtopsstyle}
10862 % oder den entsprechenden \opt{addto}\prm{style} Parametern ändern um die
10863 % Vererbungslinie beizubehalten. Eine identisches Vererbungsdiagramm besteht
10864 % für die entsprechenden \opt{Wire\ldots} Stile.}%
10865 % \fi \ifENGLISH
10866 % \caption{Inheritance diagram for the psstyles used for the automatic fiber
10867 % connections. These styles should be changed with \protect\Lcs*{addtopsstyle}
10868 % or the respective \opt{addto}\prm{style} options to preserve the
10869 % inheritance. An identical inheritance tree applies to the respective
10870 % \opt{Wire\ldots} styles.}%
10871 % \fi
10872 % \label{fig:fiberstyles}
10873 % \end{figure}
10874 %
10875 % \ifENGLISH
10876 % The styles of all automatic fiber connections can be configured independently,
10877 % they are all derived from the basic \Lstyle{Fiber} style which is described in
10878 % \prettyref{sec:fiberappearance}.
10879 % \fi
10880 % \ifGERMAN
10881 % Die Stile aller automatischen Faserverbindungen können separat konfiguriert
10882 % werden, der zugrundeliegende Stil ist immer \Lstyle{Fiber}, der in
10883 % \prettyref{sec:fiberappearance} beschrieben ist.
10884 % \fi
10885 %
10886 % \begin{stylelist}
10887 % \item[\smash{%
10888 % \begin{tabular}[t]{@{}r@{}}%
10889 % \opt{FiberIn}\\
10890 % \opt{FiberIn1}\\
10891 % \opt{FiberIn2}\\
10892 % \opt{FiberOut}\\
10893 % \opt{FiberOut1}\\
10894 % \opt{FiberOut2}
10895 % \end{tabular}}%
10896 % ]%
10897 % \xLstyle{FiberIn}\label{sty:FiberIn}%
10898 % \xLstyle{FiberIn1}\label{sty:FiberIn1}%
10899 % \xLstyle{FiberIn2}\label{sty:FiberIn2}%
10900 % \xLstyle{FiberOut}\label{sty:FiberOut}%
10901 % \xLstyle{FiberOut1}\label{sty:FiberOut1}%
10902 % \xLstyle{FiberOut2}\label{sty:FiberOut2}%
10903 % \ifENGLISH
10904 % Style \Lstyle{FiberIn} applies to all input fibers, it inherits from
10905 % \Lstyle{Fiber}. If the component has more than one input fiber they use the
10906 % styles \Lstyle{FiberIn1} and \Lstyle{FiberIn2} which inherit from
10907 % \Lstyle{FiberIn}. All output fibers use the style \Lstyle{FiberOut}, in case of two output fibers they use the styles \Lstyle{FiberOut1} and \Lstyle{FiberOut2} which
10908 % inherit from \Lstyle{FiberOut}. See \prettyref{fig:fiberstyles} for an
10909 % inheritance diagram of the styles. You must have in mind, that this
10910 % inheritance is effective only if you use \Lcs*{addtopsstyle} to change the
10911 % styles (see also below).
10912 % \fi
10913 % \ifGERMAN
10914 % Der Stil \Lstyle{FiberIn} bezieht sich auf alle Eingangsfasern und erbt alle
10915 % Eigenschaften von \Lstyle{Fiber}. Hat eine Komponente zwei davon, so können
10916 % diese mit \Lstyle{FiberIn1} und \Lstyle{FiberIn2} angesprochen werden, die
10917 % alles von \Lstyle{FiberIn} übernehmen. Entsprechend bezieht sich
10918 % \Lstyle{FiberOut} auf alle Ausgangsfasern, falls es davon zwei gibt dann
10919 % können diese mit \Lstyle{FiberOut1} und \Lstyle{FiberOut2} geändert
10920 % werden. Siehe \prettyref{fig:fiberstyles} für ein Vererbungsdiagramm der
10921 % Faserstile. Beachten Sie, dass diese Vererbung nur erhalten bleibt, falls die
10922 % Stile nur mit \Lcs*{addtopsstyle} oder den entsprechenden
10923 % \opt{addto}\prm{style} Parametern verändert werden.
10924 % \fi
10925 % \item[\smash{%
10926 % \begin{tabular}[t]{@{}r@{}}%
10927 % \opt{WireIn}\\
10928 % \opt{WireIn1}\\
10929 % \opt{WireIn2}\\
10930 % \opt{WireOut}\\
10931 % \opt{WireOut1}\\
10932 % \opt{WireOut2}
10933 % \end{tabular}}%
10934 % ]%
10935 % \ifENGLISH
10936 % Style \Lstyle{WireIn} applies to all input wires, it inherits from
10937 % \Lstyle{Wire}. If the component has more than one input wire they use
10938 % the styles \Lstyle{WireIn1} and \Lstyle{WireIn2} which inherit from
10939 % \Lstyle{WireIn}. All output wires use the style \Lstyle{WireOut}, in
10940 % case of two output wires they use the styles \Lstyle{WireOut1} and
10941 % \Lstyle{WireOut2} which inherit from \Lstyle{WireOut}. See
10942 % \prettyref{fig:fiberstyles} for an inheritance diagram of the
10943 % styles. You must have in mind, that this inheritance is effective only
10944 % if you use \Lcs*{addtopsstyle} to change the styles (see also below).
10945 % \fi
10946 % \ifGERMAN
10947 % Der Stil \Lstyle{WireIn} bezieht sich auf alle eingehenden
10948 % elektrischen Verbindungen und erbt alle Eigenschaften von
10949 % \Lstyle{Wire}. Hat eine Komponente zwei davon, so können diese mit
10950 % \Lstyle{WireIn1} und \Lstyle{WireIn2} angesprochen werden, die alles
10951 % von \Lstyle{WireIn} übernehmen. Entsprechend bezieht sich
10952 % \Lstyle{WireOut} auf alle ausgehenden elektrischen Verbindungen, falls
10953 % es davon zwei gibt dann können diese mit \Lstyle{WireOut1} und
10954 % \Lstyle{WireOut2} geändert werden. Siehe \prettyref{fig:fiberstyles}
10955 % für ein Vererbungsdiagramm der Stile. Beachten Sie, dass diese
10956 % Vererbung nur erhalten bleibt, falls die Stile nur mit
10957 % \Lcs*{addtopsstyle} oder den entsprechenden \opt{addto}\prm{style}
10958 % Parametern verändert werden.
10959 % \fi
10960 % \xLstyle{WireIn}\label{sty:WireIn}%
10961 % \xLstyle{WireIn1}\label{sty:WireIn1}%
10962 % \xLstyle{WireIn2}\label{sty:WireIn2}%
10963 % \xLstyle{WireOut}\label{sty:WireOut}%
10964 % \xLstyle{WireOut1}\label{sty:WireOut1}%
10965 % \xLstyle{WireOut2}\label{sty:WireOut2}%
10966 %
10967 % \item[\smash{\begin{tabular}[t]{@{}r@{}}%
10968 % \opt{new}\prm{style}\\
10969 % \opt{addto}\prm{style}
10970 % \end{tabular}}]
10971 % \xLkeyword{newFiberIn}\xLkeyword{addtoFiberIn}%
10972 % \label{prm:newFiberIn}\label{prm:addtoFiberIn}
10973 % \xLkeyword{newFiberIn1}\xLkeyword{addtoFiberIn1}
10974 % \label{prm:newFiberIn1}\label{prm:addtoFiberIn1}
10975 % \xLkeyword{newFiberIn2}\xLkeyword{addtoFiberIn2}
10976 % \label{prm:newFiberIn2}\label{prm:addtoFiberIn2}
10977 % \xLkeyword{newFiberOut}\xLkeyword{addtoFiberOut}
10978 % \label{prm:newFiberOut}\label{prm:addtoFiberOut}
10979 % \xLkeyword{newFiberOut1}\xLkeyword{addtoFiberOut1}
10980 % \label{prm:newFiberOut1}\label{prm:addtoFiberOut1}
10981 % \xLkeyword{newFiberOut2}\xLkeyword{addtoFiberOut2}
10982 % \label{prm:newFiberOut2}\label{prm:addtoFiberOut2}
10983 % \xLkeyword{newWireIn}\xLkeyword{addtoWireIn}
10984 % \label{prm:newWireIn}\label{prm:addtoWireIn}
10985 % \xLkeyword{newWireIn1}\xLkeyword{addtoWireIn1}
10986 % \label{prm:newWireIn1}\label{prm:addtoWireIn1}
10987 % \xLkeyword{newWireIn2}\xLkeyword{addtoWireIn2}
10988 % \label{prm:newWireIn2}\label{prm:addtoWireIn2}
10989 % \xLkeyword{newWireOut}\xLkeyword{addtoWireOut}
10990 % \label{prm:newWireOut}\label{prm:addtoWireOut}
10991 % \xLkeyword{newWireOut1}\xLkeyword{addtoWireOut1}
10992 % \label{prm:newWireOut1}\label{prm:addtoWireOut1}
10993 % \xLkeyword{newWireOut2}\xLkeyword{addtoWireOut2}
10994 % \label{prm:newWireOut2}\label{prm:addtoWireOut2}
10995 % \ifENGLISH
10996 % For every style two appropriate keys \opt{new}\prm{style} and
10997 % \opt{addto}\prm{style} are provided which can be used to change the
10998 % styles for single objects. This can be used to define own components
10999 % (\prettyref{sec:customcomp}) with respectively changed connections
11000 % or to avoid explicit grouping.
11001 % \fi
11002 % \ifGERMAN
11003 % Für jeden Faserstil werden zwei Parameter \opt{new}\prm{style} und
11004 % \opt{addto}\prm{style} bereitgestellt, mit denen die Stile für
11005 % einzelne Komponenten verändert werden können. Damit können neuen
11006 % Komponenten mit anderen voreingestellten Verbindungen definiert
11007 % werden (\prettyref{sec:customcomp}), oder explizite Gruppierung kann
11008 % vermieden werden.
11009 % \fi
11010 %
11011 % \iffalse
11012 %<*ignore>
11013 % \fi
11014 \begin{LTXexample}[morekeywords={[21]{addtoFiberOut1}}]
11015 \begin{pspicture}(3,2)
11016 \newpsobject{tapcoupler}{wdmsplitter}{%
11017 coupleralign=b,
11018 addtoFiberOut1={arrows=->, arrowscale=1.2, arrowinset=0}}
11019 \tapcoupler(0,0.5)(3,1.5)(3,0.5){99/1}
11020 \end{pspicture}
11021 \end{LTXexample}
11022 % \iffalse
11023 %</ignore>
11024 % \fi
11025 % \end{stylelist}
11026 %
11027 %
11028 % \ifGERMAN\subsection{Bekannte Einschränkungen}\fi
11029 % \ifENGLISH\subsection{Known limitations}\fi
11030 %
11031 % \ifGERMAN Die Kombination von \Lkeyword{fiber} und \Lkeyword{wire}
11032 % erlaubt in der derzeitigen Implementierung (Version \fileversion)
11033 % nicht die beliebige Kombination aller Parametervarianten. Die meisten
11034 % funktionieren, aber das folgende Beispiel zeigt eine Variante, die
11035 % nicht korrekt funktioniert (der \Lcomp{elecsynthesizer} sollte eine
11036 % Eingangsfaser haben):
11037 % \fi
11038 % \ifENGLISH The combination of \Lkeyword{fiber} and \Lkeyword{wire}
11039 % does not allow any arbitrary combination of all parameter values in
11040 % the current implementation (version \fileversion). Most combinations
11041 % do work, but the following examples shows a variant, which does not
11042 % work correctly (the \Lcomp{elecsynthesizer} should have an input fiber):
11043 % \fi
11044 % \iffalse
11045 %<*ignore>
11046 % \fi
11047 \begin{LTXexample}[morekeywords={[21]{fiber, wire}}]
11048 \begin{pspicture}(3,3)
11049 \psset[optexp]{fiber=i, wire=+i}
11050 \fiberdelayline(0,2.5)(3,2.5)
11051 \optbox(0,1.5)(3,1.5)
11052 \elecsynthesizer[position=0.5](0,0.5)(3,0.5)
11053 \end{pspicture}
11054 \end{LTXexample}
11055 % \iffalse
11056 %</ignore>
11057 % \fi
11058 %
11059 % \ifGERMAN In solchen speziellen Fällen muss auf manuelle Verbindungen
11060 % zurückgegriffen werden.
11061 % \fi
11062 % \ifENGLISH In such special cases one must resort to manual
11063 % connections.
11064 % \fi
11065 %
11066 % \ifGERMAN\section{Zeichenebenen}\fi
11067 % \ifENGLISH\section{Layers}\fi
11068 % \label{sec:layers}
11069 %
11070 % \ifENGLISH
11071 % The necessary order of constructing a drawing is to define the components
11072 % first before you can connect them. This implies that all connections are drawn
11073 % on top of the components, which might be unwanted.
11074 %
11075 % To circumvent this, we provide the \Lenv{optexp} environment, inside which all
11076 % connections are drawn behind the components.
11077 % \fi
11078 % \ifGERMAN
11079 % Die Reihenfolge der Konstruktion einer Skizze ist die, dass zuerst die
11080 % Komponenten definiert werden müssen, bevor diese verbunden werden können. Das
11081 % beinhaltet aber, dass alle Verbindungen über die Komponenten gezeichnet
11082 % werden, was nicht erwünscht sein muss.
11083 %
11084 % Um das zu vermeiden, wird die \Lenv{optexp}-Umgebung bereitgestellt, innerhalb
11085 % derer alle Verbindungen hinter die Komponenten gelegt werden.
11086 % \fi
11087 %
11088 % \begin{ltxsyntax}
11089 % \envitem{optexp}
11090 % \end{ltxsyntax}
11091 %
11092 % \iffalse
11093 %<*ignore>
11094 % \fi
11095 \ifENGLISH
11096 \begin{LTXexample}
11097 \begin{pspicture}(3,4)
11098 \psset{beam, fillstyle=solid, fillcolor=black}
11099 \optbox(0,3.5)(3,3.5){no layers}
11100 \begin{optexp}
11101 \optbox(0,1.5)(3,1.5){with layers}
11102 \end{optexp}
11103 \end{pspicture}
11104 \end{LTXexample}
11105 \fi
11106 \ifGERMAN
11107 \begin{LTXexample}
11108 \begin{pspicture}(3,4)
11109 \psset{beam, fillstyle=solid, fillcolor=black}
11110 \optbox(0,3.5)(3,3.5){ohne Ebenen}
11111 \begin{optexp}
11112 \optbox(0,1.5)(3,1.5){mit Ebenen}
11113 \end{optexp}
11114 \end{pspicture}
11115 \end{LTXexample}
11116 \fi
11117 % \iffalse
11118 %</ignore>
11119 % \fi
11120 %
11121 % \ifENGLISH
11122 % Beware, that this is achieved by executing twice all code included in the
11123 % environment. This works fine for all \LPack{pst-optexp} commands which take
11124 % care of not drawing stuff twice but only in a changed order. All other text
11125 % and graphics are drawn twice which leads to ugly results because of altered
11126 % anti-aliasing in the viewer.
11127 %
11128 % To avoid this, you can either move all other code outside the environment, or
11129 % use the following two commands to define code parts which are executed only
11130 % once.
11131 % \fi
11132 % \ifGERMAN
11133 % Beachten Sie, dass das erreicht wird, indem der gesamte Code innerhalb der
11134 % Umgebung doppelt ausgeführt wird. Das funktioniert mit allen
11135 % \LPack{pst-optexp}-Makros, da diese sich intern darum kümmern nichts doppelt
11136 % sondern nur in geänderter Reihenfolge zu zeichnen. Alle anderen Zeichnungen
11137 % und Texte werden zweimal gezeichnet, was zu unschönen Ergebnissen aufgrund
11138 % von geändertem Antialiasing in dem Betrachter führen kann.
11139 %
11140 % Um zu verhindern, dass anderer Code doppelt ausgeführt wird, muss dieser
11141 % entweder außerhalb der \Lenv{optexp}-Umgebung definiert werden, oder durch
11142 % eins der beiden folgenden Makros auf eine Ebene beschränkt werden.
11143 % \fi
11144 %
11145 % \begin{ltxsyntax}
11146 % \cmditem{backlayer}{code}
11147 %
11148 % \ifENGLISH Execute \prm{code} only once in the first pass.\fi
11149 % \ifGERMAN Führe \prm{code} nur beim ersten Durchgang aus.\fi
11150 %
11151 % \cmditem{frontlayer}{code}
11152 %
11153 % \ifENGLISH Execute \prm{code} only once in the second pass.\fi
11154 % \ifGERMAN Führe \prm{code} nur beim zweiten Durchgang aus.\fi
11155 % \end{ltxsyntax}
11156 %
11157 % \ifENGLISH
11158 % In this example, the text is put on top of the frame although the text is
11159 % defined first:
11160 % \fi
11161 % \ifGERMAN In diesem Beispiel wird der Text über dem Rechteck angezeigt, obwohl
11162 % der Text zuerst definiert wird:
11163 % \fi
11164 %
11165 % \iffalse
11166 %<*ignore>
11167 % \fi
11168 \begin{LTXexample}
11169 \begin{pspicture}(3,1)
11170 \begin{optexp}
11171 \frontlayer{\rput(1.5,0.5){front}}
11172 \backlayer{\psframe*[linecolor=DOrange!50](1,0)(2,1)}
11173 \end{optexp}
11174 \end{pspicture}
11175 \end{LTXexample}
11176 % \iffalse
11177 %</ignore>
11178 % \fi
11179 %
11180 %
11181 % \ifGERMAN\chapter{Benutzerdefinierte Komponenten}\fi
11182 % \ifENGLISH\chapter{Custom components}\fi
11183 % \label{chap:custom}
11184 %
11185 % \ifGERMAN
11186 % Das \LPack{pst-optexp}-Paket stellt zwei Makros zur Verfügung um
11187 % eigene Komponenten zu zeichnen. Diese können z.B. aus Bildern oder
11188 % eigenen Zeichnungen bestehen.
11189 % \fi
11190 % \ifENGLISH
11191 % The \nxLPack{pst-optexp} package provides two commands which can use
11192 % anything as optical components. This includes e.g. external images or
11193 % your own drawings.
11194 % \fi
11195 %
11196 % \begin{ltxsyntax}
11197 % \xLdipole{optdipole}%
11198 % \compitem{optdipole}[options](in)(out){comp}{label}
11199 % \iffalse
11200 %<*ignore>
11201 % \fi
11202 \begin{LTXexample}
11203 \begin{pspicture}(3,3)
11204 \optdipole[labeloffset=1, beam](0,2)(3,1){%
11205 \rput(0,0){\rule{0.5cm}{1cm}}%
11206 }{label}
11207 \end{pspicture}
11208 \end{LTXexample}
11209 % \iffalse
11210 %</ignore>
11211 % \fi
11212 %
11213 % \xLdipole{opttripole}%
11214 % \compitem{opttripole}[options](in)(center)(out){comp}{label}
11215 %
11216 % \iffalse
11217 %<*ignore>
11218 % \fi
11219 \begin{LTXexample}
11220 \begin{pspicture}(3,3)
11221 \opttripole[beam](3,1.5)(1.5,2)(0,0){%
11222 \rput[b](0,0){text}%
11223 }{label}
11224 \end{pspicture}
11225 \end{LTXexample}
11226 % \iffalse
11227 %</ignore>
11228 % \fi
11229 % \end{ltxsyntax}
11230 %
11231 % \ifENGLISH
11232 % These components can also be connected with beams and fibers, but do
11233 % not provide full access to all options. \Lcomp{opttripole} defines a
11234 % single reflective interface, whereas \Lcomp{optdipole} can have two
11235 % transmittive interfaces:
11236 % \fi
11237 % \ifGERMAN
11238 % Diese Komponenten können sowohl mit Fasern als auch mit Strahlen
11239 % verbunden werden, können aber nicht deren volles Potential
11240 % ausschöpfen. \Lcomp{opttripole} definiert eine einzelne reflektive
11241 % Grenzfläche, \Lcomp{optdipole} kann zwei transmittive Grenzflächen haben:
11242 % \fi
11243 %
11244 % \begin{optionlist}
11245 % \optitem[0 0]{optdipolesize}{\prm{width}[ \prm{height}]}
11246 % \ifGERMAN
11247 % Hiermit können zwei transmittierende Grenzflächen für
11248 % \Lcomp{optdipole} definiert werden, die sich bei
11249 % $(\pm 0.5\text{\prm{width}}, 0)$ befinden.
11250 % \fi
11251 % \ifENGLISH
11252 % With this option you can define two transmittive interfaces for
11253 % \Lcomp{optdipole}, which are placed at $(\pm 0.5\text{\prm{width}}, 0)$.
11254 % \fi
11255 %
11256 % \iffalse
11257 %<*ignore>
11258 % \fi
11259 \begin{LTXexample}[morekeywords={[21]optdipolesize}]
11260 \begin{pspicture}(3,2)
11261 \pnodes(0,1){A}(3,1){B}
11262 \optdipole[optdipolesize=1, showifcnodes](A)(B){%
11263 \psframe[fillstyle=solid,fillcolor=black!30](-0.5,-0.5)(-0.3,0.5)
11264 \psframe(-0.5,-0.5)(0.5,0.5)}{label}
11265 \drawwidebeam[beamwidth=0.3, beaminside=false](A){}(B)
11266 \drawbeam[beaminside=false, linecolor=red](A){}(B)
11267 \end{pspicture}
11268 \end{LTXexample}
11269 % \iffalse
11270 %</ignore>
11271 % \fi
11272 %
11273 % \ifGERMAN Wenn zusätzlich eine Höhe \prm{height} ungleich Null
11274 % angegeben wird, so wird diese als Apertur für das Raytracing genommen
11275 % (siehe \Lkeyword{useNA}). Im folgenden Beispiel ist die Höhe gleich
11276 % \opt{0.2} und damit kleiner als der aufgeweitete Strahl der deshalb
11277 % anders als im vorangegangenen Beispiel nicht gezeichnet wird.
11278 % \fi
11279 % \ifENGLISH
11280 % If also a \prm{height} greater than zero is set, this is used as size
11281 % of the numerical aperture for ray tracing (see \Lkeyword{useNA}). In
11282 % the following example the height is set to \opt{0.2} which is smaller
11283 % than the wide beam which is not drawn, in contrast to the previous
11284 % example.
11285 % \fi
11286 %
11287 % \iffalse
11288 %<*ignore>
11289 % \fi
11290 \begin{LTXexample}[morekeywords={[21]optdipolesize}]
11291 \begin{pspicture}(3,2)
11292 \pnodes(0,1){A}(3,1){B}
11293 \optdipole[optdipolesize=1 0.2, showifcnodes](A)(B){%
11294 \psframe[fillstyle=solid,fillcolor=black!30](-0.5,-0.5)(-0.3,0.5)
11295 \psframe(-0.5,-0.5)(0.5,0.5)}{label}
11296 \drawwidebeam[beamwidth=0.3, beaminside=false](A){}(B)
11297 \drawbeam[beaminside=false, linecolor=red](A){}(B)
11298 \end{pspicture}
11299 \end{LTXexample}
11300 % \iffalse
11301 %</ignore>
11302 % \fi
11303 %
11304 % \ifGERMAN
11305 % Weitere Beispiel sind \prettyref{ex:lclv} und
11306 % \prettyref{ex:absspektr}.
11307 % \fi
11308 % \ifENGLISH
11309 % Further examples are \prettyref{ex:lclv} and
11310 % \prettyref{ex:absspektr}.
11311 % \fi
11312 %
11313 % \optitem{optdipolecomp}{\prm{macros}}
11314 % \ifGERMAN Mit dieser Option kann die Zeichnung einer Komponente
11315 % definiert werden, um dann mit \Lcs*{newpsobject} basierend auf
11316 % \Lcomp{optdipole} eine neuen Komponente zu definieren.
11317 % \fi
11318 % \ifENGLISH
11319 % This option defines the drawing of a component, and can be used to
11320 % define a new component based in \Lcomp{optdipole} with
11321 % \Lcs*{newpsobject}.
11322 % \fi
11323 %
11324 % \iffalse
11325 %<*ignore>
11326 % \fi
11327 \begin{LTXexample}[morekeywords={[21]optdipolecomp}]
11328 \begin{pspicture}(3,2)
11329 \def\phasemodulatorcomp{%
11330 \psframe(-1,-0.4)(1,0.4)
11331 \psframe[fillstyle=hlines](-1.3,-0.5)(1.3,-0.4)
11332 \psframe[fillstyle=hlines](-1.3,0.5)(1.3,0.4)}
11333 \newpsobject{phasemodulator}{optdipole}{optdipolesize=2 0.8, optdipolecomp={\phasemodulatorcomp}}
11334 \pnodes(0,1){A}(3,1){B}
11335 \phasemodulator(A)(B){LiNbO$_3$}
11336 \drawwidebeam[beamwidth=0.3, beaminside=false](A){}(B)
11337 \end{pspicture}
11338 \end{LTXexample}
11339 % \iffalse
11340 %</ignore>
11341 % \fi
11342 %
11343 % \optitem{opttripolecomp}{\prm{macros}}
11344 % \ifGERMAN Mit dieser Option kann die Zeichnung einer Komponente
11345 % definiert werden, um dann mit \Lcs*{newpsobject} basierend auf
11346 % \Lcomp{opttripole} eine neuen Komponente zu definieren.
11347 % \fi
11348 % \ifENGLISH
11349 % This option defines the drawing of a component, and can be used to
11350 % define a new component based in \Lcomp{opttripole} with
11351 % \Lcs*{newpsobject}.
11352 % \fi
11353 %
11354 % \iffalse
11355 %<*ignore>
11356 % \fi
11357 \begin{LTXexample}[morekeywords={[21]opttripolecomp}]
11358 \begin{pspicture}(3,2)
11359 \def\ampmodcomp{%
11360 \psframe*[linestyle=none](-0.5,0)(0.5,0.1)
11361 \psframe*[linestyle=none, linecolor=gray](-0.5,0.1)(0.5,0.2)}
11362 \newpsobject{ampmod}{opttripole}{opttripolecomp={\ampmodcomp}}
11363 \pnodes(0,0){A}(2,1.5){B}(3,0){C}
11364 \ampmod(A)(B)(C){AM}
11365 \drawwidebeam[beamwidth=0.3](A){}(C)
11366 \end{pspicture}
11367 \end{LTXexample}
11368 % \iffalse
11369 %</ignore>
11370 % \fi
11371 %
11372 % \end{optionlist}
11373 %
11374 % \ifGERMAN
11375 % \section{Benutzerdefinierte Version existierender Komponenten}
11376 % \fi
11377 % \ifENGLISH
11378 % \section{Customized versions of existing components}
11379 % \fi
11380 % \label{sec:customcomp}
11381 %
11382 % \ifENGLISH
11383 % You can define a customized version of an existing component using the
11384 % \Lcs*{newpsobject} macro. With this you can define a new component using
11385 % predefined objects with a set of options. These options serve only as default
11386 % values and can be overridden when calling the macro.
11387 % \fi
11388 % \ifGERMAN
11389 % Sie können eine benutzerdefinierte Version einer existierenden Komponente mit
11390 % \Lcs*{newpsobject} definieren, die z.B. andere Voreinstellungen oder und ein
11391 % anderes Aussehen hat.
11392 % \fi
11393 %
11394 % \iffalse
11395 %<*ignore>
11396 % \fi
11397 \begin{LTXexample}[morekeywords={[21]{newpsobject}}]
11398 \begin{pspicture}(3,1.7)
11399 \newpsobject{sbn}{crystal}{%
11400 voltage, lamp, %
11401 fillstyle=solid, fillcolor=yellow!90!black}
11402 \sbn[label=1.2 45, beam](0,1)(3,1){SBN:Ce}
11403 \end{pspicture}
11404 \end{LTXexample}
11405
11406 \begin{LTXexample}[morekeywords={[21]{newpsobject}}]
11407 \begin{pspicture}(3,1.7)
11408 \newpsobject{pumpcoupler}{wdmcoupler}{%
11409 coupleralign=top, addtoFiberIn2={ArrowInside=->, arrowscale=2}}
11410 \pumpcoupler[label=0.5 180](0,1)(0,0)(3,1){Pumpcoupler}
11411 \end{pspicture}
11412 \end{LTXexample}
11413 % \iffalse
11414 %</ignore>
11415 % \fi
11416 %
11417 % \iffalse
11418 %<*ignore>
11419 % \fi
11420 \begin{LTXexample}[pos=t, morekeywords={[21]{newpsobject}}, caption={caption}]
11421 \begin{pspicture}(10,2)
11422 \newpsobject{MOLensIn}{lens}{lens=0.5 0.5 0.5}
11423 \newpsobject{MOLensOut}{lens}{lens=1.5 1.5 1.5}
11424 \pnodes(0,1){A}(10,1){B}
11425 \MOLensIn[abspos=1](A)(B)\MOLensOut[abspos=2](A)(B)
11426 \optplate[plateheight=1.5](A)(B)
11427 \MOLensOut[abspos=8](A)(B)\MOLensIn[abspos=9](A)(B)
11428 \addtopsstyle{Beam}{n=1, fillstyle=solid, fillcolor=green, opacity=0.3}
11429 \psset{loadbeampoints}
11430 \drawwidebeam[beamwidth=0.2, stopinside](A){1}
11431 \drawwidebeam[beamdiv=-70]{1}{2}
11432 \drawwidebeam[stopinside]{2-4}
11433 \drawwidebeam[beamdiv=-70]{4}{5}
11434 \drawwidebeam{5}(B)
11435 \end{pspicture}
11436 \end{LTXexample}
11437 % \iffalse
11438 %</ignore>
11439 % \fi
11440 %
11441 % \ifENGLISH\section{Defining new objects}\fi
11442 % \ifGERMAN\section{Neue Objekte definieren}\fi
11443 % \label{sec:newobj}
11444 %
11445 % \ifENGLISH
11446 % \nxLPack{pst-optexp} provides some high-level macros to allow very convenient
11447 % definition of your own custom components.
11448 %
11449 % Note, that this part of the documentation is not complete. It roughly
11450 % describes the steps to define own components since version 3.0. Some parts may
11451 % be subject to change which are not backward compatible.
11452 % \fi
11453 % \ifGERMAN
11454 % \nxLPack{pst-optexp} stellt einige Benutzermakros zur Verfügung, mit denen
11455 % sehr bequem neue, eigene Komponenten definiert werden können.
11456 %
11457 % Beachten Sie, dass dieser Teil der Dokumentation nicht vollständig ist. Die
11458 % notwendigen Schritte zur Definition neuer Komponenten seit Version 3.0 werden
11459 % grob beschrieben, können sich aber noch ändern und sind nicht zwangsläufig
11460 % abwärtskompatibel.
11461 % \fi
11462 %
11463 % \begin{ltxsyntax}
11464 % \xLcs{newOptexpDipole}\cmditem{newOptexpDipole}[fixopt]{name}{dftopt}
11465 % \xLcs{newOptexpTripole}\cmditem{newOptexpTripole}[fixopt]{name}{dftopt}
11466 % \xLcs{newOptexpFiberDipole}\cmditem{newOptexpFiberDipole}[fixopt]{name}{dftopt}
11467 % \xLcs{newOptexpElecDipole}\cmditem{newOptexpElecDipole}[fixopt]{name}{dftopt}
11468 % \end{ltxsyntax}
11469 %
11470 % \ifENGLISH
11471 % These macros generate all organizing code for the component
11472 % \textbackslash\prm{name} which handle the positioning, label
11473 % placement, rotation and shifting, and the layering. In the simplest
11474 % case you only have to define the actual drawing of the component
11475 % outline.
11476 %
11477 % With the argument \prm{fixopt} you can specify argument settings which
11478 % will not be allowed to be overwritten, with \prm{dftopt} you can
11479 % specify a set of default arguments which may be overwritten with the
11480 % components optional argument. Both arguments \prm{fixopt} and
11481 % \prm{dftopt} are optional and may be omitted.
11482 %
11483 % The macros \Lcs{newOptexpFiberDipole} and \Lcs{newOptexpElecDipole}
11484 % only differ from the generic \Lcs{newOptexpDipole} in the connection
11485 % settings, like the components in \prettyref{chap:fibercomp} and
11486 % \prettyref{chap:electrcomp}, respectively.
11487 %
11488 % The actual process of creating a new component is split up in different parts,
11489 % depending on the component complexity and user requirements:
11490 % \begin{enumerate}
11491 % \item The component drawing (see \prettyref{sec:newobj-comp}), this is the
11492 % only required part.
11493 % \item Support for raytracing (optional)
11494 % \item Optional support for \Lkeyword{rotateref}, \Lkeyword{extnode} and
11495 % \Lkeyword{position}\opt{=start|end} (optional).
11496 % \end{enumerate}
11497 % \fi
11498 % \ifGERMAN
11499 % Diese Makros erzeugen den Code für die Positionierung, Drehung,
11500 % Beschriftung und die Ebenenverwaltung der neuen Komponente
11501 % \textbackslash\prm{name}. Im einfachsten Fall müssen Sie lediglich die
11502 % eigentliche Zeichnung der Komponente erstellen.
11503 %
11504 % Mit dem Argument \prm{fixopt} können Optionen voreingestellt werden,
11505 % die später über das optionale Argument der Komponente nicht verändert
11506 % werden können, \prm{dftopt} erlaubt Voreinstellungen zu machen, die
11507 % überschrieben werden können. Beide Argumente \prm{fixopt} und
11508 % \prm{dftopt} sind optional und können auch ganz weggelassen werden.
11509 %
11510 % Die Definition der neuen Komponenten kann in unterschiedliche Schritte
11511 % eingeteilt werden, je nach Komplexität und Anforderung des Benutzers:
11512 % \begin{enumerate}
11513 % \item Die Zeichnung (siehe \prettyref{sec:newobj-comp}), das ist der einzige
11514 % erforderliche Schritt.
11515 % \item Unterstützung von Raytracing (optional).
11516 % \item Unterstützung für \Lkeyword{rotateref}, \Lkeyword{extnode} und
11517 % \Lkeyword{position}\opt{=start|end} (optional).
11518 % \end{enumerate}
11519 % \fi
11520 %
11521 % \ifGERMAN Die folgenden Abschnitte enthalten die Entwicklung einer
11522 % einfachen Beispielkomponente \nxLcs{testcomp}.
11523 % \fi
11524 % \ifENGLISH The following section show the development of a simple
11525 % example component \nxLcs{testcomp}.
11526 % \fi
11527 %
11528 % \ifENGLISH\subsection{The component drawing}\fi
11529 % \ifGERMAN\subsection{Die Zeichnung der Komponente}\fi
11530 % \label{sec:newobj-comp}
11531 %
11532 % \ifENGLISH
11533 % You must define a macro which is called e.g. \cs{\ldots @comp}, which
11534 % contains the component drawings. See the following two examples for dipole and
11535 % tripole which show the orientation and position of the component coordinate
11536 % system.
11537 % \fi
11538 % \ifGERMAN Sie müssen ein Makro \cs{\ldots @comp} definieren, welches
11539 % die Zeichnung enthält. In den folgenden Beispielen sehen Sie die Ausrichtung
11540 % und Position des Koordinatensystems für einen Zweipol und einen Dreipol.
11541 % \fi
11542 %
11543 % \iffalse
11544 %<*ignore>
11545 % \fi
11546 \begin{LTXexample}
11547 \begin{pspicture}(3.5,2.6)
11548 \newOptexpDipole{mydipole}
11549 \makeatletter
11550 \def\mydipole@comp{%
11551 \psaxes[arrows=->](0,0)(0,-1.1)(1.3,1.3)[$x$,90][$y$,0]
11552 }%
11553 \makeatother
11554 \mydipole(0,1)(3.5,1){\color{spot}label}
11555 \drawbeam(0,1){}(3.5,1)
11556 \end{pspicture}
11557 \end{LTXexample}
11558 \begin{LTXexample}
11559 \begin{pspicture}(3.5,3.7)
11560 \newOptexpTripole{mytripole}{labelangle=-60}
11561 \makeatletter
11562 \def\mytripole@comp{%
11563 \psaxes[arrows=->](0,0)(-1.1,0)(1.3,1.3)[$x$,90][$y$,0]
11564 }%
11565 \makeatother
11566 \mytripole(0,1)(2,1.7)(3,0){\color{spot}label}
11567 \drawbeam(0,1){}(3,0)
11568 \end{pspicture}
11569 \end{LTXexample}
11570 % \iffalse
11571 %</ignore>
11572 % \fi
11573 %
11574 % \ifGERMAN Unsere Beispielkomponente und ihre Zeichnung wird also wie
11575 % folgt definiert:
11576 % \fi
11577 % \ifENGLISH Our example component and its drawing are defined as
11578 % follows:
11579 % \fi
11580 % \iffalse
11581 %<*ignore>
11582 % \fi
11583 \begin{LTXexample}[morekeywords={[21]{testcomp@comp}}]
11584 \begin{pspicture}(3, 2)
11585 \newOptexpDipole{testcomp}
11586 \makeatletter
11587 \def\testcomp@comp{%
11588 \psframe[fillstyle=solid, fillcolor=black!30](-0.5,-0.5)(-0.3,0.5)
11589 \psframe(-0.5,-0.5)(0.5,0.5)
11590 }%
11591 \makeatother
11592 \begin{optexp}
11593 \testcomp[position=0.6, labelalign=l](0,1)(3,1){label}
11594 \drawbeam[beaminside=false](0,1){}(3,1)
11595 \end{optexp}
11596 \end{pspicture}
11597 \end{LTXexample}
11598 % \iffalse
11599 %</ignore>
11600 % \fi
11601 %
11602 % \ifGERMAN Die Positionierung der Komponente und der Beschriftung,
11603 % sowie die Ebenen funktioniert also schon.
11604 % \fi
11605 % \ifENGLISH The positioning of the component and the label, and the
11606 % layering is working already.
11607 % \fi
11608 %
11609 % \ifENGLISH\subsection{Support for raytracing}\fi
11610 % \ifGERMAN\subsection{Unterstützung von Raytracing}\fi
11611 %
11612 % \ifGERMAN Damit die Komponente Raytracing unterstützt, müssen die
11613 % Grenzflächen mit ihren Eigenschaften definiert werden. Die Definition
11614 % der Ebenen werden in einenm Makro \nxLcs{\prm{name}@nodes} definiert,
11615 % damit sie auch in den unterschiedlichen Ebenen verfügbar sind.
11616 %
11617 % Die Definition der Ebenen erfolgt dann über das Makro \Lcs*{newOptexpComp}
11618 %
11619 % \begin{lstlisting}[gobble=2]
11620 % \def\testcomp@nodes{%
11621 % \newOptexpComp{%
11622 % % Definition der ersten Grenzflaeche (GF)
11623 % {-0.5 0} % x- und y-Koordinate der GF-Mitte
11624 % {0 1} % Richtungsvektor der GF (x und y)
11625 % -0.5 0.5 % Grenzen fuer die NA, gesehen als Faktoren des GF-Vektor
11626 % trans % Verhalten der GF, kann 'trans', 'refl' oder 'abs' sein
11627 % {PlainIfc} % Art der GF
11628 % % Dasselbe fuer die rechte GF, nur die Mitte ist anders
11629 % {0.5 0} {0 1} -0.5 0.5 trans {PlainIfc}
11630 % \POE@key@n % Brechungsindex, koennte jede Zahl sein
11631 % }%
11632 % }%
11633 % \end{lstlisting}
11634 % \fi
11635 % \ifENGLISH To add support for ray-tracing, you must define the
11636 % interface with their properties. The definitions are nested in a macro
11637 % \nxLcs{\prm{name}@nodes} in order to be accessible in the different
11638 % layers.
11639 %
11640 % The definitions are done with the macro \Lcs*{newOptexpComp}
11641 %
11642 % \begin{lstlisting}[gobble=2]
11643 % \def\testcomp@nodes{%
11644 % \newOptexpComp{%
11645 % % definition of the first interface (IF)
11646 % {-0.5 0} % x- and y-coordinate of the IF center
11647 % {0 1} % direction vector of the IF (x and y)
11648 % -0.5 0.5 % limits use for the NA as factor for IF vector.
11649 % trans % behavior of the IF, can be 'trans', 'refl' or 'abs'
11650 % {PlainIfc} % type of IF
11651 % % the same for the right IF, only the center is different
11652 % {0.5 0} {0 1} -0.5 0.5 trans {PlainIfc}
11653 % \POE@key@n % refractive index, could be any number
11654 % }%
11655 % }%
11656 % \end{lstlisting}
11657 % \fi
11658 %
11659 % \ifENGLISH So, in condensed form, our example component looks like
11660 % this, and the beam is not drawn inside the component any more:
11661 % \fi
11662 % \ifGERMAN Unsere Komponent sieht also folgendermaßen aus, und der
11663 % Strahl verläuft nicht mehr innerhalb der Komponente:
11664 % \fi
11665 % \iffalse
11666 %<*ignore>
11667 % \fi
11668 \begin{LTXexample}[morekeywords={[21]{testcomp@comp, testcomp@nodes}}]
11669 \begin{pspicture}(3, 2)
11670 \newOptexpDipole{testcomp}
11671 \makeatletter
11672 \def\testcomp@comp{%
11673 \psframe[fillstyle=solid, fillcolor=black!30](-0.5,-0.5)(-0.3,0.5)
11674 \psframe(-0.5,-0.5)(0.5,0.5)}%
11675 \def\testcomp@nodes{%
11676 \newOptexpComp{%
11677 {-0.5 0} {0 1} -0.5 0.5 trans {PlainIfc}
11678 {0.5 0} {0 1} -0.5 0.5 trans {PlainIfc} \POE@key@n }}%
11679 \makeatother
11680 \begin{optexp}
11681 \testcomp[position=0.6, labelalign=l](0,1)(3,1){label}
11682 \drawbeam[beaminside=false](0,1){}(3,1)
11683 \end{optexp}
11684 \end{pspicture}
11685 \end{LTXexample}
11686 % \iffalse
11687 %</ignore>
11688 % \fi
11689 %
11690 % \ifENGLISH\subsection{Support for external nodes}\fi
11691 % \ifGERMAN\subsection{Unterstützung von externen Knoten}\fi
11692 %
11693 % \ifGERMAN Damit nun, als letzter Schritt auch externe Knoten mit \Lkeyword{extnode},
11694 % Positionierung an den Anfang oder das Ende mit
11695 % \Lkeyword{position}\opt{=start|end}, oder auch das Setzen eines
11696 % anderen Drehpunktes mit \Lkeyword{rotateref} möglich wird, müssen die
11697 % externen Dimensionen der Komponente bekannt gemacht werden. Dafür muss
11698 % ein weiteres Makro mit dem Name \nxLcs{\prm{name}@ref} definiert
11699 % werden, in dem auf Postscript-Ebene die Werte \opt{@@x} (halbe
11700 % Breite), \opt{@@y} (halbe Höhe), und optional auch \opt{@@x0} und
11701 % \opt{@@y0} (Verschiebung der Mitte) definiert werden müssen.
11702 % \fi
11703 % \ifENGLISH To enable, as last step, support for external nodes with
11704 % \Lkeyword{extnode}, positioning at the start or end with
11705 % \Lkeyword{position}\opt{=start|end}, and setting the rotation
11706 % reference node with \Lkeyword{rotateref}, we need to provide the
11707 % external dimensions of the component. For this we need to define a new
11708 % macro \nxLcs{\prm{name}@ref}, which defines at Postscript level the
11709 % values \opt{@@x} (half width), \opt{@@y} (half height), and optionally
11710 % \opt{@@x0} and \opt{@@y0} (offset of the center).
11711 % \fi
11712 % \begin{lstlisting}[gobble=2]
11713 % \def\testcomp@ref{%
11714 % \POE@setref{ /@@x 0.5 def /@@y 0.5 def }%
11715 % }%
11716 % \end{lstlisting}
11717 %
11718 % \ifGERMAN Der Code für unsere Beispielkomponente \nxLcs{testcomp} ist
11719 % damit vollständig, und sieht folgendermaßen aus:
11720 % \fi
11721 % \ifENGLISH This completes the code for our example component
11722 % \nxLcs{testcomp}, which now looks like this:
11723 % \fi
11724 % \iffalse
11725 %<*ignore>
11726 % \fi
11727 \begin{LTXexample}[morekeywords={[21]{testcomp@comp, testcomp@nodes, testcomp@ref}}]
11728 \begin{pspicture}(3, 2)
11729 \newOptexpDipole{testcomp}
11730 \makeatletter
11731 \def\testcomp@comp{%
11732 \psframe[fillstyle=solid, fillcolor=black!30](-0.5,-0.5)(-0.3,0.5)
11733 \psframe(-0.5,-0.5)(0.5,0.5)}%
11734 \def\testcomp@nodes{%
11735 \newOptexpComp{%
11736 {-0.5 0} {0 1} -0.5 0.5 trans {PlainIfc}
11737 {0.5 0} {0 1} -0.5 0.5 trans {PlainIfc} \POE@key@n }}%
11738 \def\testcomp@ref{%
11739 \POE@setref{ /@@x 0.5 def /@@y 0.5 def }}%
11740 \makeatother
11741 \begin{optexp}
11742 \testcomp[position=0.6, labelalign=l, extnode=tl](0,1)(3,1){label}
11743 \drawbeam[beaminside=false](0,1){}(3,1)
11744 \psdot(\oenodeExt{})
11745 \end{optexp}
11746 \end{pspicture}
11747 \end{LTXexample}
11748 % \iffalse
11749 %</ignore>
11750 % \fi
11751 %
11752 % \ifGERMAN
11753 % \subsection{Beispiele für benutzerdefinierte Komponenten}
11754 % \fi
11755 % \ifENGLISH
11756 % \subsection{Examples of custom components}
11757 % \fi
11758 %
11759 % \iffalse
11760 %<*ignore>
11761 % \fi
11762 \begin{LTXexample}
11763 \begin{pspicture}(6,4)
11764 \newOptexpTripole{raindrop}
11765 \makeatletter
11766 \def\raindrop@nodes{%
11767 \newOptexpComp{%
11768 {0 -2} { 0 2 } -2 2 trans {CurvedIfc}
11769 {0 2} {0 -2} -2 2 refl {CurvedIfc}
11770 {0 -2} { 0 2 } -2 2 trans {CurvedIfc}
11771 \POE@key@n }}%
11772 \def\raindrop@comp{\pscircle(0,0){2}}%
11773 \raindrop(0,4)(4,2)(0,0)
11774 \psset{beamalign=abs, arrows=->, arrowscale=2}
11775 \drawbeam[linecolor=red](0,3){}(0,1)
11776 \drawbeam[n=*n*1.05, linecolor=blue](0,3){}(0,1)
11777 \end{pspicture}
11778 \end{LTXexample}
11779 % \iffalse
11780 %</ignore>
11781 % \fi
11782 %
11783 % \ifGERMAN
11784 % \chapter{Beispiele}
11785 % \fi
11786 % \ifENGLISH
11787 % \chapter{Examples}
11788 % \fi
11789 % \label{sec:examples}
11790 % \iffalse
11791 %<*ignore>
11792 % \fi
11793 \enlargethispage{1.5cm}
11794 \begin{LTXexample}[pos=t, caption={caption}]
11795 \begin{pspicture}(0.1,0.4)(10,4.5)
11796 \psset[optexp]{lens=1 1 0.7, loadbeampoints}
11797 \pnodes(2,4){L}([Xnodesep=4]L){M}([Xnodesep=1.5]M){IRSpec}([offset=-2.5]M){OSA}
11798 \begin{optexp}
11799 \optbox[position=start, innerlabel, optboxwidth=1.8](L)(M){fs laser}
11800 \lens[abspos=1](L)(M)
11801 \optbox[abspos=1.85, optboxsize=0.7 0.15, fillstyle=solid, fillcolor=black](L)(M){sample}
11802 \lens[abspos=2.7](L)(M)
11803 \mirror[labelangle=45](L)(M)(OSA){flip mirror}
11804 \optbox[position=end, optboxsize=3.2 1, innerlabel, compshift=-0.2](M)(IRSpec){IR spectrometer}
11805 \lens[abspos=1](M)(OSA)
11806 \optplane[angle=90]([offset=-1.5]M)
11807 \optfiber[fiberloopradius=0.2, label=1, newFiber={linewidth=1.5\pslinewidth}]([offset=-1.5]M)(OSA){MM fiber}
11808 \optbox[position=end, innerlabel, optboxwidth=1.1](M)(OSA){OSA}
11809 \newpsstyle{Beam}{linestyle=none, fillcolor=red, fillstyle=solid, raytrace=false}
11810 \drawwidebeam[beamwidth=0.2, stopinside]{1-2}
11811 \drawwidebeam[beamdiv=-25]{2-3}
11812 \drawwidebeam[loadbeampoints=false, beamdiv=25]{3-4}
11813 \drawwidebeam[startinside]{4-5}
11814 \drawwidebeam[savebeampoints=false, beamalign=abs]{5-6}
11815 \drawwidebeam[stopinside]{5}{7}
11816 \drawwidebeam[beamdiv=-25]{7-8}
11817 \end{optexp}
11818 \end{pspicture}
11819 \end{LTXexample}
11820
11821 \begin{LTXexample}[pos=t, caption={caption}]
11822 \begin{pspicture}(-4.2,-1)(3,3)
11823 \pnodes(-2,0){LOut}(0,0){Grat}(4;45){Out}(2.5;70){Mvar}
11824 \newpsstyle{Beam}{linewidth=2\pslinewidth, linecolor=red!90!black}
11825 \begin{optexp}
11826 \optbox[optboxwidth=2.2, labeloffset=0, position=start](LOut)(Grat){diode laser}
11827 \mirror[variable, label=0.5](Grat)(Mvar)(Grat){M$_\mathrm{var}$}
11828 \optretplate[position=0.3](LOut)(Grat){$\nicefrac{\lambda}{4}$}
11829 \optgrating(LOut)(Grat)(Out){grating}
11830 \drawbeam[arrows=->]{1}{3}{4}(Out)
11831 \drawbeam{2}{4}
11832 \end{optexp}
11833 \rput[l](-3,2){Littman setup}
11834 \end{pspicture}
11835 \end{LTXexample}
11836 \bigskip
11837
11838 \begin{LTXexample}[pos=t, caption={caption}]
11839 \begin{pspicture}(8.5,1.9)
11840 \pnodes(1.4,1.3){Laser}(7.6,1.3){Diode}
11841 \optbox[position=start, labeloffset=0](Laser)(Diode){Laser}%
11842 \optbox[abspos=4, optboxsize=1 0.6, labeloffset=1, n=3,
11843 compname=PC, angle=-10, rotateref=l](Laser)(Diode){Photonic Crystal}
11844 \optdetector[dettype=diode](\oenodeOut{PC})(Diode|\oenodeOut{PC}){PD}
11845 \nodexn{(\oenodeIn{PC}) + (2;170)}{Angle1}
11846 \psline[linestyle=dashed](\oenodeIn{PC})(Angle1)
11847 \psarc{<->}(\oenodeIn{PC}){1.3}{330}{30}
11848 \psarc[arcsep=1pt]{<->}(\oenodeIn{PC}){2}{170}{180}
11849 \uput{2.1}[175](\oenodeIn{PC}){\small $\varphi$}
11850 \drawbeam{-}
11851 \end{pspicture}
11852 \end{LTXexample}
11853 \bigskip
11854
11855 \enlargethispage{2cm}
11856 \begin{LTXexample}[pos=t, caption={caption}]
11857 \begin{pspicture}(10.4,1.7)
11858 \pnodes(1.2,1){Start}(9.2,1){CCD}
11859 \begin{optexp}
11860 \optbox[position=end, label=0, optboxwidth=1.2](CCD)(Start){Laser}
11861 \optbox[position=end, label=0, optboxwidth=1.2](Start)(CCD){CCD}
11862 \polarization[poltype=perp,abspos=0.5](Start)(CCD)
11863 \optretplate[abspos=1](Start)(CCD){$\nicefrac{\lambda}{2}$}
11864 \lens[lens=0.4 0.4 0.5,abspos=2](Start)(CCD){$L_1$}
11865 \lens[abspos=4](Start)(CCD){$L_2$}
11866 \optplate[abspos=6, platelinewidth=3\pslinewidth](Start)(CCD){SLM}
11867 \optplate[abspos=6.5, labelangle=180](Start)(CCD){PF}
11868 \polarization[abspos=6.7](Start)(CCD)
11869 \lens[abspos=7](Start)(CCD){$L_3$}
11870 \drawbeam[linewidth=2\pslinewidth]{1}{2}
11871 \end{optexp}
11872 \end{pspicture}
11873 \end{LTXexample}
11874 \medskip
11875
11876 \begin{LTXexample}[pos=t, caption={caption}]
11877 \begin{pspicture}(10.4,1.7)
11878 \pnodes(1.2,1){Start}(9.2,1){CCD}
11879 \begin{optexp}
11880 \optbox[position=start, label=0, optboxwidth=1.2](Start)(CCD){Laser}
11881 \polarization[poltype=perp,abspos=0.5](Start)(CCD)
11882 \optretplate[abspos=1](Start)(CCD){$\nicefrac{\lambda}{2}$}
11883 \lens[lens=0.4 0.4 0.5,abspos=2](Start)(CCD){$L_1$}
11884 \pinhole[phwidth=0.05, abspos=2.35, labelangle=180](Start)(CCD){iris}
11885 \lens[abspos=4](Start)(CCD){$L_2$}
11886 \optplate[abspos=6,platelinewidth=3\pslinewidth](Start)(CCD){SLM}
11887 \optplate[abspos=6.5,labelangle=180](Start)(CCD){PF}
11888 \lens[abspos=7](Start)(CCD){$L_3$}
11889 \optbox[position=end, label=0, optboxwidth=1.2](Start)(CCD){CCD}
11890 \polarization[abspos=6.7, polsize=0.8](Start)(CCD)
11891 \addtopsstyle{Beam}{fillstyle=solid, fillcolor=green!40!white, loadbeampoints}
11892 \drawwidebeam[beamwidth=0.1, stopinside]{1}{4}
11893 \drawwidebeam[beamdiv=-20]{4}{6}
11894 \drawwidebeam[stopinside]{6-9}
11895 \drawwidebeam[beamdiv=-30]{9-10}
11896 \end{optexp}
11897 \end{pspicture}
11898 \end{LTXexample}
11899 \bigskip
11900
11901 \enlargethispage{2.5cm}
11902 \begingroup
11903 \captionsetup[lstlisting]{format=poecaption}
11904 \begin{LTXexample}[pos=t, caption={\ifGERMAN Angepasst von \fi\ifENGLISH Adapted from \fi\arxivurl{1112.5270v2}}]
11905 \begin{pspicture}(0.3,0.4)(5.5,8.3)
11906 \pnodes(2,7){L}(2,5.8){Pbs}([Xnodesep=1]Pbs){Blk1}(2,2.3){Bs}
11907 \pnodes([Xnodesep=-1]Bs){Blk2}([Xnodesep=3.5]Bs){Out}(2,1.3){Slm}
11908 \begin{optexp}
11909 \optbox[position=end, innerlabel, optboxsize=1.2 0.6](Pbs)(L){Laser}
11910 \psset{labelalign=r, mirrortype=extended}
11911 \newpsstyle{ExtendedMirror}{fillstyle=solid, fillcolor=black}
11912 \optretplate[position=0.4](L)(Pbs){HWP}
11913 \beamsplitter[labelangle=-90](L)(Pbs)(Blk1){PBS}
11914 \mirror[label=. -90 c](Pbs)(Blk1)(Pbs){B}
11915 \lens[abspos=0.8, lens=0.7 0.7 0.7, n=2](Pbs)(Bs){MO}
11916 \pinhole[phwidth=0.15, abspos=1.2](Pbs)(Bs){PH}
11917 \lens[abspos=2.6, lensradius=1.4](Pbs)(Bs){L}
11918 \psset{labelalign=c}
11919 \beamsplitter[labelangle=-135](Pbs)(Bs)(Blk2){BS}
11920 \mirror[labeloffset=0.4](Bs)(Blk2)(Bs){B}
11921 \lens[abspos=1, lensradius=1.4](Bs)(Out){L}
11922 \lens[abspos=2.8, lens=0.7 0.7 0.7, n=2](Bs)(Out){L}
11923 \opttripole(Bs)(Slm)(Bs){%
11924 \psframe[fillstyle=solid,fillcolor=gray!50](-0.3,0)(0.3,0.2)
11925 \psline(-0.3,0.1)(-0.5,0.1)(-0.5,0.5)(0.5,0.5)(0.5,0.1)(0.3,0.1)}{SLM}
11926 \addtopsstyle{Beam}{linestyle=none, fillstyle=solid, fillcolor=green!70!black}
11927 \drawwidebeam[beamwidth=0.1]{1-4}
11928 \drawwidebeam[beamwidth=0.1, beaminsidefirst, beaminsidelast]{3}{5-8}
11929 \psset{savebeampoints=false, loadbeampoints}
11930 \drawwidebeam{8-11}(Out)\drawwidebeam[beaminsidefirst]{8}{12}
11931 \end{optexp}
11932 \end{pspicture}
11933 \end{LTXexample}
11934 \endgroup
11935
11936 \begin{LTXexample}[pos=t, caption={caption}]
11937 \begin{pspicture}(6.4,3.2)
11938 \addtopsstyle{Fiber}{linecolor=red}\psset{fiber=none}
11939 \pnodes(2.3,2.3){Lin}([Xnodesep=4.5]Lin){Det}
11940 \optbox[label=0.2, position=start, compname=L, extnode=b](Lin)(Det){%
11941 \psGauss[yunit=0.03,sigma=0.03]{-0.5}{0.5}}
11942 \optbox[label=0, compname=EAM, extnode=b, abspos=1.5](Lin)(Det){EAM}
11943 \optfiber[labeloffset=0.3, abspos=3.2](Lin)(Det){fibre}
11944 \optdetector(Lin)(Det){OSA}
11945 \pnode([Xnodesep=-0.5,offset=-1]\oenodeExt{L}){Osc}
11946 \elecsynthesizer[wire=none](Osc)(\oenodeExt{EAM}|Osc){10\,GHz}
11947 \optarrowcomp[arrowcompsize=0.8 0.6, arrowscale=1.5](Osc)(\oenodeExt{EAM}|Osc){$\tau$}
11948 \drawfiber{1-4}
11949 \addtopsstyle{Wire}{arrows=->, arrowinset=0, arrowscale=1.5}
11950 \drawwire{5}{6}\psset[optexp]{wireangleB=90}
11951 \drawwire{6}(\oenodeExt{EAM})\drawwire{5}(\oenodeExt{L})
11952 \end{pspicture}
11953 \end{LTXexample}
11954
11955 \enlargethispage{1cm}
11956 \begin{LTXexample}[pos=t, caption={caption}]
11957 \begin{pspicture}(0.2,0.6)(8.2,3.5)
11958 \pnodes(2,3){Laser}(2,1){PwMeter}(6,3){CplTop}(6,1){CplBot}
11959 \psset{arrowscale=1.5, arrowinset=0}
11960 \optbox[position=start, optboxsize=1.8 1, labeloffset=0](Laser)([Xnodesep=0.1]Laser){%
11961 \begin{tabular}{@{}c@{}}Nd:YAG\\[-0.4ex]cw laser\end{tabular}}
11962 \optcoupler[addtoFiberIn1={ArrowInside=->}, addtoFiberIn2={ArrowInside=-<},
11963 labeloffset=0.4](Laser)(PwMeter)(CplTop)(CplBot){WDM}
11964 \optfiber[addtoFiberOut={ncurv=1, angleB=0}, addtoFiberIn={ncurv=1, angleA=0},
11965 compshift=-1, label=0.2 . l](CplBot)(CplTop){fiber}
11966 \optdetector[dettype=diode]([Xnodesep=0.1]PwMeter)(PwMeter){power meter}
11967 \end{pspicture}
11968 \end{LTXexample}
11969
11970 \begin{LTXexample}[pos=t, caption={caption}]
11971 \begin{pspicture}(0.9,0.9)(10.4,6.1)
11972 \psset{arrowscale=1.5, arrowinset=0}
11973 \pnodes(2,5){PC1in}(4,5){PC1out}(6,5){PC2in}(8,5){PC2out}(2,2){CplSig}
11974 \pnodes(5,2){CplIn}(2,1){CplOut}(10,4.5){Pump}(8,2){PumpSig}
11975 \optisolator[compshift=0.8, addtoFiberIn={angleA=180},
11976 addtoFiberOut={angleB=180}, label=0.5 . l]%
11977 (CplSig)(PC1in){isolator}
11978 \polcontrol[addtoFiberIn={arrows=|-}](PC1in)(PC1out)
11979 \optfiberpolarizer[labeloffset=0.6](PC1out)(PC2in){polarizer}
11980 \polcontrol[addtoFiberOut={arrows=-|}](PC2in)(PC2out)
11981 \wdmsplitter[labeloffset=0.3, coupleralign=bottom, addtoFiberIn={arrows=|-},
11982 addtoFiberOut1={arrows=->}, addtoFiberOut2={arrows=-|}]%
11983 (CplIn)(CplOut)(CplSig){95/5}
11984 \wdmcoupler[addtoFiberIn1={ArrowInside=->}, addtoFiberIn2={angleA=0},
11985 addtoFiberOut={angleB=0,arrows=-|}, ncurv=0.9,
11986 coupleralign=bottom, compshift=0.8](Pump)(PC2out)(PumpSig){pump}
11987 \optbox[position=start, innerlabel, optboxwidth=1.6](Pump)([offset=-0.1]Pump){980~nm}
11988 \optfiber[fiberloops=2, labeloffset=0.4](CplIn)(PumpSig){Er$^+$-doped}
11989 \end{pspicture}
11990 \end{LTXexample}
11991 \bigskip
11992
11993 \begin{LTXexample}[pos=t, caption={caption}]
11994 \begin{pspicture}(1,1.2)(6.2,5)
11995 \pnodes(1,4){SigIn}(3,4){BS}(3,5){LO}(5,4){Det1}(3,2){Det2}
11996 \begin{optexp}
11997 \optplane[compname=LO, angle=90](LO)
11998 \beamsplitter[compname=BS](SigIn)(BS)(Det2)
11999 \lens[abspos=0.5, compname=L2, n=2.1](Det2)(BS){$L_2$}
12000 \lens[abspos=0.5, compname=L1, n=2.1](Det1)(BS){$L_1$}
12001 \psset[optexp]{extnodealign=rel, extnode=r}
12002 \optdetector[compname=Det1](BS)(Det1){PD1}
12003 \optdetector[compname=Det2](BS)(Det2){PD2}
12004 \addtopsstyle{Beam}{beamwidth=0.2, fillstyle=solid,
12005 fillcolor=green, opacity=0.2}
12006 \drawwidebeam(SigIn){BS}{L2}{Det2}
12007 \drawwidebeam[beaminsidefirst]{BS}{L1}{Det1}
12008 \newpsstyle{Beam}{linecolor=red, linestyle=dashed, linewidth=1.5\pslinewidth}
12009 \drawbeam{LO}{BS}{L1}{Det1}
12010 \drawbeam[beaminsidefirst]{BS}{L2}{Det2}
12011 \end{optexp}
12012 \cnodeput[framesep=5pt]([Xnodesep=0.5, offset=-0.5]\oenodeExt{Det1}|\oenodeExt{Det2}){M}{\rule{2.5mm}{1pt}}
12013 \psset{arrows=<-, arrowscale=1.5, arrowinset=0}
12014 \nccurve[angleA=90]{M}{\oenodeExt{Det1}}
12015 \nccurve[angleA=180, angleB=-90]{M}{\oenodeExt{Det2}}
12016 \end{pspicture}
12017 \end{LTXexample}
12018 \bigskip
12019
12020 \begin{LTXexample}[pos=t, caption={caption}, label={ex:lclv}]
12021 \begin{pspicture}(-0.2,0)(9,5)
12022 \psset[optexp]{lens=1.2 0 1.2, n=1.72}
12023 \addtopsstyle{Beam}{fillstyle=solid, fillcolor=green, opacity=0.3}
12024 \pnodes(2.4,1){BS1}([offset=3]BS1){M1}([Xnodesep=5.5]M1){PP}(PP|BS1){BS2}
12025 \begin{optexp}
12026 \optbox[label=0, position=start, optboxwidth=1.6]([Xnodesep=-1]BS1)(BS1){Nd:YAG}
12027 \beamsplitter[compname=BS](BS2)(BS1)(M1){BS}
12028 \optdipole[position=0.2, compname=LCLV, optdipolesize=0.28 1](BS1)(BS2){%
12029 \psframe[fillstyle=solid,fillcolor=black,dimen=outer](-0.14,-0.5)(-0.02,0.5)
12030 \psframe[fillstyle=solid,fillcolor=gray!50,dimen=outer](-0.02,-0.5)(0.14,0.5)
12031 }{LCLV}
12032 \optretplate(BS1)(M1){P}
12033 \mirror(BS1)(M1)(PP){M}
12034 \lens[position=0.2](M1)(PP){L}
12035 \pinhole(M1)(PP)
12036 \lens[position=0.2](PP)(M1){L}
12037 \pentaprism(M1)(PP)(BS2){PP}
12038 \beamsplitter(PP)(BS2)(BS1){BS}
12039 \doveprism[compname=Dove, position=0.27, n=2.3](BS2)(BS1){Dove}
12040 \lens[n=2.5](BS2)(BS1){L}
12041 \drawwidebeam[beamwidth=0.3]{1-3}
12042 \drawwidebeam[loadbeampoints]{3}{2}{4-}{3}
12043 \end{optexp}
12044 \end{pspicture}
12045 \end{LTXexample}
12046
12047 \enlargethispage{1cm}
12048 \begin{LTXexample}[pos=t, caption={caption}]
12049 \begin{pspicture}(0,-0.2)(8.6,5.6)
12050 \pnodes(1.5,5){Laser}(4,5){PBS}(6.5,5){PBS2}(6.5,5.7){piezo}(4,2){BSFwd}
12051 \pnodes(6.5,2){BSBwd}(2,2){BS4f}(2,0.5){M4f3}(8,2){M4f1}(8,0.5){M4f2}(1,2){CCD}
12052 \psset{mirrorwidth=0.6, plateheight=0.7, outerheight=0.7, labeloffset=0.7, labelstyle=\scriptsize, lens=1.2 1.2 0.8, bssize=0.5}
12053 \optbox[position=start, optboxsize=1.5 0.7, innerlabel]%
12054 (Laser)(PBS){\parbox{1.5cm}{\centering Nd:YAG\\ 532\,nm}}
12055 \lens[lensheight=0.5, position=0.2](Laser)(PBS){MO}
12056 \pinhole[position=0.3,labelangle=180](Laser)(PBS){PH}
12057 \lens[position=0.5](Laser)(PBS){L}
12058 \optretplate[position=0.8](Laser)(PBS){$\nicefrac{\lambda}{2}$}
12059 \beamsplitter(Laser)(PBS)(BSFwd){PBS}
12060 \optretplate[position=0.4](PBS)(BSFwd){$\nicefrac{\lambda}{2}$}
12061 \polarization(PBS)(BSFwd)\polarization(PBS2)(BSBwd)
12062 \lens[position=0.8](PBS)(BSFwd){L}
12063 \optretplate(PBS)(PBS2){$\nicefrac{\lambda}{2}$}
12064 \beamsplitter(PBS)(PBS2)(piezo){PBS}
12065 \optretplate[abspos=0.5](PBS2)(piezo){$\nicefrac{\lambda}{4}$}
12066 \mirror[mirrortype=piezo,labelangle=90](PBS2)(piezo)(PBS2){PZ}
12067 \lens[position=0.8,labelangle=180](PBS2)(BSBwd){L}
12068 \crystal[crystalsize=1 0.5, voltage, lamp, fillstyle=solid, fillcolor=yellow!90!black, labeloffset=0.8](BSFwd)(BSBwd){SBN:Ce}
12069 \beamsplitter(PBS)(BSFwd)(BSBwd){BS}
12070 \beamsplitter[labelangle=-90](PBS2)(BSBwd)(BSFwd){BS}
12071 \mirror(BSBwd)(M4f1)(M4f2){M}\mirror(M4f1)(M4f2)(M4f3){M}
12072 \lens[labelangle=180](M4f2)(M4f3){L}\mirror(M4f2)(M4f3)(BS4f){M}
12073 \beamsplitter(M4f3)(BS4f)(CCD){BS}
12074 \optbox[position=end, label=0, optboxwidth=1](BS4f)(CCD){CCD}
12075 \lens[abspos=0.7](BS4f)(BSFwd){L}\lens[abspos=0.7](BSBwd)(M4f1){L}
12076 \addtopsstyle{Beam}{linewidth=2\pslinewidth, linejoin=2}
12077 \drawbeam{1-6}{11-14}{13}{12}{15}{18}{16}{17}{25}{23}{24}
12078 \drawbeam[beaminsidefirst]{6}{7}{10}{17}{16}{18}{26}{19-24}
12079 \end{pspicture}
12080 \end{LTXexample}
12081
12082 \bgroup
12083 \psset{unit=0.9}
12084 \begin{LTXexample}[pos=t, caption={caption}, label=ex:transmission-loop]
12085 \begin{pspicture}(13,5.5)
12086 \psset{optboxwidth=1, labelstyle=\footnotesize, fiber=none}
12087 \pnodes(1,5){LD}([Xnodesep=5.5]LD){CPLin1}([offset=-2]CPLin1){CPLin2}
12088 \pnodes([Xnodesep=2.5]CPLin1){CPLout1}([Xnodesep=2.5]CPLin2){CPLout2}
12089 \pnode([Xnodesep=3]CPLout1){RX}
12090 \optbox[position=start, label=0](LD)(CPLin1){LD}
12091 \optmzm[abspos=0.8](LD)(CPLin1){MZM}
12092 \optamp[abspos=2](LD)(CPLin1){EDFA}
12093 \optfilter[abspos=3](LD)(CPLin1){BPF}
12094 \optswitch[abspos=4](LD)(CPLin1){SW}
12095 \polcontrol[abspos=5, fiber=out](LD)(CPLin1)
12096 \drawfiber{1-6}
12097 \optcoupler[couplertype=none, fiber](CPLin1)(CPLin2)(CPLout1)(CPLout2)
12098 \optamp[abspos=0.8, fiber=in](CPLout1)(RX){EDFA}
12099 \optfilter[abspos=2](CPLout1)(RX){BPF}
12100 \optbox[position=end](CPLout1)(RX){RX}
12101 \drawfiber{8-10}
12102 \pnodes([Xnodesep=-0.5]LD|CPLin2){TL}(RX|TL){TR}([offset=-2.5]TR){BR}(TL|BR){BL}
12103 \optamp[fiber=i](CPLout2)(TR){EDFA}
12104 \optfiber[label=0.3 . t, position=0.85](BL)(BR){SSMF 89.8~km}
12105 \drawfiber[fiberstyle=angle, arm=1.2, linearc=0.5, startnode=N]{11}{12}
12106 \optamp[position=0.3](BR)(BL){EDFA}
12107 \optfilter[position=0.55, labelangle=180](BL)(BR){BPF}
12108 \optfiber[fiberloops=1, label=0.3 . t, position=0.35](BL)(BR){DCF 16.2~km}
12109 \optamp[position=0.85](BR)(BL){EDFA}
12110 \optfilter[position=0.2](TL)(CPLin2){BPF}
12111 \optswitch(TL)(CPLin2){SW}
12112 \polcontrol[position=0.8, fiber=out](TL)(CPLin2)
12113 \drawfiber{12-16}\drawfiber{17-19}
12114 \drawfiber[fiberstyle=angle, arm=0.5, linearc=0.5, stopnode=1]{16}{17}
12115 \end{pspicture}
12116 \end{LTXexample}
12117 \egroup
12118
12119 \enlargethispage{1cm}
12120 \begin{LTXexample}[pos=t, caption={caption}]
12121 \begin{pspicture}(12, 4)
12122 \psset{labeloffset=0.3, fiber=none}
12123 \pnodes(1.6,2){In}(12, 2){Ref}
12124 \optplate[linestyle=dashed, plateheight=3, position=1, compname=RefPlane](In)(Ref)
12125 \addtopsstyle{Beam}{linestyle=none, beamdiv=20, beaminside=false, fillstyle=solid, fillcolor=red, opacity=0.3}
12126 \multido{\i=1+1, \ii=165+10}{4}{%
12127 \rput(Ref){\pnode(6;\ii){A\i}}
12128 \optbox[optboxsize=0.5 0.3, position=end, compname=Box\i, extnode=l](Ref)(A\i)
12129 \lens[lens=0 -0.6 0.6, abspos=0.5, compname=L\i](A\i)(Ref)
12130 \lens[lens=1.2 1.2 0.8, abspos=1.1, n=1.65, compname=LC\i](A\i)(Ref)
12131 \drawwidebeam{Box\i}{L\i}{LC\i}{RefPlane}
12132 }%
12133 \optcoupler[abspos=1](In)(In)(Ref)(Ref)
12134 \wdmsplitter[abspos=2.5, compshift=1](In)(Ref)(Ref)
12135 \wdmsplitter[abspos=2.5, compshift=-1](In)(Ref)(Ref)
12136 \optbox[compshift=-1, position=start, label=0](In)(Ref){Laser1}
12137 \optbox[compshift=1, position=start, label=0](In)(Ref){Laser2}
12138 \drawfiber{17}{14}{15}{Box1}\drawfiber{15}{Box2}
12139 \drawfiber{18}{14}{16}{Box3}\drawfiber{16}{Box4}
12140 \end{pspicture}
12141 \end{LTXexample}
12142 \medskip
12143
12144 \begin{LTXexample}[caption={caption}]
12145 \begin{pspicture}(0.5,0)(2.2,4)
12146 \pnodes(0,1){A}(1,1){BS}(2,1){G}(1,4){B}
12147 \beamsplitter(G)(BS)(B) \optgrating(BS)(G)(BS)
12148 \lens[lens=2 2 1.5, compshift=0.1, n=2.25](BS)(B)
12149 \pinhole[phwidth=0.05, innerheight=0.05, position=0.8, compshift=0.18](BS)(B)
12150 \optplane[angle=90](B)
12151 \addtopsstyle{Beam}{linestyle=none, beamwidth=0.2, fillstyle=solid}
12152 \drawwidebeam[fillcolor=red!25!white](A){1-2}{1}{3-5}
12153 \drawwidebeam[fillcolor=red!50!white, beamangle=-5]{2}{1}{3-5}
12154 \end{pspicture}
12155 \end{LTXexample}
12156
12157 \begingroup
12158 \captionsetup[lstlisting]{format=poecaption}
12159 \begin{LTXexample}[pos=t, caption={\ifGERMAN Angepasst von \fi\ifENGLISH Adapted from \fi\href{http://de.wikipedia.org/w/index.php?title=Datei:Czerny-turner.png}{Wikipedia}}, label={ex:czerny-turner}]
12160 \begin{pspicture}(0,-1)(8.5,4)
12161 \psframe[fillstyle=solid,fillcolor=gray!90,linestyle=none](0,-1)(8.5,4)
12162 \addtopsstyle{OptComp}{linecolor=white}
12163 \newpsstyle{Beam}{ArrowInside=->, linejoin=2, arrowscale=1.3, arrowinset=0}
12164 \addtopsstyle{ExtendedMirror}{hatchcolor=white, hatchsep=0.5\pslinewidth}
12165 \pnodes(0,3){A}(8,3){B}(3,1.5){C}(8,0){D}(0,0){E}%
12166 \psset{linewidth=1.5\pslinewidth, mirrorradius=13, mirrorwidth=1.5, gratingwidth=1.3, mirrortype=extended, phwidth=0.1, outerheight=1.5}%
12167 \begin{optexp}
12168 \pinhole[position=0.2](A)(B)%
12169 \mirror(A)(B)(C)
12170 \optgrating[reverse, angle=15, variable](B)(C)(D)
12171 \mirror(C)(D)(E)
12172 \pinhole[position=0.8](D)(E)
12173 \drawwidebeam[ArrowInsidePos=0.3, beamwidth=0.2, linecolor=white, beamdiv=-7.15](A){1-3}
12174 \psset{loadbeampoints, savebeampoints=false}%
12175 \drawwidebeam[ArrowInsidePos=0.6, beamangle=3, linecolor=blue!60!white]{3-5}(E)
12176 \drawwidebeam[ArrowInsidePos=0.7, linecolor=green!60!white, arrows=->, ArrowInsideMinLength=2]{3-5}(E)
12177 \drawwidebeam[ArrowInsidePos=0.8, beamangle=-3, linecolor=red!60!white]{3-5}(E)
12178 \end{optexp}
12179 \end{pspicture}
12180 \end{LTXexample}
12181 \endgroup
12182
12183 \begin{LTXexample}[pos=t, caption={caption}]
12184 \begin{pspicture}(0,0.7)(9.4,3.3)
12185 \psset[optexp]{couplertype=rectangle, fiber=none, detsize=0.5 0.6}
12186 \multido{\i=1+1}{3}{%
12187 \optbox[optboxsize=1.5 0.6, innerlabel,position=start](1.5,\i)(7,\i){Laser \i}
12188 \wdmsplitter[position=0.2](1.5,\i)(7,\i)(7,\i)
12189 \wdmcoupler[position=0.8](1.5,\i)(1.5,\i)(7,\i)
12190 \optdetector[label=0.4 90 l](1.5,\i)(7,\i){Detector \i}
12191 }%
12192 \drawfiber[linecolor=blue, startnode=N]{1}{2}{7}
12193 \drawfiber[linecolor=blue]{2}{11}
12194 \drawfiber[linecolor=green, stopnode=1]{5}{6}{11}
12195 \drawfiber[linecolor=green, stopnode=2]{6}{3}
12196 \drawfiber[linecolor=red]{9}{10}{3}
12197 \drawfiber[linecolor=red, startnode=2]{10}{7}
12198 \drawfiber[linecolor=cyan]{11}{12}
12199 \drawfiber[linecolor=magenta]{7}{8}
12200 \drawfiber[linecolor=yellow]{3}{4}
12201 \end{pspicture}
12202 \end{LTXexample}
12203
12204 \begin{LTXexample}[caption={caption}]
12205 \psset{unit=1.5}
12206 \begin{pspicture}(0,1)(2.2,4.2)
12207 \pnodes(0,2){In}(1,2){G}(1,4){M1}(2,2){M2}(1,1){S}
12208 \mirror[mirrortype=semitrans](In)(G)(M1)
12209 \optbox[optboxwidth=0.15, angle=45, style=SemitransMirror](G)(M1)
12210 \mirror[mirrortype=extended](G)(M1)(G)
12211 \mirror[mirrortype=extended](G)(M2)(G)
12212 \optplate[position=end](G)(S)
12213 \newpsstyle{Beam}{linecolor=red, ArrowInside=->, ArrowInsidePos=0.4, arrowscale=1.5}
12214 \drawbeam(In){1}{4}{1}{5}
12215 \drawbeam(In){1-3}{2}{1}{5}
12216 \end{pspicture}
12217 \end{LTXexample}
12218
12219 \begingroup
12220 \captionsetup[lstlisting]{format=poecaption}
12221 \begin{LTXexample}[vsep=10mm, pos=t, caption={\ifENGLISH Adapted from \fi\ifGERMAN Angepasst von \fi\href{http://www.semibyte.de/wp/graphicslibrary/gl-physics/versuchsaufbauten-f-praktikum/}{semibyte.de}}]
12222 \begin{pspicture}(13.6,2.6)
12223 \psset[optexp]{labeloffset=1, mirrorwidth=0.5, optboxwidth=2}
12224 \pnodes(2,1){Laser}(12,2){Film}(Film|Laser){Ref}
12225 \begin{optexp}
12226 \optbox[position=start](Laser)(Ref){HeNe-Laser}
12227 \pinhole[abspos=0.8](Laser)(Ref){Blende}
12228 \optbox[abspos=2.5](Laser)(Ref){Raumfilter}
12229 \lens[fillstyle=solid, fillcolor={[rgb]{0.87,0.91,0.93}}](Laser)(Ref){Linse}
12230 \mirror[label=1 30]([offset=0.2]Laser)([offset=0.2]Ref)(Film){%
12231 \begin{tabular}{c}Spiegel\\(fest)\end{tabular}}
12232 \opttripole[label=0.4](Ref)(Film)(Ref){%
12233 \psframe(0.5,1\pslinewidth)(-0.5,5\pslinewidth)
12234 \psline[linewidth=2\pslinewidth](0.5,0)(-0.5,0)
12235 }{Film}
12236 \newpsstyle{Beam}{linewidth=2\pslinewidth, linecolor=red!90!black, beamalign=absolute}
12237 \drawbeam{1-4}
12238 \drawbeam[beampos=0.2]{4-6}
12239 \mirror[variable, label=0.8 -30]([offset=-0.2]Laser)([offset=-0.2, Xnodesep=-0.7]Ref)(Film){var. Spiegel}
12240 \drawbeam[beampos=-0.2]{4}{7}{6}
12241 \end{optexp}
12242 \end{pspicture}
12243 \end{LTXexample}
12244 \endgroup
12245
12246 \begin{LTXexample}[pos=t, caption={caption}]
12247 \begin{pspicture}(0,0.2)(6.6,3.1)
12248 \psset{mirrorwidth=0.6, useNA=false, beaminsidefirst}
12249 \pnodes(0,2){In}(1,2){BS}(1,0.5){M1}(2,1){M2}(6,1.5){Det}
12250 \mirror[mirrortype=semitrans, n=1](In)(BS)(M1)
12251 \mirror[label=0.6 180 . absolute, compname=M](BS)(M1)(M2|M1)
12252 \mirror(M1)(M2|M1)(M2)
12253 \mirror(M2|M1)(M2)([Xnodesep=1]M2)
12254 \optbox[optboxsize=2 1, abspos=2, label=0, allowbeaminside=false](BS)([offset=0.5]Det){%
12255 \parbox{1.6\psxunit}{spectral\\filter ($\Omega$)}}
12256 \lens[lens=4 4 2, n=3.3]([Xnodesep=-3]Det)(Det)
12257 \optbox[optboxsize=0.2 0.6, n=1, label=-1.2](\oenodeOut{6})(Det){%
12258 \begin{tabular}{@{}c@{}}nonlinear\\ crystal\end{tabular}}
12259 \optplate[linestyle=none](\oenodeOut{7})(Det)
12260 \optdetector[detsize=0.6 0.6, fillstyle=solid, fillcolor=blue](\oenodeOut{6})(Det)
12261 \newpsstyle{Beam}{linewidth=1.5\pslinewidth}
12262 \drawbeam[linecolor=blue]{7-9}
12263 \addtopsstyle{Beam}{linecolor=red}
12264 \drawbeam(In){1-4}{6-8}
12265 \drawbeam{1}{5-8}
12266 \rput[r](\oenodeLabel{M}){$\tau$
12267 \psline[arrows=<->, arrowinset=0](0.15,0.25)(0.15,-0.15)}
12268 \end{pspicture}
12269 \end{LTXexample}
12270
12271 \begin{LTXexample}[pos=t, caption={caption}, label={ex:glan-thompson}]
12272 \begin{pspicture}(-1,-0.5)(8,1.5)
12273 \newpsobject{perppol}{polarization}{poltype=perp, linecolor=green, polsize=1}
12274 \newpsobject{parpol}{polarization}{poltype=parallel, linecolor=red, polsize=0.8}
12275 \newpsstyle{Polarization}{arrowinset=0, arrowscale=1.2}
12276 \pnodes(0,1){A}(8,1){B}(4,-0.5){C}
12277 \glanthompson[glanthompsongap=0.2, glanthompsonsize=2 1](A)(B)
12278 \optplane(B)\optplane[angle=90](C)
12279 \drawbeam(A){1-2}
12280 \drawbeam[linestyle=dashed, dash=2pt 2pt, linecolor=red, arrows=->](A){1}{3}
12281 \parpol[abspos=1](A)(B)\perppol[abspos=1](A)(B)
12282 \nodexn{(\oenodeBeam{})-1.5(!\oeBeamVec{})}{D}
12283 \perppol[abspos=7](A)(B)\parpol(D)(\oenodeBeam{})
12284 \end{pspicture}
12285 \end{LTXexample}
12286 \enlargethispage{1.5cm}
12287 \begin{LTXexample}[pos=t, caption={caption}]
12288 \begin{pspicture}(13.7,2.9)
12289 \newpsstyle{Wire}{arm=0.1, arrows=->}
12290 \psset[optexp]{optboxsize=1.2 0.8, optmzmsize=1.2 0.8, fiber=none, label=0.7}
12291 \pnodes(2,1){L}([Xnodesep=11]L){A}
12292 \optbox[position=start, optboxwidth=2, label=0](L)(A){DFB-Laser}
12293 \optbox[abspos=1, label=0, compname=Eam, extnode=t](L)(A){EAM}
12294 \optmzm[abspos=4.5, compname=Mzm1, extnode=t](L)(A){MZM}
12295 \optmzm[abspos=6, compname=Mzm2, extnode=t](L)(A){MZM}
12296 \optamp[abspos=9](L)(A){EDFA}
12297 \drawfiber{1-5}\drawfiber[arrows=->]{}(A)
12298 \pnode([offset=1.5]\oenodeExt{Eam}){Osci}
12299 \elecsynthesizer[compname=Syn, position=0.5, wire=o, label=0.5 . r](Osci)(\oenodeExt{Eam}){10\,GHz}
12300 \psset[optexp]{label=0, wire, optboxsize=0.8 1.2}
12301 \optbox[compname=Ppg1](\oenodeExt{Mzm1}|Osci)(\oenodeExt{Mzm1}){PPG}
12302 \optbox[compname=Ppg2](\oenodeExt{Mzm2}|Osci)(\oenodeExt{Mzm2}){PPG}
12303 \drawwire[arrows=-, wireangleB=-90]{Syn}(\oenodeExt{Mzm2}|Osci)
12304 \rput([offset=0.5, Xnodesep=-0.3]A){Faserschleife}
12305 \end{pspicture}
12306 \end{LTXexample}
12307
12308 \enlargethispage{110pt}
12309 \begingroup
12310 \captionsetup[lstlisting]{format=poecaption}%
12311 \begin{LTXexample}[pos=t, caption={\ifGERMAN Angepasst von \fi\ifENGLISH Adapted from \fi\doiurl{10.1364/OL.37.000930}}]
12312 \begin{pspicture}(0,0.2)(13.5,4.7)
12313 \psset[optexp]{optboxsize=1 0.8, label=0, fiber=none}
12314 \pnodes(1,3.2){Scan}\pnode([offset=-1.6]Scan){Sat}
12315 \pnode([Xnodesep=5]Scan){ScanCpl}\pnode(ScanCpl|Sat){SatCpl}
12316 \pnode([Xnodesep=1.5,offset=-0.8]ScanCpl){Cpl}\pnode([Xnodesep=5]Cpl){PD}
12317 \pnode([Xnodesep=2.5, offset=-1.4]Cpl){Pump}
12318 \optbox[position=start](Scan)(ScanCpl){Scan}
12319 \optmzm[abspos=1, compname=M1, extnode=t](Scan)(ScanCpl)
12320 \optmzm[abspos=2.5, compname=M2, extnode=t](Scan)(ScanCpl)
12321 \optamp[abspos=3.7](Scan)(ScanCpl)
12322 \polcontrol[abspos=4.5, fiber=o](Scan)(ScanCpl)
12323 \drawfiber{1-5}
12324 \optbox[position=start, compname=S, extnode=b](Sat)(SatCpl){Sat}
12325 \optmzm[abspos=1.75, compname=M3, extnode=b](Sat)(SatCpl)
12326 \optamp[abspos=3.7](Sat)(SatCpl)
12327 \polcontrol[abspos=4.5, fiber=o](Sat)(SatCpl)
12328 \drawfiber{6-9}
12329 \wdmcoupler[fiber=i](ScanCpl)(SatCpl)(Cpl)
12330 \optisolator[position=0.1](Cpl)(Pump|Cpl)
12331 \optfiber[position=0.6](Cpl)(Pump|Cpl)
12332 \addtopsstyle{OptCircArrow}{arrows=<-}
12333 \optcirculator[optcircangle=0 -90](Cpl)(PD)(Pump)
12334 \wdmsplitter[position=0.8, coupleralign=t](Cpl)(PD)
12335 \optbox[position=end, compname=Pd, extnode=t](Cpl)(PD){PD}
12336 \optbox[position=end, compshift=-1.5](Cpl)(PD){OSA}
12337 \optamp[fiber](Pump)(\oenodeIfc{2}{13})
12338 \optbox[position=start, optboxsize=0.6 1.2](Pump)(Pump|Cpl){Pump}
12339 \drawfiber{10-15}\drawfiber{14}{16}
12340 \optbox[compshift=0.7, optboxsize=2.5 0.8](\oenodeExt{M2})(\oenodeExt{Pd}|\oenodeExt{M2}){Lock-In Amp}
12341 \addtopsstyle{Wire}{arm=0.1}
12342 \drawwire[wireangleA=90, linearc=0.3](\oenodeExt{M2}){}
12343 \drawwire[wireangleB=90, linearc=0.3]{}(\oenodeExt{Pd})
12344 \elecsynthesizer([offset=0.2]\oenodeExt{M1})(\oenodeExt{M1})
12345 \psset[optexp]{synthshape=rectangle}
12346 \elecsynthesizer[synthtype=sawtooth](\oenodeExt{S}|Pump)(\oenodeExt{S})
12347 \elecsynthesizer[synthtype=triangle](\oenodeExt{M3}|Pump)(\oenodeExt{M3})
12348 \end{pspicture}
12349 \end{LTXexample}
12350 \endgroup
12351
12352 \enlargethispage{100pt}
12353 \begingroup
12354 \captionsetup[lstlisting]{format=poecaption}
12355 \begin{LTXexample}[pos=t, caption={\ifENGLISH Adapted from \fi\ifGERMAN Angepasst von \fi\href{http://www.semibyte.de/wp/graphicslibrary/gl-physics/versuchsaufbauten-f-praktikum/}{semibyte.de}}, label={ex:absspektr}]
12356 \begin{pspicture}(0.2,0.5)(9,7.4)
12357 \pnode(1,2){DL}\pnode([offset=0.5]DL){OAP}\pnode([Xnodesep=2]OAP){ST}
12358 \pnode([offset=-1.4]ST){SP4}\pnode([Xnodesep=4]SP4){SP3}
12359 \pnode([offset=3]SP3){JL}\pnode([Xnodesep=1]SP3|ST){SP1}
12360 \pnode([Xnodesep=1]ST|JL){SP2}\pnode([Xnodesep=1.5,offset=3]SP2){Det}
12361 \psset[optexp]{optboxsize=1.5 0.9, labeloffset=0.6}
12362 \begin{optexp}
12363 \optbox[position=start, innerlabel](DL)(OAP){\parbox{1.5\psunit}{\centering Dioden-\\laser}}
12364 \psset[optexp]{mirrortype=extended}
12365 \mirror[mirrorradius=2](DL)(OAP)(ST){OAP}
12366 \psset[optexp]{variable}
12367 \beamsplitter[bssize=0.4, labelangle=-45](SP4)(ST)(SP1){ST}
12368 \optplate[abspos=1, plateheight=0.7](ST)(SP1){CP}
12369 \mirror(ST)(SP1)(SP2){SP1}\mirror(SP1)(SP2)(Det){SP2}
12370 \optdipole[label=-0.7 . b relative, optdipolesize=2, position=0.6](SP2)(Det){%
12371 \psframe[dimen=outer](-1,-0.6)(1,0.6)
12372 \psset{fillstyle=solid, fillcolor=blue!40, linestyle=none}
12373 \psframe(-1,-0.5)(-0.9,0.5)\psframe(0.9,-0.5)(1,0.5)}{Plasmareaktor}
12374 \optdetector[label=. 30 l](SP2)(Det){Detektor}
12375 \optbox[position=end, innerlabel](SP3)(JL){\parbox{1.5\psunit}{\centering Justage-\\laser}}
12376 \mirror(SP4)(SP3)(JL){SP3}\mirror(ST)(SP4)(SP3){SP4}
12377 \psset{linewidth=2\pslinewidth}
12378 \drawbeam[linecolor=blue, beampos=0.03]{1-2}
12379 \drawbeam[beamalign=abs, loadbeampoints, linecolor=blue]{2-8}
12380 \drawbeam[linecolor=red, beampos=-0.03]{9-11}{3-8}
12381 \end{optexp}
12382 \pnode([Xnodesep=1.2,offset=-0.6]\oenodeIn{8}){NaCl}
12383 \psset{linestyle=dashed, arrows=->, arrowscale=1.5}
12384 \ncline[nodesepA=0.1, nodesepB=0.2]{NaCl}{\oenodeIn{7}}
12385 \ncline[nodesepA=0.1, nodesepB=0.3]{NaCl}{\oenodeOut{7}}
12386 \rput[l](NaCl){NaCl-Fenster}
12387 \end{pspicture}
12388 \end{LTXexample}
12389 \endgroup
12390
12391 \begingroup
12392 \captionsetup[lstlisting]{format=poecaption}
12393 \begin{LTXexample}[pos=t, caption={\ifGERMAN Angepasst von \fi\ifENGLISH Adapted from \fi\doiurl{10.1364/AOP.1.000308}, \ifGERMAN Abb. \fi\ifENGLISH Fig. \fi 8}, label={ex:autocorrelation}]
12394 \begin{pspicture}(5.7,2.8)
12395 \psset{mirrorwidth=0.7, bsstyle=plate, bssize=0.5, arrowinset=0, arrowscale=1.2}
12396 \newpsobject{splitterplate}{beamsplitter}{linewidth=2\pslinewidth, linecolor=gray!50}
12397 \pnodes(2.3,0){In}([offset=0.5]In){STM1}([Xnodesep=-2]STM1){M1}
12398 \pnodes([offset=1]M1){M2}([offset=2]STM1){M3}([Xnodesep=-1]M3){M4}(M4|M2){STM2}
12399 \splitterplate(In)(STM1)(M1)
12400 \mirror(STM1)(M1)(M2)
12401 \mirror(M1)(M2)(M3|M2)
12402 \mirror(STM1)(M3)(M4)
12403 \mirror[label=0.6 180 . absolute](M3)(M4)(STM2)
12404 \rput[r](\oenodeLabel{}){$\tau$
12405 \psline[arrows=<->](0.15, 0.4)(0.15, -0.2)}
12406 \splitterplate[compoffset=0.2, compname=STM2](M4)(STM2)([Xnodesep=1]STM2)
12407 \pnode(\oenodeCenter{STM2}){STM2C}
12408 \pnode([Xnodesep=4]STM2C){Out}
12409 \lens[n=2](STM2C)(Out)
12410 \optbox[position=0.65, optboxsize=0.1 0.6](STM2C)(Out)
12411 \optplate[linestyle=none, position=0.75](STM2C)(Out)
12412 \pinhole[position=0.95, outerheight=0.6](STM2C)(Out)
12413 \optdetector[detsize=0.5 0.6](STM2C)(Out)
12414 \drawbeam[linecolor=blue]{8-}
12415 \newpsstyle{Beam}{ArrowInside=->, linecolor=red, ArrowInsideMinLength=1, arrows=>-}
12416 \drawbeam[ArrowInsidePos=0.835](In){1-3}{7-9}
12417 \drawbeam[ArrowInsidePos=0.74](In){1}{4-9}
12418 \end{pspicture}
12419 \end{LTXexample}
12420 \endgroup
12421
12422 \begin{LTXexample}[pos=t, caption={caption}]
12423 \begin{pspicture}(13.8,3.8)
12424 \pnode(2.3,2){Signal}
12425 \pnode([Xnodesep=1.5,offset=0.8]Signal){UpIn}
12426 \pnode([Xnodesep=1.5, offset=-0.8]Signal){LowIn}
12427 \pnode([Xnodesep=3.5]UpIn){UpOut}
12428 \pnode(UpOut|LowIn){LowOut}
12429 \pnode([Xnodesep=1.5]UpOut){UpIn2}
12430 \pnode([Xnodesep=3]UpIn2){UpOut2}
12431 \pnode([Xnodesep=1.5]LowOut){LowIn2}
12432 \pnode(UpOut2|LowIn2){LowOut2}
12433 \psset{labelstyle=\footnotesize}
12434 \psset{fiber=none}\addtopsstyle{Fiber}{linecolor=red}
12435 \psset{wire=none}\addtopsstyle{Wire}{arm=0.1, arrows=->}
12436 \optbox[position=start, label=0, optboxsize=2.3 0.8](Signal)([Xnodesep=0.1]Signal){2.5\,ps, 10\,GHz}
12437 \wdmsplitter[label=0.4](Signal)(UpIn)(LowIn){50\%}
12438 \optfiber[fiberloops=4, label=0.4, position=0.3](LowIn)(LowOut){L$_2$}
12439 \optswitch[position=0.7](LowIn)(LowOut){AOM}
12440 \optfiber[fiberloops=2, label=0.4, position=0.2](UpIn)(UpOut){L$_1$}
12441 \optswitch[position=0.7](UpIn)(UpOut)
12442 \optcoupler[label=0.4, position=0.3](UpOut)(LowOut)(UpIn2)(LowIn2){50\%}
12443 \optbox[optboxsize=2 0.8, position=end, label=0, extnode=t](LowIn2)(LowOut2){Messsystem}
12444 \drawfiber{1-4}{7}(LowIn2)\drawfiber[arrows=->](LowIn2){8}
12445 \optdetector[abspos=0.4, detsize=0.6 0.8](UpIn2)(UpOut2){PD}
12446 \optbox[optboxsize=0.8 0.8, label=0, position=0.44](UpIn2)(UpOut2){$\div 8$}
12447 \optamp[position=0.8](UpIn2)(UpOut2)
12448 \optbox[position=end, extnode=b, label=0, optboxsize=2 0.8](UpIn2)(UpOut2){Faserkamm}
12449 \drawfiber{2}{5-7}(UpIn2)\drawfiber[arrows=->](UpIn2){9}
12450 \drawwire{9-12}
12451 \drawfiber[arrows=->](\oenodeExt{12})(\oenodeExt{8})
12452 \end{pspicture}
12453 \end{LTXexample}
12454
12455 \begingroup
12456 \captionsetup[lstlisting]{format=poecaption}
12457 \begin{LTXexample}[pos=t, caption={\ifGERMAN Angepasst von \fi\ifENGLISH Adapted from \fi\doiurl{10.1103/PhysRevLett.105.263904}}, label={ex:wgm-pdc}]
12458 \begin{pspicture}(0.6,2.8)(6.8,7.8)
12459 \pnodes(1,6){Laser}(1,5){M}(3,4){PR}(5,5){PT}(6,7){D1}
12460 \newpsstyle{Glass}{fillcolor=blue, fillstyle=solid, opacity=0.15, linecolor=blue!30!white}
12461 \begin{optexp}
12462 \optbox[position=start, innerlabel, optboxwidth=1.8](Laser)(M){Nd:YAG}
12463 \optprism[style=Glass, compname=P, n=1, prismtype=reflective, prismangle=60, labeloffset=1.2](M)(PR)(PT){\begin{tabular}{@{}c@{}}diamond\\ prism\end{tabular}}
12464 \mirror(Laser)(M)(\oenodeIfc{2}{P})%
12465 \lens[abspos=1.05, style=Glass](\oenodeIfc{2}{P})(M)%
12466 \optprism[compname=PDet, style=Glass](\oenodeIfc{2}{P})(PT)(D1)%
12467 \lens[abspos=1.05, style=Glass](\oenodeIfc{2}{P})(\oenodeOut{PDet})%
12468 \newpsstyle{Beam}{linestyle=none, fillstyle=solid}%
12469 \drawwidebeam[fillcolor=green, beamwidth=0.2, beaminsidelast, beampathcount=5]{1}{3}{4}{2}%
12470 \drawwidebeam[fillcolor=orange, beaminsidefirst, startinsidecount=1, loadbeam, beaminsidelast]{2}{6}%
12471 \psset{savebeam=false, loadbeam, beamnodealign=vector}%
12472 \drawwidebeam[fillcolor=orange]{6}{5}%
12473 \drawwidebeam[fillcolor=green, n=1.2, beampathskip=1, savebeam=2]{6}{5}(D1)
12474 \drawwidebeam[fillcolor=red, beampathskip=1, n=1.4, savebeam=3]{6}{5}(D1)
12475 \drawwidebeam[fillcolor=red!50!black, beampathskip=1, n=1.57, savebeam=4]{6}{5}(D1)
12476 \multido{\i=2+1}{3}{%
12477 \backlayer{%
12478 \pnode(!\oeBeamCenter{\i}){Det\i}
12479 \nodexn{(Det\i)-(!\oeBeamVecMedian{\i})}{Det\i'}}
12480 \optdetector[detsize=0.6 0.5](Det\i')(Det\i)}
12481 \end{optexp}
12482 \pscircle[style=Glass]([offset=-0.5]\oenodeIfc{2}{P}){0.5}
12483 \rput[l]([offset=-0.5,Xnodesep=0.7]\oenodeIfc{2}{P}){WGM}
12484 \end{pspicture}
12485 \end{LTXexample}
12486 \endgroup
12487
12488 \begin{LTXexample}[caption={caption}]
12489 \begin{pspicture}(2.2,2.2)
12490 \definecolor[ps]{bl}{rgb}{tx@addDict begin Red Green Blue end}%
12491 \pnode(0,0.5){In}\pnode(2,0.5){G1}
12492 \pnode([Xnodesep=-1.5, offset=1.3]G1){G2}\pnode(G1|G2){MG}
12493 \begin{optexp}
12494 \optgrating[angle=40, gratingalign=c](In)(G1)(G2)
12495 \optgrating[reverse, angle=40, gratingalign=c](G1)(G2)(MG)
12496 \mirror[mirrorwidth=1, mirrortype=extended](G2)(MG)(G2)
12497 \drawbeam[linecolor=red](In){1}
12498 \multido{\i=0+1}{40}{%
12499 \pstVerb{\i\space 650 400 sub 39 div mul 400 add
12500 tx@addDict begin wavelengthToRGB end }%
12501 \drawbeam[linecolor=bl, beamangle=\i\space 16 sub 0.2 mul]{1-2}%
12502 \drawbeam[linecolor=bl, loadbeampoints]{2-3}
12503 }%
12504 \end{optexp}
12505 \end{pspicture}
12506 \end{LTXexample}
12507
12508 \begin{LTXexample}[pos=t, caption={caption}]
12509 \begin{pspicture}(5.6,3)
12510 \pnodes(0,0.5){S1}(2,2.5){S2}(3,1.5){S3}(4,0.5){S4}(4.5,1){S5}
12511 \psset{prismangle=30, mirrortype=extended}
12512 \definecolor[ps]{bl}{rgb}{tx@addDict begin Red Green Blue end}%
12513 \begin{optexp}
12514 \optprism(S1)(S2)(S3)\optprism(S3)(S4)(S5)
12515 \mirror[compshift=-0.07](\oenodeIn{2})([offset=1,Xnodesep=1]\oenodeIn{2})(\oenodeIn{2})
12516 \drawbeam[linecolor=orange, ArrowInside=->, ArrowInsidePos=0.2, arrowscale=1.5](S1){1}
12517 \addtopsstyle{Beam}{linecolor=bl, linewidth=0.35\pslinewidth, beampathskip=1}
12518 \multido{\r=0+0.5}{120}{%
12519 \pstVerb{\r\space 620 590 sub 59 div mul 590 add
12520 tx@addDict begin wavelengthToRGB end }%
12521 \drawbeam[n=3.42 -0.002 \r\space mul add, beampos=\r\space 60 sub 0.0002 mul](S1){1-3}
12522 }%
12523 \end{optexp}
12524 \end{pspicture}
12525 \end{LTXexample}
12526
12527 \begin{LTXexample}[pos=t, caption={caption}, label=ex:dsotm]
12528 \begin{pspicture}(3,1.7)
12529 \pnodes(-1,0){A}(1,1){B}(3,0){C}
12530 \psframe*(0,0)(3,1.7)
12531 \begin{optexp}
12532 \optplane(0,0.7)
12533 \optprism[prismalign=center, linecolor=white](A)(B)(C)
12534 \optplane(C)
12535 \addtopsstyle{Beam}{linecolor=white}
12536 \drawbeam[ArrowInside=->]{1-2}
12537 \definecolor[ps]{bl}{rgb}{%
12538 tx@addDict begin Red Green Blue end}%
12539 \addtopsstyle{Beam}{linestyle=fade, beaminsidelast, fadeto=black}
12540 \multido{\i=0+1}{60}{%
12541 \drawbeam[n=1.5 \i\space 0.003 mul add, linecolor=white, beampathskip=1, fadefuncname=gauss]{1-2}
12542 \pstVerb{\i\space 650 400 sub 59 div mul 400 add
12543 tx@addDict begin wavelengthToRGB end }%
12544 \drawbeam[n=1.5 \i\space 0.003 mul add, linecolor=bl, beampathskip=2, linewidth=0.3\pslinewidth]{-}%
12545 }%
12546 \end{optexp}
12547 \end{pspicture}
12548 \end{LTXexample}
12549
12550 \begin{LTXexample}[pos=t, caption={\ifENGLISH Adapted from \fi\ifGERMAN Angepasst von \fi\href{https://tex.stackexchange.com/q/581952}}, label=ex:multi-input-coupler]
12551 \begin{pspicture}(10,6)
12552 \begin{optexp}
12553 \psset[optexp]{usefiberstyle, couplersize=0.25, couplersep=0.07}
12554 \newpsstyle{Fiber}{linecolor=orange, linewidth=2\pslinewidth}
12555 \pnodes(2,1){PumpDiode}(2,5){UpperPumpDiode}(1,3){SignalIsolatorIn}(4, 3){SignalIsolatorOut}(1,3){SignalIn}(10,3){SignalCombinerOut}
12556 \pnodes(7,3){FiberIn}(9,3){FiberOut}(9,3){AmpOut}
12557 \optdiode[compname=PumpDiode, position=start](PumpDiode)([Xnodesep=1]PumpDiode){Pump diode}
12558 \optdiode[compname=UpperPumpDiode, position=start](UpperPumpDiode)([Xnodesep=1]UpperPumpDiode){Pump diode}
12559 \optisolator[compname=SignalIsolator, fiber=none](SignalIsolatorIn)(SignalIsolatorOut)%
12560 {\begin{tabular}{@{}c@{}}Signal\\Isolator\end{tabular}}
12561 \wdmcoupler[compname=SignalPumpCombiner](UpperPumpDiode)(\oenodeOut{SignalIsolator})(PumpDiode)(FiberIn)%
12562 {\begin{tabular}{@{}c@{}}Signal/Pump\\light combiner\end{tabular}}
12563 \optfiber[
12564 compname=ActiveFiber,
12565 position=start,
12566 addtoFiberOut={arrows=->}](FiberIn)(FiberOut)%
12567 {\begin{tabular}{@{}c@{}}Active\\fiber\end{tabular}}
12568 \drawfiber[ArrowInside=->](SignalIn){SignalIsolator}
12569 \end{optexp}
12570 \nput{75}{AmpOut}{\begin{tabular}{@{}c@{}}Amplifier\\Output\end{tabular}}
12571 \nput{-90}{SignalIn}{\begin{tabular}{@{}c@{}}Signal\\Input\end{tabular}}
12572 \end{pspicture}
12573 \end{LTXexample}
12574
12575 \begin{LTXexample}[pos=t, linerange={1-1}, caption={caption}]
12576
12577 \psset{unit=1.1, usefiberstyle=false}
12578 \begin{pspicture}(9.3,6.1)
12579 \psset{labeloffset=0.5, optboxsize=1 0.8, arrowscale=1.2, arrowinset=0}
12580 \newpsstyle{Fiber}{linecolor=red!70!black, linewidth=1.5\pslinewidth}
12581 \pnode(1, 3.7){LD}\pnode([Xnodesep=3.2]LD){LoopIn}\pnode([offset=-1.2]LoopIn){LoopInsIn}
12582 \pnode([Xnodesep=2]LoopInsIn){LoopInsOut}\pnode(LoopInsOut|LoopIn){LoopOut}
12583 \optswitch[compname=LSw, label=. 180 b, abspos=2.7, fiber=o](LD)(LoopIn){load switch}
12584 \optcoupler[addtoFiber={ArrowInside=->, ArrowInsidePos=0.7}](LoopIn)(LoopInsIn)(LoopOut)(LoopInsOut){50/50}
12585 \optbox[labelstyle=\footnotesize, position=end, fiber, label=0, optboxsize=1.6 1.2](LoopOut)([Xnodesep=0.1]LoopOut){\parbox{1.4\psxunit}{\centering Linear\\Optical\\Sampling}}%
12586 \pnode([Xnodesep=2.8]LoopInsOut){TR}
12587 \pnode([offset=-2]TR){BR}
12588 \pnode([Xnodesep=-1.5]LoopInsIn){TL}
12589 \pnode(TL|BR){BL}
12590 \psset[optexp]{fiber=none}
12591 \optisolator[isolatorsize=0.5, abspos=0.6](LoopInsOut)(TR){isolator}% 4
12592 \optbox[label=0, extnode=t, compname=PM, abspos=2](LoopInsOut)(TR){PM}
12593 \drawfiber(LoopInsOut){4}{5}
12594 \optfiber[label=0.2 . t, abspos=4](BL)(BR){fiber}
12595 \drawfiber[fiberstyle=bar, angleA=0, startnode=N, linearc=0.5, armA=0.6]{5}{6}
12596 \optamp[labelalign=b, abspos=3.8](BR)(BL){EDFA}
12597 \optfilter[label=. 180 b, usefiberstyle, abspos=1](BL)(BR){OBPF}
12598 \drawfiber{6-8}
12599 \optswitch[labelalign=t, abspos=1, fiber=o](TL)(LoopInsIn){unload switch}
12600 \drawfiber[angleA=180, linearc=0.5, armA=1, startnode=1, fiberstyle=bar]{8}{9}
12601 \optbox[extnode=t, compname=Mod, innerlabel, abspos=0.7](LD)(LoopIn){MOD}
12602 \optbox[position=start, innerlabel](LD)(LoopIn){LD}
12603 \drawfiber{}{Mod}
12604 \drawfiber[arrows=->]{Mod}{LSw}
12605 \pnode([offset=1.2, Xnodesep=-0.7]\oenodeExt{Mod}){Osci}\pnode(\oenodeExt{PM}|Osci){Tmp}
12606 \psset{wire=none, fiber=none, label=0.5 180 b}
12607 \elecsynthesizer(Osci)(Tmp){SYN}
12608 \elecsynthesizer[synthshape=rectangle, synthtype=pulse, abspos=0.7, compname=Pg, extnode=b](Osci)(Tmp){PG}
12609 \optfilter[abspos=2](Osci)(Tmp){BPF}
12610 \rput[r]([offset=0.4, Xnodesep=0.2]\oenodeOut{}){\psplot[plotpoints=200]{0}{1}{360 3.14159 div x 6 mul mul sin 2 exp 0.3 mul 0.15 sub}}
12611 \drawwire[arm=0]{12-14}\drawwire[wireangleB=-90, arrows=->]{14}(\oenodeExt{PM})
12612 \psline[style=Wire, arrows=->](\oenodeExt{Pg})(\oenodeExt{Mod})
12613 \rput([Xnodesep=0.1, offset=0.2]\oenodeOut{Mod}){%
12614 \psplot[plotpoints=200, unit=0.7]{0}{1}{2.7182818 x 0.5 sub 0.08 div 2 exp neg exp 0.5 mul}%
12615 }%
12616 \end{pspicture}
12617 \end{LTXexample}
12618
12619 \begingroup
12620 \captionsetup[lstlisting]{format=poecaption}
12621 \begin{LTXexample}[pos=t, linerange={1-1}, caption={\ifGERMAN Angepasst von \fi\ifENGLISH Adapted from \fi\doiurl{10.1364/OL.37.000797}}, label={ex:ratchet}]
12622
12623 \begin{pspicture}(12.3,8.8)
12624 \newpsobject{laser}{optbox}{position=start, innerlabel}
12625 \psset[optexp]{lens=2, phwidth=0.07, outerheight=0.6}
12626 \pnode(1,7){L}\pnode([offset=-6]L){PSLM}
12627 \pnode([Xnodesep=2,offset=1]L){ASLM}\pnode([offset=-0.5,Xnodesep=9]L){MRef}
12628 \pnode([offset=-7]ASLM){ML}\pnode([Xnodesep=8.5]ML){Cam}
12629 \begin{optexp}
12630 \laser[optboxsize=1.6 0.6](L)(PSLM){Nd:YAG}
12631 \beamsplitter[bssize=0.4, labelangle=-90](L)(L|MRef)(MRef){BS}
12632 \lens[abspos=1.2, lens=0.5 0.5 0.4, n=2.5, labelangle=-10](L)(PSLM){MO}
12633 \pinhole[abspos=1.4, labelangle=10](L)(PSLM){PH}
12634 \lens[abspos=2.3](L)(PSLM){L}
12635 \opttripole[label=0.5](L)(PSLM)(ASLM){\psframe[dimen=outer](-0.5,0)(0.5,0.1)}{PSLM}
12636 \lens[label=0.6 -40](PSLM)(ASLM){L}
12637 \opttripole[label=0.5](PSLM)(ASLM)(ML){\psframe[dimen=outer](-0.5,0)(0.5,0.1)}{ASLM}
12638 \lens[position=0.45, labelangle=180](ASLM)(ML){L}
12639 \optretplate[labelangle=180, position=0.55](ASLM)(ML){$\lambda/2$}
12640 \optplate[labelangle=180, position=0.62](ASLM)(ML){P}
12641 \mirror[labeloffset=0.4](ASLM)(ML)(Cam){M}
12642 \newpsstyle{Beam}{fillcolor=green!80!black, opacity=0.5, fillstyle=solid, linestyle=none, beaminside=false}
12643 \drawwidebeam[beamwidth=0.1, stopinside]{1-5}
12644 \psset{loadbeampoints}
12645 \drawwidebeam[stopinside, savebeampoints=2]{5-7}
12646 \drawwidebeam[loadbeampoints=2, beamdiv=-8.5]{7-8}
12647 \drawwidebeam[loadbeampoints=2, beamdiv=-8.5, beamangle=-4]{7-8}
12648 \drawwidebeam[beamdiv=-8.5, beamangle=-4.5]{8-9}
12649 \drawwidebeam[loadbeampoints=2, beamdiv=-8.5, beamangle=4]{7-8}
12650 \drawwidebeam[beamdiv=-8.5, beamangle=4.5]{8-9}
12651 \lens[abspos=2](ML)(Cam){L}
12652 \lens[abspos=4](ML)(Cam){L}
12653 \crystal[abspos=6, voltage, crystalsize=1 0.6, fillcolor=yellow!90!black, fillstyle=solid](ML)(Cam){SBN}
12654 \beamsplitter[bssize=0.6](MRef)(MRef|Cam)(Cam){BS}
12655 \lens[n=2.4](MRef|Cam)(Cam){L}
12656 \optbox[optboxsize=0.8 0.6, position=end](ML)(Cam){Cam}
12657 \drawwidebeam[savebeampoints=2, stopinside]{9-13}
12658 \drawwidebeam[loadbeampoints=2, beamdiv=-16, beamangle=5, stopinside]{13-14}
12659 \drawwidebeam[beamangle=-5]{14-18}
12660 \drawwidebeam[loadbeampoints=2, beamdiv=-16, beamangle=-5, stopinside]{13-14}
12661 \drawwidebeam[beamangle=5]{14-18}
12662 \lens[lens=0.5 0.5 0.4, n=2](L|MRef)(MRef){MO}
12663 \pinhole[position=0.53, labelangle=180](L|MRef)(MRef){PH}
12664 \lens[position=0.65](L|MRef)(MRef){L}
12665 \optplate[position=0.7](L|MRef)(MRef){S}
12666 \mirror[labeloffset=0.4](L|MRef)(MRef)(MRef|Cam){M}
12667 \addtopsstyle{Beam}{fillcolor=red!70}
12668 \drawwidebeam[loadbeampoints=false, beamwidth=0.1, savebeampoints]{2}{19-21}
12669 \drawwidebeam{21-23}{16-18}
12670 \end{optexp}
12671 \end{pspicture}
12672 \end{LTXexample}
12673 \endgroup
12674
12675 \begingroup
12676 \captionsetup[lstlisting]{format=poecaption}
12677 \begin{LTXexample}[pos=t, linerange={1-1}, caption={\ifGERMAN Angepasst von \fi\ifENGLISH Adapted from \fi\doiurl{10.1364/AOP.1.000308}, \ifGERMAN Abb. \fi\ifENGLISH Fig. \fi 37}]
12678
12679 \begin{pspicture}(-2,-0.2)(8.3,5.9)
12680 \scriptsize
12681 \definecolor[ps]{bl}{rgb}{tx@addDict begin Red Green Blue end}%
12682 \addtopsstyle{SemitransMirror}{linestyle=solid, linewidth=0.7\pslinewidth}
12683 \newpsstyle{ExtendedMirror}{style=SemitransMirror}
12684 \psset[optexp]{mirrortype=extended, mirrorwidth=0.7, n=1, gratingalign=c}
12685 \newpsstyle{Beam}{linecolor=red!80!black, linewidth=1.5\pslinewidth, beaminside=false}
12686 \pnode(-2,0.5){In}\pnode(8,0.5){G1}\pnode([Xnodesep=-1.5, offset=1.3]G1){G2}\pnode(G1|G2){MG}
12687 \pnode([Xnodesep=1,offset=1]In){M1}
12688 \pnode([Xnodesep=5]In){M}
12689 \begin{optexp}
12690 \mirror[mirrortype=semitrans, mirrorlinewidth=0.7\pslinewidth, label=0.6 -90, compname=Et](In)([Xnodesep=-3]G1)(M1){Etalon}
12691 \optgrating[angle=40](In)(G1)(G2)
12692 \optgrating[reverse, angle=40](G1)(G2)(MG)
12693 \mirror[mirrorwidth=1, label=1 135](G2)(MG)(G2){Stretcher}
12694 \multido{\i=0+1}{40}{%
12695 \pstVerb{%
12696 \i\space 650 400 sub 39 div mul 400 add
12697 tx@addDict begin wavelengthToRGB end }%
12698 \drawbeam[linecolor=bl, beamangle=\i\space 16 sub 0.2 mul]{2-3}%
12699 \drawbeam[linecolor=bl, loadbeampoints]{3-4}
12700 }%
12701 \newpsstyle{Beam}{fillstyle=solid, fillcolor=red!90!black, beamwidth=0.1, linestyle=none}
12702 \drawwidebeam(In){1-2}
12703 \pnode([offset=4]M1){M2}\pnode([Xnodesep=3]M2){M3}
12704 \pnode([offset=0.2,Xnodesep=0.2]M|M1){M4}
12705 \pnode([Xnodesep=4, offset=4]M){CM}
12706 \pnode([Xnodesep=-1,offset=-2]M3){SM}
12707 \pnode([offset=0.5]SM){S}
12708 \mirror[compname=M1](\oenodeIn{Et})(M1)(M2)
12709 \mirror(M1)(M2)(M3)
12710 \mirror(M2)(M3)(M4)
12711 \mirror[compname=M4, angle=1.5](M3)(M4)(CM)
12712 \mirror[mirrorradius=3.5 0, angle=2, compname=CM](M4)(CM)(SM)
12713 \mirror(G1)(M)(CM)
12714 \optretplate[plateheight=0.5, abspos=1.5, label=0.6](M)(CM){$\lambda/2$}
12715 \optbox[optboxsize=0.3 0.5, position=0.25, fillstyle=solid, fillcolor=yellow!90!black](CM)(SM){\begin{tabular}{@{}c@{}}nonlinear\\crystal\end{tabular}}
12716 \pinhole[phwidth=0.1, position=0.35](CM)(SM)
12717 \lens[lens=0.7 0.7 0.7, position=0.5, n=1.25](CM)(SM)
12718 \lens[lens=0.7 0.7 0.7, position=0.9, n=1.31](CM)(SM)
12719 \mirror[compname=SM](CM)(SM)(S)
12720 \optbox[position=end, optboxsize=0.8 1.9, compshift=0.6, label=0](SM)(S){Spectrometer}
12721 \drawwidebeam{Et}{5-8}\backlayer{\pnode(\oenodeBeamLow{}){BeamA}}
12722 \drawwidebeam[loadbeam]{8-9}\backlayer{\pnode(\oenodeBeamUp{}){BeamB}}
12723 \drawwidebeam[loadbeam]{9}{12-13}
12724 \drawwidebeam[beamangle=-1.9, beaminsidelast]{10-11}\backlayer{\pnode(\oenodeBeamLow{}){BeamC}}
12725 \drawwidebeam[loadbeam]{11}{9}\backlayer{\pnode(\oenodeBeamLow{}){BeamD}}
12726 \drawwidebeam[loadbeam]{9}{12-13}
12727 \addtopsstyle{Beam}{fillcolor=blue!40}
12728 \drawwidebeam[beamwidth=0, beamdiv=8, stopinside]{12-14}\backlayer{\pnode(\oenodeBeamUp{}){BeamE}}
12729 \drawwidebeam[loadbeam]{14-15}\backlayer{\pnode(\oenodeBeamUp{}){BeamF}}
12730 \drawwidebeam[loadbeam, startinside]{15-17}
12731 \end{optexp}
12732 % now put the pulses
12733 \def\mypulse{\psplot[style=Pulse]{-0.3}{0.3}{2.7182818 x 0.1 div 2 exp neg exp 0.8 mul}}%
12734 \newpsstyle{Pulse}{linecolor=red!90!black, linewidth=1.5\pslinewidth, plotpoints=200}
12735 \newpsstyle{Arrow}{arrowinset=0, arrowscale=1.2, linewidth=2\pslinewidth, linecolor=red!90!black}
12736 \rput([Xnodesep=0.3,offset=0.1]In){%
12737 \mypulse\psline[arrows=->, style=Arrow](0.3,0.2)(1,0.2)}%
12738 \rput([Xnodesep=1.5,offset=-0.3]\oenodeCenter{Et}){\psline[arrows=<->, style=Arrow](-0.7,0)(0.7,0)}
12739 \nlput[nrot=:U](\oenodeIn{M1})(\oenodeIn{Et}){2}{%
12740 \psline[arrows=->, style=Arrow](-0.3,0.25)(-1,0.25)%
12741 \rput(0,0.1){\psset{unit=0.7}\mypulse\rput(0.8,0){\mypulse}}}%
12742 \nlput[nrot=:U](BeamA)(BeamB){1}{%
12743 \psline[arrows=->, style=Arrow](1,0.25)(1.7,0.25)%
12744 \rput(0,0.05){\psset{unit=0.7}\mypulse\rput(0.8,0){\mypulse}}}%
12745 \nlput[nrot=:U](BeamD)(BeamC){2}{%
12746 \psline[arrows=->, style=Arrow](-1,0.25)(-1.7,0.25)%
12747 \psplot[style=Pulse]{-1}{1}{2.7182818 x 1 div 2 exp neg exp 0.5 mul 0.1 sub}}%
12748 \nlput[nrot=:U](BeamF)(BeamE){1.9}{%
12749 \rput(0,0.05){\addtopsstyle{Pulse}{linecolor=blue!50!red!50}\mypulse
12750 \rput(-0.7,0){\addtopsstyle{Pulse}{linecolor=blue!50}\mypulse}}}%
12751 \end{pspicture}
12752 \end{LTXexample}
12753 \endgroup
12754
12755 \begin{LTXexample}[pos=t, linerange={1-1}, caption={caption}]
12756
12757 \begin{pspicture}(-0.5,-0.4)(13,11)
12758 \psset{%
12759 optboxsize=0.8 0.6,
12760 arrowcompsize=0.8 0.5,
12761 optmzmsize=0.8 0.6,
12762 isolatorsize=0.8 0.5,
12763 filtersize=0.6,
12764 detsize=0.5 0.6,
12765 fiber=none, wire=none,
12766 usefiberstyle=false,
12767 labeloffset=0.5, labelstyle=\footnotesize
12768 }
12769 \footnotesize
12770 \newpsobject{elecfilter}{optfilter}{usewirestyle}
12771 \addtopsstyle{Wire}{arrowscale=1.2, arrows=->, linewidth=1.5\pslinewidth}
12772 \newpsstyle{FiberComp}{linecolor=red!80!black}
12773 \newpsstyle{Fiber}{style=FiberComp, arrows=->, linewidth=1.5\pslinewidth}
12774 \pnode(1,10){Syn}\pnode([Xnodesep=8]Syn){Pm}
12775 \elecsynthesizer[compname=Syn, labelalign=t](Syn)(Pm){10\,GHz}
12776 \fiberdelayline[compname=Voa1, abspos=2.5, label= 0.6 . t](Syn)(Pm){VOA}
12777 \optbox[compname=Am, abspos=4, innerlabel, extnode=b](Syn)(Pm){AM}
12778 \fiberdelayline[compname=DelayPm, abspos=5.5, label=0.6 . t](Syn)(Pm){DLY}
12779 \optbox[fiber, addtoFiber={arrows=->}, style=FiberComp, label=0, compname=Pm, extnode=t, optboxheight=0.7]([offset=-1]Pm)([offset=1]Pm){PM}
12780 \elecsynthesizer[synthtype=rectangle, synthrectwidth=0.3, wire, addtoWire={arrows=->}, label=. -45 l]([offset=-0.5]\oenodeExt{Am})(\oenodeExt{Am}){AWG}
12781 \pnode([offset=-0.5, Xnodesep=-1]\oenodeIn{Voa1}){A}
12782 \pnode([offset=-1.5]A){B}
12783 \eleccoupler[eleccouplertype=directional, eleccouplerinput=right, compname=Cpl](B)(A)
12784 \pnode([Xnodesep=-1.2]\oenodeIn{}){EamIn}
12785 \pnode([Xnodesep=0.5,offset=-0.3]\oenodeIfc{2}{}){N1}
12786 \pnode([offset=-1.3]N1){N2}
12787 \optisolator[label=0.4 . r, compname=Iso1](N1)(N2){Isolator}
12788 \optarrowcomp[compname=DelayPpg, labelalign=l]([offset=-1.4]N2)(N2){DLY}
12789 \fiberbox[position=start,
12790 label=0,
12791 fiberboxsize=0.7 1,
12792 fiberboxcount=2x1,
12793 fiberboxsepin=0.2,
12794 compname=Ppg]([offset=-0.4]\oenodeIn{DelayPpg})(\oenodeIn{DelayPpg}){PPG}
12795 \pnode([offset=-0.5,Xnodesep=-0.5]\oenodeIn{Ppg}){MzmAmp1}
12796 \pnode([offset=-0.5,Xnodesep=0.5]\oenodeIfc{2}{Ppg}){MzmAmp2}
12797 \pnode([offset=-1.5,Xnodesep=-0.9]MzmAmp1){MzmIn}
12798 \pnode([offset=-1.5,Xnodesep=0.9]MzmAmp2){MzmOut}
12799 \optamp[abspos=0.5, compname=MzmAmp1](MzmAmp1)(MzmAmp1|MzmIn)
12800 \optamp[abspos=0.5, compname=MzmAmp2](MzmAmp2)(MzmAmp2|MzmIn)
12801 \optmzm[abspos=0.9, usefiberstyle, style=FiberComp, compname=Mzm1, extnode=t, labelalign=t](MzmIn)(MzmOut){MZM}
12802 \optmzm[abspos=2.3, usefiberstyle, style=FiberComp, compname=Mzm2, extnode=t, labelalign=t](MzmIn)(MzmOut){MZM}
12803 \rput(\oenodeCenter{Ppg}|[offset=-0.2]\oenodeCenter{MzmAmp1}){AMP}
12804 \pnode([Xnodesep=-1]\oenodeIn{Mzm1}){Eam}
12805 \optbox[style=FiberComp,
12806 label=0,
12807 optboxsize=1 0.6,
12808 compname=Eam,
12809 extnode=t]([Xnodesep=-1]Eam)([Xnodesep=0.8]Eam){EAM}
12810 \drawfiber[style=FiberComp, arrows=->]([Xnodesep=-1.2]Eam){Eam}{Mzm1}{Mzm2}(MzmOut)
12811 \pnode([Xnodesep=8]N2){N3}
12812 \optfilter[abspos=2, label=. 180 b, compname=Bpf1](N2)(N3){\parbox{\widthof{10\,GHz}}{\centering BPF\\[-1pt] 10\,GHz}}
12813 \makeatletter\edef\mystart{\the\POE@cnt}\makeatother
12814 \optbox[label=0,
12815 abspos=3.2,
12816 optboxsize=0.6 0.6](N2)(N3){$\div 8$}
12817 \makeatletter\edef\mystartb{\the\POE@cnt}\makeatother
12818 \optamp[abspos=4.7, label=. 180 b](N2)(N3){AMP}
12819 \optbox[label=0,
12820 abspos=6,
12821 optboxsize=0.6 0.6,
12822 compname=Div5](N2)(N3){$\div 5$}
12823 \optfilter[abspos=7.3, label=. 180 b](N2)(N3){\parbox{\widthof{250\,MHz}}{\centering BPF\\[-1pt] 250\,MHz}}
12824 \pnode([offset=-1]N3){N4}
12825 \pnode([offset=-2.4]N4){Mixer}
12826 \optamp[abspos=0.4, label=. 0 l global](N4)(Mixer){AMP}
12827 \optfilter[innercompalign=abs,
12828 filtertype=lowpass,
12829 abspos=1.4,
12830 compname=Bpf,
12831 extnode=t,
12832 label=. 0 l global](N4)(Mixer){%
12833 \parbox{\widthof{300\,MHz}}{LPF\\[-1pt]300\,MHz}%
12834 }
12835 \pnode([Xnodesep=-4]Mixer){MixerI}
12836 \pnode([offset=-2.5]Mixer){MixerR}
12837 \elecmixer[compname=Mixer, elecmixersize=0.7, labelalign=l](Mixer)(MixerR)(MixerI){Mixer}
12838 \pnode([Xnodesep=-9.8]MixerR){Menlo}
12839 \optbox[position=start,
12840 compname=Lo,
12841 innerlabel,
12842 style=FiberComp](Menlo)(MixerR){LO}
12843 \optdetector[extnode=r,
12844 labelalign=t,
12845 compname=Pd](Menlo)([Xnodesep=0.5]Menlo){\parbox{\widthof{2\,GHz}}{\centering PD\\[-1pt]2\,GHz}}
12846 \optfilter[abspos=1.5, labelalign=t,
12847 compname=LoBpf](\oenodeExt{Pd})(MixerR){\parbox{\widthof{250\,MHz}}{\centering BPF\\[-1pt]250\,MHz}}
12848 \optamp[abspos=3, labelalign=t,
12849 compname=LoAmp](\oenodeExt{Pd})(MixerR){AMP}
12850 \drawfiber[arrows=->]{Lo}{Pd}
12851 \drawwire(\oenodeExt{Pd}){LoBpf}{LoAmp}
12852 \drawwire[stopnode=N]{LoAmp}{Mixer}
12853 \optfilter[filtertype=lowpass,
12854 abspos=1,
12855 label=1.1 180 t,
12856 compname=LpfP2](MixerI)(\oenodeIfc{2}{Mixer}){%
12857 \parbox{\widthof{500\,kHz}}{\centering LPF\\[-1pt]500\,kHz}%
12858 }
12859 \optfilter[filtertype=lowpass,
12860 abspos=2.7,
12861 label=1.1 180 t,
12862 compname=LpfP1](MixerI)(\oenodeIfc{2}{Mixer}){%
12863 \parbox{\widthof{10.7\,MHz}}{\centering LPF\\[-1pt]10.7\,MHz}%
12864 }
12865 \optbox[compname=T0,
12866 extnode=b,
12867 position=start,
12868 optboxsize=2.2 0.8,
12869 innerlabel](MixerI)(\oenodeIfc{2}{Mixer}){$T_0$-Messung}
12870 \drawwire[wirealign=center]{Mixer}{LpfP1}{LpfP2}{}
12871 \psline[style=Wire](\oenodeExt{T0}|Menlo)(\oenodeExt{T0})
12872 \uput{0.4}[-60](\oenodeExt{T0}){\rput[l](0,0){Takt}}
12873 \drawwire[arrows=<-](\oenodeExt{Eam}){Cpl}
12874 \drawwire{Syn}{Voa1}{Am}{DelayPm}(\oenodeExt{Pm})
12875 \drawwire{Syn}{Cpl}{Iso1}{DelayPpg}{Ppg}{MzmAmp1}(\oenodeExt{Mzm1})
12876 \drawwire{Ppg}{MzmAmp2}(\oenodeExt{Mzm2})
12877 \drawwire{Iso1}{Bpf1}
12878 \multido{\i=\mystart+1,\ii=\mystartb+1}{7}{%
12879 \drawwire{\i}{\ii}}
12880 \end{pspicture}
12881 \end{LTXexample}
12882
12883 \begin{LTXexample}[pos=t, caption={caption}]
12884 \begin{pspicture}(10,3)
12885 \makeatletter
12886 \newOptexpTripole{roughsurface}
12887 \def\roughsurface@nodes{%
12888 \pssavepath[linestyle=none, arrows=-,ArrowInside=-]{\oenode@Path{A}}{%
12889 \code{0 srand}
12890 \moveto(!-3 Rand 0.5 sub 0.1 mul)
12891 \multido{\r=-2.7+0.3}{20}{%
12892 \lineto(!\r\space Rand 0.5 sub 0.1 mul)}%
12893 }%
12894 \newOptexpComp{%
12895 {0 0} tx@IntersectDict /\PIT@name{\oenode@Path{A}} get 0 0 refl {PathIfc}
12896 1 }%
12897 }%
12898 \def\roughsurface@comp{%
12899 \pstracecurve{\oenode@Path{A}}
12900 }%
12901 \makeatother
12902 \optplane[angle=90](1,3)
12903 \roughsurface(0,3)(5,0)(10,3)
12904 \addtopsstyle{Beam}{beamalign=abs, beamangle=-45, arrows=->, arrowscale=2}
12905 \multido{\r=0+0.3}{6}{%
12906 \drawbeam[beampos=\r]{1}{2}{1}}
12907 \end{pspicture}
12908 \end{LTXexample}
12909 % \iffalse
12910 %</ignore>
12911 % \fi
12912 %
12913 % \ifGERMAN\chapter{Zusatzinformationen}\fi
12914 % \ifENGLISH\chapter{Additional information}\fi
12915 %
12916 % \ifENGLISH\section{Internal component structure}\fi
12917 % \ifGERMAN\section{Interne Struktur der Komponenten}\fi
12918 %
12919 % \begin{optionlist}
12920 % \boolitem[false]{showifcnodes}
12921 % \styleitem[dotstyle=x, dotscale=1.5, linecolor=blue]{IfcNodeStyle}
12922 % \end{optionlist}
12923 %
12924 % \ifENGLISH
12925 % Every component consists internally of interfaces which are defined by a node
12926 % on the optical axis, a plane vector or a curvature radius, and by its optical
12927 % characteristics (reflective or transmittive, or both e.g. for
12928 % \Lcomp{beamsplitter}). The interface nodes can be visualized for each component
12929 % with the \Lkeyword{showifcnodes} parameter.
12930 % \fi
12931 % \ifGERMAN
12932 % Jede Komponente besteht aus Grenzflächen, die über einen Knoten auf der
12933 % optischen Achse, einen Ebenevektor bzw. einen Krümmungsradius, und ihre
12934 % optische Eigenschaft (reflektiv oder transmittiv, oder beides für
12935 % z.B. \Lcomp{beamsplitter}) definiert ist. Die Grenzflächenknoten können mit
12936 % \Lkeyword{showifcnodes} angezeigt werden.
12937 % \fi
12938 %
12939 % \iffalse
12940 %<*ignore>
12941 % \fi
12942 \begin{LTXexample}
12943 \begin{pspicture}(4,3)
12944 \psset{showifcnodes}
12945 \optbox(0,2.5)(4,2.5)
12946 \doveprism(0,1.5)(4,1.5)
12947 \lens(0,0.5)(4,0.5)
12948 \mirror(0,0.5)(3.5,0.5)(3.5,3)
12949 \end{pspicture}
12950 \end{LTXexample}
12951 % \iffalse
12952 %</ignore>
12953 % \fi
12954 %
12955 % \medskip
12956 %
12957 % \ifENGLISH
12958 % \nxLcs{draw*beam}\xLcs{drawbeam}\xLcs{drawwidebeam} calculates the distance
12959 % between the interface nodes of two components and connects the two nearest
12960 % to each other.
12961 % \fi
12962 % \ifGERMAN
12963 % \nxLcs{draw*beam}\xLcs{drawbeam}\xLcs{drawwidebeam} berechnet den Abstand
12964 % zwischen den Grenzflächenknoten zweier Komponenten und verbindet die beiden
12965 % nächstgelegenen.
12966 % \fi
12967 %
12968 % \iffalse
12969 %<*ignore>
12970 % \fi
12971 \begin{LTXexample}
12972 \begin{pspicture}(-3,-3)(3,3)
12973 \psset{optboxsize=0.6 0.5, labeloffset=0}
12974 \multido{\i=0+60,\ii=1+1}{6}{%
12975 \pnode(2.5;\i){A}
12976 \optbox([Xnodesep=-1]A)([Xnodesep=1]A){\ii}
12977 }
12978 \optbox[compname=ref](-1,0)(1,0){ref}
12979 \addtopsstyle{Beam}{arrows=->}
12980 \multido{\i=1+1}{6}{\drawbeam{ref}{\i}}
12981 \end{pspicture}
12982 \end{LTXexample}
12983 % \iffalse
12984 %</ignore>
12985 % \fi
12986 %
12987 % \begin{optionlist}
12988 % \boolitem[false]{showinterfaces}
12989 % \ifGERMAN Zeigt alle Grenzflächen einer Komponente an.\fi
12990 % \ifENGLISH Visualizes all interfaces of a component.\fi
12991 %
12992 % \iffalse
12993 %<*ignore>
12994 % \fi
12995 \begin{LTXexample}
12996 \begin{pspicture}(3,1.5)
12997 \psset[optexp]{showinterfaces, aomgratingcount=6}
12998 \addtopsstyle{IfcStyle}{linewidth=2\pslinewidth}
12999 \pnodes(0,1.5){A}(3,0.5){B}(3,1.5){C}
13000 \optaom[aomalign=symmetric](A)(B)(C){symmetric}
13001 \addtopsstyle{Beam}{arrows=->, linewidth=4\pslinewidth}
13002 \drawbeam[linecolor=red!50](A){}(C)
13003 \drawbeam[linecolor=red](A){}(B)
13004 \end{pspicture}
13005 \end{LTXexample}
13006
13007 \begin{LTXexample}
13008 \begin{pspicture}(3,1.5)
13009 \psset[optexp]{showinterfaces, aomgratingcount=6}
13010 \addtopsstyle{IfcStyle}{linewidth=2\pslinewidth}
13011 \pnodes(0,1){A}(3,1){B}(3,1.5){C}
13012 \optaom[aomalign=straight](A)(B)(C){straight}
13013 \addtopsstyle{Beam}{arrows=->, linewidth=4\pslinewidth}
13014 \drawbeam[linecolor=red!50](A){}(C)
13015 \drawbeam[linecolor=red](A){}(B)
13016 \end{pspicture}
13017 \end{LTXexample}
13018 % \iffalse
13019 %</ignore>
13020 % \fi
13021 %
13022 % \styleitem[linestyle=dashed, dash=1pt 1pt, linecolor=red!70!black]{IfcStyle}
13023 % \ifGERMAN
13024 % Bestimmt das Aussehen der mit \Lkeyword{showinterfaces} angezeigten
13025 % Grenzflächen.
13026 % \fi
13027 % \ifENGLISH
13028 % Determines the appearance of the interfaces, which are shown with
13029 % \Lkeyword{showinterfaces}.
13030 % \fi
13031 % \end{optionlist}
13032 %
13033 % \ifENGLISH\section{Overview of special nodes}\fi
13034 % \ifGERMAN\section{Übersicht der Spezialknoten}\fi
13035 %
13036 % \ifENGLISH In this section you find overviews of all special nodes which
13037 % each component provides. The possible positions for external and rotation
13038 % reference nodes, and the interface nodes.
13039 % \fi
13040 % \ifGERMAN
13041 % In diesem Abschnitt finden sie Übersichten für alle Spezialknoten, die von
13042 % allen Komponenten bereitgestellt werden: die möglichen Positionen für externe
13043 % und Rotationsknoten, und die Grenzflächenknoten.
13044 % \fi
13045 %
13046 % \ifENGLISH\subsection{External and rotation reference nodes}\fi
13047 % \ifGERMAN\subsection{Externe und Rotationsreferenzknoten}\fi
13048 % \label{sec:overview-extnode}
13049 %
13050 % \ifENGLISH
13051 % Here, you find all possible external (\prettyref{sec:extnode}) and rotation
13052 % reference nodes (\prettyref{sec:rotrefnode}) for all components. Displayed are
13053 % all possible combinations of \opt{t}, \opt{c}, or \opt{b} with \opt{l},
13054 % \opt{c}, or \opt{r}. Not all components support all combinations, e.g. a plain
13055 % \Lcomp{mirror} ignores \opt{t} and \opt{b} and an \Lcomp{optplate} ignores \opt{l}
13056 % and \opt{r}.
13057 %
13058 % Instead of these values also fractional parts can be used: \opt{t}
13059 % corresponds to $+1\cdot\Delta y$, \opt{b} corresponds to
13060 % $-1\cdot\Delta y$, \opt{l} corresponds to $-1\cdot\Delta x$, and
13061 % \opt{r} corresponds to $+1\cdot\Delta x$. This can be especially
13062 % useful for round outer shapes, as the following examples shows.
13063 % \fi
13064 % \ifGERMAN
13065 % Hier finden Sie eine Übersicht über alle möglichen externen Knoten
13066 % (\prettyref{sec:extnode}) und Rotationsknoten (\prettyref{sec:rotrefnode})
13067 % aller Komponenten. Angezeigt werden die Positionen für alle möglichen
13068 % Kombinationen von \opt{t}, \opt{c} oder \opt{b} mit \opt{l}, \opt{c} oder
13069 % \opt{r}. Es sind nicht immer alle Möglichkeiten vorhanden, so können \opt{t}
13070 % und \opt{b} ignoriert werden (z.B. bei \Lcomp{mirror}), oder auch \opt{r} und
13071 % \opt{l} (z.B. bei \Lcomp{optplate}).
13072 %
13073 % Anstelle dieser Werte können auch Bruchteile davon verwendet werden:
13074 % \opt{t} entspricht $+1\cdot\Delta y$, \opt{b} entspricht
13075 % $-1\cdot\Delta y$, \opt{l} entspricht $-1\cdot\Delta x$ und \opt{r}
13076 % entspricht $+1\cdot\Delta x$. Das kann gerade im Fall einer runden
13077 % Außenform sehr hilfreich sein, wie das folgende Beispiel zeigt.
13078 % \fi
13079 % \iffalse
13080 %<*ignore>
13081 % \fi
13082 \begin{LTXexample}[morekeywords={[21]extnode}]
13083 \begin{pspicture}(2,1)
13084 \elecsynthesizer[extnode={-0.707,0.707}](1,0.5)(2,0.5)
13085 \psdot(\oenodeExt{})
13086 \end{pspicture}
13087 \end{LTXexample}
13088 % \iffalse
13089 %</ignore>
13090 % \fi
13091 %
13092 % \newpsstyle{ExtNodeStyle}{dotstyle=B+, dotangle=45, linewidth=2\pslinewidth, linecolor=DOrange}
13093 % \makeatletter
13094 % \newcommand{\testextnodes}[3][]{%
13095 % \begin{pspicture}(3,2.2)
13096 % \@nameuse{#2}[#1]#3
13097 % \rput[t](1.5,0.9){\ttfamily\small
13098 % \ifx\\#1\\\relax
13099 % \begin{tabular}{@{}c@{}}\textbackslash #2\end{tabular}
13100 % \else\begin{tabular}{@{}c@{}}\textbackslash #2\\ #1\end{tabular}\fi}
13101 % \POE@extnodes[style=ExtNodeStyle,#1]{#2}
13102 % \end{pspicture}
13103 % }%
13104 % \makeatother
13105 %
13106 % \ifENGLISH\subsubsection*{Free-ray components}\fi
13107 % \ifGERMAN\subsubsection*{Freistrahlkomponenten}\fi
13108 %
13109 % \testextnodes{lens}{(0,1.5)(3,1.5)}
13110 % \testextnodes[lensradius=-1]{lens}{(0,1.5)(3,1.5)}
13111 % \testextnodes{optplate}{(0,1.5)(3,1.5)}
13112 % \testextnodes{optretplate}{(0,1.5)(3,1.5)}
13113 % \testextnodes[phwidth=0.2]{pinhole}{(0,1.5)(3,1.5)}
13114 % \testextnodes{optbox}{(0,1.5)(3,1.5)}
13115 % \testextnodes{crystal}{(0,1.5)(3,1.5)}
13116 % \testextnodes{optdetector}{(0,1.5)(2,1.5)}
13117 % \testextnodes[dettype=diode]{optdetector}{(0,1.5)(2,1.5)}
13118 % \testextnodes{optdiode}{(0,1.5)(3,1.5)}
13119 % \testextnodes{doveprism}{(0,1.5)(3,1.5)}
13120 % \testextnodes[glanthompsongap=0.15]{glanthompson}{(0,1.5)(3,1.5)}
13121 % \bgroup
13122 % \addtopsstyle{PiezoMirror}{unit=1.5}
13123 % \testextnodes[mirrortype=piezo]{mirror}{(0,1.5)(2,1.5)(2,0)}
13124 % \egroup
13125 % \bgroup\psset{mirrordepth=0.25}
13126 % \testextnodes[mirrortype=extended]{mirror}{(0,1.5)(2,1.5)(2,0)}
13127 % \testextnodes{mirror}{(0,1.5)(2,1.5)(2,0)}
13128 % \testextnodes[mirrortype=semitrans]{mirror}{(0,1.5)(2,1.5)(2,0)}
13129 % \egroup
13130 % \testextnodes{optprism}{(0,1.5)(1.5,1.5)(3,1)}
13131 % \testextnodes{optgrating}{(0,1.5)(2,1.5)(2,0)}
13132 % \testextnodes{beamsplitter}{(0,1.5)(2,1.5)(2,0)}
13133 % \testextnodes[bsstyle=plate]{beamsplitter}{(0,1.5)(2,1.5)(2,0)}
13134 % \testextnodes{rightangleprism}{(0,1.5)(2.5,1)(0,0.5)}
13135 % \testextnodes{pentaprism}{(0,1.3)(2,1.3)(2,0)}
13136 % \testextnodes{optarrowcomp}{(0,1.5)(3,1.5)}
13137 % \testextnodes{optbarcomp}{(0,1.5)(3,1.5)}
13138 % \begin{pspicture}(3,2)
13139 % \optdipole[optdipolesize=1](0,1.5)(3,1.5){}
13140 % \rput[t](1.5,0.9){\ttfamily\small
13141 % \begin{tabular}{@{}c@{}}\textbackslash optdipole\end{tabular}}
13142 % \makeatletter
13143 % \POE@extnodes[style=ExtNodeStyle, optdipolesize=1]{optdipole}
13144 % \makeatother
13145 % \end{pspicture}
13146 % \begin{pspicture}(3,2)
13147 % \transmissiongrating(0,1.5)(1.5,1.5)(3,1)
13148 % \rput[t](1.5,0.9){\ttfamily\small
13149 % \begin{tabular}{@{}c@{}}\textbackslash transmissiongrating\end{tabular}}
13150 % \makeatletter
13151 % \POE@extnodes[style=ExtNodeStyle]{transmissiongrating}
13152 % \makeatother
13153 % \end{pspicture}
13154 %
13155 % \ifENGLISH\subsubsection*{Fiber components}\fi
13156 % \ifGERMAN\subsubsection*{Faserkomponenten}\fi
13157 %
13158 % \testextnodes{optfiber}{(0,1)(3,1)}
13159 % \testextnodes{optamp}{(0,1.5)(3,1.5)}
13160 % \testextnodes{optmzm}{(0,1.5)(3,1.5)}
13161 % \testextnodes{optfilter}{(0,1.5)(3,1.5)}
13162 % \testextnodes{polcontrol}{(0,1.5)(3,1.5)}
13163 % \testextnodes{optisolator}{(0,1.5)(3,1.5)}
13164 % \testextnodes{optswitch}{(0,1.5)(3,1.5)}
13165 % \testextnodes{fiberdelayline}{(0,1.5)(3,1.5)}
13166 % \testextnodes{optfiberpolarizer}{(0,1.5)(3,1.5)}
13167 % \testextnodes{fibercollimator}{(0,1.5)(3,1.5)}
13168 % \testextnodes{optcirculator}{(0,1.6)(3,1.6)(1.5,0.9)}
13169 % \testextnodes[couplersize=0.5 0.3]{optcoupler}{(0,2)(0,1)(3,2)(3,1)}
13170 % \testextnodes{fiberbox}{(0,1.75)(0,1.25)(3,1.75)(3,1.25)}
13171 %
13172 % \ifENGLISH\subsubsection*{Electrical components}\fi
13173 % \ifGERMAN\subsubsection*{Elektrische Komponenten}\fi
13174 %
13175 % \testextnodes{eleccoupler}{(0,2)(0,1)(3,2)(3,1)}
13176 % \testextnodes{elecmixer}{(0,1.6)(3,1.6)(1.5,0.9)}
13177 % \testextnodes{elecsynthesizer}{(1,1.5)(3,1.5)}
13178 %
13179 %
13180 % \ifENGLISH\subsection{Interface nodes}\fi
13181 % \ifGERMAN\subsection{Grenzflächenknoten}\fi
13182 % \label{sec:overview-ifcnode}
13183 %
13184 % \ifENGLISH
13185 % Here, all available components and their interface nodes are listed. If
13186 % a node is labeled as «1, N», it means that both nodes are equal.
13187 % \fi
13188 % \ifGERMAN Hier sind alle Komponenten und deren Grenzflächenknoten
13189 % aufgelistet. Ist ein Knoten mit «1, N» beschriftet, dann fallen beide
13190 % Knoten zusammen.
13191 % \fi
13192 %
13193 % \ifENGLISH\subsubsection*{Free-ray components}\fi
13194 % \ifGERMAN\subsubsection*{Freistrahlkomponenten}\fi
13195 %
13196 % \begingroup
13197 % \addtopsstyle{Beam}{arrows=->, arrowinset=0, arrowscale=1.5}
13198 % \newcommand{\showdipoleifc}[1]{%
13199 % \begin{pspicture}(0,-0.5)(3,1)
13200 % \pnode(0,0.5){A}\pnode(3,0.5){B}
13201 % \csname #1\endcsname(A)(B)
13202 % \drawbeam(A){}(B)
13203 % \psdot(\oenodeIn{})\uput[-135](\oenodeIn{}){1}
13204 % \psdot(\oenodeOut{})\uput[-45](\oenodeOut{}){N}
13205 % \rput[bl](0,-0.4){\ttfamily\textbackslash #1}
13206 % \end{pspicture}
13207 % }%
13208 % \newcommand{\showdipoleoneifc}[1]{%
13209 % \begin{pspicture}(0,-0.5)(3,1)
13210 % \pnode(0,0.5){A}\pnode(3,0.5){B}
13211 % \csname #1\endcsname(A)(B)
13212 % \drawbeam(A){}(B)
13213 % \psdot(\oenodeIn{})\uput[-135](\oenodeIn{}){1, N}
13214 % \rput[bl](0,-0.4){\ttfamily\textbackslash #1}
13215 % \end{pspicture}
13216 % }%
13217 % \showdipoleifc{lens}\hspace{\fill}%
13218 % \showdipoleoneifc{optplate}\hspace{\fill}%
13219 % \showdipoleifc{optretplate}%
13220 % \bigskip
13221 %
13222 % \noindent\showdipoleoneifc{pinhole}\hspace{\fill}%
13223 % \showdipoleifc{optbox}\hspace{\fill}%
13224 % \showdipoleifc{crystal}
13225 % \bigskip
13226 %
13227 % \noindent
13228 % \begin{pspicture}(0, -0.5)(3,1)
13229 % \pnode(0,0.5){A}\pnode(2,0.5){B}
13230 % \optdetector(A)(B)
13231 % \drawbeam(A){}
13232 % \psdot(\oenodeIn{})\uput[-135](\oenodeIn{}){1}
13233 % \psdot(\oenodeOut{})\uput[-45](\oenodeOut{}){N}
13234 % \rput[bl](0,-0.4){\ttfamily\textbackslash optdetector}
13235 % \end{pspicture}%
13236 % \hspace{\fill}%
13237 % \bgroup
13238 % \addtopsstyle{Beam}{beaminside=false}%
13239 % \showdipoleifc{optdiode}\egroup%
13240 % \hspace{\fill}%
13241 % \begin{pspicture}(0,-0.5)(3,1)
13242 % \pnode(0,0.5){A}\pnode(3,0.5){B}
13243 % \doveprism(A)(B)
13244 % \drawbeam[raytrace=false](A){}(B)
13245 % \psdot(\oenodeIn{})\uput[135](\oenodeIn{}){1}
13246 % \psdot(\oenodeIfc{2}{})\uput[90](\oenodeIfc{2}{}){2}
13247 % \psdot(\oenodeOut{})\uput[45](\oenodeOut{}){N}
13248 % \rput[bl](0,-0.4){\ttfamily\textbackslash doveprism}
13249 % \end{pspicture}%
13250 %
13251 % \begin{pspicture}(3,1.5)
13252 % \pnode(0,1){A}\pnode(2.5,1){B}\pnode(2.5,0){C}
13253 % \mirror(A)(B)(C)
13254 % \drawbeam(A){}(C)
13255 % \psdot(\oenodeIn{})\uput[-135](\oenodeIn{}){1, N}
13256 % \rput[bl](0,0){\ttfamily\textbackslash mirror}
13257 % \end{pspicture}%
13258 % \hspace{\fill}%
13259 % \begin{pspicture}(3,1.5)
13260 % \pnode(0,1){A}\pnode(1.5,1){B}\pnode(3,0){C}
13261 % \optprism(A)(B)(C)
13262 % \drawbeam[raytrace=false](A){}(C)
13263 % \psdot(\oenodeIn{})\uput[135](\oenodeIn{}){1}
13264 % \psdot(\oenodeOut{})\uput[45](\oenodeOut{}){N}
13265 % \rput[bl](0,0){\ttfamily\textbackslash optprism}
13266 % \end{pspicture}%
13267 % \hspace{\fill}%
13268 % \begin{pspicture}(3,1.5)
13269 % \pnode(0,1.5){A}\pnode(1.5,1){B}\pnode(3,1.5){C}
13270 % \optprism[prismtype=reflective](A)(B)(C)
13271 % \drawbeam[raytrace=false](A){}(C)
13272 % \psdot(\oenodeIn{})\uput[110](\oenodeIn{}){1}
13273 % \psdot(\oenodeOut{})\uput[70](\oenodeOut{}){N}
13274 % \psdot(\oenodeIfc{2}{})\uput[90](\oenodeIfc{2}{}){2}
13275 % \rput[tl](0,0.42){\ttfamily\begin{tabular}{@{}l@{}}\textbackslash optprism\\prismtype=reflective\end{tabular}}
13276 % \end{pspicture}%
13277 %
13278 % \begin{pspicture}(3,1.5)
13279 % \pnode(0,1){A}\pnode(2.5,1){B}\pnode(2.5,0){C}
13280 % \optgrating(A)(B)(C)
13281 % \drawbeam(A){}(C)
13282 % \psdot(\oenodeIn{})\uput[-135](\oenodeIn{}){1, N}
13283 % \rput[bl](0,0){\ttfamily\textbackslash optgrating}
13284 % \end{pspicture}%
13285 % \hspace{\fill}%
13286 % \begin{pspicture}(0,-0.5)(3,1.7)
13287 % \pnode(0,0.7){A}\pnode(3,0.7){B}
13288 % \glanthompson[glanthompsonsize=1.8 1, glanthompsongap=0.2](A)(B)
13289 % \drawbeam(A){}(B)
13290 % \psdot(\oenodeIn{})\uput[135](\oenodeIn{}){1}
13291 % \psdot(\oenodeIfc{2}{})\uput[45](\oenodeIfc{2}{}){2}
13292 % \psdot(\oenodeIfc{3}{})\uput[30](\oenodeIfc{3}{}){3,C}
13293 % \psdot(\oenodeIfc{4}{})\uput[150](\oenodeIfc{4}{}){4}
13294 % \psdot(\oenodeOut{})\uput[45](\oenodeOut{}){N}
13295 % \rput[bl](0,-0.4){\ttfamily\textbackslash glanthompson}
13296 % \end{pspicture}%
13297 % \hspace{\fill}%
13298 % \showdipoleifc{optarrowcomp}%
13299 %
13300 % \showdipoleifc{optbarcomp}\hspace{\fill}%
13301 % \begin{pspicture}(0,-0.5)(3,1.7)
13302 % \pnode(0,0.7){A}\pnode(3,0.7){B}
13303 % \optdipole[optdipolesize=1](A)(B){}
13304 % \drawbeam(A){}(B)
13305 % \psdot(\oenodeIn{})\uput[135](\oenodeIn{}){1}
13306 % \psdot(\oenodeOut{})\uput[45](\oenodeOut{}){N}
13307 % \rput[bl](0,-0.4){\ttfamily\textbackslash optdipole}
13308 % \end{pspicture}%
13309 % \hspace{\fill}%
13310 % \begin{pspicture}(0,-0.5)(3,1.7)
13311 % \pnode(0,0.7){A}\pnode(1.5,0.7){B}\pnode(3,0.4){C}
13312 % \transmissiongrating(A)(B)(C)
13313 % \drawbeam(A){}(C)
13314 % \psdot(\oenodeIn{})\uput[45](\oenodeIn{}){1, N}
13315 % \rput[bl](0,-0.4){\ttfamily\textbackslash transmissiongrating}
13316 % \end{pspicture}%
13317 %
13318 % \noindent\begin{pspicture}(3,2.5)
13319 % \pnode(0,1.5){A}\pnode(2.5,1.5){B}\pnode(2.5,0.4){C}
13320 % \beamsplitter[bssize=1.2](A)(B)(C)
13321 % \drawbeam(A){}(C)
13322 % \psdot(\oenodeIfc{1}{})\uput[135](\oenodeIfc{1}{}){1}
13323 % \psdot(\oenodeIfc{2}{})\uput[-45](\oenodeIfc{2}{}){2}
13324 % \psdot(\oenodeIfc{3}{})\uput[60](\oenodeIfc{3}{}){3,C}
13325 % \psdot(\oenodeIfc{4}{})\uput[0](\oenodeIfc{4}{}){4}
13326 % \psdot(\oenodeIfc{N}{})\uput[90](\oenodeIfc{N}{}){N}
13327 % \rput[bl](0,0){\ttfamily\textbackslash beamsplitter}
13328 % \end{pspicture}%
13329 % \hspace{\fill}%
13330 % \begin{pspicture}(3,2.5)
13331 % \pnode(0,2){A}\pnode(2.5,1.5){B}\pnode(0,1){C}
13332 % \rightangleprism[raprismsize=2](A)(B)(C)
13333 % \drawbeam[arrows=->, arrowinset=0, arrowscale=1.5](A){}(C)
13334 % \psdot(\oenodeIn{})\uput[135](\oenodeIn{}){1}
13335 % \psdot(\oenodeIfc{2}{})\uput[45](\oenodeIfc{2}{}){2}
13336 % \psdot(\oenodeIfc{3}{})\uput[-45](\oenodeIfc{3}{}){3}
13337 % \psdot(\oenodeOut{})\uput[-135](\oenodeOut{}){N}
13338 % \rput[bl](0,0){\ttfamily\textbackslash rightangleprism}
13339 % \end{pspicture}%
13340 % \hspace{\fill}%
13341 % \begin{pspicture}(3,2.5)
13342 % \pnode(0,1.5){A}\pnode(2.1,1.5){B}\pnode(2.1,0.4){C}
13343 % \pentaprism[pentaprismsize=1](A)(B)(C)
13344 % \drawbeam[arrows=->, arrowinset=0, arrowscale=1.5](A){}(C)
13345 % \psdot(\oenodeIn{})\uput[135](\oenodeIn{}){1}
13346 % \psdot(\oenodeIfc{2}{})\uput[0](\oenodeIfc{2}{}){2}
13347 % \psdot(\oenodeIfc{3}{})\uput[90](\oenodeIfc{3}{}){3}
13348 % \psdot(\oenodeOut{})\uput[-45](\oenodeOut{}){N}
13349 % \rput[bl](0,0){\ttfamily\textbackslash pentaprism}
13350 % \end{pspicture}%
13351 % \endgroup
13352 %
13353 % \ifENGLISH\subsubsection*{Fiber components}\fi
13354 % \ifGERMAN\subsubsection*{Faserkomponenten}\fi
13355 %
13356 % \newcommand{\showfdipoleifc}[1]{%
13357 % \begin{pspicture}(0,-0.5)(3,1)
13358 % \pnode(0,0.5){A}\pnode(3,0.5){B}
13359 % \csname #1\endcsname(A)(B)
13360 % \psdot(\oenodeIn{})\uput[-135](\oenodeIn{}){1}
13361 % \psdot(\oenodeOut{})\uput[-45](\oenodeOut{}){N}
13362 % \rput[bl](0,-0.4){\ttfamily\textbackslash #1}
13363 % \end{pspicture}%
13364 % }%
13365 % \begingroup
13366 % \addtopsstyle{Fiber}{ArrowInside=->, ArrowInsidePos=0.6, arrowscale=1.5, arrowinset=0}
13367 % \vspace*{5mm}%
13368 % \showfdipoleifc{optfiber}\hspace{\fill}%
13369 % \showfdipoleifc{optamp}\hspace{\fill}%
13370 % \showfdipoleifc{optmzm}%
13371 % \bigskip
13372 %
13373 % \noindent\showfdipoleifc{optfilter}\hspace{\fill}%
13374 % \showfdipoleifc{polcontrol}\hspace{\fill}%
13375 % \showfdipoleifc{optisolator}%
13376 % \bigskip
13377 %
13378 % \noindent\showfdipoleifc{optswitch}\hspace{\fill}%
13379 % \showfdipoleifc{fiberdelayline}\hspace{\fill}%
13380 % \showfdipoleifc{optfiberpolarizer}%
13381 % \bigskip
13382 %
13383 % \bgroup\psset{beam}
13384 % \noindent\showfdipoleifc{fibercollimator}\egroup
13385 % \hspace{\fill}%
13386 % \begin{pspicture}(0,-0.5)(3,1.5)
13387 % \pnode(0,1){A}\pnode(3,1){B}\pnode(1.2,-0.1){C}
13388 % \optcirculator(A)(B)(C)
13389 % \psdot(\oenodeIn{})\uput[-135](\oenodeIn{}){1}
13390 % \psdot(\oenodeIfc{2}{})\uput[-45](\oenodeIfc{2}{}){2}
13391 % \psdot(\oenodeOut{})\uput[-45](\oenodeOut{}){N}
13392 % \rput[bl](0,-0.4){\ttfamily\textbackslash optcirculator}
13393 % \end{pspicture}\hspace{\fill}%
13394 % \begin{pspicture}(0,-0.5)(3,1.5)
13395 % \fiberbox[fiberboxcount=2x3](0,0.95)(0,0.45)(3,1.2)(3,0.2)
13396 % \psdot(\oenodeIn{})\uput[135](\oenodeIn{}){1}
13397 % \psdot(\oenodeIfc{2}{})\uput[-135](\oenodeIfc{2}{}){2}
13398 % \psdot(\oenodeIfc{3}{})\uput[45](\oenodeIfc{3}{}){3}
13399 % \psdot(\oenodeIfc{4}{})\uput[0](\oenodeIfc{4}{}){4}
13400 % \psdot(\oenodeOut{})\uput[-45](\oenodeOut{}){N}
13401 % \rput[bl](0,-0.4){\ttfamily\textbackslash fiberbox}
13402 % \end{pspicture}
13403 % \bigskip
13404 %
13405 % \noindent
13406 % \begin{pspicture}(0,-0.5)(3,1.5)
13407 % \pnode(0,0.75){A}\pnode(3,1.5){B}\pnode(3,0){C}
13408 % \wdmsplitter[couplersize=0.5, couplersep=0.2](A)(B)(C)
13409 % \psdot(\oenodeIn{})\uput[135](\oenodeIn{}){1}
13410 % \psdot(\oenodeIfc{2}{})\uput[90](\oenodeIfc{2}{}){2}
13411 % \psdot(\oenodeOut{})\uput[-90](\oenodeOut{}){N}
13412 % \rput[bl](0,-0.4){\ttfamily\textbackslash wdmsplitter}
13413 % \end{pspicture}%
13414 % \hspace{\fill}%
13415 % \begin{pspicture}(0,-0.5)(3,1.5)
13416 % \pnode(0,1.5){A}\pnode(0,0){B}\pnode(3,0.75){C}
13417 % \wdmcoupler[couplersize=0.5, couplersep=0.2](A)(B)(C)
13418 % \psdot(\oenodeIn{})\uput[90](\oenodeIn{}){1}
13419 % \psdot(\oenodeIfc{2}{})\uput[-90](\oenodeIfc{2}{}){2}
13420 % \psdot(\oenodeOut{})\uput[45](\oenodeOut{}){N}
13421 % \rput[bl](0,-0.4){\ttfamily\textbackslash wdmcoupler}
13422 % \end{pspicture}%
13423 % \hspace{\fill}%
13424 % \begin{pspicture}(0,-0.5)(3,1.5)
13425 % \pnode(0,1.5){A}\pnode(0,0){B}\pnode(3,1.5){C}\pnode(3,0){D}
13426 % \optcoupler[couplersize=0.5, couplersep=0.2](A)(B)(C)(D)
13427 % \psdot(\oenodeIn{})\uput[90](\oenodeIn{}){1}
13428 % \psdot(\oenodeIfc{2}{})\uput[-90](\oenodeIfc{2}{}){2}
13429 % \psdot(\oenodeIfc{3}{})\uput[90](\oenodeIfc{3}{}){3}
13430 % \psdot(\oenodeOut{})\uput[-90](\oenodeOut{}){N}
13431 % \rput[bl](0,-0.4){\ttfamily\textbackslash optcoupler}
13432 % \end{pspicture}%
13433 % \endgroup
13434 %
13435 %
13436 % \ifENGLISH\subsubsection*{Electrical components}\fi
13437 % \ifGERMAN\subsubsection*{Elektrische Komponenten}\fi
13438 % \begingroup
13439 % \addtopsstyle{Wire}{arrows=->, arrowscale=1.5, arrowinset=0, arm=0.6}
13440 % \noindent\begin{pspicture}(0, -0.5)(3,1.7)
13441 % \pnode(2,1.2){A}\pnode(3,1.2){B}
13442 % \elecsynthesizer(A)(B)
13443 % \psdot(\oenodeIn{})\uput[135](\oenodeIn{}){1}
13444 % \psdot(\oenodeOut{})\uput[45](\oenodeOut{}){N}
13445 % \rput[bl](0,-0.4){\ttfamily\textbackslash elecsynthesizer}
13446 % \end{pspicture}\hspace{\fill}%
13447 % \begin{pspicture}(0,-0.5)(3,1.7)
13448 % \pnode(0,1.2){A}\pnode(3,1.2){B}\pnode(1.2,0.1){C}
13449 % \elecmixer(A)(B)(C)
13450 % \psdot(\oenodeIn{})\uput[-135](\oenodeIn{}){1}
13451 % \psdot(\oenodeIfc{2}{})\uput[-45](\oenodeIfc{2}{}){2}
13452 % \psdot(\oenodeOut{})\uput[-45](\oenodeOut{}){N}
13453 % \rput[bl](0,-0.4){\ttfamily\textbackslash elecmixer}
13454 % \end{pspicture}\hspace{\fill}%
13455 % \begin{pspicture}(0,-0.5)(3,1.7)
13456 % \pnode(0,1.7){A}\pnode(0,0.2){B}\pnode(3,1.7){C}\pnode(3,0.2){D}
13457 % \eleccoupler(A)(B)(C)(D)
13458 % \psdot(\oenodeIn{})\uput[120](\oenodeIn{}){1}
13459 % \psdot(\oenodeIfc{2}{})\uput[-120](\oenodeIfc{2}{}){2}
13460 % \psdot(\oenodeIfc{3}{})\uput[60](\oenodeIfc{3}{}){3}
13461 % \psdot(\oenodeOut{})\uput[-60](\oenodeOut{}){N}
13462 % \rput[bl](0,-0.4){\ttfamily\textbackslash eleccoupler}
13463 % \end{pspicture}%
13464 % \endgroup
13465 %
13466 % \ifGERMAN
13467 % \section{Abwärtskompatibilität}
13468 % \fi
13469 % \ifENGLISH
13470 % \section{Backward compatibility}
13471 % \fi\label{sec:bwd-comp}
13472 %
13473 % \ifENGLISH In this section you find a comprehensive listing of the behaviour
13474 % which changed in a version compared to the previous one and which is not
13475 % backward compatible. Here you find also information on what you must note when
13476 % upgrading and how you must change old documents to work correctly with the
13477 % newer version.
13478 % \fi
13479 % \ifGERMAN
13480 % In diesem Abschnitt finden Sie eine umfangreiche Auflistung aller Änderungen
13481 % in einer Version bezüglich der Vorgängerversion, die nicht abwärts kompatibel
13482 % sind. Sie finden ebenfalls Informationen was Sie bei einem Wechsel zur neuen
13483 % Version beachten müssen, und was sie bei älteren Dokumenten gegebenenfalls
13484 % ändern müssen um mit der neuen Version korrekt zu funktionieren. \fi
13485 %
13486 %
13487 % \subsection{Version 4.3a}\label{sec:bwd-comp-4.3a}
13488 %
13489 % \begin{optionlist}
13490 % \poeitem{prismtype}
13491 % \ifGERMAN Die Option \Lkeyword{prismtype} war immer noch
13492 % «zusammengeschustert» und die automatische Positionierung war recht
13493 % willkürlich. Dies sollte nun endlich korrigiert sein, unter
13494 % Option \Lkeyword{prismalign} ist ein entsprechendes Beispiel zu sehen.
13495 % \fi
13496 % \ifENGLISH The option \Lkeyword{prismtype} was still not correctly
13497 % implemented, die automatic alignment was somewhat arbitrary. This
13498 % should be finally fixed, an example is shown for option
13499 % \Lkeyword{prismalign}.
13500 % \fi
13501 %
13502 % \poeitem{\cs{optprism}}
13503 % \ifGERMAN Die Positionierung der Beschriftung war nicht konsistent mit
13504 % anderen Komponenten, der Bezugspunkt war nicht der Mittelpunkt und
13505 % auch nicht fest. Das ist jetzt behoben, könnte aber leichte
13506 % Korrekturen an bestehenden Skizzen erfordern.
13507 % \fi
13508 % \ifENGLISH The positioning of the label was not consistent with other
13509 % components, the reference point was not the center point and did also
13510 % depend on the component rotation. This is fixed now, but could mean
13511 % little corrections for existing images.
13512 % \fi
13513 %
13514 % \end{optionlist}
13515 %
13516 % \subsection{Version 4.3}\label{sec:bwd-comp-4.3}
13517 %
13518 % \begin{optionlist}
13519 % \poeitem{\cs{rightangleprism}}
13520 % \ifGERMAN Die Ausrichtung des \Lcomp{rightangleprism} und die
13521 % Positionierung der Beschriftung war falsch. Das kommt aber nur zum
13522 % tragen, wenn Eingangs- und Ausgangsvektor sehr unterschiedliche Längen
13523 % haben.
13524 % \fi
13525 % \ifENGLISH The alignment of the \Lcomp{rightangleprism} and the
13526 % positioning of the label was wrong. This became apparent only if the
13527 % input and output vectors had very different lenghts.
13528 % \fi
13529 % \end{optionlist}
13530 %
13531 % \subsection{Version 4.2}\label{sec:bwd-comp-4.2}
13532 %
13533 % \begin{optionlist}
13534 % \poeitem{prismtype}
13535 % \ifGERMAN
13536 % Die in Version 4.1 eingeführte Option \Lkeyword{prismtype} benötigte
13537 % immer eine zusätzliche Drehung der Komponente um 180\textdegree. Das
13538 % entfällt nun, da die Komponentenausrichtung korrigiert wurde,
13539 % erfordert aber gegebenenfalls eine Korrektur von Skizzen, die mit
13540 % Version 4.1 erstellt wurden.
13541 % \fi
13542 % \ifENGLISH
13543 % The option \Lkeyword{prismtype}, introduced in version 4.1, always
13544 % needed an additional angle rotation of 180\textdegree. This is not
13545 % necessary anymore, the component behavior was corrected, but this may
13546 % require adjustment of drawings created with version 4.1.
13547 % \fi
13548 % \end{optionlist}
13549 %
13550 % \subsection{Version 4.0}\label{sec:bwd-comp-4.0}
13551 %
13552 % \ifGERMAN Die Option \Lkeyword*{conn} und das alte, fehlerhafte
13553 % Verfahren Strahlverbindungen zu zeichnen, wurde nun entfernt. Zur
13554 % Migration älterer Dokumente siehe
13555 % \prettyref{sec:bwd-comp-3.0-conn}. Damit wurde auch die Option
13556 % \Lkeyword*{connjoin} überflüssig und wurde entfernt.
13557 % \fi
13558 % \ifENGLISH The option \Lkeyword*{conn} and the old, buggy code for beam
13559 % connections was finally removed. To update older documents, see
13560 % \prettyref{sec:bwd-comp-3.0-conn}. With this change also option
13561 % \Lkeyword*{connjoin} became useless.
13562 % \fi
13563 %
13564 % \ifENGLISH
13565 % The appearance of \Lcomp{optfiber} changed slightly, because the old
13566 % implementation was buggy and the separation between the loops depended
13567 % on the number of loops (see example below). Note, that to achieve a
13568 % similar default look, the default value for \Lkeyword{fiberloopsep}
13569 % was changed from 0.3 to 0.2. Therefore, the interface nodes are a bit
13570 % closer together.
13571 % \fi
13572 % \ifGERMAN
13573 % Das Aussehen von \Lcomp{optfiber} hat sich etwas geändert, da in der
13574 % vorherigen Implementierung der Abstand zwischen zwei Schleifen von der
13575 % Anzahl der Schleifen abhing (siehe das Beispiel unten). Beachten Sie,
13576 % dass die Voreinstellung für \Lkeyword{fiberloopsep} von 0.3 auf 0.2
13577 % geändert wurde um ein ähnliches Aussehen bei Verwendung der
13578 % Voreinstellungen zu erhalten. Dadurch sitzen die Eingangs- und
13579 % Ausgangsknoten jedoch etwas näher zusammen (siehe unten).
13580 % \fi
13581 %
13582 % \makeatletter
13583 % \begin{pspicture}[showgrid](0,-0.3)(6,1.4)
13584 % \newOptexpFiberDipole{optfiber@old}
13585 % \def\optfiber@old@ref{%
13586 % \POE@setref{/@@x 0.3 \POE@key@fiberloops\space 1 sub mul 0.5 mul def }%
13587 % }%
13588 % \def\optfiber@old@nodes{%
13589 % \newOptexpFiberComp{{@@x neg 0} {@@x 0}}%
13590 % \ignorespaces}%
13591 % \def\optfiber@old@comp{%
13592 % \edef\@f@cnt{\POE@key@fiberloops\space}%
13593 % \edef\@f@r{0.4 }%
13594 % \edef\@f@sep{0.3 }%
13595 % \parametricplot[plotpoints=200, style=Fiber]{0}{1}{%
13596 % t 360 mul \@f@cnt mul sin \@f@r mul \@f@sep
13597 % \@f@cnt 1 sub mul t 0.5 sub mul add
13598 % 1 t 360 mul \@f@cnt mul cos sub \@f@r mul
13599 % }%
13600 % \ignorespaces}%
13601 % \psset[optexp]{label=0.5 . b, showifcnodes}
13602 % \optfiber@old[fiberloops=2](0,0.5)(2,0.5)
13603 % \optfiber@old[fiberloops=3](2,0.5)(4,0.5){old}
13604 % \optfiber@old[fiberloops=4](4,0.5)(6,0.5)
13605 % \end{pspicture}
13606 % \makeatother
13607 % \hspace{\fill}
13608 % \begin{pspicture}[showgrid](0,-0.3)(6,1.4)
13609 % \psset[optexp]{label=0.5 . b, showifcnodes}
13610 % \optfiber[fiberloops=2](0,0.5)(2,0.5)
13611 % \optfiber[fiberloops=3](2,0.5)(4,0.5){new}
13612 % \optfiber[fiberloops=4](4,0.5)(6,0.5)
13613 % \end{pspicture}
13614 %
13615 % \ifGERMAN Das Makro \Lcs*{newOptexpDipoleNolabel} wurde entfernt und
13616 % kann ohne weitere Änderungen durch \Lcs{newOptexpDipole} ersetzt werden.
13617 % \fi
13618 % \ifENGLISH The macro \Lcs*{newOptexpDipoleNolabel} was removed and can
13619 % be replaced by \Lcs{newOptexpDipole} without any further changes.
13620 % \fi
13621 %
13622 % \ifGERMAN The alte Syntax mit \nxLcs{mycomp@iii} zur Definition eigener
13623 % Komponenten wird nicht mehr unterstützt.
13624 % \fi
13625 % \ifENGLISH The old syntax of defining own components with
13626 % \nxLcs{mycomp@iii} is not supported anymore.
13627 % \fi
13628 %
13629 % \subsection{Version 3.3}\label{sec:bwd-comp-3.3}
13630 %
13631 % \begin{optionlist}
13632 % \poeitem{\textbackslash opttripole}
13633 % \ifGERMAN Der Ausgangswinkel für die Beschriftung des
13634 % \Lcomp{opttripole} wurde um 180° geändert um konsistent zu den anderen
13635 % Dreipolen zu sein.
13636 % \fi
13637 % \ifENGLISH Changed the reference angle for the label of the
13638 % \Lcomp{opttripole} to be consistent with the other tripoles.
13639 % \fi
13640 % \end{optionlist}
13641 %
13642 % \ifGERMAN\subsubsection{Strahlknoten}\fi
13643 % \ifENGLISH\subsubsection{Beam nodes}\fi
13644 %
13645 % \ifGERMAN Vor Version 3.3 sind the Strahlknoten \Lcs{oenodeBeamUp} und
13646 % \Lcs{oenodeBeamLow} nicht korrekt ausgerichtet gewesen, «upper» und
13647 % «lower» war immer relativ zur Strahlrichtung (analog zu
13648 % \Lkeyword{extnodealign}\opt{=relative}).
13649 %
13650 % Das konnte zu Problemen führen wenn \Lkeyword{loadbeampoints} zusammen
13651 % mit \Lkeyword{beamdiv} verwendet wurde, da das Vorzeichen von
13652 % \Lkeyword{beamdiv} nicht eindeutig kontrahierenden bzw. expandierenden
13653 % Strahlen zugeordnet war.
13654 %
13655 % Seit Version 3.3 werden die Strahlknoten analog zu
13656 % \Lkeyword{extnodealign}\opt{=absolute} definiert und die Zuordnung
13657 % eines negativen \Lkeyword{beamdiv} mit kontrahierenden Strahlen sowie
13658 % positiven \Lkeyword{beamdiv} mit expandierenden Strahlen ist immer
13659 % gültig. In den folgenden beiden Beispielen ist immer der
13660 % \Lcs{oenodeBeamUp} gekennzeichnet.
13661 % \fi
13662 % \ifENGLISH Before version 3.3 the beam nodes
13663 % \Lcs{oenodeBeamUp} and \Lcs{oenodeBeamLow} were not swapped correctly
13664 % and the orientation of «upper» and «lower» was only relative to the
13665 % beam direction (equivalent to
13666 % \Lkeyword{extnodealign}\opt{=relative}).
13667 %
13668 % This could lead to problems when using \Lkeyword{loadbeampoints} with
13669 % \Lkeyword{beamdiv}. In that case the sign of \Lkeyword{beamdiv} was
13670 % not unambiguously associated with contracting or expanding beam.
13671 %
13672 % As of version 3.3 the beam nodes are arranged according to
13673 % \Lkeyword{extnodealign}\opt{=absolute} and the association of negative
13674 % \Lkeyword{beamdiv} with a contracting and positive \Lkeyword{beamdiv}
13675 % with an expanding beam is always valid. In the following two examples
13676 % all \Lcs{oenodeBeamUp} are marked.
13677 % \fi
13678 %
13679 % \iffalse
13680 %<*ignore>
13681 % \fi
13682 \begin{LTXexample}
13683 \begin{pspicture}(-2,-2)(2,2)
13684 \addtopsstyle{Beam}{fillstyle=solid, fillcolor=green!40}
13685 \multido{\i=0+90,\ia=1+2,\ib=2+2}{4}{%
13686 \optplate[position=end](0.3;\i)(1;\i)
13687 \optplate[position=end, plateheight=1.5](1;\i)(2;\i)
13688 \drawwidebeam[beamwidth=0.2](0.3;\i){\ia}
13689 \pnode(\oenodeBeamUp{}){Up}
13690 \drawwidebeam[loadbeampoints, beamdiv=45]{\ia-\ib}
13691 \psdot(Up)\psdot(\oenodeBeamUp{})
13692 }
13693 \end{pspicture}
13694 \end{LTXexample}
13695
13696 \begin{LTXexample}
13697 \begin{pspicture}(-2,-2)(2,2)
13698 \addtopsstyle{Beam}{fillstyle=solid, fillcolor=green!40}
13699 \multido{\i=0+90,\ia=1+2,\ib=2+2}{4}{%
13700 \optplate[position=end](0.3;\i)(1;\i)
13701 \optplate[position=end](1;\i)(2;\i)
13702 \drawwidebeam[beamwidth=0.2](0.3;\i){\ia}
13703 \pnode(\oenodeBeamUp{}){Up}
13704 \drawwidebeam[loadbeampoints, beamdiv=-45]{\ia-\ib}
13705 \psdot(Up)\psdot(\oenodeBeamUp{})
13706 }
13707 \end{pspicture}
13708 \end{LTXexample}
13709 % \iffalse
13710 %</ignore>
13711 % \fi
13712 %
13713 % \subsection{Version 3.0}\label{sec:bwd-comp-3.0}
13714 %
13715 % \ifENGLISH The changes in version 3.0 compared to version 2.1 which are not
13716 % backward compatible.
13717 % \fi
13718 % \ifGERMAN Die Änderungen in Version 3.0 gegenüber Version 2.1, die nicht
13719 % abwärtskompatibel sind.
13720 % \fi
13721 %
13722 % \ifENGLISH\subsubsection{General parameters}\fi
13723 % \ifGERMAN\subsubsection{Allgemeine Parameter}\fi
13724 %
13725 % \begin{optionlist}
13726 % \optitem*[new]{namingscheme}{old, new}
13727 % \ifGERMAN
13728 % In Version 2.1 mussten spezielle Komponentenknoten über ihren expliziten
13729 % Namen angesprochen werden. Wenn Sie das alte Namensschema benötigen, da Sie
13730 % direkt auf die Knoten zugegriffen haben, so müssen Sie
13731 % \nxLkeyword{namingscheme=old} verwenden. Seit Version 3.0 werden Makros für
13732 % den Zugriff auf die Komponentenknoten bereitgestellt, so dass das
13733 % eigentlichen Namensschema unerheblich ist, siehe \prettyref{sec:objnodes}
13734 % \fi
13735 % \ifENGLISH
13736 % In version 2.1 special component nodes had to be accessed by their explicit
13737 % name. If you need the old naming scheme, because you accessed internal nodes
13738 % directly, then you must set \nxLkeyword{namingscheme=old}. Since version 3.0
13739 % explicit macros are provided to access all special component nodes, so that
13740 % the actual naming scheme does not matter, see \prettyref{sec:objnodes}.
13741 % \fi
13742 %
13743 % \poeitem{\smash{\begin{tabular}[t]{@{}r@{}}endbox\\angle\\rotateref\end{tabular}}}
13744 % \ifENGLISH These options now affect all components.\fi
13745 % \ifGERMAN Diese Parameter wirken sich jetzt auf alle Komponenten aus.\fi
13746 % \vspace*{1cm}
13747 %
13748 % \poeitem{extnode}
13749 % \ifENGLISH
13750 % Some components now provide more possible positions for
13751 % \Lkeyword{extnode}. \Lcomp{optdetector} had only one possible external node,
13752 % which was accessible for any value of \Lkeyword{extnode}, now this node can
13753 % be accessed only with \Lkeyword{extnode}\opt{=r}. All other values give
13754 % different node positions.
13755 % \fi
13756 % \ifGERMAN
13757 % Einigen Komponenten stellen nun mehr mögliche Positionen für
13758 % \Lkeyword{extnode} zur Verfügung. So muss war z.B. für \Lcomp{optdetector} nur
13759 % ein Knoten möglich, der für jeden Wert von \Lkeyword{extnode} zugänglich
13760 % war, jetzt aber nur mit \Lkeyword{extnode}\opt{=r}. Alle anderen Werte
13761 % setzen den Knoten an andere Stellen.
13762 % \fi
13763 %
13764 % \poeitem{\textbackslash optbox}
13765 % \ifENGLISH An \Lcomp{optbox} does always have the input and output
13766 % nodes at the respective interfaces, whereas in version 2.1 the input
13767 % and output nodes where at the same position for
13768 % \Lkeyword{endbox}\opt{=true}.
13769 % \fi
13770 % \ifGERMAN Eine \Lcomp{optbox} hat immer einen Eingangs- und
13771 % Ausgangsknoten an den entsprechenden Grenzflächen. In Version 2.1
13772 % fielen Eingangs- und Ausgangsknoten zusammen falls \Lkeyword{endbox}
13773 % auf \opt{true} gesetzt war.
13774 % \fi
13775 %
13776 % \poeitem{\textbackslash fibercollimator}
13777 % \ifENGLISH The \Lcomp{fibercollimator} has only a fiber connection by
13778 % default, the beam must be drawn manually or with \Lkeyword{beam}
13779 % option.
13780 % \fi
13781 % \ifGERMAN Der \Lcomp{fibercollimator} hat in den Voreinstellungen nur
13782 % eine Faserverbindung, der Strahl muss manuell oder durch Angabe des
13783 % \Lkeyword{beam} Parameters gezeichnet werden.
13784 % \fi
13785 % \end{optionlist}
13786 %
13787 % \ifENGLISH\subsubsection{Beam connections}\fi
13788 % \ifGERMAN\subsubsection{Strahlverbindungen}\fi
13789 % \label{sec:bwd-comp-3.0-conn}
13790 %
13791 % \ifENGLISH
13792 % In version 2.1, beam connections could be internal, that is the connections
13793 % were specified together with the compent (\Lkeyword{beam} or
13794 % \Lkeyword*{conn}), or external with an additional call of \Lcs{drawbeam}. The
13795 % main reason for internal connections was the aesthetic aspect of drawing the
13796 % beam behind the component, but also convenience played a role. Drawing the
13797 % beam behind the component is possible with layering (\prettyref{sec:layers})
13798 % since 3.0.
13799 %
13800 % Some of the variants of internal beam connections can be used also in 3.0:
13801 % \fi
13802 % \ifGERMAN
13803 % In Version 2.1 konnten Strahlverbindungen intern sein, d.h. die Verbindung
13804 % wurde zusammen mit der Komponenten definiert (z.B. mit \Lkeyword{beam}, oder
13805 % \Lkeyword*{conn}) oder extern über einen separaten Aufruf von \Lcs{drawbeam}.
13806 % Der Hauptgrund für die internen Verbindungen war der ästhetische Aspekt,
13807 % zuerst die Verbindung und dann die Komponente darüber zu zeichnen, aber
13808 % Bequemlichkeit spielte auch eine Rolle. Seit Version 3.0 kann die Reihenfolge
13809 % von Verbindungen und Komponenten über Ebenen geregelt werden
13810 % (\prettyref{sec:layers}).
13811 %
13812 % Manche Varianten für interne Strahlverbindungen können auch in 3.0 verwendet
13813 % werden:
13814 % \fi
13815 %
13816 % \iffalse
13817 %<*ignore>
13818 % \fi
13819 \begin{LTXexample}[linerange={1-3,5-5}]
13820 \begin{pspicture}(3,2)
13821 \pnode(0,1){A}\pnode(3,1){B}
13822 \optbox[beam](A)(B)
13823 \rput[b]([offset=-0.9]\oenodeCenter{}){\ttfamily conn=o-i, conn=i-o}
13824 \end{pspicture}
13825 \end{LTXexample}
13826
13827 \begin{LTXexample}[linerange={1-3,5-5}]
13828 \begin{pspicture}(3,2)
13829 \pnode(0,1){A}\pnode(3,1){B}
13830 \optbox[beam, beaminside=false](A)(B)
13831 \rput[b]([offset=-0.9]\oenodeCenter{}){\ttfamily conn=o-o}
13832 \end{pspicture}
13833 \end{LTXexample}
13834 % \iffalse
13835 %</ignore>
13836 % \fi
13837 %
13838 % \ifENGLISH
13839 % Other internal connections need an additional \Lcs{drawbeam} call, and if you
13840 % want to move the beam behind the component, the code must be wrapped in a
13841 % \Lenv{optexp} environment. Except for this, external connection are equivalent:
13842 % \fi
13843 % \ifGERMAN
13844 % Andere Verbindungen können nur über einen zusätzlichen \Lcs{drawbeam} Aufruf
13845 % erreicht werden, falls die Verbindung dann hinter der Komponente sein soll,
13846 % musst der beteiligte Code in eine \Lenv{optexp}-Umgebung geschachtelt
13847 % werden. Außer diesem Aspekt sind die separaten Verbindungen äquivalent:
13848 %\fi
13849 %
13850 % \iffalse
13851 %<*ignore>
13852 % \fi
13853 \begin{LTXexample}[linerange={1-4,6-6}]
13854 \begin{pspicture}(3,2)
13855 \pnode(0,1){A}\pnode(3,1){B}
13856 \optbox(A)(B)
13857 \drawbeam(A){}
13858 \rput[b]([offset=-0.9]\oenodeCenter{}){\ttfamily conn=o-, conn=a-}
13859 \end{pspicture}
13860 \end{LTXexample}
13861
13862 \begin{LTXexample}[linerange={1-3,5-6}]
13863 \begin{pspicture}(3,2)
13864 \pnode(0,1){A}\pnode(3,1){B}
13865 \optbox(A)(B)
13866 \rput[b]([offset=-0.9]\oenodeCenter{}){\ttfamily conn=-o, conn=-b}
13867 \drawbeam{}(B)
13868 \end{pspicture}
13869 \end{LTXexample}
13870
13871 \begin{LTXexample}[linerange={1-4,6-8}]
13872 \begin{pspicture}(3,2)
13873 \pnode(0,1){A}\pnode(3,1){B}
13874 \begin{optexp}
13875 \optbox(A)(B)
13876 \rput[b]([offset=-0.9]\oenodeCenter{}){\ttfamily conn=i-, A-}
13877 \drawbeam[beaminsidelast](A){}
13878 \end{optexp}
13879 \end{pspicture}
13880 \end{LTXexample}
13881
13882 \begin{LTXexample}[linerange={1-4,6-8}]
13883 \begin{pspicture}(3,2)
13884 \pnode(0,1){A}\pnode(3,1){B}
13885 \begin{optexp}
13886 \optbox(A)(B)
13887 \rput[b]([offset=-0.9]\oenodeCenter{}){\ttfamily conn=-i, conn=-B}
13888 \drawbeam[beaminsidefirst]{}(B)
13889 \end{optexp}
13890 \end{pspicture}
13891 \end{LTXexample}
13892 % \iffalse
13893 %</ignore>
13894 % \fi
13895 %
13896 %
13897 % \makeatletter
13898 % \bgroup
13899 % \newcommand*{\index@preamble}{}
13900 % \let\index@preamble=\relax
13901 % \renewcommand{\setindexpreamble}[1]{\def\index@preamble{#1}}
13902 % \renewcommand*{\idx@heading}{%
13903 % \addchap{\indexname}%
13904 % \@mkboth{\indexname}{\indexname}%
13905 % }
13906 % \renewenvironment{theindex}{%
13907 % \idx@heading%
13908 % \index@preamble\par\nobreak
13909 % \thispagestyle{\indexpagestyle}\parindent\z@
13910 % \setlength{\parskip}{\z@ \@plus .3\p@}%
13911 % \setlength{\parfillskip}{\z@ \@plus 1fil}%
13912 % \let\item\@idxitem
13913 % }{%
13914 % \clearpage
13915 % }
13916 % \renewcommand*\@idxitem{\par\hangindent 40\p@}
13917 % \renewcommand*\subitem{\@idxitem \hspace*{20\p@}}
13918 % \renewcommand*\subsubitem{\@idxitem \hspace*{30\p@}}
13919 % \renewcommand*\indexspace{%
13920 % \par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax
13921 % }
13922 % \renewcommand*\indexname{Index}
13923 % \printindex[doc]
13924 % \egroup
13925 % \makeatother
13926 %
13927 % \appendix
13928 %
13929 % \ifGERMAN
13930 % \chapter{Versionsgeschichte}
13931 %
13932 % Diese Versionsgeschichte ist eine Liste von Änderungen, die für den Nutzer des
13933 % Pakets von Bedeutung sind. Änderungen, die eher technischer Natur sind und für
13934 % den Nutzer des Pakets nicht relevant sind und das Verhalten des Pakets nicht
13935 % ändern, werden nicht aufgeführt. Wenn ein Eintrag der Versionsgeschichte ein
13936 % Feature als \emph{improved} oder \emph{extended} bekannt gibt, so bedeutet
13937 % dies, dass eine Modifikation die Syntax und das Verhalten des Pakets nicht
13938 % beeinflusst, oder das es für ältere Versionen kompatibel ist. Einträge, die
13939 % als \emph{deprecated}, \emph{modified}, \emph{renamed}, oder \emph{removed}
13940 % deklariert sind, verlangen besondere Aufmerksamkeit. Diese bedeuten, dass eine
13941 % Modifikation Änderungen in existierenden Dokumenten mit sich ziehen kann. Die
13942 % Zahlen an der rechten Seite stehen für die relevante Stelle dieser
13943 % Dokumentation, zusätzliche Informationen zur Migration von älteren Dokumenten
13944 % sind in \prettyref{sec:bwd-comp} zu finden.
13945 % \fi
13946 % \ifENGLISH
13947 % \chapter{Revision history}
13948 %
13949 % This revision history is a list of changes relevant to users of this
13950 % package. Changes of a more technical nature which do not affect the
13951 % user interface or the behavior of the package are not included in the
13952 % list. If an entry in the revision history states that a feature has
13953 % been \emph{improved} or \emph{extended}, this indicates a modification
13954 % which either does not affect the syntax and behavior of the package or
13955 % is syntactically backwards compatible (such as the addition of an
13956 % optional argument to an existing command). Entries stating that a
13957 % feature has been \emph{deprecated}, \emph{modified}, \emph{fixed},
13958 % \emph{renamed}, or \emph{removed} demand attention. They indicate a
13959 % modification which may require changes to existing documents. The
13960 % numbers on the right indicate the relevant section of this manual,
13961 % more information regarding backward compatibility can be found in
13962 % \prettyref{sec:bwd-comp}. \fi
13963 %
13964 % \begin{changelog}
13965 % \patchcmd{\release}{\setlength{\itemsep}{0pt}}{\setlength{\itemsep}{0pt}\setlength{\parsep}{0pt}}{}{}
13966 % \begin{release}{6.1}{2022-02-06}
13967 % \item Fixed bug in \cs{oapmirror}
13968 % \end{release}
13969 % \begin{release}{6.0}{2021-02-26}
13970 % \item Modified \cs{wdmcoupler} to handle an arbitrary number of input nodes\see{comp:wdmcoupler}
13971 % \item Modified \cs{wdmsplitter} to handle an arbitrary number of output nodes\see{comp:wdmsplitter}
13972 % \item Removed deprecated \opt{lampscale}, use style \opt{CrystalLamp}.
13973 % \item Removed deprecated \opt{pollinewidth}, use style \opt{Polarization}.
13974 % \item Removed deprecated \cs{optgrid}, use \cs{optgrating}.
13975 % \item Removed deprecated \opt{optgridwidth}, use \opt{gratingwidth}.
13976 % \item Removed deprecated \opt{optgridheight}, use \opt{gratingheight}.
13977 % \item Removed deprecated \opt{optgriddepth}, use \opt{gratingdepth}.
13978 % \item Removed deprecated \opt{optgridcount}, use \opt{gratingcount}.
13979 % \item Removed deprecated \opt{optgridtype}, use \opt{gratingtype}.
13980 % \item Removed deprecated \opt{optgridlinewidth}, use \opt{gratinglinewidth}.
13981 % \item Removed deprecated \opt{align}, use \opt{coupleralign}.
13982 % \item Removed deprecated \opt{namingschema}.
13983 % \end{release}
13984 % \begin{release}{5.2}{2014-11-26}
13985 % \item Added component \cs{asphericlens}\see{comp:asphericlens}
13986 % \item Added component \cs{axicon}\see{comp:axicon}
13987 % \item Added component \cs{optwedge}\see{comp:optwedge}
13988 % \end{release}
13989 % \begin{release}{5.1}{2014-11-19}
13990 % \item Added component \cs{oapmirror}\see{comp:oapmirror}
13991 % \item Added support for filled beams with path interfaces.
13992 % \end{release}
13993 % \begin{release}{5.0}{2014-10-30}
13994 % \item Added support for arbitrary interface shapes (experimental,
13995 % requires the \opt{pst-intersect} package and \opt{pstricks}
13996 % version 2.53).
13997 % \item Added component \cs{parabolicmirror}\see{comp:parabolicmirror}
13998 % \end{release}
13999 % \begin{release}{4.10}{2014-06-04}
14000 % \item Added value \opt{firstcomp} to parameter \opt{beamalign}\see{prm:beamalign}
14001 % \item Modified \cs{optsource} to handle also the beam alignment\see{comp:optsource}
14002 % \end{release}
14003 % \begin{release}{4.9}{2014-06-03}
14004 % \item Added new component \cs{optsource}\see{comp:optsource}
14005 % \item Improved naming of the last component name, which can now be
14006 % accessed also by its number besides using \opt{N}.
14007 % \item Fixed bug related to \opt{extnodes} together with \opt{compname}
14008 % \end{release}
14009 % \begin{release}{4.8}{2014-02-28}
14010 % \item Added component \cs{optaom}\see{comp:optaom}
14011 % \item Added option \opt{beammode}\see{prm:beammode}
14012 % \item Added option \opt{showinterfaces}\see{prm:showinterfaces}
14013 % \end{release}
14014 % \begin{release}{4.7}{2014-01-12}
14015 % \item Added syntax \opt{<}\prm{num} for accessing relative component
14016 % IDs\see{sec:namingobj}
14017 % \end{release}
14018 % \begin{release}{4.6}{2013-11-27}
14019 % \item Added option \opt{extnodes}\see{prm:extnodes}
14020 % \item Added option \opt{optdipolecomp}\see{prm:optdipolecomp}
14021 % \item Added option \opt{opttripolecomp}\see{prm:opttripolecomp}
14022 % \end{release}
14023 % \begin{release}{4.5}{2013-07-21}
14024 % \item Added option \opt{usewirestyle}\see{prm:usewirestyle}
14025 % \item Added line style \opt{fade}, with options \opt{fadeto},
14026 % \opt{fadepoints}, \opt{fadefunc}, and
14027 % \opt{fadefuncname}\see{prm:fade}.
14028 % \end{release}
14029 % \begin{release}{4.4}{2013-07-14}
14030 % \item Added component \cs{transmissiongrating}\see{comp:transmissiongrating}
14031 % \item Modified \opt{innerlabel} to explicitly set \opt{labelalign=c}
14032 % \item Fixed trailing spaces in \opt{savebeampoints} (and \opt{savebeam}).
14033 % \item Allow Postscript code in \opt{angle}.
14034 % \end{release}
14035 % \begin{release}{4.3a}{2013-07-02}
14036 % \item Fixed tripole alignment bugs introduced in version 4.3.
14037 % \item Again fixed the alignment of reflective \cs{optprism}\see{prm:prismalign}
14038 % \item Fixed improper alignment of \cs{optprism} label\see{sec:bwd-comp-4.3a}
14039 % \end{release}
14040 % \begin{release}{4.3}{2013-06-28}
14041 % \item Added option \opt{raprismalign}\see{prm:raprismalign}
14042 % \item Fixed alignment of \cs{rightangleprism} and rotation of its
14043 % label.
14044 % \end{release}
14045 % \begin{release}{4.2}{2013-06-07}
14046 % \item Added option \opt{startinsidecount}\see{prm:startinsidecount}
14047 % \item Added option \opt{stopinsidecount}\see{prm:stopinsidecount}
14048 % \item Added option \opt{beampathcount}\see{prm:beampathcount}
14049 % \item Added option \opt{beamnodealign}\see{prm:beamnodealign}
14050 % \item Added \cs{oeBeamVecMedian}\see{cs:oeBeamVecMedian}
14051 % \item Added \cs{oeBeamCenter}\see{cs:oeBeamCenter}
14052 % \item Modified the orientation of a reflective
14053 % \cs{optprism}\see{sec:bwd-comp-4.2}
14054 % \item Fixed bug of \cs{optprism} and \cs{rightangleprism} inside
14055 % an \env{optexp} environment.
14056 % \item Fixed bug of wrong \cs{rightangleprism} rotation in special
14057 % cases.
14058 % \item Fixed buggy handling of multiple saved beams\see{prm:savebeam}
14059 % \end{release}
14060 % \begin{release}{4.1}{2013-05-21}
14061 % \item Added option \opt{prismtype}\see{prm:prismtype}
14062 % \end{release}
14063 % \begin{release}{4.0}{2013-04-15}
14064 % \item Added electrical components\see{chap:electrcomp}
14065 % \item Added wire connections with \cs{drawwire}\see{sec:drawwire}
14066 % \item Added component \cs{optarrowcomp}\see{comp:optarrowcomp}
14067 % \item Added component \cs{optbarcomp}\see{comp:optbarcomp}
14068 % \item Improved \cs{optdetector}\see{comp:optdetector}
14069 % \item Extended \cs{drawfiber} to support component
14070 % ranges\see{cs:drawfiber}
14071 % \item Extended \opt{couplersep} to support automatic
14072 % calculation\see{prm:couplersep}
14073 % \item Fixed appearance of \cs{optfiber}\see{sec:bwd-comp-4.0}
14074 % \item Fixed \opt{extnodealign} to affect also
14075 % multipoles\see{prm:extnodealign}
14076 % \item Fixed \opt{pswarning}.
14077 % \item Removed old, buggy beam connection code\see{sec:bwd-comp-4.0}
14078 % \item Removed option \opt{conn}\see{sec:bwd-comp-4.0}
14079 % \item Removed option \opt{connjoin}\see{sec:bwd-comp-4.0}
14080 % \item Removed \cs{newOptexpDipoleNolabel}\see{sec:bwd-comp-4.0}
14081 % \end{release}
14082 % \begin{release}{3.6}{2013-03-20}
14083 % \item Added option \opt{compoffset}\see{prm:compoffset}
14084 % \item Added option \opt{beampathskip}\see{prm:beampathskip}
14085 % \item Added option \opt{innercompalign}\see{prm:innercompalign}
14086 % \item Fixed some bugs in the raytracing and beam code.
14087 % \end{release}
14088 % \begin{release}{3.5}{2013-02-22}
14089 % \item Added option \opt{filterangle}\see{prm:filterangle}
14090 % \item Fixed wrong output fiber style in \cs{optcoupler}
14091 % \item Fixed strange Postscript error which occured with some
14092 % interpreters.
14093 % \end{release}
14094 % \begin{release}{3.4}{2013-02-03}
14095 % \item Fixed bugs when using \opt{fillstyle} for some components.
14096 % \item Extended option \opt{switchsize}\see{comp:optswitch}
14097 % \item Modified coupler center node to be on the base
14098 % line\see{sec:centernode}
14099 % \item Extended error checking for \cs{drawbeam} and
14100 % \cs{drawfiber}\see{sec:accessobj}
14101 % \item Fixed some bugs in the connection code.
14102 % \end{release}
14103 % \begin{release}{3.3a}{2012-09-18}
14104 % \item Fixed bug which was exposed by an update of pst-node.
14105 % \item Fixed trailing spaces.
14106 % \end{release}
14107 % \begin{release}{3.3}{2012-08-17}
14108 % \item Extended \cs{opttripole} and \cs{optdipole}\see{comp:optdipole}
14109 % \item Modified reference angle for label of
14110 % \cs{opttripole}\see{sec:bwd-comp-3.3}
14111 % \item Added option \opt{optdipolesize} to support two interfaces for
14112 % \cs{optdipole}\see{prm:optdipolesize}
14113 % \item Added option \opt{gratingalign}\see{prm:gratingalign}
14114 % \item Added option \opt{forcebeaminside}\see{prm:forcebeaminside}
14115 % \item Extended option \opt{mirrorradius}\see{prm:mirrorradius}
14116 % \item Improved \cs{drawbeam} and \cs{drawwidebeam} to be able to use
14117 % \opt{ArrowInside} without linestyle\see{prm:ArrowInsideMaxLength}
14118 % \item Fixed orientation of \cs{oenodeBeamUp} and
14119 % \cs{oenodeBeamLow}\see{cs:oenodeBeamUp}
14120 % \item Fixed a bug related to \opt{beaminside} and ambiguous
14121 % components.
14122 % \item Fixed some trailing spaces.
14123 % \item Added more examples\see{sec:examples}
14124 % \end{release}
14125 % \begin{release}{3.2}{2012-07-26}
14126 % \item Added component \cs{glanthompson}\see{comp:glanthompson}
14127 % \item Added access to beam vectors with \cs{oeBeamVec},
14128 % \cs{oeBeamVecUp} and \cs{oeBeamVecLow}\see{cs:oeBeamVec}
14129 % \item Fixed wrong computation of node distance in \cs{fiberbox}
14130 % \item Fixed bug in \cs{wdmsplitter} for \opt{coupleralign=b} and
14131 % \opt{couplertype=none}
14132 % \item Fixed bug when filling components placed with
14133 % \opt{position=end}/\opt{start}
14134 % \item Added value \opt{absolute} to parameter
14135 % \opt{labelref}\see{prm:labelref}
14136 % \item Added examples\see{sec:examples}
14137 % \end{release}
14138 % \begin{release}{3.1}{2012-07-17}
14139 % \item Added component \cs{fiberbox}\see{comp:fiberbox}
14140 % \item Extended connection macros to not required curly braces around
14141 % node parenthesis any more\see{sec:namingobj}
14142 % \item Modified \cs{fibercollimator} to have
14143 % \opt{allowbeaminside=false} by default\see{comp:fibercollimator}
14144 % \item Extended fiber couplers to allow using only two
14145 % nodes\see{sec:coupler}
14146 % \item Fixed a bug concerning node expressions with \cs{drawfiber}
14147 % \end{release}
14148 % \begin{release}{3.0}{2012-07-09}
14149 % \item Modified beam connections with \cs{drawbeam} to support
14150 % raytracing\see{cs:drawbeam}
14151 % \item Added wide beams with \cs{drawwidebeam}\see{cs:drawwidebeam}
14152 % \item Added \cs{drawfiber} for fiber connections\see{cs:drawfiber}
14153 % \item Added \opt{optexp} environment for layering of components and
14154 % connections\see{sec:layers}
14155 % \item Added german documentation.
14156 % \item Modified naming of component nodes\see{sec:objnodes}
14157 % \item Modified \opt{extnode} to work with more
14158 % components\see{prm:extnode}
14159 % \item Modified \opt{angle} and \opt{rotateref} to affect all
14160 % components\see{sec:rotshift}
14161 % \item Modified \opt{endbox} to affect all
14162 % components\see{sec:positioning}
14163 % \item Extended \opt{position} by values \opt{start} and
14164 % \opt{end}\see{sec:positioning}
14165 % \item Extended \opt{abspos} by values \opt{start} and
14166 % \opt{end}\see{sec:positioning}
14167 % \item Removed deprecated lens code which used \opt{lenswidth} and
14168 % \opt{lensheight} for construction\see{comp:lens}
14169 % \item Added option \opt{platesize}\see{prm:platesize}
14170 % \item Added option \opt{phwidth}\see{comp:pinhole}
14171 % \item Modified option \opt{caxislength}\see{comp:crystal}
14172 % \item Deprecated option \opt{lampscale}\see{comp:crystal}
14173 % \item Added style \opt{CrystalCaxis}\see{comp:crystal}
14174 % \item Added style \opt{CrystalLamp}\see{comp:crystal}
14175 % \item Added option \opt{optboxsize}\see{comp:optbox}
14176 % \item Extended option \opt{detsize}\see{comp:optdetector}
14177 % \item Added style \opt{DetectorStyle}\see{comp:optdetector}
14178 % \item Removed deprecated \cs{detector}, use
14179 % \cs{optdetector}\see{comp:optdetector}
14180 % \item Extended option \opt{doveprismsize}\see{comp:doveprism}
14181 % \item Added style \opt{Polarization}\see{comp:polarization}
14182 % \item Deprecated option \opt{pollinewidth}\see{comp:polarization}
14183 % \item Removed option \opt{polwidth}\see{comp:polarization}
14184 % \item Removed option \opt{pol}\see{comp:polarization}
14185 % \item Added style \opt{VariableStyle}\see{comp:mirror}
14186 % \item Added mirror type \opt{semitrans}\see{prm:mirrortype}
14187 % \item Renamed \cs{optgrid} to \cs{optgrating}\see{comp:optgrating}
14188 % \item Renamed \opt{optgridwidth} to
14189 % \opt{gratingwidth}\see{comp:optgrating}
14190 % \item Renamed \opt{optgridheight} to
14191 % \opt{gratingheight}\see{comp:optgrating}
14192 % \item Renamed \opt{optgriddepth} to
14193 % \opt{gratingdepth}\see{comp:optgrating}
14194 % \item Renamed \opt{optgridcount} to
14195 % \opt{gratingcount}\see{comp:optgrating}
14196 % \item Renamed \opt{optgridtype} to
14197 % \opt{gratingtype}\see{comp:optgrating}
14198 % \item Renamed \opt{optgridlinewidth} to
14199 % \opt{gratinglinewidth}\see{comp:optgrating}
14200 % \item Added option \opt{prismalign}\see{comp:optprism}
14201 % \item Modified faulty alignment of
14202 % \cs{rightangleprism}\see{comp:rightangleprism}
14203 % \item Extended option \opt{optampsize}\see{comp:optamp}
14204 % \item Extended option \opt{optmzmsize}\see{comp:optmzm}
14205 % \item Added option \opt{polcontroltype}\see{comp:polcontrol}
14206 % \item Extended option \opt{isolatorsize}\see{comp:optisolator}
14207 % \item Added style \opt{IsolatorArrow}\see{comp:optisolator}
14208 % \item Extended option \opt{fdlsize}\see{comp:fiberdelayline}
14209 % \item Added style \opt{FdlArrow}\see{comp:fiberdelayline}
14210 % \item Extended option \opt{fiberpolsize}\see{comp:optfiberpolarizer}
14211 % \item Added component \cs{optcirculator}\see{comp:optcirculator}
14212 % \item Extended option \opt{couplersize}\see{comp:optcoupler}
14213 % \item Extended option \opt{couplertype}\see{comp:optcoupler}
14214 % \item Renamed option \opt{align} to
14215 % \opt{coupleralign}\see{comp:optcoupler}
14216 % \item Added style \opt{VariableCoupler}\see{comp:optcoupler}
14217 % \item Added style \opt{FilterStyle}\see{comp:optfilter}
14218 % \item Extended option \opt{fibercolsize}\see{comp:fibercollimator}
14219 % \item Removed deprecated option \opt{labelrelative}\see{sec:labels}
14220 % \item Removed deprecated option \opt{iwidth}\see{comp:pinhole}
14221 % \item Removed deprecated option \opt{owidth}\see{comp:pinhole}
14222 % \item Removed deprecated option \opt{bswidth}\see{comp:beamsplitter}
14223 % \item Deprecated \cs{newOptexpDipoleNolabel}, use
14224 % \cs{newOptexpDipole}\see{sec:newobj}
14225 % \item Deprecated option
14226 % \opt{refractiveindex}\see{prm:refractiveindex}
14227 % \item Deprecated option \opt{conn}\see{sec:drawbeam}
14228 % \item Extended option \opt{fiber}\see{prm:fiber}
14229 % \end{release}
14230 % \begin{release}{2.1}{2009-11-05}
14231 % \item Added component
14232 % \cs{optfiberpolarizer}\see{comp:optfiberpolarizer}
14233 % \item Added option \opt{compshift}\see{prm:compshift}
14234 % \item Added option \opt{label}\see{prm:label}
14235 % \item Added option \opt{connjoin}
14236 % \item Added options \opt{addtoBeam} and
14237 % \opt{newBeam}\see{sec:drawbeam}
14238 % \item Added style \opt{OptComp} and related options
14239 % \opt{addtoOptComp} and \opt{newOptComp}\see{sec:appearance}
14240 % \item Added option \opt{bsstyle}\see{comp:beamsplitter}
14241 % \item Extended \cs{fibercollimator} to use up to four reference
14242 % nodes\see{comp:fibercollimator}
14243 % \item Improved \opt{thicklens} to work also with plain
14244 % lenses\see{prm:thicklens}
14245 % \item Use pst-doc class for the documentation.
14246 % \end{release}
14247 %
14248 % \begin{release}{2.0}{2008-07-27}
14249 % \item Added fiber-optical components\see{chap:fibercomp}
14250 % \item Added component \cs{optdiode}\see{comp:optdiode}
14251 % \item Added component \cs{pentaprism}\see{comp:pentaprism}
14252 % \item Added component
14253 % \cs{rightangleprism}\see{comp:rightangleprism}
14254 % \item Added component \cs{doveprism}\see{comp:doveprism}
14255 % \item Added component \cs{optprism}\see{comp:optprism}
14256 % \item Added \cs{drawbeam}\see{sec:drawbeam}
14257 % \item Added component connections (options \opt{fiber}, \opt{conn}
14258 % and \opt{beam})\see{chap:connecting}
14259 % \item Added option \opt{compname}\see{prm:compname}
14260 % \item Added option \opt{extnode}\see{prm:extnode}
14261 % \item Renamed \cs{detector} to
14262 % \cs{optdetector}\see{comp:optdetector}
14263 % \end{release}
14264 % \begin{release}{1.2}{2008-06-17}
14265 % \item Modified lens design to use interface curvatures\see{comp:lens}
14266 % \item Added options \opt{lensradiusleft} and
14267 % \opt{lensradiusright}\see{comp:lens}
14268 % \item Added option \opt{thicklens}\see{comp:lens}
14269 % \item Added option \opt{lenstype}\see{comp:lens}
14270 % \item Added option \opt{mirrorradius} (curved
14271 % mirrors)\see{comp:mirror}
14272 % \item Added option \opt{optgridtype} (binary
14273 % gratings)\see{comp:optgrating}
14274 % \item Added \cs{newOptexpDipole}\see{sec:newobj}
14275 % \item Added \cs{newOptexpDipoleNolabel}\see{sec:newobj}
14276 % \item Added \cs{newOptexpTripole}\see{sec:newobj}
14277 % \item Added \cs{newOptexpFiberDipole}\see{sec:newobj}
14278 % \item General improvements of \TeX{} and Postscript code
14279 % \end{release}
14280 % \begin{release}{1.1}{2007-09-06}
14281 % \item Improved labeling features\see{sec:labels}
14282 % \item Added parameter \opt{labelref}\see{sec:labels}
14283 % \item Replaced \opt{labelrelative} by
14284 % \opt{labelref=relative}\see{sec:labels}
14285 % \item Renamed \cs{polarisation} to
14286 % \cs{polarization}\see{comp:polarization}
14287 % \item Renamed \opt{polwidth} to \opt{polsize}\see{comp:polarization}
14288 % \item Renamed \opt{pol} to \opt{poltype}\see{comp:polarization}
14289 % \item Renamed \opt{bswidth} to \opt{bssize}\see{comp:beamsplitter}
14290 % \item Renamed \opt{iwidth} to \opt{innerheight}\see{comp:pinhole}
14291 % \item Renamed \opt{owidth} to \opt{outerheight}\see{comp:pinhole}
14292 % \item Added support for fillstyle for all components
14293 % \end{release}
14294 %
14295 % \begin{release}{1.0}{2007-07-18}
14296 % \item First CTAN version
14297 % \end{release}
14298 % \end{changelog}
14299 %
14300 % \StopEventually{}
14301 %
14302 % \begin{otherlanguage}{english}
14303 % \printindex[idx]
14304 % \end{otherlanguage}
14305 %
14306 % \chapter{The \LaTeX/\TeX\ implementation}
14307 %<*stylefile>
14308 % \section{Requirements}
14309 % \begin{macrocode}
14310 \RequirePackage{ifthen}
14311 \RequirePackage{pstricks}
14312 \RequirePackage{pst-xkey}
14313 \RequirePackage{pst-node}
14314 \RequirePackage{pst-plot}
14315 \RequirePackage{multido}
14316 \RequirePackage{pst-eucl}
14317 \RequirePackage{pst-intersect}
14318 \RequirePackage{pstricks-add}
14319 \RequirePackage{environ}
14320 % \end{macrocode}
14321 % Add the Postscript header file.
14322 % \begin{macrocode}
14323 \@addtofilelist{pst-optexp.pro}{}%
14324 \pst@addfams{optexp}
14325 \pstheader{pst-optexp.pro}
14326 % \end{macrocode}
14327 % This holds a comma-separated list of all component names which are
14328 % defined in a \nxLenv{pspicture} environment. The list is cleared when
14329 % leaving the \nxLenv{pspicture} environment.
14330 % \begin{macrocode}
14331 \gdef\POE@complist{}%
14332 % \end{macrocode}
14333 % This hold a comma-separated list of the numbers of all saved beam end
14334 % points in a \nxLenv{pspicture} environment. The list is used to delete
14335 % all remaining Postscript information about the saved beams when
14336 % leaving the current \nxLenv{pspicture}, as they may cause problems
14337 % inside any following optexp-drawing.
14338 % \begin{macrocode}
14339 \gdef\POE@beamlist{1}%
14340 \g@addto@macro{\endpspicture}{%
14341 % \end{macrocode}
14342 % Undefine all beam nodes at the end of the \nxLenv{pspicture}.
14343 % \begin{macrocode}
14344 \expandafter\XKV@for@n\expandafter{\POE@beamlist}\POE@temp{%
14345 \POE@Verb{%
14346 /lastBeamPointUp\POE@temp\space
14347 /lastBeamPointLow\POE@temp\space
14348 /lastBeamPoint\POE@temp\space
14349 3 { currentdict exch undef } repeat
14350 /N@\oenodeBeam{\POE@temp}
14351 /N@\oenodeBeamUp{\POE@temp}
14352 /N@\oenodeBeamLow{\POE@temp}
14353 3 { tx@NodeDict exch undef } repeat
14354 }%
14355 }%
14356 % \end{macrocode}
14357 % Reset the component list.
14358 % \begin{macrocode}
14359 \gdef\POE@complist{}\gdef\POE@beamlist{1}\global\POE@cnt=0\relax
14360 }%
14361 % \end{macrocode}
14362 % Some convenience definitions.
14363 % \begin{macrocode}
14364 \def\pst@optexpdict{tx@OptexpDict begin }
14365 \def\POE@dict#1{\pst@optexpdict #1 end}
14366 \def\POE@Verb#1{\pst@Verb{\pst@optexpdict #1 end }}%
14367 % \end{macrocode}
14368 % Save the pstricks-add line definition for use with the beams
14369 % \begin{macrocode}
14370 \let\POE@tx@Line\tx@Line
14371 \SpecialCoor
14372 % \end{macrocode}
14373 %
14374 % \section{Basic definitions}
14375 % \subsection{Switches for the boolean keys}
14376 % See respective key definitions for explanation.
14377 % \begin{macrocode}
14378 \newif\ifPOE@backlayer
14379 \newif\ifPOE@frontlayer
14380 \newif\ifPOE@optexpenv
14381 \newif\ifPOE@variable
14382 \newif\ifPOE@voltage
14383 \newif\ifPOE@caxisinv
14384 \newif\ifPOE@reverse
14385 \newif\ifPOE@lamp
14386 \newif\ifPOE@component@optional
14387 \newif\ifPOE@debug@showoptdots
14388 \newif\ifPOE@debug@showifcnodes
14389 \newif\ifPOE@debug@showinterfaces
14390 \newif\ifPOE@endbox
14391 \newif\ifPOE@startbox
14392 \newif\ifPOE@thicklens
14393 \newif\ifPOE@usefiberstyle
14394 \newif\ifPOE@usewirestyle
14395 \newif\ifPOE@fiberin@
14396 \newif\ifPOE@fiberin@top
14397 \newif\ifPOE@fiberin@bottom
14398 \newif\ifPOE@fiberout@
14399 \newif\ifPOE@fiberout@top
14400 \newif\ifPOE@fiberout@bottom
14401 \newif\ifPOE@fiberpresetin@
14402 \newif\ifPOE@fiberpresetin@top
14403 \newif\ifPOE@fiberpresetin@bottom
14404 \newif\ifPOE@fiberpresetout@
14405 \newif\ifPOE@fiberpresetout@top
14406 \newif\ifPOE@fiberpresetout@bottom
14407 \newif\ifPOE@wirein@
14408 \newif\ifPOE@wirein@top
14409 \newif\ifPOE@wirein@bottom
14410 \newif\ifPOE@wireout@
14411 \newif\ifPOE@wireout@top
14412 \newif\ifPOE@wireout@bottom
14413 \newif\ifPOE@wirepresetin@
14414 \newif\ifPOE@wirepresetin@top
14415 \newif\ifPOE@wirepresetin@bottom
14416 \newif\ifPOE@wirepresetout@
14417 \newif\ifPOE@wirepresetout@top
14418 \newif\ifPOE@wirepresetout@bottom
14419 \newif\ifPOE@beam
14420 \newif\ifPOE@startinside
14421 \newif\ifPOE@stopinside
14422 \newif\ifPOE@beaminsidefirst
14423 \newif\ifPOE@beaminsidelast
14424 \newif\ifPOE@savebeam
14425 \newif\ifPOE@loadbeam
14426 \newif\ifPOE@beaminside
14427 \newif\ifPOE@raytrace
14428 \newif\ifPOE@pswarning
14429 \newif\ifPOE@useNA
14430 % \end{macrocode}
14431 % This is to check if \nxLkeyword{compname} is set inside or outside of a component. For this no boolean key is provided.
14432 % \begin{macrocode}
14433 \newif\ifPOE@insideobj\POE@insideobjfalse
14434 % \end{macrocode}
14435 %
14436 % \subsection{Counters}
14437 % Count the components in one \nxLenv{pspicture} environment.
14438 % \begin{macrocode}
14439 \newcount\POE@cnt
14440 % \end{macrocode}
14441 % Save the current count at the end of the optexp-environment, before
14442 % the second pass.
14443 % \begin{macrocode}
14444 \newcount\POE@oldcnt
14445 % \end{macrocode}
14446 % Count the temporal planes which are created for connections to nodes.
14447 % \begin{macrocode}
14448 \newcount\POE@nodecnt
14449 % \end{macrocode}
14450 % Count the number of input nodes of a wdmcoupler, or output nodes of a wdmsplitter
14451 % \begin{macrocode}
14452 \newcount\POE@couplernodecount
14453 % \end{macrocode}
14454 %
14455 % \subsection{Fixed strings}
14456 % These are all the fixed strings which are used as possible values for
14457 % choicekeys.
14458 % \begin{macrocode}
14459 \def\POE@str@absolute{absolute}
14460 \def\POE@str@auto{auto}
14461 \def\POE@str@bandpass{bandpass}
14462 \def\POE@str@bandstop{bandstop}
14463 \def\POE@str@binary{binary}
14464 \def\POE@str@blazed{blazed}
14465 \def\POE@str@bottom{bottom}
14466 \def\POE@str@center{center}
14467 \def\POE@str@circle{circle}
14468 \def\POE@str@closed{closed}
14469 \def\POE@str@connection{connection}
14470 \def\POE@str@coupling{coupling}
14471 \def\POE@str@cross{cross}
14472 \def\POE@str@cube{cube}
14473 \def\POE@str@custom{custom}
14474 \def\POE@str@default{default}
14475 \def\POE@str@diode{diode}
14476 \def\POE@str@directional{directional}
14477 \def\POE@str@ellipse{ellipse}
14478 \def\POE@str@elliptic{elliptic}
14479 \def\POE@str@extended{extended}
14480 \def\POE@str@global{global}
14481 \def\POE@str@highpass{highpass}
14482 \def\POE@str@lcirc{lcirc}
14483 \def\POE@str@left{left}
14484 \def\POE@str@linear{linear}
14485 \def\POE@str@lowpass{lowpass}
14486 \def\POE@str@misc{misc}
14487 \def\POE@str@none{none}
14488 \def\POE@str@opened{opened}
14489 \def\POE@str@parallel{parallel}
14490 \def\POE@str@perp{perp}
14491 \def\POE@str@piezo{piezo}
14492 \def\POE@str@plain{plain}
14493 \def\POE@str@plate{plate}
14494 \def\POE@str@pulse{pulse}
14495 \def\POE@str@quiet{quiet}
14496 \def\POE@str@rcirc{rcirc}
14497 \def\POE@str@rectangle{rectangle}
14498 \def\POE@str@reflective{reflective}
14499 \def\POE@str@relative{relative}
14500 \def\POE@str@relgrav{relgrav}
14501 \def\POE@str@right{right}
14502 \def\POE@str@round{round}
14503 \def\POE@str@sawtooth{sawtooth}
14504 \def\POE@str@semitrans{semitrans}
14505 \def\POE@str@sine{sine}
14506 \def\POE@str@standard{standard}
14507 \def\POE@str@symmetric{symmetric}
14508 \def\POE@str@top{top}
14509 \def\POE@str@transmittive{transmittive}
14510 \def\POE@str@transparency{transparency}
14511 \def\POE@str@triangle{triangle}
14512 \def\POE@str@vector{vector}
14513 \def\POE@str@verbose{verbose}
14514 % \end{macrocode}
14515 %
14516 % \section{Parameter and style definitions}
14517 % The parameters and styles are commented quiet well in the user documentation,
14518 % here you will find only additional comments about technical peculiarities.
14519 % \begin{macrocode}
14520 \newpsstyle{OptComp}{}%
14521 \define@key[psset]{optexp}{newOptComp}{%
14522 \newpsstyle{OptComp}{#1}%
14523 }
14524 \define@key[psset]{optexp}{addtoOptComp}{%
14525 \addtopsstyle{OptComp}{#1}%
14526 }
14527 \newpsstyle{OptionalStyle}{linestyle=dashed,dash=1.5pt 1pt}%
14528 \newpsstyle{IfcNodeStyle}{dotstyle=x, dotscale=1.5, linecolor=blue}%
14529 \newpsstyle{IfcStyle}{linestyle=dashed, dash=1pt 1pt, linecolor=red!70!black}%
14530 \newpsstyle{Beam}{linecolor=green!90!black, linejoin=1}%
14531 \define@key[psset]{optexp}{newBeam}{%
14532 \newpsstyle{Beam}{#1}%
14533 }
14534 \define@key[psset]{optexp}{addtoBeam}{%
14535 \addtopsstyle{Beam}{#1}%
14536 }
14537 % \end{macrocode}
14538 % Styles for the automatic fiber connections.
14539 % \begin{macrocode}
14540 \newpsstyle{Fiber}{}%
14541 \define@key[psset]{optexp}{newFiber}{%
14542 \newpsstyle{Fiber}{#1}%
14543 }
14544 \define@key[psset]{optexp}{addtoFiber}{%
14545 \addtopsstyle{Fiber}{#1}%
14546 }
14547 \newpsstyle{FiberIn}{style=Fiber}%
14548 \define@key[psset]{optexp}{newFiberIn}{%
14549 \newpsstyle{FiberIn}{#1}%
14550 }
14551 \define@key[psset]{optexp}{addtoFiberIn}{%
14552 \addtopsstyle{FiberIn}{#1}%
14553 }
14554 \newpsstyle{FiberOut}{style=Fiber}%
14555 \define@key[psset]{optexp}{newFiberOut}{%
14556 \newpsstyle{FiberOut}{#1}%
14557 }
14558 \define@key[psset]{optexp}{addtoFiberOut}{%
14559 \addtopsstyle{FiberOut}{#1}%
14560 }
14561 \newpsstyle{FiberIn1}{style=FiberIn}%
14562 \define@key[psset]{optexp}{newFiberIn1}{%
14563 \newpsstyle{FiberIn1}{#1}%
14564 }
14565 \define@key[psset]{optexp}{addtoFiberIn1}{%
14566 \addtopsstyle{FiberIn1}{#1}%
14567 }
14568 \newpsstyle{FiberIn2}{style=FiberIn}%
14569 \define@key[psset]{optexp}{newFiberIn2}{%
14570 \newpsstyle{FiberIn2}{#1}%
14571 }
14572 \define@key[psset]{optexp}{addtoFiberIn2}{%
14573 \addtopsstyle{FiberIn2}{#1}%
14574 }
14575 \newpsstyle{FiberOut1}{style=FiberOut}%
14576 \define@key[psset]{optexp}{newFiberOut1}{%
14577 \newpsstyle{FiberOut1}{#1}%
14578 }
14579 \define@key[psset]{optexp}{addtoFiberOut1}{%
14580 \addtopsstyle{FiberOut1}{#1}%
14581 }
14582 \newpsstyle{FiberOut2}{style=FiberOut}%
14583 \define@key[psset]{optexp}{newFiberOut2}{%
14584 \newpsstyle{FiberOut2}{#1}%
14585 }
14586 \define@key[psset]{optexp}{addtoFiberOut2}{%
14587 \addtopsstyle{FiberOut2}{#1}%
14588 }
14589 % \end{macrocode}
14590 %
14591 % Electrical connection stuff
14592 % \begin{macrocode}
14593 \newpsstyle{Wire}{}
14594 \define@key[psset]{optexp}{newWire}{%
14595 \newpsstyle{Wire}{#1}%
14596 }
14597 \define@key[psset]{optexp}{addtoWire}{%
14598 \addtopsstyle{Wire}{#1}%
14599 }
14600 \newpsstyle{WireIn}{style=Wire}
14601 \define@key[psset]{optexp}{newWireIn}{%
14602 \newpsstyle{WireIn}{#1}%
14603 }
14604 \define@key[psset]{optexp}{addtoWireIn}{%
14605 \addtopsstyle{WireIn}{#1}%
14606 }
14607 \newpsstyle{WireIn1}{style=WireIn}
14608 \define@key[psset]{optexp}{newWireIn1}{%
14609 \newpsstyle{WireIn1}{#1}%
14610 }
14611 \define@key[psset]{optexp}{addtoWireIn1}{%
14612 \addtopsstyle{WireIn1}{#1}%
14613 }
14614 \newpsstyle{WireIn2}{style=WireIn}
14615 \define@key[psset]{optexp}{newWireIn2}{%
14616 \newpsstyle{WireIn2}{#1}%
14617 }
14618 \define@key[psset]{optexp}{addtoWireIn2}{%
14619 \addtopsstyle{WireIn2}{#1}%
14620 }
14621 \newpsstyle{WireOut}{style=Wire}
14622 \define@key[psset]{optexp}{newWireOut}{%
14623 \newpsstyle{WireOut}{#1}%
14624 }
14625 \define@key[psset]{optexp}{addtoWireOut}{%
14626 \addtopsstyle{WireOut}{#1}%
14627 }
14628 \newpsstyle{WireOut1}{style=WireOut}
14629 \define@key[psset]{optexp}{newWireOut1}{%
14630 \newpsstyle{WireOut1}{#1}%
14631 }
14632 \define@key[psset]{optexp}{addtoWireOut1}{%
14633 \addtopsstyle{WireOut1}{#1}%
14634 }
14635 \newpsstyle{WireOut2}{style=WireOut}
14636 \define@key[psset]{optexp}{newWireOut2}{%
14637 \newpsstyle{WireOut2}{#1}%
14638 }
14639 \define@key[psset]{optexp}{addtoWireOut2}{%
14640 \addtopsstyle{WireOut2}{#1}%
14641 }
14642 \newpsstyle{ElecComp}{}
14643 % \end{macrocode}
14644 % Special styles to change only a part of some devices.
14645 % \begin{macrocode}
14646 \newpsstyle{ExtendedMirror}{%
14647 linestyle=none, hatchwidth=0.5\pslinewidth,
14648 hatchsep=1.4\pslinewidth, fillstyle=hlines
14649 }%
14650 \newpsstyle{VariableStyle}{%
14651 linewidth=0.8\pslinewidth, arrowinset=0, arrowscale=0.8, arrows=<->
14652 }
14653 \newpsstyle{SemitransMirror}{linestyle=none, fillstyle=solid,fillcolor=black!30}%
14654 \newpsstyle{PiezoMirror}{fillstyle=solid,fillcolor=black!30}%
14655 \newpsstyle{IsolatorArrow}{linewidth=2\pslinewidth, arrowinset=0}
14656 \newpsstyle{CrystalCaxis}{%
14657 linestyle=dashed, dash=2pt 2pt, linewidth=0.7\pslinewidth,
14658 arrowinset=0, arrows=->
14659 }
14660 \newpsstyle{CrystalLamp}{linewidth=0.6\pslinewidth}
14661 \newpsstyle{FdlArrow}{arrowinset=0, arrows=->}
14662 \newpsstyle{VariableCoupler}{arrowinset=0, arrows=->}
14663 % \end{macrocode}
14664 %
14665 % \subsection{General parameters}
14666 % \begin{macrocode}
14667 \define@boolkey[psset]{optexp}[POE@component@]{optional}[true]{}
14668 \define@boolkey[psset]{optexp}[POE@]{usefiberstyle}[true]{}
14669 \define@choicekey[psset]{optexp}{usewirestyle}%
14670 [\val\nr]{true,false}[true]{%
14671 \psset[optexp]{usefiberstyle=false}%
14672 \ifcase\nr\relax
14673 \POE@usewirestyletrue
14674 \or
14675 \POE@usewirestylefalse
14676 \fi}%
14677 \define@boolkey[psset]{optexp}[POE@]{usewirestyle}[true]{}
14678 \define@boolkey[psset]{optexp}[POE@debug@]{showoptdots}[true]{}
14679 \define@boolkey[psset]{optexp}[POE@debug@]{showifcnodes}[true]{}
14680 \define@boolkey[psset]{optexp}[POE@debug@]{showinterfaces}[true]{}
14681 % \end{macrocode}
14682 % The positioning parameters.
14683 % \begin{macrocode}
14684 \define@boolkey[psset]{optexp}[POE@]{endbox}[true]{}
14685 \define@boolkey[psset]{optexp}[POE@]{startbox}[true]{}
14686 \define@choicekey*+[psset]{optexp}{position}[\val\nr]{start,end}{%
14687 \ifcase\nr\relax
14688 \psset[optexp]{startbox, endbox=false}%
14689 \or
14690 \psset[optexp]{startbox=false, endbox=true}%
14691 \fi
14692 }{%
14693 \psset[optexp]{startbox=false, endbox=false}%
14694 \edef\POE@key@position{#1}%
14695 }%
14696 \define@choicekey*+[psset]{optexp}{abspos}[\val\nr]{start,end}{%
14697 \ifcase\nr\relax
14698 \psset[optexp]{startbox, endbox=false}%
14699 \or
14700 \psset[optexp]{startbox=false, endbox=true}%
14701 \fi
14702 }{%
14703 \psset[optexp]{startbox=false, endbox=false}%
14704 \edef\POE@key@abspos{#1}%
14705 }%
14706 \define@key[psset]{optexp}{compshift}{%
14707 \pst@checknum{#1}\POE@key@compshift
14708 }
14709 \define@key[psset]{optexp}{angle}{%
14710 \pst@checknum{#1}\POE@key@angle
14711 }
14712 \define@key[psset]{optexp}{compoffset}{%
14713 \pst@checknum{#1}\POE@key@compoffset
14714 }
14715 \define@choicekey+[psset]{optexp}{innercompalign}%
14716 [\val\nr]{rel,abs,relative,absolute}%
14717 {%
14718 \ifcase\nr\relax
14719 \let\POE@key@innercompalign\POE@str@relative
14720 \or
14721 \let\POE@key@innercompalign\POE@str@absolute
14722 \else
14723 \def\POE@key@innercompalign{#1}%
14724 \fi
14725 }%
14726 {\PackageError{pst-optexp}{Unknown value '\val' for innercompalign}}%
14727 \psset[optexp]{%
14728 position={},
14729 abspos={},
14730 compshift=0,
14731 compoffset=0,
14732 innercompalign=relative,
14733 angle=0
14734 }%
14735 % \end{macrocode}
14736 % Layering
14737 % \begin{macrocode}
14738 \define@boolkey[psset]{optexp}[POE@]{backlayer}[true]{}
14739 \define@boolkey[psset]{optexp}[POE@]{frontlayer}[true]{}
14740 \define@boolkey[psset]{optexp}[POE@]{optexpenv}[true]{}
14741 \psset[optexp]{backlayer, frontlayer}%
14742 % \end{macrocode}
14743 % Labels
14744 % \begin{macrocode}
14745 \newcommand{\oelabel}[1]{#1}%
14746 \define@key[psset]{optexp}{labelangle}{%
14747 \pst@checknum{#1}\POE@key@labelangle
14748 }
14749 \define@key[psset]{optexp}{labeloffset}{%
14750 \pst@checknum{#1}\POE@key@labeloffset
14751 }
14752 \define@key[psset]{optexp}{labelstyle}{%
14753 \def\POE@key@labelstyle{#1}%
14754 }
14755 \define@key[psset]{optexp}{labelalign}{%
14756 \def\POE@key@labelalign{#1}%
14757 }
14758 \define@choicekey+[psset]{optexp}{labelref}%
14759 [\val\nr]{absolute,relative,relgrav,global}%
14760 {%
14761 \ifcase\nr\relax
14762 \let\POE@key@labelref\POE@str@global
14763 \else
14764 \def\POE@key@labelref{#1}%
14765 \fi
14766 }{%
14767 \PackageError{pst-optexp}%
14768 {Unknown value '\val' for labelref}%
14769 }%
14770 \define@choicekey*+[psset]{optexp}{innerlabel}%
14771 [\val\nr]{true}[true]%
14772 {\ifcase\nr\relax
14773 \psset[optexp]{labeloffset=0, labelref=relative, labelalign=c}%
14774 \fi}
14775 {\PackageError{pst-optexp}{Unknown value '\val' for innerlabel}}%
14776 \define@key[psset]{optexp}{label}{%
14777 \pst@expandafter\POE@psset@@label{#1} {} {} {} {} {}\@nil
14778 }%
14779 \def\POE@psset@@label#1 #2 #3 #4 #5\@nil{%
14780 \edef\POE@temp{#4}%
14781 \ifx\POE@temp\@empty\else
14782 \expandafter\ifx\POE@temp.\else
14783 \psset[optexp]{labelref=#4}%
14784 \fi
14785 \fi
14786 \edef\POE@temp{#3}%
14787 \ifx\POE@temp\@empty\else
14788 \expandafter\ifx\POE@temp.\else
14789 \psset[optexp]{labelalign=#3}%
14790 \fi
14791 \fi
14792 \edef\POE@temp{#2}%
14793 \ifx\POE@temp\@empty\else
14794 \expandafter\ifx\POE@temp.\else
14795 \psset[optexp]{labelangle=#2}%
14796 \fi
14797 \fi
14798 \edef\POE@temp{#1}%
14799 \ifx\POE@temp\@empty\else
14800 \expandafter\ifx\POE@temp.\else
14801 \psset[optexp]{labeloffset=#1}%
14802 \fi
14803 \fi
14804 }%
14805 % \end{macrocode}
14806 % This is for internal use only, it sets the reference angle for the \opt{labelangle} parameter and can be different for some components.
14807 % \begin{macrocode}
14808 \define@key[psset]{optexp}{ref@angle}{%
14809 \pst@checknum{#1}\POE@key@labelrefangle
14810 }%
14811 \psset[optexp]{%
14812 labeloffset=0.8,
14813 labelangle=0,
14814 labelstyle=,
14815 labelalign=c,
14816 labelref=relgrav,
14817 ref@angle=180
14818 }%
14819 % \end{macrocode}
14820 % External node
14821 % \begin{macrocode}
14822 \define@choicekey+[psset]{optexp}{extnodealign}%
14823 [\val\nr]{rel,abs,relative,absolute}%
14824 {%
14825 \ifcase\nr\relax
14826 \let\POE@key@extnodealign\POE@str@relative
14827 \or
14828 \let\POE@key@extnodealign\POE@str@absolute
14829 \else
14830 \def\POE@key@extnodealign{#1}%
14831 \fi
14832 }%
14833 {\PackageError{pst-optexp}{Unknown value '\val' for extnodealign}}
14834 % \end{macrocode}
14835 % This part was copied and adapted from \cs{psset@@ref} from pstricks.tex
14836 % \begin{macrocode}
14837 \define@key[psset]{optexp}{extnodes}{%
14838 \edef\POE@key@extnode{#1}%
14839 \ifx\@empty\POE@key@extnode
14840 \edef\POE@key@extnode@cnt{1}%
14841 \edef\POE@key@extnode@xrefs{0 }%
14842 \edef\POE@key@extnode@yrefs{0 }%
14843 \else
14844 \def\POE@key@extnode@xrefs{}%
14845 \def\POE@key@extnode@yrefs{}%
14846 \psForeach{\POE@tempD}{#1,}{%
14847 \ifx\POE@tempD\@empty
14848 \advance\psLoopIndex by -1
14849 \else
14850 \pst@expandafter\POE@psset@@extnode{\POE@tempD}\@empty,,\@nil
14851 \edef\POE@key@extnode@xrefs{\POE@key@extnode@xrefs\POE@key@extnode@xref\space}%
14852 \edef\POE@key@extnode@yrefs{\POE@key@extnode@yrefs\POE@key@extnode@yref\space}%
14853 \fi
14854 }%
14855 \edef\POE@key@extnode@cnt{\the\psLoopIndex}%
14856 \fi
14857 }%
14858 % \end{macrocode}
14859 % Need to have two options 'extnode' and 'extnodes' to allow extnode={-0.5,1} without
14860 % \begin{macrocode}
14861 \define@key[psset]{optexp}{extnode}{%
14862 \edef\POE@key@extnode{#1}%
14863 \edef\POE@key@extnode@cnt{1}%
14864 \ifx\@empty\POE@key@extnode
14865 \edef\POE@key@extnode@xrefs{0 }%
14866 \edef\POE@key@extnode@yrefs{0 }%
14867 \else
14868 \pst@expandafter\POE@psset@@extnode{#1}\@empty,,\@nil
14869 \edef\POE@key@extnode@xrefs{\POE@key@extnode@xref}%
14870 \edef\POE@key@extnode@yrefs{\POE@key@extnode@yref}%
14871 \fi
14872 }%
14873 \def\POE@key@extnode@xref{0}%
14874 \def\POE@key@extnode@yref{0}%
14875 \def\POE@psset@@extnode#1#2,#3,#4\@nil{%
14876 \def\POE@key@extnode@xref{0}%
14877 \def\POE@key@extnode@yref{0}%
14878 \ifx\@empty#3\@empty
14879 \@nameuse{POE@getref@#1}%
14880 \@nameuse{POE@getref@#2}%
14881 \else
14882 \pst@checknum{#1#2}\POE@key@extnode@xref%
14883 \pst@checknum{#3}\POE@key@extnode@yref%
14884 \fi
14885 }%
14886 \def\POE@getref@c{}%
14887 \def\POE@getref@t{\def\POE@key@extnode@yref{1}}%
14888 \def\POE@getref@b{\def\POE@key@extnode@yref{-1}}%
14889 \def\POE@getref@l{\def\POE@key@extnode@xref{-1}}%
14890 \def\POE@getref@r{\def\POE@key@extnode@xref{1}}%
14891 \psset[optexp]{%
14892 extnode=\@empty,
14893 extnodealign=absolute
14894 }%
14895 % \end{macrocode}
14896 % Set the rotation reference point. For this to work properly, the components
14897 % must define a proper \cs{component@ref} macro which sets the origin and
14898 % sizes. See below for detailed information.
14899 % \begin{macrocode}
14900 \define@key[psset]{optexp}{rotateref}{%
14901 \def\POE@temp{#1}%
14902 \ifx\@empty\POE@temp\else
14903 \pst@expandafter\POE@psset@@rotateref{#1}\@empty,,\@nil
14904 \fi
14905 }%
14906 \def\POE@key@rotate@xref{0}%
14907 \def\POE@key@rotate@yref{0}%
14908 \def\POE@psset@@rotateref#1#2,#3,#4\@nil{%
14909 \def\POE@key@rotate@xref{0}%
14910 \def\POE@key@rotate@yref{0}%
14911 \ifx\@empty#3\@empty
14912 \@nameuse{POE@getref@rotate@#1}%
14913 \@nameuse{POE@getref@rotate@#2}%
14914 \else
14915 \pst@checknum{#1#2}\POE@key@rotate@xref%
14916 \pst@checknum{#3}\POE@key@rotate@yref%
14917 \fi}%
14918 \def\POE@getref@rotate@c{}%
14919 \def\POE@getref@rotate@t{\def\POE@key@rotate@yref{1}}%
14920 \def\POE@getref@rotate@b{\def\POE@key@rotate@yref{-1}}%
14921 \def\POE@getref@rotate@l{\def\POE@key@rotate@xref{-1}}%
14922 \def\POE@getref@rotate@r{\def\POE@key@rotate@xref{1}}%
14923 \psset[optexp]{rotateref=c}%
14924 % \end{macrocode}
14925 % Naming parameters.
14926 % \begin{macrocode}
14927 \edef\POE@str@basicname@default{@}%
14928 \edef\POE@str@basicname@prefix{OE@}%
14929 \gdef\POE@str@basicname@sep{}%
14930 \edef\POE@str@extnode@postfix{Ext}%
14931 \define@key[psset]{optexp}{b@sicname}{%
14932 \edef\POE@key@b@sicname{\POE@str@basicname@prefix#1}%
14933 }%
14934 \define@key[psset]{optexp}{compname}{%
14935 \ifPOE@insideobj\else
14936 \PackageError{pst-optexp}{compname allowed only inside an object}
14937 \fi
14938 \edef\POE@temp{#1}%
14939 \ifx\POE@temp\@empty
14940 \edef\POE@key@compname{\the\POE@cnt}%
14941 \else
14942 \edef\POE@key@compname{#1}%
14943 \fi
14944 % \end{macrocode}
14945 % check if compname was already defined.
14946 % \begin{macrocode}
14947 \@expandtwoargs\in@{,\POE@key@compname,}{,\POE@complist,}%
14948 \ifin@
14949 \PackageWarning{pst-optexp}{%
14950 ^^Jcompname '\POE@key@compname' already used,\MessageBreak
14951 previous nodes will be overwritten!^^J
14952 }%
14953 \else
14954 % \end{macrocode}
14955 %
14956 % Use definition of \cs{XKV@addtolist@x} with an \cs{xdef} instead of \cs{edef} in order to keep the bookkeeping global.
14957 % \begin{macrocode}
14958 \xdef\POE@complist{%
14959 \POE@key@compname\ifx\POE@complist\@empty\else,\fi\POE@complist
14960 }%
14961 \fi
14962 }%
14963 \POE@insideobjtrue
14964 \psset[optexp]{compname=\@empty}
14965 \POE@insideobjfalse
14966 % \end{macrocode}
14967 % Error handling.
14968 % \begin{macrocode}
14969 \define@boolkey[psset]{optexp}[POE@]{pswarning}[true]{}
14970 \psset[optexp]{pswarning=false}%
14971 % \end{macrocode}
14972 %
14973 % \subsection{Free-ray component parameters}
14974 % Lens
14975 % \begin{macrocode}
14976 \define@key[psset]{optexp}{lensheight}{%
14977 \pst@checknum{#1}\POE@key@lensheight
14978 }
14979 \define@key[psset]{optexp}{lenswidth}{%
14980 \pst@checknum{#1}\POE@key@lenswidth
14981 \ifdim\POE@key@lenswidth pt > 0pt
14982 \psset[optexp]{thicklens=true}
14983 \fi
14984 }
14985 \define@key[psset]{optexp}{lensradiusleft}{%
14986 \pst@checknum{#1}\POE@key@lensradiusleft
14987 }
14988 \define@key[psset]{optexp}{lensradiusright}{%
14989 \pst@checknum{#1}\POE@key@lensradiusright
14990 }
14991 \define@boolkey[psset]{optexp}[POE@]{thicklens}[true]{}
14992 \define@key[psset]{optexp}{lensradius}{%
14993 \pst@expandafter\POE@psset@@lensradius{#1} {} {} {}\@nil
14994 }%
14995 \def\POE@psset@@lensradius#1 #2 #3\@nil{%
14996 \edef\POE@temp{#1}%
14997 \ifx\POE@temp\@empty\else
14998 \psset[optexp]{lensradiusleft=#1}%
14999 \fi
15000 \edef\POE@temp{#2}%
15001 \ifx\POE@temp\@empty
15002 \psset[optexp]{lensradiusright=#1}%
15003 \else
15004 \psset[optexp]{lensradiusright=#2}%
15005 \fi
15006 }%
15007 \define@key[psset]{optexp}{lens}{%
15008 \pst@expandafter\POE@psset@@lens{#1} {} {} {} {} {}\@nil
15009 }%
15010 \def\POE@psset@@lens#1 #2 #3 #4 #5\@nil{%
15011 \edef\POE@temp{#4}%
15012 \ifx\POE@temp\@empty\else
15013 \expandafter\ifx\POE@temp.\else
15014 \psset[optexp]{lenswidth=#4}%
15015 \fi
15016 \fi
15017 \edef\POE@temp{#3}%
15018 \ifx\POE@temp\@empty\else
15019 \expandafter\ifx\POE@temp.\else
15020 \psset[optexp]{lensheight=#3}
15021 \fi
15022 \fi
15023 \edef\POE@temp{#2}%
15024 \ifx\POE@temp\@empty
15025 \psset[optexp]{lensradiusright=#1}%
15026 \else
15027 \expandafter\ifx\POE@temp.\else
15028 \psset[optexp]{lensradiusright=#2}%
15029 \fi
15030 \fi
15031 \edef\POE@temp{#1}%
15032 \expandafter\ifx\POE@temp.\else
15033 \psset[optexp]{lensradiusleft=#1}%
15034 \fi
15035 }%
15036 \psset[optexp]{%
15037 lenswidth=0,
15038 lensheight=1,
15039 lensradiusleft=1,
15040 lensradiusright=1
15041 }%
15042 % \end{macrocode}
15043 %
15044 % \begin{macrocode}
15045 \define@key[psset]{optexp}{asphereheight}{%
15046 \pst@checknum{#1}\POE@key@asphereheight
15047 }%
15048 \define@key[psset]{optexp}{aspherewidth}{%
15049 \pst@checknum{#1}\POE@key@aspherewidth
15050 }%
15051 \define@key[psset]{optexp}{asphereradiusleft}{%
15052 \pst@checknum{#1}\POE@key@asphereradiusleft
15053 }%
15054 \define@key[psset]{optexp}{asphereradiusright}{%
15055 \pst@checknum{#1}\POE@key@asphereradiusright
15056 }%
15057 \define@key[psset]{optexp}{asphereconstant}{%
15058 \pst@checknum{#1}\POE@key@asphereconstant
15059 }%
15060 \define@key[psset]{optexp}{aspherecoefficients}{%
15061 \pst@expandafter\POE@psset@@aspherecoefficients{#1} {} {} {} {} {}\@nil
15062 }%
15063 \def\POE@psset@@aspherecoefficients#1 #2 #3 #4 #5\@nil{%
15064 \def\POE@key@asphereAfour{0}%
15065 \def\POE@key@asphereAsix{0}%
15066 \def\POE@key@asphereAeight{0}%
15067 \def\POE@key@asphereAten{0}%
15068 \ifx\\#1\\\else
15069 \def\POE@key@asphereAfour{#1}%
15070 \ifx\\#2\\\else
15071 \def\POE@key@asphereAsix{#2}%
15072 \ifx\\#3\\\else
15073 \def\POE@key@asphereAeight{#3}%
15074 \ifx\\#4\\\else
15075 \def\POE@key@asphereAten{#4}%
15076 \fi
15077 \fi
15078 \fi
15079 \fi
15080 }%
15081 \psset[optexp]{%
15082 aspherewidth=0,
15083 asphereheight=1,
15084 asphereconstant=-1,
15085 asphereradiusleft=1,
15086 aspherecoefficients=0,
15087 asphereradiusright=0
15088 }
15089 % \end{macrocode}
15090 % Pinhole
15091 % \begin{macrocode}
15092 \define@key[psset]{optexp}{innerheight}{%
15093 \pst@checknum{#1}\POE@key@innerheight
15094 }
15095 \define@key[psset]{optexp}{outerheight}{%
15096 \pst@checknum{#1}\POE@key@outerheight
15097 }
15098 \define@key[psset]{optexp}{phlinewidth}{%
15099 \edef\POE@key@phlinewidth{#1}%
15100 }
15101 \define@key[psset]{optexp}{phwidth}{%
15102 \edef\POE@key@phwidth{#1}%
15103 }
15104 \psset[optexp]{%
15105 phlinewidth=2\pslinewidth,
15106 phwidth=0,
15107 outerheight=1,
15108 innerheight=0.1
15109 }%
15110 % \end{macrocode}
15111 % Crystal
15112 % \begin{macrocode}
15113 \define@key[psset]{optexp}{crystalwidth}{%
15114 \pst@checknum{#1}\POE@key@crystalwidth
15115 }
15116 \define@key[psset]{optexp}{crystalheight}{%
15117 \pst@checknum{#1}\POE@key@crystalheight
15118 }
15119 \define@key[psset]{optexp}{crystalsize}{%
15120 \pst@expandafter\POE@psset@@crystalsize{#1} {} {} {}\@nil
15121 }%
15122 \def\POE@psset@@crystalsize#1 #2 #3\@nil{%
15123 \ifx\\#2\\%
15124 \PackageWarning{pst-optexp}{%
15125 Parameter 'crystalsize' requires two numbers.}%
15126 \fi
15127 \psset[optexp]{crystalwidth=#1}%
15128 \psset[optexp]{crystalheight=#2}%
15129 }%
15130 \define@key[psset]{optexp}{caxislength}{%
15131 \pst@checknum{#1}\POE@key@caxislength
15132 }
15133 \define@boolkey[psset]{optexp}[POE@]{voltage}[true]{}
15134 \define@boolkey[psset]{optexp}[POE@]{caxisinv}[true]{}
15135 \define@boolkey[psset]{optexp}[POE@]{lamp}[true]{}
15136 \psset[optexp]{%
15137 crystalwidth=1.4,
15138 crystalheight=0.6,
15139 caxislength=0.3
15140 }%
15141 % \end{macrocode}
15142 % Box
15143 % \begin{macrocode}
15144 \define@key[psset]{optexp}{optboxwidth}{%
15145 \pst@checknum{#1}\POE@key@optboxwidth
15146 }
15147 \define@key[psset]{optexp}{optboxheight}{%
15148 \pst@checknum{#1}\POE@key@optboxheight
15149 }
15150 \define@key[psset]{optexp}{optboxsize}{%
15151 \pst@expandafter\POE@psset@@optboxsize{#1} {} {} {}\@nil
15152 }%
15153 \def\POE@psset@@optboxsize#1 #2 #3\@nil{%
15154 \ifx\\#2\\%
15155 \PackageWarning{pst-optexp}{%
15156 Parameter 'optboxsize' requires two numbers.}%
15157 \fi
15158 \psset[optexp]{optboxwidth=#1, optboxheight=#2}%
15159 }%
15160 \psset[optexp]{optboxsize=1.4 0.8}%
15161 % \end{macrocode}
15162 %
15163 % Box
15164 % \begin{macrocode}
15165 \define@key[psset]{optexp}{sourcewidth}{%
15166 \pst@checknum{#1}\POE@key@sourcewidth
15167 }
15168 \define@key[psset]{optexp}{sourceheight}{%
15169 \pst@checknum{#1}\POE@key@sourceheight
15170 }
15171 \define@key[psset]{optexp}{sourcesize}{%
15172 \pst@expandafter\POE@psset@@sourcesize{#1} {} {} {}\@nil
15173 }%
15174 \def\POE@psset@@sourcesize#1 #2 #3\@nil{%
15175 \ifx\\#2\\%
15176 \PackageWarning{pst-optexp}{%
15177 Parameter 'sourcesize' requires two numbers.}%
15178 \fi
15179 \psset[optexp]{sourcewidth=#1, sourceheight=#2}%
15180 }%
15181 \psset[optexp]{sourcesize=1.4 0.8}%
15182 % \end{macrocode}
15183 %
15184 % arrowbox
15185 % \begin{macrocode}
15186 \define@key[psset]{optexp}{arrowcompwidth}{%
15187 \pst@checknum{#1}\POE@key@arrowcompwidth
15188 }
15189 \define@key[psset]{optexp}{arrowcompheight}{%
15190 \pst@checknum{#1}\POE@key@arrowcompheight
15191 }
15192 \define@key[psset]{optexp}{arrowcompsize}{%
15193 \pst@expandafter\POE@psset@@arrowcompsize{#1} {} {} {}\@nil
15194 }%
15195 \def\POE@psset@@arrowcompsize#1 #2 #3\@nil{%
15196 \ifx\\#2\\%
15197 \psset[optexp]{arrowcompwidth=#1, arrowcompheight=#1}%
15198 \else
15199 \psset[optexp]{arrowcompwidth=#1, arrowcompheight=#2}%
15200 \fi
15201 }%
15202 \define@key[psset]{optexp}{arrowcompangle}{%
15203 \pst@checknum{#1}\POE@key@arrowcompangle
15204 }%
15205 \define@choicekey+[psset]{optexp}{arrowcompshape}%
15206 [\val\nr]{circle, rectangle}%
15207 {\edef\POE@key@arrowcompshape{#1}}%
15208 {\PackageError{pst-optexp}{Unknown value '\val' for arrowcompshape}}
15209 \psset[optexp]{%
15210 arrowcompsize=1.4 0.8,
15211 arrowcompangle=70,
15212 arrowcompshape=rectangle
15213 }%
15214 \newpsstyle{ArrowCompStyle}{arrowinset=0, arrows=->}%
15215 % \end{macrocode}
15216 % BarBox
15217 % \begin{macrocode}
15218 \define@key[psset]{optexp}{barcompwidth}{%
15219 \pst@checknum{#1}\POE@key@barcompwidth
15220 }
15221 \define@key[psset]{optexp}{barcompheight}{%
15222 \pst@checknum{#1}\POE@key@barcompheight
15223 }
15224 \define@key[psset]{optexp}{barcompsize}{%
15225 \pst@expandafter\POE@psset@@barcompsize{#1} {} {} {}\@nil
15226 }%
15227 \def\POE@psset@@barcompsize#1 #2 #3\@nil{%
15228 \ifx\\#2\\%
15229 \psset[optexp]{barcompwidth=#1, barcompheight=#1}%
15230 \else
15231 \psset[optexp]{barcompwidth=#1, barcompheight=#2}%
15232 \fi
15233 }%
15234 \define@key[psset]{optexp}{barcompangle}{%
15235 \pst@checknum{#1}\POE@key@barcompangle
15236 }%
15237 \define@choicekey+[psset]{optexp}{barcompshape}%
15238 [\val\nr]{circle, rectangle}%
15239 {\edef\POE@key@barcompshape{#1}}%
15240 {\PackageError{pst-optexp}{Unknown value '\val' for barcompshape}}
15241 \psset[optexp]{%
15242 barcompsize=1.4 0.8,
15243 barcompangle=70,
15244 barcompshape=rectangle
15245 }%
15246 \newpsstyle{BarCompStyle}{}%
15247 % \end{macrocode}
15248 %
15249 % Plate
15250 % \begin{macrocode}
15251 \define@key[psset]{optexp}{platelinewidth}{%
15252 \edef\POE@key@platelinewidth{#1}%
15253 }
15254 \define@key[psset]{optexp}{plateheight}{%
15255 \pst@checknum{#1}\POE@key@plateheight
15256 }
15257 \psset[optexp]{%
15258 plateheight=1,
15259 platelinewidth=2\pslinewidth
15260 }%
15261 % \end{macrocode}
15262 % Optical retardation plate, the height is the same as for \cs{optplate}.
15263 % \begin{macrocode}
15264 \define@key[psset]{optexp}{platewidth}{%
15265 \pst@checknum{#1}\POE@key@platewidth
15266 }
15267 \define@key[psset]{optexp}{platesize}{%
15268 \pst@expandafter\POE@psset@@platesize{#1} {} {} {}\@nil
15269 }%
15270 \def\POE@psset@@platesize#1 #2 #3\@nil{%
15271 \ifx\\#2\\%
15272 \PackageWarning{pst-optexp}{%
15273 Parameter 'platesize' requires two numbers.}%
15274 \fi
15275 \psset[optexp]{platewidth=#1, plateheight=#2}%
15276 }%
15277 \psset[optexp]{platewidth=0.1}%
15278 % \end{macrocode}
15279 % Detector
15280 % \begin{macrocode}
15281 \define@key[psset]{optexp}{detsize}{%
15282 \pst@expandafter\POE@psset@@detsize{#1} {} {} {}\@nil
15283 }%
15284 \def\POE@psset@@detsize#1 #2 #3\@nil{%
15285 \ifx\\#2\\%
15286 \pst@checknum{#1}\POE@key@detsize
15287 \else
15288 \let\POE@key@detsize\@empty
15289 \pst@checknum{#1}\POE@key@detwidth
15290 \pst@checknum{#2}\POE@key@detheight
15291 \fi
15292 }%
15293 \define@choicekey*+[psset]{optexp}{dettype}[\val\nr]{round,diode}%
15294 {\edef\POE@key@dettype{\val}}
15295 {\PackageError{pst-optexp}{Unknown value '\val' for dettype}}
15296 \newpsstyle{DetectorStyle}{}
15297 \psset[optexp]{%
15298 detsize=0.8,
15299 dettype=round
15300 }%
15301 % \end{macrocode}
15302 % Polarization
15303 % \begin{macrocode}
15304 \define@key[psset]{optexp}{polsize}{%
15305 \pst@checknum{#1}\POE@key@polsize
15306 }
15307 % \end{macrocode}
15308 % This is defined manually, to avoid printing the warning inside the key definition above.
15309 % \begin{macrocode}
15310 \newpsstyle{Polarization}{%
15311 linewidth=0.7\pslinewidth,
15312 arrowscale=0.8, dotsize=3\pslinewidth}
15313 \define@choicekey+[psset]{optexp}{poltype}%
15314 [\val\nr]{parallel,misc,perp,rcirc,lcirc}%
15315 {\edef\POE@key@poltype{#1}}
15316 {\PackageError{pst-optexp}{Unknown value '\val' for poltype}%
15317 }
15318 \psset[optexp]{%
15319 poltype=parallel,
15320 polsize=0.6
15321 }%
15322 % \end{macrocode}
15323 % Optical diode
15324 % \begin{macrocode}
15325 \define@key[psset]{optexp}{optdiodesize}{%
15326 \pst@checknum{#1}\POE@key@optdiodesize
15327 }
15328 \psset[optexp]{optdiodesize=0.8}%
15329 % \end{macrocode}
15330 % Dove prism
15331 % \begin{macrocode}
15332 \define@key[psset]{optexp}{doveprismsize}{%
15333 \pst@expandafter\POE@psset@@doveprismsize{#1} {} {} {}\@nil
15334 }%
15335 \def\POE@psset@@doveprismsize#1 #2 #3\@nil{%
15336 \ifx\\#2\\%
15337 \pst@checknum{#1}\POE@key@doveprismheight
15338 \pstFPmul\POE@key@doveprismwidth{3}{#1}
15339 \else
15340 \pst@checknum{#1}\POE@key@doveprismwidth
15341 \pst@checknum{#2}\POE@key@doveprismheight
15342 \fi
15343 }%
15344 \psset[optexp]{doveprismsize=0.6}%
15345 % \end{macrocode}
15346 % Glan-Thompson prism
15347 % \begin{macrocode}
15348 \define@key[psset]{optexp}{glanthompsongap}{%
15349 \pst@checknum{#1}\POE@key@glanthompsongap
15350 }%
15351 \define@key[psset]{optexp}{glanthompsonwidth}{%
15352 \pst@checknum{#1}\POE@key@glanthompsonwidth
15353 }%
15354 \define@key[psset]{optexp}{glanthompsonheight}{%
15355 \pst@checknum{#1}\POE@key@glanthompsonheight
15356 }%
15357 \define@key[psset]{optexp}{glanthompsonsize}{%
15358 \pst@expandafter\POE@psset@@glanthompsonsize{#1} {} {} {}\@nil
15359 }%
15360 \def\POE@psset@@glanthompsonsize#1 #2 #3\@nil{%
15361 \ifx\\#2\\%
15362 \PackageWarning{pst-optexp}{%
15363 Parameter 'glanthompsonsize' requires two numbers.}%
15364 \fi
15365 \psset[optexp]{glanthompsonwidth=#1, glanthompsonheight=#2}%
15366 }%
15367 \psset[optexp]{%
15368 glanthompsongap=0,
15369 glanthompsonsize=1 0.5
15370 }%
15371 % \end{macrocode}
15372 % Beamsplitter
15373 % \begin{macrocode}
15374 \define@key[psset]{optexp}{bssize}{%
15375 \pst@checknum{#1}\POE@key@bssize
15376 }
15377 \define@key[psset]{optexp}{bsstyle}{%
15378 \edef\POE@key@bsstyle{#1}%
15379 }
15380 \psset[optexp]{%
15381 bssize=0.8,
15382 bsstyle=cube
15383 }%
15384 % \end{macrocode}
15385 % Mirror
15386 % \begin{macrocode}
15387 \define@key[psset]{optexp}{mirrorwidth}{%
15388 \pst@checknum{#1}\POE@key@mirrorwidth
15389 }
15390 \define@key[psset]{optexp}{mirrorlinewidth}{%
15391 \edef\POE@key@mirrorlinewidth{#1}%
15392 }
15393 \define@choicekey*[psset]{optexp}{mirrortype}%
15394 [\val\nr]{piezo,extended,plain,semitrans}{%
15395 \edef\POE@key@mirrortype{#1}%
15396 }
15397 \define@key[psset]{optexp}{mirrordepth}{%
15398 \pst@checknum{#1}\POE@key@mirrordepth
15399 }
15400 \define@key[psset]{optexp}{mirrorradius}{%
15401 \pst@expandafter\POE@psset@@mirrorradius{#1} {} {} {}\@nil
15402 }%
15403 \def\POE@psset@@mirrorradius#1 #2 #3\@nil{%
15404 \pst@checknum{#1}\POE@key@mirrorradius
15405 \ifx\\#2\\%
15406 \def\POE@key@mirrorradiusB{}%
15407 \else
15408 \pst@checknum{#2}\POE@key@mirrorradiusB
15409 \ifdim\POE@key@mirrorradiusB pt=0pt\else
15410 \PackageWarning{optexp}{%
15411 The second value for option 'mirrorradius' must be 0.}%
15412 \fi
15413 \fi
15414 }%
15415 \define@boolkey[psset]{optexp}[POE@]{variable}[true]{}
15416 \psset[optexp]{%
15417 mirrorwidth=1,
15418 mirrordepth=0.15,
15419 mirrorradius=0,
15420 mirrortype=plain,
15421 mirrorlinewidth=2\pslinewidth
15422 }%
15423 % \end{macrocode}
15424 %
15425 % Parabolic mirror
15426 % \begin{macrocode}
15427 \define@key[psset]{optexp}{parmirrorwidth}{%
15428 \pst@checknum{#1}\POE@key@parmirrorwidth
15429 }
15430 \define@key[psset]{optexp}{parmirrorheight}{%
15431 \pst@checknum{#1}\POE@key@parmirrorheight
15432 }
15433 \psset[optexp]{%
15434 parmirrorwidth=1,
15435 parmirrorheight=1
15436 }%
15437 % \end{macrocode}
15438 %
15439 % Off-axis parabolic mirror
15440 % \begin{macrocode}
15441 \define@key[psset]{optexp}{oapmirroraperture}{%
15442 \pst@expandafter\POE@psset@@oapmirroraperture{#1} {} {} {}\@nil
15443 }%
15444 \def\POE@psset@@oapmirroraperture#1 #2 #3\@nil{%
15445 \ifx\\#2\\%
15446 \def\POE@key@oapmirroraperture@outer{#1 0.5 mul}
15447 \def\POE@key@oapmirroraperture@inner{#1 0.5 mul}
15448 \else
15449 \pst@checknum{#1}\POE@key@oapmirroraperture@inner
15450 \pst@checknum{#2}\POE@key@oapmirroraperture@outer
15451 \fi
15452 }%
15453 \psset[optexp]{oapmirroraperture=1}
15454 % \end{macrocode}
15455 %
15456 % Axicon
15457 % \begin{macrocode}
15458 \define@key[psset]{optexp}{axiconheight}{%
15459 \pst@checknum{#1}\POE@key@axiconheight
15460 }%
15461 \define@key[psset]{optexp}{axiconwidth}{%
15462 \pst@checknum{#1}\POE@key@axiconwidth
15463 }%
15464 \define@key[psset]{optexp}{axiconangle}{%
15465 \pst@checknum{#1}\POE@key@axiconangle
15466 }%
15467 \psset[optexp]{axiconheight=1.5, axiconwidth=0.4, axiconangle=10}
15468 % \end{macrocode}
15469 %
15470 % Wedge
15471 % \begin{macrocode}
15472 \define@key[psset]{optexp}{wedgeangles}{%
15473 \pst@expandafter\POE@psset@@wedgeangles{#1} {} {} {}\@nil
15474 }%
15475 \def\POE@psset@@wedgeangles#1 #2 #3\@nil{%
15476 \pst@checknum{#1}\POE@key@wedgeangleleft
15477 \ifx\\#2\\%
15478 \pst@checknum{#1}\POE@key@wedgeangleright
15479 \else
15480 \pst@checknum{#2}\POE@key@wedgeangleright
15481 \fi
15482 }%
15483 \define@key[psset]{optexp}{wedgeangleleft}{%
15484 \pst@checknum{#1}\POE@key@wedgeangleleft
15485 }%
15486 \define@key[psset]{optexp}{wedgeangleright}{%
15487 \pst@checknum{#1}\POE@key@wedgeangleright
15488 }%
15489 \define@key[psset]{optexp}{wedgeheight}{%
15490 \pst@checknum{#1}\POE@key@wedgeheight
15491 }%
15492 \define@key[psset]{optexp}{wedgewidth}{%
15493 \pst@checknum{#1}\POE@key@wedgewidth
15494 }%
15495 \psset[optexp]{%
15496 wedgeangles=0 10,
15497 wedgeheight=0.8,
15498 wedgewidth=0
15499 }%
15500 % \end{macrocode}
15501 % Grating
15502 % \begin{macrocode}
15503 \define@key[psset]{optexp}{gratingcount}{%
15504 \pst@checknum{#1}\POE@key@gratingcount
15505 }
15506 \define@key[psset]{optexp}{gratingwidth}{%
15507 \pst@checknum{#1}\POE@key@gratingwidth
15508 }
15509 \define@key[psset]{optexp}{gratingheight}{%
15510 \pst@checknum{#1}\POE@key@gratingheight
15511 }
15512 \define@choicekey*[psset]{optexp}{gratingtype}%
15513 [\val\nr]{binary,blazed}{%
15514 \edef\POE@key@gratingtype{#1}%
15515 }
15516 \define@key[psset]{optexp}{gratingdepth}{%
15517 \pst@checknum{#1}\POE@key@gratingdepth
15518 }
15519 \define@key[psset]{optexp}{gratinglinewidth}{%
15520 \edef\POE@key@gratinglinewidth{#1}%
15521 }
15522 \define@choicekey+[psset]{optexp}{gratingalign}%
15523 [\val\nr]{t,c,top,center}%
15524 {%
15525 \ifcase\nr\relax
15526 \let\POE@key@gratingalign\POE@str@top
15527 \or
15528 \let\POE@key@gratingalign\POE@str@center
15529 \else
15530 \def\POE@key@gratingalign{#1}%
15531 \fi}%
15532 {\PackageError{pst-optexp}{Unknown value '\val' for gratingalign}}
15533 \define@boolkey[psset]{optexp}[POE@]{reverse}[true]{}
15534 \psset[optexp]{%
15535 gratingcount=10,
15536 gratingwidth=1,
15537 gratingheight=0.15,
15538 gratingdepth=0.075,
15539 gratingtype=blazed,
15540 gratinglinewidth=0.7\pslinewidth,
15541 gratingalign=t
15542 }%
15543 % \end{macrocode}
15544 % Penta prism
15545 % \begin{macrocode}
15546 \define@key[psset]{optexp}{pentaprismsize}{%
15547 \pst@checknum{#1}\POE@key@pentaprismsize
15548 }
15549 \psset[optexp]{pentaprismsize=0.7}
15550 % \end{macrocode}
15551 % Right-angle prism
15552 % \begin{macrocode}
15553 \define@key[psset]{optexp}{raprismsize}{%
15554 \pst@checknum{#1}\POE@key@raprismsize
15555 }
15556 \define@choicekey+[psset]{optexp}{raprismalign}[\val\nr]%
15557 {auto,center}%
15558 {\def\POE@key@raprismalign{#1}}%
15559 {\PackageError{pst-optexp}{Unknown value '\val' for raprismalign}}%
15560 \psset[optexp]{%
15561 raprismsize=1.5,
15562 raprismalign=auto
15563 }
15564 % \end{macrocode}
15565 % Prism
15566 % \begin{macrocode}
15567 \define@key[psset]{optexp}{prismsize}{%
15568 \pst@checknum{#1}\POE@key@prismsize
15569 }
15570 \define@key[psset]{optexp}{prismangle}{%
15571 \pst@checknum{#1}\POE@key@prismangle
15572 }
15573 \define@choicekey+[psset]{optexp}{prismalign}[\val\nr]%
15574 {auto,center}%
15575 {\def\POE@key@prismalign{#1}}%
15576 {\PackageError{pst-optexp}{Unknown value '\val' for prismalign}}%
15577 \define@choicekey+[psset]{optexp}{prismtype}[\val\nr]%
15578 {transmittive, reflective, coupling}%
15579 {\def\POE@key@prismtype{#1}}%
15580 {\PackageError{pst-optexp}{Unknown value '\val' for prismtype}}%
15581 \psset[optexp]{%
15582 prismsize=1,
15583 prismangle=60,
15584 prismalign=auto,
15585 prismtype=transmittive
15586 }%
15587 % \end{macrocode}
15588 %
15589 % Optdipole and Opttripole
15590 % \begin{macrocode}
15591 \define@key[psset]{optexp}{optdipolesize}{%
15592 \pst@expandafter\POE@psset@@optdipolesize{#1} {} {} {}\@nil
15593 }%
15594 \def\POE@psset@@optdipolesize#1 #2 #3\@nil{%
15595 \ifx\\#2\\%
15596 \def\POE@key@optdipoleheight{0}%
15597 \else
15598 \pst@checknum{#2}\POE@key@optdipoleheight
15599 \fi
15600 \pst@checknum{#1}\POE@key@optdipolewidth
15601 }%
15602 \define@key[psset]{optexp}{optdipolecomp}{%
15603 \def\POE@key@optdipolecomp{#1}%
15604 }
15605 \define@key[psset]{optexp}{opttripolecomp}{%
15606 \def\POE@key@opttripolecomp{#1}%
15607 }
15608 \psset[optexp]{%
15609 optdipolesize=0 0,
15610 optdipolecomp=,
15611 opttripolecomp=%
15612 }%
15613 % \end{macrocode}
15614 %
15615 % acousto-optic modulator
15616 % \begin{macrocode}
15617 \define@key[psset]{optexp}{aomwidth}{%
15618 \pst@checknum{#1}\POE@key@aomwidth
15619 }%
15620 \define@key[psset]{optexp}{aomheight}{%
15621 \pst@checknum{#1}\POE@key@aomheight
15622 }%
15623 \define@key[psset]{optexp}{aomsize}{%
15624 \pst@expandafter\POE@psset@@aomsize{#1} {} {} {}\@nil
15625 }%
15626 \define@key[psset]{optexp}{aomgratingcount}{%
15627 \edef\POE@key@aomgratingcount{#1}%
15628 }%
15629 \define@choicekey+[psset]{optexp}{aomalign}%
15630 [\val\nr]{sym,symmetric,straight}%
15631 {%
15632 \ifcase\nr\relax
15633 \let\POE@key@aomalign\POE@str@symmetric
15634 \else
15635 \def\POE@key@aomalign{#1}%
15636 \fi
15637 }%
15638 {\PackageError{pst-optexp}{Unknown value '\val' for aomalign}}%
15639 \define@choicekey+[psset]{optexp}{aomreflalign}%
15640 [\val\nr]{perp,parallel}%
15641 {\def\POE@key@aomreflalign{#1}}%
15642 {\PackageError{pst-optexp}{Unknown value '\val' for aomreflalign}}%
15643 \def\POE@psset@@aomsize#1 #2 #3\@nil{%
15644 \ifx\\#2\\%
15645 \PackageWarning{pst-optexp}{%
15646 Parameter 'aomsize' requires two numbers.}%
15647 \fi
15648 \psset[optexp]{aomwidth=#1, aomheight=#2}%
15649 }%
15650 \define@key[psset]{optexp}{aomcomp}{%
15651 \def\POE@key@aomcomp{#1}%
15652 }%
15653 \define@key[psset]{optexp}{diffractionorders}{%
15654 \def\POE@key@diffractionorders{#1}%
15655 }%
15656 \define@key[psset]{optexp}{beamdiffractionorder}{%
15657 \def\POE@key@beamdiffractionorder{#1}%
15658 }%
15659 \psset[optexp]{%
15660 aomsize=1.5 1,
15661 aomcomp=default,
15662 aomalign=sym,
15663 aomreflalign=parallel,
15664 aomgratingcount=9,
15665 diffractionorders=2,
15666 beamdiffractionorder=
15667 }%
15668 % \end{macrocode}
15669 %
15670 % \subsection{Parameters of fiber-optical components}
15671 % \subsubsection{fiber}
15672 % \begin{macrocode}
15673 \define@key[psset]{optexp}{fiberloops}{%
15674 \pst@checknum{#1}\POE@key@fiberloops
15675 }
15676 \define@key[psset]{optexp}{fiberloopradius}{%
15677 \pst@checknum{#1}\POE@key@fiberloopradius
15678 }
15679 \define@key[psset]{optexp}{fiberloopsep}{%
15680 \pst@checknum{#1}\POE@key@fiberloopsep
15681 }
15682 \psset[optexp]{%
15683 fiberloops=3,
15684 fiberloopradius=0.4,
15685 fiberloopsep=0.2
15686 }%
15687 % \end{macrocode}
15688 % \subsubsection{optfilter}
15689 % \begin{macrocode}
15690 \define@key[psset]{optexp}{filtersize}{%
15691 \pst@checknum{#1}\POE@key@filtersize
15692 }
15693 \define@choicekey+[psset]{optexp}{filtertype}[\val\nr]%
15694 {bandstop,bandpass,lowpass,highpass}%
15695 {\def\POE@key@filtertype{#1}}%
15696 {\PackageError{pst-optexp}{Unknown value '\val' for filtertype}}
15697 \define@key[psset]{optexp}{filterangle}{%
15698 \pst@checknum{#1}\POE@key@filterangle
15699 }
15700 \newpsstyle{FilterStyle}{}
15701 \psset[optexp]{%
15702 filterangle=0,
15703 filtersize=0.8,
15704 filtertype=bandpass
15705 }%
15706 % \end{macrocode}
15707 % Polarization controller
15708 % \begin{macrocode}
15709 \define@key[psset]{optexp}{polcontrolsize}{%
15710 \pst@checknum{#1}\POE@key@polcontrolsize
15711 }
15712 \define@choicekey+[psset]{optexp}{polcontroltype}[\val\nr]%
15713 {linear,triangle}%
15714 {\def\POE@key@polcontroltype{#1}}%
15715 {\PackageError{pst-optexp}{Unknown value '\val' for polcontroltype}}
15716 \psset[optexp]{%
15717 polcontrolsize=0.15,
15718 polcontroltype=linear
15719 }%
15720 % \end{macrocode}
15721 %
15722 % \subsubsection{optamp}
15723 % \begin{macrocode}
15724 \define@key[psset]{optexp}{optampsize}{%
15725 \pst@expandafter\POE@psset@@optampsize{#1} {} {} {}\@nil
15726 }%
15727 \def\POE@psset@@optampsize#1 #2 #3\@nil{%
15728 \ifx\\#2\\%
15729 \pst@checknum{#1}\POE@key@optampheight
15730 \pstFPmul\POE@key@optampwidth{0.866}{#1}
15731 \else
15732 \pst@checknum{#1}\POE@key@optampwidth
15733 \pst@checknum{#2}\POE@key@optampheight
15734 \fi
15735 }%
15736 \psset[optexp]{optampsize=0.8}
15737 % \end{macrocode}
15738 % Mach-Zehnder modulator
15739 % \begin{macrocode}
15740 \define@key[psset]{optexp}{optmzmsize}{%
15741 \pst@expandafter\POE@psset@@optmzmsize{#1} {} {} {}\@nil
15742 }%
15743 \def\POE@psset@@optmzmsize#1 #2 #3\@nil{%
15744 \ifx\\#2\\%
15745 \pst@checknum{#1}\POE@key@optmzmheight
15746 \pstFPmul\POE@key@optmzmwidth{1.6}{#1}
15747 \else
15748 \pst@checknum{#1}\POE@key@optmzmwidth
15749 \pst@checknum{#2}\POE@key@optmzmheight
15750 \fi
15751 }%
15752 \psset[optexp]{optmzmsize=0.8}
15753 % \end{macrocode}
15754 % \subsubsection{Isolator}
15755 % \begin{macrocode}
15756 \define@key[psset]{optexp}{isolatorsize}{%
15757 \pst@expandafter\POE@psset@@isolatorsize{#1} {} {} {}\@nil
15758 }%
15759 \def\POE@psset@@isolatorsize#1 #2 #3\@nil{%
15760 \ifx\\#2\\%
15761 \pst@checknum{#1}\POE@key@isolatorheight
15762 \pstFPmul\POE@key@isolatorwidth{1.6}{#1}
15763 \else
15764 \pst@checknum{#1}\POE@key@isolatorwidth
15765 \pst@checknum{#2}\POE@key@isolatorheight
15766 \fi
15767 }%
15768 \psset[optexp]{isolatorsize=0.6}%
15769 % \end{macrocode}
15770 % Fiber polarizer
15771 % \begin{macrocode}
15772 \define@key[psset]{optexp}{fiberpolsize}{%
15773 \pst@expandafter\POE@psset@@fiberpolsize{#1} {} {} {}\@nil
15774 }%
15775 \def\POE@psset@@fiberpolsize#1 #2 #3\@nil{%
15776 \ifx\\#2\\%
15777 \pst@checknum{#1}\POE@key@fiberpolheight
15778 \pstFPmul\POE@key@fiberpolwidth{1.6}{#1}
15779 \else
15780 \pst@checknum{#1}\POE@key@fiberpolwidth
15781 \pst@checknum{#2}\POE@key@fiberpolheight
15782 \fi
15783 }%
15784 \psset[optexp]{fiberpolsize=0.6}%
15785 % \end{macrocode}
15786 % Optical switch
15787 % \begin{macrocode}
15788 \define@key[psset]{optexp}{switchsize}{%
15789 \pst@expandafter\POE@psset@@switchsize{#1} {} {} {}\@nil
15790 }%
15791 \def\POE@psset@@switchsize#1 #2 #3\@nil{%
15792 \pst@checknum{#1}\POE@key@switchwidth
15793 \ifx\\#2\\%
15794 \pst@checknum{#1}\POE@key@switchheight
15795 \else
15796 \pst@checknum{#2}\POE@key@switchheight
15797 \fi
15798 }%
15799 \define@choicekey+[psset]{optexp}{switchstyle}%
15800 [\val\nr]{opened,closed}%
15801 {\edef\POE@key@switchstyle{#1}}%
15802 {\PackageError{pst-optexp}{Unknown value '\val' for switchstyle}}
15803 \psset[optexp]{%
15804 switchsize=0.8,
15805 switchstyle=opened
15806 }%
15807 % \end{macrocode}
15808 % \subsubsection{Fiber delay line}
15809 % \begin{macrocode}
15810 \define@key[psset]{optexp}{fdlsize}{%
15811 \pst@expandafter\POE@psset@@fdlsize{#1} {} {} {}\@nil
15812 }%
15813 \def\POE@psset@@fdlsize#1 #2 #3\@nil{%
15814 \ifx\\#2\\%
15815 \pst@checknum{#1}\POE@key@fdlheight
15816 \pstFPmul\POE@key@fdlwidth{1.6}{#1}
15817 \else
15818 \pst@checknum{#1}\POE@key@fdlwidth
15819 \pst@checknum{#2}\POE@key@fdlheight
15820 \fi
15821 }%
15822 \psset[optexp]{fdlsize=0.6}%
15823 % \end{macrocode}
15824 % Fiber collimator
15825 % \begin{macrocode}
15826 \define@key[psset]{optexp}{fibercolsize}{%
15827 \pst@expandafter\POE@psset@@fibercolsize{#1} {} {} {}\@nil
15828 }%
15829 \def\POE@psset@@fibercolsize#1 #2 #3\@nil{%
15830 \ifx\\#2\\%
15831 \pst@checknum{#1}\POE@key@fibercolheight
15832 \pstFPmul\POE@key@fibercolwidth{0.866}{#1}
15833 \else
15834 \pst@checknum{#1}\POE@key@fibercolwidth
15835 \pst@checknum{#2}\POE@key@fibercolheight
15836 \fi
15837 }%
15838 \psset[optexp]{fibercolsize=0.3}%
15839 % \end{macrocode}
15840 % Optical Circulator
15841 % \begin{macrocode}
15842 \define@key[psset]{optexp}{optcircsize}{%
15843 \pst@checknum{#1}\POE@key@optcircsize
15844 }%
15845 \define@key[psset]{optexp}{optcircangleA}{%
15846 \pst@checknum{#1}\POE@key@optcircangleA
15847 }%
15848 \define@key[psset]{optexp}{optcircangleB}{%
15849 \pst@checknum{#1}\POE@key@optcircangleB
15850 }%
15851 \define@key[psset]{optexp}{optcircangle}{%
15852 \pst@expandafter\POE@psset@@optcircangle{#1} {} {} {}\@nil
15853 }%
15854 \def\POE@psset@@optcircangle#1 #2 #3\@nil{%
15855 \ifx\\#2\\%
15856 \PackageError{pst-optexp}{optcircangle requires two numbers}%
15857 \else\ifx\\#1\\%
15858 \PackageError{pst-optexp}{optcircangle requires two numbers}%
15859 \else
15860 \psset[optexp]{optcircangleA=#1, optcircangleB=#2}%
15861 \fi\fi
15862 }%
15863 \psset[optexp]{%
15864 optcircsize=0.8,
15865 optcircangle=-160 -20
15866 }%
15867 \newpsstyle{OptCircArrow}{unit=0.7, arrows=->, arrowinset=0}
15868 % \end{macrocode}
15869 %
15870 % \subsubsection{Coupler}
15871 % \begin{macrocode}
15872 \define@key[psset]{optexp}{couplersize}{%
15873 \pst@expandafter\POE@psset@@couplersize{#1} {} {} {}\@nil
15874 }%
15875 \def\POE@psset@@couplersize#1 #2 #3\@nil{%
15876 \ifx\\#2\\%
15877 \pstFPmul\POE@key@couplerheight{0.8}{#1}
15878 \pstFPmul\POE@key@couplerwidth{2}{#1}
15879 \else
15880 \pst@checknum{#1}\POE@key@couplerwidth
15881 \pst@checknum{#2}\POE@key@couplerheight
15882 \fi
15883 }%
15884 \define@key[psset]{optexp}{couplersep}{%
15885 \edef\POE@key@couplersep{#1}%
15886 }
15887 \define@choicekey+[psset]{optexp}{couplertype}%
15888 [\val\nr]{none,elliptic,ellipse,cross,rectangle}%
15889 {%
15890 \edef\POE@key@couplertype{#1}
15891 \ifx\POE@key@couplertype\POE@str@elliptic
15892 \let\POE@key@couplertype\POE@str@ellipse
15893 \fi
15894 }%
15895 {\PackageError{pst-optexp}{Unknown value '\val' for couplertype}}
15896 \define@choicekey+[psset]{optexp}{coupleralign}%
15897 [\val\nr]{t,b,c,top,bottom,center}%
15898 {%
15899 \ifcase\nr\relax
15900 \let\POE@key@coupleralign\POE@str@top
15901 \or
15902 \let\POE@key@coupleralign\POE@str@bottom
15903 \or
15904 \let\POE@key@coupleralign\POE@str@center
15905 \else
15906 \def\POE@key@coupleralign{#1}%
15907 \fi}%
15908 {\PackageError{pst-optexp}{Unknown value '\val' for coupleralign}}
15909 \psset[optexp]{%
15910 couplersize=0.2,
15911 couplersep=0.05,
15912 coupleralign=center,
15913 couplertype=elliptic
15914 }%
15915 % \end{macrocode}
15916 %
15917 % \subsection{Fiber box}
15918 %
15919 % \begin{macrocode}
15920 \define@key[psset]{optexp}{fiberboxheight}{%
15921 \pst@checknum{#1}\POE@key@fiberboxheight
15922 }%
15923 \define@key[psset]{optexp}{fiberboxwidth}{%
15924 \pst@checknum{#1}\POE@key@fiberboxwidth
15925 }%
15926 \define@key[psset]{optexp}{fiberboxsize}{%
15927 \pst@expandafter\POE@psset@@fiberboxsize{#1} {} {} {}\@nil
15928 }%
15929 \def\POE@psset@@fiberboxsize#1 #2 #3\@nil{%
15930 \psset[optexp]{fiberboxwidth=#1}
15931 \ifx\\#2\\%
15932 \psset[optexp]{fiberboxheight=0}%
15933 \else
15934 \psset[optexp]{fiberboxheight=#2}%
15935 \fi
15936 }%
15937 \define@key[psset]{optexp}{fiberboxsepin}{%
15938 \def\POE@key@fiberboxsepin{#1}
15939 }%
15940 \define@key[psset]{optexp}{fiberboxsepout}{%
15941 \def\POE@key@fiberboxsepout{#1}%
15942 }%
15943 \define@key[psset]{optexp}{fiberboxcount}{%
15944 \pst@expandafter\POE@psset@@fiberboxcount#1\@nil
15945 }%
15946 \def\POE@psset@@fiberboxcount#1x#2\@nil{%
15947 \ifx\\#1\\%
15948 \def\POE@key@fiberboxcountin{1}%
15949 \else
15950 \def\POE@key@fiberboxcountin{#1}%
15951 \fi
15952 \ifx\\#2\\%
15953 \def\POE@key@fiberboxcountout{1}%
15954 \else
15955 \def\POE@key@fiberboxcountout{#2}
15956 \fi
15957 }%
15958 \psset[optexp]{%
15959 fiberboxsize=1,
15960 fiberboxsepin=0.2,
15961 fiberboxsepout=0.2,
15962 fiberboxcount=2x2}
15963 % \end{macrocode}
15964 %
15965 % \subsection{Electrical components}
15966 %
15967 % \subsubsection{elecmixer}
15968 % \begin{macrocode}
15969 \define@key[psset]{optexp}{elecmixersize}{%
15970 \pst@checknum{#1}\POE@key@elecmixersize
15971 }%
15972 \psset[optexp]{elecmixersize=0.8}%
15973 % \end{macrocode}
15974 %
15975 % \subsubsection{eleccoupler}
15976 % \begin{macrocode}
15977 \define@key[psset]{optexp}{eleccouplersize}{%
15978 \pst@expandafter\POE@psset@@eleccouplersize{#1} {} {} {}\@nil
15979 }%
15980 \def\POE@psset@@eleccouplersize#1 #2 #3\@nil{%
15981 \pst@checknum{#1}\POE@key@eleccouplerwidth
15982 \ifx\\#2\\%
15983 \pst@checknum{#1}\POE@key@eleccouplerheight
15984 \else
15985 \pst@checknum{#2}\POE@key@eleccouplerheight
15986 \fi
15987 }%
15988 \define@key[psset]{optexp}{eleccouplersep}{%
15989 \edef\POE@key@eleccouplersep{#1}%
15990 }
15991 \define@choicekey+[psset]{optexp}{eleccouplertype}%
15992 [\val\nr]{standard, directional}%
15993 {\edef\POE@key@eleccouplertype{#1}}%
15994 {\PackageError{pst-optexp}{Unknown value '\val' for eleccouplertype}}%
15995 \define@choicekey+[psset]{optexp}{eleccouplerinput}%
15996 [\val\nr]{left, right}%
15997 {\edef\POE@key@eleccouplerinput{#1}}%
15998 {\PackageError{pst-optexp}{Unknown value '\val' for eleccouplerinput}}%
15999 \define@choicekey+[psset]{optexp}{eleccoupleralign}%
16000 [\val\nr]{t,b,c,top,bottom,center}%
16001 {%
16002 \ifcase\nr\relax
16003 \let\POE@key@eleccoupleralign\POE@str@top
16004 \or
16005 \let\POE@key@eleccoupleralign\POE@str@bottom
16006 \or
16007 \let\POE@key@eleccoupleralign\POE@str@center
16008 \else
16009 \def\POE@key@eleccoupleralign{#1}%
16010 \fi}%
16011 {\PackageError{pst-optexp}{Unknown value '\val' for eleccoupleralign}}
16012 \psset[optexp]{%
16013 eleccouplersize=0.8,
16014 eleccouplersep={},
16015 eleccoupleralign=center,
16016 eleccouplertype=standard,
16017 eleccouplerinput=left
16018 }%
16019 % \end{macrocode}
16020 %
16021 % \begin{macrocode}
16022 \define@key[psset]{optexp}{synthsize}{%
16023 \pst@expandafter\POE@psset@@synthsize{#1} {} {} {}\@nil
16024 }%
16025 \def\POE@psset@@synthsize#1 #2 #3\@nil{%
16026 \pst@checknum{#1}\POE@key@synthwidth
16027 \ifx\\#2\\%
16028 \pst@checknum{#1}\POE@key@synthheight
16029 \else
16030 \pst@checknum{#2}\POE@key@synthheight
16031 \fi
16032 }%
16033 \define@key[psset]{optexp}{synthrectwidth}{%
16034 \pst@checknum{#1}\POE@key@synthrectwidth
16035 }%
16036 \define@choicekey+[psset]{optexp}{synthshape}%
16037 [\val\nr]{circle, rectangle}%
16038 {\edef\POE@key@synthshape{#1}}%
16039 {\PackageError{pst-optexp}{Unknown value '\val' for synthshape}}
16040 \define@choicekey+[psset]{optexp}{synthtype}%
16041 [\val\nr]{sine, pulse, rectangle, triangle, sawtooth, custom}%
16042 {\edef\POE@key@synthtype{#1}}%
16043 {\PackageError{pst-optexp}{Unknown value '\val' for synthtype}}
16044 \newpsstyle{SynthStyle}{}
16045 \psset[optexp]{%
16046 synthsize=0.8,
16047 synthshape=circle,
16048 synthtype=sine,
16049 synthrectwidth=0.2
16050 }%
16051 % \end{macrocode}
16052 %
16053 % \subsection{Beam-connection parameters}
16054 % The keys related to the \cs{draw*} macros.
16055 %
16056 % Connect a component directly with its reference nodes using \cs{drawbeam}.
16057 % \begin{macrocode}
16058 \define@boolkey[psset]{optexp}[POE@]{beam}[true]{}
16059 % \end{macrocode}
16060 % \begin{macrocode}
16061 \define@key[psset]{optexp}{refractiveindex}{%
16062 \psset[optexp]{n=#1}%
16063 \PackageWarning{pst-optexp}{%
16064 Option 'refractiveindex' is deprecated,\MessageBreak
16065 use 'n' instead.}%
16066 }%
16067 \define@key[psset]{optexp}{n}{%
16068 \POE@parsealg{n}#1\@nil
16069 }
16070 \def\POE@parsealg#1#2#3\@nil{%
16071 \ifx#2*\relax
16072 \POE@@parsealg#3\@nil
16073 \expandafter\let\csname POE@key@#1\endcsname\POE@tempA
16074 \else
16075 \@namedef{POE@key@#1}{[#2#3] }%
16076 \fi
16077 }
16078 \def\POE@@parsealg#1#2\@nil{%
16079 \edef\POE@tempA{tx@Dict begin (#1#2) AlgParser end }%
16080 }
16081 \define@key[psset]{optexp}{beamangle}{%
16082 \edef\POE@key@beamangle{#1}%
16083 }%
16084 \define@key[psset]{optexp}{beampos}{%
16085 \edef\POE@key@beampos{#1}%
16086 }%
16087 \define@key[psset]{optexp}{beamdiv}{%
16088 \edef\POE@key@beamdiv{#1}%
16089 }%
16090 \define@key[psset]{optexp}{beamwidth}{%
16091 \edef\POE@key@beamwidth{#1}%
16092 }%
16093 \define@choicekey+[psset]{optexp}{beammode}%
16094 [\val\nr]{trans,refl,reflective,transmittive,auto}%
16095 {\ifcase\nr\relax
16096 \let\POE@key@beammode\POE@str@transmittive
16097 \or
16098 \let\POE@key@beammode\POE@str@reflective
16099 \else
16100 \def\POE@key@beammode{#1}%
16101 \fi}%
16102 {\PackageError{pst-optexp}{Unknown value '\val' for beammode}}
16103
16104 \define@boolkey[psset]{optexp}[POE@]{startinside}[true]{}%
16105 \define@boolkey[psset]{optexp}[POE@]{stopinside}[true]{}%
16106 \define@key[psset]{optexp}{startinsidecount}{%
16107 \pst@checknum{#1}\POE@key@startinsidecount
16108 }
16109 \define@key[psset]{optexp}{stopinsidecount}{%
16110 \pst@checknum{#1}\POE@key@stopinsidecount
16111 }
16112 \define@boolkey[psset]{optexp}[POE@]{beaminsidefirst}[true]{}%
16113 \define@boolkey[psset]{optexp}[POE@]{beaminsidelast}[true]{}%
16114 \define@choicekey+[psset]{optexp}{savebeampoints}%
16115 [\val\nr]{true,false}[true]{%
16116 \ifcase\nr\relax
16117 \def\POE@key@savebeampoints{1}%
16118 \or
16119 \def\POE@key@savebeampoints{0}%
16120 \fi
16121 }{%
16122 \ifnum9<1#1
16123 \def\POE@key@savebeampoints{#1}%
16124 \else
16125 \PackageError{pst-optexp}%
16126 {savebeampoints must be a positive integer or 0}%
16127 \fi
16128 \@expandtwoargs\in@{,\POE@key@savebeampoints,}{,\POE@beamlist,}%
16129 \ifin@\else
16130 \xdef\POE@beamlist{%
16131 \POE@key@savebeampoints
16132 \ifx\POE@beamlist\@empty\else,\fi\POE@beamlist
16133 }%
16134 \fi
16135 }%
16136 \define@choicekey+[psset]{optexp}{loadbeampoints}%
16137 [\val\nr]{true,false}[true]{%
16138 \ifcase\nr\relax
16139 \def\POE@key@loadbeampoints{1}%
16140 \or
16141 \def\POE@key@loadbeampoints{0}%
16142 \fi
16143 }{%
16144 \ifnum9<1#1
16145 \def\POE@key@loadbeampoints{#1}%
16146 \else
16147 \PackageError{pst-optexp}%
16148 {loadbeampoints must be a positive integer or 0}%
16149 \fi
16150 \@expandtwoargs\in@{,\POE@key@loadbeampoints,}{,\POE@beamlist,}%
16151 \ifin@\else
16152 \xdef\POE@beamlist{%
16153 \POE@key@loadbeampoints
16154 \ifx\POE@beamlist\@empty\else,\fi\POE@beamlist
16155 }%
16156 \fi
16157 }%
16158 \define@key[psset]{optexp}{loadbeam}[true]{%
16159 \setkeys[psset]{optexp}{loadbeampoints=#1}%
16160 \ifdim\POE@key@loadbeampoints pt>0pt
16161 \POE@loadbeamtrue
16162 \else
16163 \POE@loadbeamfalse
16164 \fi
16165 }%
16166 \define@key[psset]{optexp}{savebeam}[true]{%
16167 \setkeys[psset]{optexp}{savebeampoints=#1}%
16168 \ifdim\POE@key@savebeampoints pt>0pt
16169 \POE@savebeamtrue
16170 \else
16171 \POE@savebeamfalse
16172 \fi
16173 }%
16174 \define@boolkey[psset]{optexp}[POE@]{beaminside}[true]{}%
16175 \define@boolkey[psset]{optexp}[POE@]{allowbeaminside}[true]{}%
16176 \define@boolkey[psset]{optexp}[POE@]{forcebeaminside}[true]{}%
16177 \define@boolkey[psset]{optexp}[POE@]{raytrace}[true]{}%
16178 \define@boolkey[psset]{optexp}[POE@]{useNA}[true]{}%
16179 \define@choicekey+[psset]{optexp}{beamnodealign}%
16180 [\val\nr]{vec, conn, vector, connection}%
16181 {%
16182 \ifcase\nr\relax
16183 \let\POE@key@beamnodealign\POE@str@vector
16184 \or
16185 \let\POE@key@beamnodealign\POE@str@connection
16186 \else
16187 \def\POE@key@beamnodealign{#1}%
16188 \fi
16189 }%
16190 {\PackageError{pst-optexp}{Unknown value '\val' for beamnodealign}}
16191 \define@key[psset]{optexp}{beampathskip}{%
16192 \pst@checknum{#1}\POE@key@beampathskip
16193 }%
16194 \define@key[psset]{optexp}{beampathcount}{%
16195 \pst@getint{#1}\POE@key@beampathcount
16196 }%
16197 \define@choicekey+[psset]{optexp}{beamalign}%
16198 [\val\nr]{rel,abs,relative,absolute,firstcomp}%
16199 {%
16200 \ifcase\nr\relax
16201 \let\POE@key@beamalign\POE@str@relative
16202 \or
16203 \let\POE@key@beamalign\POE@str@absolute
16204 \else
16205 \def\POE@key@beamalign{#1}%
16206 \fi
16207 }%
16208 {\PackageError{pst-optexp}{Unknown value '\val' for beamalign}}
16209 \define@key[psset]{optexp}{ArrowInsideMinLength}{%
16210 \def\POE@key@ArrowInsideMinLength{#1}%
16211 }%
16212 \define@key[psset]{optexp}{ArrowInsideMaxLength}{%
16213 \def\POE@key@ArrowInsideMaxLength{#1}%
16214 }%
16215 \define@choicekey[psset]{optexp}{fadeto}[\val\nr]{white,black,transparency}{%
16216 \def\POE@key@fadeto{#1}%
16217 }%
16218 \define@key[psset]{optexp}{fadefunc}{%
16219 \def\POE@key@fadefunc{#1}%
16220 }%
16221 \define@key[psset]{optexp}{fadefuncname}{%
16222 \def\POE@key@fadefuncname{#1}%
16223 }%
16224 \define@key[psset]{optexp}{fadepoints}{%
16225 \def\POE@key@fadepoints{#1}%
16226 }%
16227 \def\psls@fade{%
16228 \pst@optexpdict
16229 \ifx\POE@key@fadefunc\@empty\else
16230 /fadefunc@custom {\POE@key@fadefunc} def
16231 \fi
16232 /fadecorrect \ifx\POE@key@fadeto\POE@str@transparency 0 \else 0.1 \fi def
16233 \pst@usecolor\pslinecolor
16234 \POE@key@fadepoints\space
16235 \psk@strokeopacityalpha
16236 currentdict /fadeto@\POE@key@fadeto\space dup 3 1 roll known not { pop /fadeto@white } if load
16237 currentdict /fadefunc@\POE@key@fadefuncname\space dup 3 1 roll known not { pop /fadefunc@linear } if load
16238 FadeStroke
16239 end
16240 }%
16241 \psset[optexp]{%
16242 raytrace=true
16243 ,useNA=true
16244 ,beamnodealign=connection
16245 ,startinside=false
16246 ,stopinside=false
16247 ,allowbeaminside=true
16248 ,forcebeaminside=false
16249 ,beaminside=true
16250 ,beaminsidefirst=false
16251 ,beaminsidelast=false
16252 ,loadbeam=false
16253 ,savebeam=true
16254 ,loadbeampoints=false
16255 ,savebeampoints=true
16256 ,beamangle=0
16257 ,beampos=\@empty
16258 ,beamalign=relative
16259 ,beamwidth=0
16260 ,beamdiv=0
16261 ,beammode=auto
16262 ,n=1.5
16263 ,beampathskip=0
16264 ,beampathcount=-1
16265 ,stopinsidecount=-1
16266 ,startinsidecount=-1
16267 ,ArrowInsideMinLength=0.2
16268 ,ArrowInsideMaxLength=-1
16269 ,fadepoints=200
16270 ,fadeto=white
16271 ,fadefunc=\@empty
16272 ,fadefuncname=linear
16273 }%
16274 % \end{macrocode}
16275 %
16276 % \subsection{Fiber-connection parameters}
16277 % Select which fibers are drawn automatically.
16278 % \begin{macrocode}
16279 \define@key[psset]{optexp}{fiber}[all]{%
16280 \POE@psset@fibercheck#1\@nil
16281 }
16282 % \end{macrocode}
16283 % Check which components are affected by the fiber parameter. * is only for
16284 % fiber-optical components, + refers to all components but the fiber-optical
16285 % ones, otherwise all components are affected.
16286 % \begin{macrocode}
16287 \def\POE@psset@fibercheck#1#2\@nil{%
16288 \ifx#1*\relax
16289 \ifx\\#2\\%
16290 \setkeys[psset]{optexp}{fiber@preset=all}%
16291 \else
16292 \setkeys[psset]{optexp}{fiber@preset=#2}%
16293 \fi
16294 \else\ifx#1+\relax
16295 \ifx\\#2\\%
16296 \setkeys[psset]{optexp}{fiber@all=all}%
16297 \else
16298 \setkeys[psset]{optexp}{fiber@all=#2}%
16299 \fi
16300 \POE@unset@wire
16301 \else
16302 \setkeys[psset]{optexp}{fiber@all=#1#2}%
16303 \setkeys[psset]{optexp}{fiber@preset=#1#2}%
16304 \POE@unset@wire
16305 \fi\fi
16306 }%
16307 \def\POE@unset@wire{%
16308 \ifPOE@fiberin@
16309 \setkeys[psset]{optexp}{wirepresetin@=false}%
16310 \fi
16311 \ifPOE@fiberout@
16312 \setkeys[psset]{optexp}{wirepresetout@=false}%
16313 \fi
16314 \ifPOE@fiberin@top
16315 \setkeys[psset]{optexp}{wirepresetin@top=false}%
16316 \fi
16317 \ifPOE@fiberin@bottom
16318 \setkeys[psset]{optexp}{wirepresetin@bottom=false}%
16319 \fi
16320 \ifPOE@fiberout@top
16321 \setkeys[psset]{optexp}{wirepresetout@top=false}%
16322 \fi
16323 \ifPOE@fiberout@bottom
16324 \setkeys[psset]{optexp}{wirepresetout@bottom=false}%
16325 \fi
16326 }%
16327 % \end{macrocode}
16328 % Set the fiber parameters for fiber-optical components only (use fiber=*...).
16329 % \begin{macrocode}
16330 \define@choicekey*+[psset]{optexp}{fiber@preset}%
16331 [\val\nr]{false,none,true,all}[all]{%
16332 \ifcase\nr\relax
16333 \POE@getfiberpreset@none
16334 \or
16335 \POE@getfiberpreset@none
16336 \or
16337 \POE@getfiberpreset@all
16338 \or
16339 \POE@getfiberpreset@all
16340 \fi
16341 }{%
16342 \ifx\@empty\val
16343 \POE@getfiberpreset@none
16344 \else
16345 \pst@expandafter\POE@psset@@fiberpreset{#1}\@empty,,\@nil
16346 \fi
16347 }%
16348 \def\POE@psset@@fiberpreset#1#2,#3,#4\@nil{%
16349 \POE@getfiberpreset@all
16350 \ifx\\#3\\%
16351 \@nameuse{POE@getfiberpreset@#1}%
16352 \@nameuse{POE@getfiberpreset@#2}%
16353 \fi
16354 }%
16355 \def\POE@getfiberpreset@none{%
16356 \setkeys[psset]{optexp}{%
16357 fiberpresetin@=false, fiberpresetout@=false,
16358 fiberpresetin@top=false, fiberpresetin@bottom=false,
16359 fiberpresetout@top=false, fiberpresetout@bottom=false}%
16360 }%
16361 \def\POE@getfiberpreset@all{%
16362 \setkeys[psset]{optexp}{%
16363 fiberpresetin@, fiberpresetout@,
16364 fiberpresetin@top, fiberpresetin@bottom,
16365 fiberpresetout@top, fiberpresetout@bottom}%
16366 }%
16367 \def\POE@getfiberpreset@t{%
16368 \setkeys[psset]{optexp}{%
16369 fiberpresetin@bottom=false, fiberpresetout@bottom=false}%
16370 }%
16371 \def\POE@getfiberpreset@b{%
16372 \setkeys[psset]{optexp}{%
16373 fiberpresetin@top=false, fiberpresetout@top=false}%
16374 }%
16375 \def\POE@getfiberpreset@l{%
16376 \setkeys[psset]{optexp}{%
16377 fiberpresetout@=false,
16378 fiberpresetout@top=false,
16379 fiberpresetout@bottom=false}%
16380 }%
16381 \def\POE@getfiberpreset@r{%
16382 \setkeys[psset]{optexp}{%
16383 fiberpresetin@=false,
16384 fiberpresetin@top=false,
16385 fiberpresetin@bottom=false}%
16386 }%
16387 \let\POE@getfiberpreset@i\POE@getfiberpreset@l
16388 \let\POE@getfiberpreset@o\POE@getfiberpreset@r
16389 % \end{macrocode}
16390 %
16391 % This code is for all components, fiber-optical and free-ray.
16392 % \begin{macrocode}
16393 \define@choicekey*+[psset]{optexp}{fiber@all}%
16394 [\val\nr]{false,none,true,all}[all]{%
16395 \ifcase\nr\relax
16396 \POE@getfiber@none
16397 \or
16398 \POE@getfiber@none
16399 \or
16400 \POE@getfiber@all
16401 \or
16402 \POE@getfiber@all
16403 \fi
16404 }{%
16405 \ifx\@empty\val
16406 \POE@getfiber@none
16407 \else
16408 \pst@expandafter\POE@psset@@fiber{#1}\@empty,,\@nil
16409 \fi
16410 }%
16411 \def\POE@psset@@fiber#1#2,#3,#4\@nil{%
16412 \POE@getfiber@all
16413 \ifx\@empty#3\@empty
16414 \@nameuse{POE@getfiber@#1}%
16415 \@nameuse{POE@getfiber@#2}%
16416 \fi
16417 }%
16418 \def\POE@getfiber@none{%
16419 \setkeys[psset]{optexp}{%
16420 fiberin@=false, fiberout@=false,
16421 fiberin@top=false, fiberin@bottom=false,
16422 fiberout@top=false, fiberout@bottom=false}%
16423 }%
16424 \def\POE@getfiber@all{%
16425 \setkeys[psset]{optexp}{%
16426 fiberin@, fiberout@,
16427 fiberin@top, fiberin@bottom,
16428 fiberout@top, fiberout@bottom}%
16429 }%
16430 \def\POE@getfiber@t{%
16431 \setkeys[psset]{optexp}{%
16432 fiberin@bottom=false, fiberout@bottom=false}%
16433 }%
16434 \def\POE@getfiber@b{%
16435 \setkeys[psset]{optexp}{%
16436 fiberin@top=false, fiberout@top=false}%
16437 }%
16438 \def\POE@getfiber@l{%
16439 \setkeys[psset]{optexp}{%
16440 fiberout@=false, fiberout@top=false, fiberout@bottom=false}%
16441 }%
16442 \def\POE@getfiber@r{%
16443 \setkeys[psset]{optexp}{%
16444 fiberin@=false, fiberin@top=false, fiberin@bottom=false}%
16445 }%
16446 \let\POE@getfiber@i\POE@getfiber@l
16447 \let\POE@getfiber@o\POE@getfiber@r
16448 % \end{macrocode}
16449 % These are the internal boolkeys for the fiber choices done with \opt{fiberin},
16450 % \opt{fiberout} and \opt{fiber}. Do not use them directly.
16451 % \begin{macrocode}
16452 \define@boolkey[psset]{optexp}[POE@]{fiberin@}[true]{}
16453 \define@boolkey[psset]{optexp}[POE@]{fiberin@top}[true]{}
16454 \define@boolkey[psset]{optexp}[POE@]{fiberin@bottom}[true]{}
16455 \define@boolkey[psset]{optexp}[POE@]{fiberout@}[true]{}
16456 \define@boolkey[psset]{optexp}[POE@]{fiberout@top}[true]{}
16457 \define@boolkey[psset]{optexp}[POE@]{fiberout@bottom}[true]{}
16458 \define@boolkey[psset]{optexp}[POE@]{fiberpresetin@}[true]{}
16459 \define@boolkey[psset]{optexp}[POE@]{fiberpresetin@top}[true]{}
16460 \define@boolkey[psset]{optexp}[POE@]{fiberpresetin@bottom}[true]{}
16461 \define@boolkey[psset]{optexp}[POE@]{fiberpresetout@}[true]{}
16462 \define@boolkey[psset]{optexp}[POE@]{fiberpresetout@top}[true]{}
16463 \define@boolkey[psset]{optexp}[POE@]{fiberpresetout@bottom}[true]{}
16464 \psset[optexp]{fiber=*all}%
16465 \define@key[psset]{optexp}{fiberangleA}{%
16466 \pst@checknum{#1}\POE@key@fiberangleA
16467 }%
16468 \define@key[psset]{optexp}{fiberangleB}{%
16469 \pst@checknum{#1}\POE@key@fiberangleB
16470 }%
16471 \define@choicekey+[psset]{optexp}{fiberalign}%
16472 [\val\nr]{rel,abs,relative,center,absolute}%
16473 {%
16474 \ifcase\nr\relax
16475 \let\POE@key@fiberalign\POE@str@relative
16476 \or
16477 \let\POE@key@fiberalign\POE@str@absolute
16478 \else
16479 \def\POE@key@fiberalign{#1}%
16480 \fi
16481 }%
16482 {\PackageError{pst-optexp}{Unknown value '\val' for fiberalign}}%
16483 \define@key[psset]{optexp}{fiberstyle}{%
16484 \@ifundefined{nc#1}%
16485 {\PackageError{pst-optexp}{Unknown value '#1' for fiberstyle}}%
16486 {\def\POE@key@fiberstyle{#1}}}
16487 \psset[optexp]{%
16488 fiberangleA=0,
16489 fiberangleB=0,
16490 fiberalign=relative,
16491 fiberstyle=curve
16492 }%
16493
16494 % \subsection{Wire connection parameters}
16495 % Select which wires are drawn automatically.
16496 % Note, this part is equivalent to the fiber connection parameters, only 'fiber' is replace by 'wire'.
16497 % \begin{macrocode}
16498 \define@key[psset]{optexp}{wire}[all]{%
16499 \POE@psset@wirecheck#1\@nil
16500 }
16501 % \end{macrocode}
16502 % Check which components are affected by the wire parameter:
16503 % * is only for electrical components
16504 % + refers to all components but the electrical ones,
16505 % otherwise all components are affected.
16506 % \begin{macrocode}
16507 \def\POE@psset@wirecheck#1#2\@nil{%
16508 \ifx#1*\relax
16509 \ifx\\#2\\%
16510 \setkeys[psset]{optexp}{wire@preset=all}%
16511 \else
16512 \setkeys[psset]{optexp}{wire@preset=#2}%
16513 \fi
16514 \else\ifx#1+\relax
16515 \ifx\\#2\\%
16516 \setkeys[psset]{optexp}{wire@all=all}%
16517 \else
16518 \setkeys[psset]{optexp}{wire@all=#2}%
16519 \fi
16520 \POE@unset@fiber
16521 \else
16522 \setkeys[psset]{optexp}{wire@all=#1#2, wire@preset=#1#2}%
16523 \POE@unset@fiber
16524 \fi\fi
16525 }%
16526 \def\POE@unset@fiber{%
16527 \ifPOE@wirein@
16528 \setkeys[psset]{optexp}{fiberpresetin@=false, fiberin@=false}%
16529 \fi
16530 \ifPOE@wireout@
16531 \setkeys[psset]{optexp}{fiberpresetout@=false, fiberout@=false}%
16532 \fi
16533 \ifPOE@wirein@top
16534 \setkeys[psset]{optexp}{fiberpresetin@top=false, fiberin@top=false}%
16535 \fi
16536 \ifPOE@wirein@bottom
16537 \setkeys[psset]{optexp}{fiberpresetin@bottom=false, fiberin@bottom=false}%
16538 \fi
16539 \ifPOE@wireout@top
16540 \setkeys[psset]{optexp}{fiberpresetout@top=false, fiberout@top=false}%
16541 \fi
16542 \ifPOE@wireout@bottom
16543 \setkeys[psset]{optexp}{fiberpresetout@bottom=false, fiberout@bottom=false}%
16544 \fi
16545 }%
16546 % \end{macrocode}
16547 % Set the fiber parameters for fiber-optical components only (use fiber=*...).
16548 % \begin{macrocode}
16549 \define@choicekey*+[psset]{optexp}{wire@preset}%
16550 [\val\nr]{false,none,true,all}[all]{%
16551 \ifcase\nr\relax
16552 \POE@getwirepreset@none
16553 \or
16554 \POE@getwirepreset@none
16555 \or
16556 \POE@getwirepreset@all
16557 \or
16558 \POE@getwirepreset@all
16559 \fi
16560 }{%
16561 \ifx\@empty\val
16562 \POE@getwirepreset@none
16563 \else
16564 \pst@expandafter\POE@psset@@wirepreset{#1}\@empty,,\@nil
16565 \fi
16566 }%
16567 \def\POE@psset@@wirepreset#1#2,#3,#4\@nil{%
16568 \POE@getwirepreset@all
16569 \ifx\\#3\\%
16570 \@nameuse{POE@getwirepreset@#1}%
16571 \@nameuse{POE@getwirepreset@#2}%
16572 \fi
16573 }%
16574 \def\POE@getwirepreset@none{%
16575 \setkeys[psset]{optexp}{%
16576 wirepresetin@=false, wirepresetout@=false,
16577 wirepresetin@top=false, wirepresetin@bottom=false,
16578 wirepresetout@top=false, wirepresetout@bottom=false}%
16579 }%
16580
16581 \def\POE@getwirepreset@all{%
16582 \setkeys[psset]{optexp}{%
16583 wirepresetin@, wirepresetout@,
16584 wirepresetin@top, wirepresetin@bottom,
16585 wirepresetout@top, wirepresetout@bottom}%
16586 }%
16587 \def\POE@getwirepreset@t{%
16588 \setkeys[psset]{optexp}{%
16589 wirepresetin@bottom=false, wirepresetout@bottom=false}%
16590 }%
16591 \def\POE@getwirepreset@b{%
16592 \setkeys[psset]{optexp}{%
16593 wirepresetin@top=false, wirepresetout@top=false}%
16594 }%
16595 \def\POE@getwirepreset@l{%
16596 \setkeys[psset]{optexp}{%
16597 wirepresetout@=false,
16598 wirepresetout@top=false,
16599 wirepresetout@bottom=false}%
16600 }%
16601 \def\POE@getwirepreset@r{%
16602 \setkeys[psset]{optexp}{%
16603 wirepresetin@=false,
16604 wirepresetin@top=false,
16605 wirepresetin@bottom=false}%
16606 }%
16607 \let\POE@getwirepreset@i\POE@getwirepreset@l
16608 \let\POE@getwirepreset@o\POE@getwirepreset@r
16609 % \end{macrocode}
16610 %
16611 % This code is for all components, fiber-optical and free-ray.
16612 % \begin{macrocode}
16613 \define@choicekey*+[psset]{optexp}{wire@all}%
16614 [\val\nr]{false,none,true,all}[all]{%
16615 \ifcase\nr\relax
16616 \POE@getwire@none
16617 \or
16618 \POE@getwire@none
16619 \or
16620 \POE@getwire@all
16621 \or
16622 \POE@getwire@all
16623 \fi
16624 }{%
16625 \ifx\@empty\val
16626 \POE@getwire@none
16627 \else
16628 \pst@expandafter\POE@psset@@wire{#1}\@empty,,\@nil
16629 \fi
16630 }%
16631 \def\POE@psset@@wire#1#2,#3,#4\@nil{%
16632 \POE@getwire@all
16633 \ifx\@empty#3\@empty
16634 \@nameuse{POE@getwire@#1}%
16635 \@nameuse{POE@getwire@#2}%
16636 \fi
16637 }%
16638 \def\POE@getwire@none{%
16639 \setkeys[psset]{optexp}{%
16640 wirein@=false, wireout@=false,
16641 wirein@top=false, wirein@bottom=false,
16642 wireout@top=false, wireout@bottom=false}%
16643 }%
16644 \def\POE@getwire@all{%
16645 \setkeys[psset]{optexp}{%
16646 wirein@, wireout@,
16647 wirein@top, wirein@bottom,
16648 wireout@top, wireout@bottom}%
16649 }%
16650 \def\POE@getwire@t{%
16651 \setkeys[psset]{optexp}{%
16652 wirein@bottom=false, wireout@bottom=false}%
16653 }%
16654 \def\POE@getwire@b{%
16655 \setkeys[psset]{optexp}{%
16656 wirein@top=false, wireout@top=false}%
16657 }%
16658 \def\POE@getwire@l{%
16659 \setkeys[psset]{optexp}{%
16660 wireout@=false, wireout@top=false, wireout@bottom=false}%
16661 }%
16662 \def\POE@getwire@r{%
16663 \setkeys[psset]{optexp}{%
16664 wirein@=false, wirein@top=false, wirein@bottom=false}%
16665 }%
16666 \let\POE@getwire@i\POE@getwire@l
16667 \let\POE@getwire@o\POE@getwire@r
16668 % \end{macrocode}
16669 % These are the internal boolkeys for the wire choices done with \opt{wirein},
16670 % \opt{wireout} and \opt{wire}. Do not use them directly.
16671 % \begin{macrocode}
16672 \define@boolkey[psset]{optexp}[POE@]{wirein@}[true]{}
16673 \define@boolkey[psset]{optexp}[POE@]{wirein@top}[true]{}
16674 \define@boolkey[psset]{optexp}[POE@]{wirein@bottom}[true]{}
16675 \define@boolkey[psset]{optexp}[POE@]{wireout@}[true]{}
16676 \define@boolkey[psset]{optexp}[POE@]{wireout@top}[true]{}
16677 \define@boolkey[psset]{optexp}[POE@]{wireout@bottom}[true]{}
16678 \define@boolkey[psset]{optexp}[POE@]{wirepresetin@}[true]{}
16679 \define@boolkey[psset]{optexp}[POE@]{wirepresetin@top}[true]{}
16680 \define@boolkey[psset]{optexp}[POE@]{wirepresetin@bottom}[true]{}
16681 \define@boolkey[psset]{optexp}[POE@]{wirepresetout@}[true]{}
16682 \define@boolkey[psset]{optexp}[POE@]{wirepresetout@top}[true]{}
16683 \define@boolkey[psset]{optexp}[POE@]{wirepresetout@bottom}[true]{}
16684 \psset[optexp]{wire=*all}%
16685 \define@key[psset]{optexp}{wireangleA}{%
16686 \pst@checknum{#1}\POE@key@wireangleA
16687 }%
16688 \define@key[psset]{optexp}{wireangleB}{%
16689 \pst@checknum{#1}\POE@key@wireangleB
16690 }%
16691 \define@choicekey+[psset]{optexp}{wirealign}%
16692 [\val\nr]{rel,abs,relative,center,absolute}%
16693 {%
16694 \ifcase\nr\relax
16695 \let\POE@key@wirealign\POE@str@relative
16696 \or
16697 \let\POE@key@wirealign\POE@str@absolute
16698 \else
16699 \def\POE@key@wirealign{#1}%
16700 \fi
16701 }%
16702 {\PackageError{pst-optexp}{Unknown value '\val' for wirealign}}%
16703 \define@key[psset]{optexp}{wirestyle}{%
16704 \@ifundefined{nc#1}%
16705 {\PackageError{pst-optexp}{Unknown value '#1' for wirestyle}}%
16706 {\def\POE@key@wirestyle{#1}}}
16707 \psset[optexp]{%
16708 wireangleA=0,
16709 wireangleB=0,
16710 wirealign=relative,
16711 wirestyle=angle
16712 }%
16713 % \end{macrocode}
16714 % Which nodes to take for the automatic fiber and wire connections.
16715 % \begin{macrocode}
16716 \define@key[psset]{optexp}{startnode}{\edef\POE@key@startnode{#1}}%
16717 \define@key[psset]{optexp}{stopnode}{\edef\POE@key@stopnode{#1}}%
16718 \psset[optexp]{%
16719 startnode=auto,
16720 stopnode=auto
16721 }%
16722 % \end{macrocode}
16723 %
16724 % \section{Layering}
16725 % \begin{macrocode}
16726 \newenvironment{optexp}{\Collect@Body\POE@collect}{}%
16727 \long\def\POE@collect#1{%
16728 \psset[optexp]{optexpenv}
16729 \global\POE@oldcnt=\POE@cnt
16730 \bgroup
16731 \psset[optexp]{backlayer=true, frontlayer=false}#1%
16732 \egroup
16733 \gdef\POE@complist{}\global\POE@cnt=\POE@oldcnt\relax
16734 \psset[optexp]{backlayer=false, frontlayer=true}%
16735 #1\ignorespaces}%
16736 % \end{macrocode}
16737 % \begin{macro}{\backlayer}
16738 % \begin{macrocode}
16739 \def\backlayer#1{\ifPOE@backlayer #1\fi\ignorespaces}%
16740 % \end{macrocode}
16741 % \end{macro}
16742 % \begin{macro}{\frontlayer}
16743 % \begin{macrocode}
16744 \def\frontlayer#1{\ifPOE@frontlayer #1\fi\ignorespaces}%
16745 % \end{macrocode}
16746 % \end{macro}
16747 %
16748 % \section{Connection code}
16749 % \subsection{drawfiber}
16750 % \begin{macro}{\POE@getnode}
16751 % \begin{macrocode}
16752 \def\POE@getnode#1#2\@nil{%
16753 \ifx(#1\relax%)
16754 \POE@getcoor#1#2
16755 \edef\POE@temp{{\pst@coor}}%
16756 \else
16757 \POE@checkcompname{#1#2}%
16758 \edef\POE@temp{/\oenode{}{#1#2}\space}%
16759 \fi%
16760 }%
16761 % \end{macrocode}
16762 % \begin{macro}{\POE@getcoor}
16763 % \begin{macrocode}
16764 \def\POE@getcoor(#1){\pst@@getcoor{#1}}%
16765 % \end{macrocode}
16766 % \end{macro}
16767 % \end{macro}
16768 %
16769 % \begin{macro}{\drawfiber}
16770 % \begin{macrocode}
16771 \def\drawfiber{\drawfiber@{Fiber}}%
16772 % \end{macrocode}
16773 % \end{macro}
16774 % \begin{macro}{\drawwire}
16775 % \begin{macrocode}
16776 \def\drawwire{\drawwire@{Wire}}%
16777 % \end{macrocode}
16778 % \end{macro}
16779 % \begin{macro}{\drawwire@}
16780 % \begin{macrocode}
16781 \def\drawwire@#1{%
16782 \def\POE@setconnparam{%
16783 \let\POE@key@connangleA\POE@key@wireangleA
16784 \let\POE@key@connangleB\POE@key@wireangleB
16785 \let\POE@key@connalign\POE@key@wirealign
16786 \let\POE@key@connstyle\POE@key@wirestyle
16787 }%
16788 \drawconn@{#1}
16789 }%
16790 % \end{macrocode}
16791 % \end{macro}
16792 % \begin{macro}{\drawfiber@}
16793 % \begin{macrocode}
16794 \def\drawfiber@#1{%
16795 \def\POE@setconnparam{%
16796 \let\POE@key@connangleA\POE@key@fiberangleA
16797 \let\POE@key@connangleB\POE@key@fiberangleB
16798 \let\POE@key@connalign\POE@key@fiberalign
16799 \let\POE@key@connstyle\POE@key@fiberstyle
16800 }%
16801 \drawconn@{#1}%
16802 }%
16803 % \end{macrocode}
16804 % \end{macro}
16805 % \begin{macro}{\drawconn@}
16806 % \begin{macrocode}
16807 \def\drawconn@#1{%
16808 \ifPst@custom\else
16809 \def\pst@par{style=#1}%
16810 \fi
16811 \@ifnextchar[%]
16812 {\drawconn@i}{\drawconn@i[]}}%
16813 \def\drawconn@i[#1]{%
16814 \addafter@par{#1}%
16815 \POE@normalizecomps\drawconn@ii}
16816 \def\drawconn@ii{%
16817 \@ifnextchar\bgroup
16818 {\drawconn@iii}%
16819 {}}%
16820 \def\drawconn@iii#1{%
16821 \def\POE@tempe{#1}\drawconn@iv}%
16822 \def\drawconn@iv{%
16823 \@ifnextchar\bgroup{\drawconn@v}{}}%
16824 \def\drawconn@v#1{%
16825 \expandafter\drawconn@vi\expandafter{\POE@tempe}{#1}%
16826 \def\POE@tempe{#1}\drawconn@iv}%
16827 \def\drawconn@vi#1#2{%
16828 \begingroup
16829 \let\psk@angleA\relax
16830 \let\psk@angleB\relax
16831 \use@par
16832 \POE@setconnparam
16833 \let\POE@angleA\psk@angleA
16834 \let\POE@angleB\psk@angleB
16835 \ifx\psk@angleA\relax
16836 \def\psk@angleA{0 }%3
16837 \fi
16838 \ifx\psk@angleB\relax
16839 \def\psk@angleB{0 }%
16840 \fi
16841 \def\POE@tempa{#1}
16842 \ifx\POE@tempa\@empty
16843 \edef\POE@comps{/\oenode{}{}\space}
16844 \else
16845 \expandafter\POE@getnode#1\@nil
16846 \edef\POE@comps{\POE@temp}
16847 \fi
16848 \def\POE@tempb{#2}
16849 \ifx\POE@tempb\@empty
16850 \edef\POE@comps{/\oenode{}{}\space \POE@comps}
16851 \else
16852 \expandafter\POE@getnode#2\@nil
16853 \edef\POE@comps{\POE@temp\space \POE@comps}
16854 \fi
16855 \ifPOE@backlayer
16856 \ifx\POE@key@startnode\POE@str@auto\else
16857 \POE@pnode{/\POE@key@startnode\space \POE@comps exch pop
16858 \POE@dict{GetIfcOrNodeCoord} \tx@UserCoor}{@@A}
16859 \fi
16860 \ifx\POE@key@stopnode\POE@str@auto\else
16861 \POE@pnode{/\POE@key@stopnode\space \POE@comps pop
16862 \POE@dict{GetIfcOrNodeCoord} \tx@UserCoor}{@@B}
16863 \fi
16864 \ifx\POE@key@startnode\POE@str@auto
16865 \ifx\POE@key@stopnode\POE@str@auto
16866 \POE@pnode{\POE@comps exch \POE@dict{NearestNode}
16867 \tx@UserCoor}{@@A}
16868 \POE@pnode{\POE@comps pop
16869 \POE@dict{/N@@@A @GetCenter ToVec NearestNode}
16870 \tx@UserCoor}{@@B}
16871 \else
16872 \POE@pnode{\POE@comps exch pop /N@@@B
16873 \POE@dict{@GetCenter ToVec NearestNode}
16874 \tx@UserCoor}{@@A}
16875 \fi
16876 \else\ifx\POE@key@stopnode\POE@str@auto
16877 \POE@pnode{\POE@comps pop /N@@@A
16878 \POE@dict{@GetCenter ToVec NearestNode}
16879 \tx@UserCoor}{@@B}
16880 \fi\fi
16881 \pst@getcoor{@@A}\POE@tempa
16882 \pst@getcoor{@@B}\POE@tempb
16883 \ifx\POE@angleA\relax
16884 \ifx\POE@key@connalign\POE@str@absolute
16885 \psset{angleA=\POE@key@connangleA}%
16886 \else
16887 \psset{angleA=! \POE@dict{%
16888 \POE@tempb \POE@tempa \POE@comps exch
16889 \POE@key@connalign\space RelConnAngle
16890 \POE@key@connangleA\space add }
16891 }%
16892 \fi
16893 \fi
16894 \ifx\POE@angleB\relax
16895 \ifx\POE@key@connalign\POE@str@absolute
16896 \psset{angleB=\POE@key@connangleB}%
16897 \else
16898 \psset{angleB=! \POE@dict{%
16899 \POE@tempa \POE@tempb \POE@comps
16900 \POE@key@connalign\space RelConnAngle
16901 \POE@key@connangleB\space add}
16902 }%
16903 \fi
16904 \fi
16905 \@nameuse{nc\POE@key@connstyle}{@@A}{@@B}
16906 \fi
16907 \endgroup
16908 }%
16909 % \end{macrocode}
16910 % \end{macro}
16911 % \begin{macro}{POE@pnode}
16912 % Do some trickery to define \cs{pnode} inside \cs{pscustom}, which is
16913 % required if one wants to use \cs{drawfiber} inside \cs{pscustom}.
16914 % \begin{macrocode}
16915 \def\POE@pnode#1#2{%
16916 \ifPst@custom
16917 \code{%
16918 gsave
16919 /currentpoint load stopped { 0 0 moveto } if
16920 1 8.3021995 div dup neg scale
16921 tx@NodeDict begin
16922 {#1 \tx@ScreenCoor } false /N@#2 10 {InitPnode}
16923 /NodeScale {} def NewNode
16924 end
16925 grestore
16926 }%
16927 \else
16928 \pnode(!#1){#2}
16929 \fi
16930 }%
16931 % \end{macrocode}
16932 % \end{macro}
16933 %
16934 % \subsection{drawbeam}
16935 %
16936 % \begin{macro}{\begin@BeamObj}
16937 % \begin{macrocode}
16938 \def\begin@BeamObj{%
16939 \addbefore@par{n=n}%
16940 \begin@SpecialObj%
16941 \addto@pscode{%
16942 \pst@optexpdict
16943 /loadbeampoints \POE@key@loadbeampoints\space def
16944 /loadbeam \ifPOE@loadbeam true \else false \fi def
16945 /beamangle \POE@key@beamangle\space def
16946 /beamdiv \POE@key@beamdiv\space def
16947 /savebeampoints \POE@key@savebeampoints\space def
16948 /savebeam \ifPOE@savebeam true \else false \fi def
16949 /startinsidecount \POE@key@startinsidecount\space cvi def
16950 startinsidecount 0 eq {
16951 /beaminsidefirst false def
16952 /startinside false def
16953 } {
16954 /beaminsidefirst \ifPOE@beaminsidefirst true \else false \fi def
16955 /startinside \ifPOE@startinside true \else false \fi def
16956 } ifelse
16957 /stopinsidecount \POE@key@stopinsidecount\space cvi def
16958 stopinsidecount 0 eq {
16959 /beaminsidelast false def
16960 /stopinside false def
16961 } {
16962 /beaminsidelast \ifPOE@beaminsidelast true \else false \fi def
16963 /stopinside \ifPOE@stopinside true \else false \fi def
16964 } ifelse
16965 /beaminside \ifPOE@beaminside true \else false \fi def
16966 /connectifc \ifPOE@raytrace false \else true \fi def
16967 /beamalign
16968 \ifx\POE@key@beamalign\POE@str@absolute\space
16969 absolute
16970 \else\ifx\POE@key@beamalign\POE@str@relative\space
16971 relative
16972 \else
16973 firstcomp
16974 \fi\fi def
16975 /beampathskip \POE@key@beampathskip\space def
16976 \POE@key@beampathcount\space dup -1 gt { beampathskip add } if /beampathcount ED
16977 /useNA \ifPOE@useNA true \else false \fi def
16978 /aligntovector \ifx\POE@key@beamnodealign\POE@str@vector true \else false \fi def
16979 /beamdiffractionorder
16980 \ifx\POE@key@beamdiffractionorder\@empty null
16981 \else\POE@key@beamdiffractionorder\space
16982 \fi def
16983 /beammode
16984 \ifx\POE@key@beammode\POE@str@reflective
16985 refl
16986 \else\ifx\POE@key@beammode\POE@str@transmittive
16987 trans
16988 \else
16989 auto
16990 \fi\fi def
16991 }%
16992 \let\tx@Line\POE@tx@Line
16993 }%
16994 % \end{macrocode}
16995 % \end{macro}
16996 %
16997 % \begin{macro}{\begin@WideBeamObj}
16998 % \begin{macrocode}
16999 \def\begin@WideBeamObj{%
17000 \addbefore@par{style=Beam}%
17001 \begin@BeamObj
17002 \let\pst@linetype\pst@arrowtype
17003 \pst@addarrowdef%
17004 }%
17005 % \end{macrocode}
17006 % \end{macro}
17007 %
17008 % \begin{macro}{\begin@SingleBeamObj}
17009 % \begin{macrocode}
17010 \let\begin@SingleBeamObj\begin@WideBeamObj
17011 % \end{macrocode}
17012 % \end{macro}
17013 %
17014 % \begin{macro}{\drawbeam}
17015 % \begin{macrocode}
17016 \def\drawbeam{\pst@object{drawbeam}}%
17017 \def\drawbeam@i{%
17018 \begin@SingleBeamObj
17019 \POE@getcomps[\drawbeam@ii%
17020 }%
17021 % \end{macrocode}
17022 % \end{macro}
17023 %
17024 % \begin{macro}{\drawwidebeam}
17025 % \begin{macrocode}
17026 \def\drawwidebeam{\pst@object{drawwidebeam}}%
17027 \def\drawwidebeam@i{%
17028 \begin@WideBeamObj
17029 \POE@getcomps[\drawwidebeam@ii%
17030 }%
17031 % \end{macrocode}
17032 % \end{macro}
17033 %
17034 % \begin{macro}{\POE@beam@use@pscode}
17035 %
17036 % This is a hack which allows us to leave the names and coordinates of the
17037 % beam end points on the stack after the \opt{@endspecial} call. This replaces
17038 % \nxLcs{use@pscode} in \nxLcs{end@BeamObj}. These values on the stack must be
17039 % consumed directly after closing the beam object.
17040 % \begin{macrocode}
17041 \def\POE@beam@use@pscode{%
17042 \pstverb{%
17043 \pst@dict
17044 \tx@STP
17045 \pst@newpath
17046 \psk@origin
17047 \psk@swapaxes
17048 \pst@code
17049 end
17050 count /ocount exch def
17051 }%
17052 \gdef\pst@code{}%
17053 }%
17054 % \end{macrocode}
17055 % \end{macro}
17056 %
17057 % \begin{macro}{\end@BeamObj}
17058 % \begin{macrocode}
17059 \def\end@BeamObj{%
17060 \addto@pscode{ end }%
17061 \let\psk@fillstyle\relax
17062 \ifPOE@optexpenv
17063 \ifPOE@frontlayer
17064 % \end{macrocode}
17065 % Erase all beam-drawing code and leave only \opt{false} on the stack to
17066 % indicate that no beampoints should be stored.
17067 % \begin{macrocode}
17068 \def\pst@code{ false false }%
17069 \fi
17070 \fi
17071 \let\use@pscode\POE@beam@use@pscode
17072 \end@SpecialObj%
17073 }%
17074 % \end{macrocode}
17075 % \end{macro}
17076 %
17077 % \begin{macro}{\drawbeam@ii}
17078 % \begin{macrocode}
17079 \def\drawbeam@ii{%
17080 \ifodd
17081 % \end{macrocode}
17082 % Do not draw anything only if both linestyle and ArrowInside are not set.
17083 % \begin{macrocode}
17084 \ifx\pslinestyle\@none\ifx\psk@ArrowInside\@empty 1\else 0\fi\else 0\fi
17085 \addto@pscode{ cleartomark false false }%
17086 \else
17087 % \end{macrocode}
17088 % Get the beamproperties from the first component if it is a source.
17089 % \begin{macrocode}
17090 \POE@HandleSourceBeam
17091 % \end{macrocode}
17092 % I need to pack it this way in order to avoid replacing the \opt{n} inside the
17093 % code here. This must be done later, when it refers to the correct refractive
17094 % indices.
17095 % \begin{macrocode}
17096 \addto@pscode{%
17097 {/nbeam {\POE@key@n cvx exec} bind def
17098 \ifPOE@pswarning
17099 /Warning /PrintWarning load def
17100 \else
17101 /Warning /pop load def
17102 \fi}%
17103 [ \POE@key@beampos\space counttomark dup
17104 0 eq {
17105 pop 0 0
17106 } {
17107 1 eq {
17108 0 exch
17109 } if
17110 } ifelse \tx@ScreenCoor] cvx
17111 beamangle
17112 currentdict /lastBeamPointTmp undef
17113 currentdict /lastVecTmp undef
17114 loadbeampoints 1 ge
17115 tx@NodeDict /N@\oenodeBeam{\POE@key@loadbeampoints} known and {
17116 /N@\oenodeBeam{\POE@key@loadbeampoints} @GetCenter ToVec
17117 /lastBeamPointTmp ED
17118 } if
17119 currentdict /lastVec\POE@key@loadbeampoints\space known
17120 loadbeam and {
17121 /lastVecTmp /lastVec\POE@key@loadbeampoints\space load def
17122 } if
17123 TraceBeam
17124 \POE@strokesinglebeam
17125 savebeampoints 1 ge
17126 currentdict /lastBeamPointTmp known and dup {
17127 lastBeamPointTmp
17128 /N@\oenodeBeam{\POE@key@savebeampoints}\space 4 -1 roll
17129 } if
17130 savebeam currentdict /lastVecTmp known and dup {
17131 /prevVec\POE@key@savebeampoints\space
17132 currentdict /prevVecTmp known { prevVecTmp }{ 0 0 } ifelse
17133 /lastVec\POE@key@savebeampoints\space lastVecTmp 7 -1 roll
17134 } if
17135 }%
17136 \fi
17137 \end@BeamObj
17138 \POE@Verb{%
17139 { tx@OptexpDict begin ToVec def ToVec def end } if
17140 { \tx@NodeScale @NewNode } if
17141 }%
17142 }%
17143 % \end{macrocode}
17144 % \end{macro}
17145 % This fix is necessary for pst-node since version 1.21.
17146 % \begin{macrocode}
17147 \def\tx@NodeScale{%
17148 \pst@nodedict
17149 /NodeScale {\ifx\pstnodescale\@undefined\else\pstnodescale\fi} def
17150 end }
17151 % \end{macrocode}
17152 %
17153 % \begin{macro}{\POE@strokesinglebeam}
17154 % \begin{macrocode}
17155 \def\POE@strokesinglebeam{%
17156 gsave
17157 /Lineto /lineto load def
17158 20 dict begin
17159 DrawbeamPrepare
17160 % \end{macrocode}
17161 % If there are only three elements or less on the stack, the first ray
17162 % misses the next interface or is even parallel to the input interface.
17163 % \begin{macrocode}
17164 counttomark 3 gt {
17165 % \end{macrocode}
17166 % Define some parameters for Drawbeam which are based on TeX-parameters
17167 % \begin{macrocode}
17168 \ifx\psk@arrowA\arrowType@H
17169 \pst@number\pshooklength
17170 \else
17171 \psk@arrowsize\space CLW mul add dup \psk@arrowlength\space mul exch \psk@arrowinset mul neg add
17172 \fi
17173 /arrowlength exch def
17174 /arrowminlength \POE@key@ArrowInsideMinLength\space\pst@number\psunit mul def
17175 /arrowmaxlength \POE@key@ArrowInsideMaxLength\space\pst@number\psunit mul def
17176 /arrowpos \psk@ArrowInsidePos\space def
17177 /arrowno \psk@ArrowInsideNo\space cvi def
17178 /ArrowPosStart \psk@ArrowInsideOffset\space def
17179 /dArrowPosStart \psk@ArrowInsidePos\space def
17180 counttomark 3 idiv /N exch def
17181 (\psk@ArrowInside) length 0 gt {
17182 DrawbeamArrowInside
17183 }{
17184 DrawbeamSimple
17185 } ifelse
17186 } if
17187 cleartomark
17188 end
17189 \tx@setlinejoin
17190 \pst@number\pslinewidth SLW
17191 \pst@usecolor\pslinecolor
17192 \tx@setStrokeTransparency
17193 \@nameuse{psls@\pslinestyle}
17194 grestore
17195 }%
17196 % \end{macrocode}
17197 % \end{macro}
17198 %
17199 % \begin{macro}{\drawwidebeam@ii}
17200 % \begin{macrocode}
17201 \def\drawwidebeam@ii{%
17202 \def\pst@fill##1{ gsave ##1 grestore }%
17203 % \end{macrocode}
17204 % Get the beamproperties from the first component if it is a source.
17205 % \begin{macrocode}
17206 \POE@HandleSourceBeam
17207 \addto@pscode{%
17208 {/nbeam {\POE@key@n cvx exec} bind def
17209 \ifPOE@pswarning
17210 /Warning /PrintWarning load def
17211 \else
17212 /Warning /pop load def
17213 \fi}%
17214 }%
17215 % \end{macrocode}
17216 % arrange and create the input vectors
17217 % \begin{macrocode}
17218 \addto@pscode{%
17219 beamangle dup
17220 beamdiv 0.5 mul dup 4 -1 roll add 3 1 roll sub
17221 }%
17222 % \end{macrocode}
17223 % the start positions
17224 % \begin{macrocode}
17225 \addto@pscode{%
17226 [ \POE@key@beampos\space counttomark dup
17227 0 eq {
17228 pop 0 0
17229 } {
17230 1 eq {
17231 0 exch
17232 } if
17233 } ifelse
17234 % \end{macrocode}
17235 % if \opt{beamwidth} is defined at Postscript level, it was defined from the source object.
17236 % \begin{macrocode}
17237 currentdict /beamwidth known {
17238 beamwidth currentdict /beamwidth undef
17239 } {
17240 mark \POE@key@beamwidth\space counttomark 0 eq { 0 } if exch pop
17241 } ifelse 0.5 mul
17242 3 copy add \tx@ScreenCoor\space ToVec
17243 5 1 roll sub \tx@ScreenCoor
17244 ] cvx
17245 }%
17246 % \end{macrocode}
17247 % rearrange options
17248 % \begin{macrocode}
17249 \addto@pscode{ exch 4 -1 roll 4 2 roll exch }%
17250 % \end{macrocode}
17251 % stroke and/or fill
17252 % \begin{macrocode}
17253 \addto@pscode{%
17254 counttomark mark exch 2 add 1 roll
17255 gsave
17256 \ifx\psk@fillstyle\relax
17257 currentdict /fillBeam undef
17258 \else
17259 /fillBeam {\psk@fillstyle} def
17260 \fi
17261 /strokeBeam
17262 \ifx\pslinestyle\@none false \else true \fi
17263 \ifx\psk@ArrowInside\@empty false \else true \fi or def
17264 [/lastBeamPointTmpLow /lastBeamPointTmpUp
17265 /lastVecTmpLow /lastVecTmpUp]
17266 {currentdict exch undef} forall
17267 tx@NodeDict /N@\oenodeBeamLow{\POE@key@loadbeampoints} known
17268 tx@NodeDict /N@\oenodeBeamUp{\POE@key@loadbeampoints} known
17269 loadbeampoints 1 ge and and {
17270 /N@\oenodeBeamLow{\POE@key@loadbeampoints} @GetCenter ToVec
17271 /lastBeamPointTmpLow ED
17272 /N@\oenodeBeamUp{\POE@key@loadbeampoints} @GetCenter ToVec
17273 /lastBeamPointTmpUp ED
17274 } if
17275 loadbeam
17276 currentdict /lastVecLow\POE@key@loadbeampoints\space known and
17277 currentdict /lastVecUp\POE@key@loadbeampoints\space known and {
17278 /lastVecTmpLow /lastVecLow\POE@key@loadbeampoints\space load def
17279 /lastVecTmpUp /lastVecUp\POE@key@loadbeampoints\space load def
17280 } if
17281 TraceAndFillWideBeam
17282 grestore pop % pop off the mark
17283 % \end{macrocode}
17284 % Rearrange the points so that we can use two Drawbeam calls.
17285 %
17286 % \begin{macrocode}
17287 counttomark 0 gt strokeBeam and {
17288 counttomark dup /cnta ED /cntb ED
17289 cnta 6 idiv {
17290 cnta 3 roll /cnta cnta 3 sub def
17291 /cntb cntb 3 sub def
17292 cntb 3 roll /cntb cntb 3 sub def
17293 } repeat
17294 counttomark 2 idiv 1 add mark exch 1 roll
17295 \POE@strokesinglebeam
17296 \POE@strokesinglebeam
17297 } {
17298 pop % pop off the mark
17299 } ifelse
17300 currentdict /fillBeam known strokeBeam or
17301 savebeampoints 1 ge and
17302 currentdict /lastBeamPointTmpLow known and
17303 currentdict /lastBeamPointTmpUp known and dup {
17304 lastBeamPointTmpLow /N@\oenodeBeamLow{\POE@key@savebeampoints}
17305 lastBeamPointTmpUp /N@\oenodeBeamUp{\POE@key@savebeampoints}
17306 7 -1 roll
17307 } if
17308 currentdict /fillBeam known strokeBeam or
17309 savebeam and
17310 currentdict /lastVecTmpLow known and
17311 currentdict /lastVecTmpUp known and dup {
17312 /prevVecLow\POE@key@savebeampoints\space /prevVecUp\POE@key@savebeampoints\space
17313 currentdict /prevVecLow known currentdict /prevVecUp known and {
17314 prevVecLow 3 -1 roll prevVecUp
17315 } {
17316 0 0 3 -1 roll 0 0
17317 } ifelse
17318 /lastVecLow\POE@key@savebeampoints\space lastVecTmpLow
17319 /lastVecUp\POE@key@savebeampoints\space lastVecTmpUp
17320 13 -1 roll
17321 } if
17322 }%
17323 \end@BeamObj
17324 \POE@Verb{%
17325 { tx@OptexpDict begin 4 { ToVec def } repeat end } if
17326 { \tx@NodeScale @NewNode @NewNode } if
17327 }%
17328 }%
17329 % \end{macrocode}
17330 % \end{macro}
17331 %
17332 % \begin{macro}{\tx@Drawbeam}
17333 % \begin{macrocode}
17334 \pst@def{Drawbeam}<
17335 % \end{macrocode}
17336 % Remove trailing empty line parts.
17337 % \begin{macrocode}
17338 { counttomark 6 le {
17339 exit
17340 } if
17341 3 index not {
17342 pop pop pop
17343 }{
17344 exit
17345 } ifelse
17346 } loop
17347 % \end{macrocode}
17348 % Remove heading empty line parts. Note, that the first point must not have
17349 % 'draw = true', because it is the starting point which we have to move to.
17350 % \begin{macrocode}
17351 { counttomark 3 le {
17352 exit
17353 } if
17354 counttomark 3 sub index not {
17355 counttomark -3 roll pop pop pop
17356 }{
17357 exit
17358 } ifelse
17359 } loop
17360 % \end{macrocode}
17361 % \begin{macrocode}
17362 counttomark 3 le {
17363 % \end{macrocode}
17364 % first ray misses the next interface or is even parallel to the input interface.
17365 % \begin{macrocode}
17366 cleartomark
17367 }{
17368 % \end{macrocode}
17369 % This is the /Line definition from \opt{pstricks-add}, adapted to the beam path
17370 % structure which includes the boolean values to indicate if a line is drawn, or
17371 % if we use moveto. There was no way to patch the original definition to account
17372 % for the moveto parts and avoid duplicating the code.
17373 % \begin{macrocode}
17374 counttomark 3 div cvi /N ED
17375 (\psk@ArrowInside) length 0 gt {
17376 \ifx\psk@arrowA\arrowType@H % do we have a Hook arrow at the beginning?
17377 \pst@number\pshooklength % yes
17378 \else
17379 \psk@arrowsize\space CLW mul add dup \psk@arrowlength\space mul exch \psk@arrowinset mul neg add
17380 \fi
17381 /arrowlength exch def
17382 6 copy pop % copy all four values for the arrow line
17383 /y1 ED /x1 ED pop /y2 ED /x2 ED % save them
17384 /Alpha y2 y1 sub x2 x1 sub Atan def % the gradient of the line
17385 pop 3 -1 roll 5 1 roll
17386 ArrowA
17387 x1 Alpha cos arrowlength mul add % dx add
17388 y1 Alpha sin arrowlength mul add % dy add, to get the current point at the end of the arrow tip
17389 5 -1 roll 3 1 roll true
17390 /N N 1 sub def
17391 N {
17392 6 copy pop
17393 /y1 ED /x1 ED pop /y2 ED /x2 ED /draw ED
17394 % \end{macrocode}
17395 % Check for line segment length and draw the arrow only, if the segment is long
17396 % enough. This is in first place to avoid drawing an inside arrow for the
17397 % pinhole which has three interfaces instead of one so that it can be used as
17398 % real spatial filter.
17399 % \begin{macrocode}
17400 x1 y1 x2 y2 @ABDist dup
17401 \POE@key@ArrowInsideMinLength\space\pst@number\psunit mul ge
17402 exch \POE@key@ArrowInsideMaxLength\space\pst@number\psunit mul dup 0 lt
17403 3 1 roll le or and {
17404 x1 y1
17405 \psk@ArrowInsidePos\space 1 gt {
17406 /Alpha y2 y1 sub x2 x1 sub Atan def
17407 /ArrowPos \psk@ArrowInsideOffset\space def
17408 /dArrowPos \psk@ArrowInsidePos\space abs def
17409 \psk@ArrowInsideNo\space cvi {
17410 /ArrowPos ArrowPos dArrowPos add def
17411 x1 Alpha cos ArrowPos mul add
17412 y1 Alpha sin ArrowPos mul add
17413 6 index { ArrowInside } if
17414 pop pop
17415 } repeat
17416 }{
17417 /ArrowPos \psk@ArrowInsideOffset\space def
17418 /dArrowPos \psk@ArrowInsideNo 1 gt {%
17419 1.0 \psk@ArrowInsideNo 1.0 add div
17420 }{\psk@ArrowInsidePos } ifelse def
17421 \psk@ArrowInsideNo\space cvi {
17422 /ArrowPos ArrowPos dArrowPos add def
17423 x2 x1 sub ArrowPos mul x1 add
17424 y2 y1 sub ArrowPos mul y1 add
17425 6 index { ArrowInside } if
17426 pop pop
17427 } repeat
17428 } ifelse
17429 pop pop
17430 } if
17431 draw {Lineto}{moveto} ifelse
17432 } repeat
17433 }{
17434 pop 5 copy 3 -1 roll pop
17435 ArrowA pop pop pop pop
17436 counttomark 3 idiv -1 2 {
17437 pop {
17438 lineto
17439 }{
17440 moveto
17441 } ifelse
17442 } for
17443 } ifelse
17444 {CP 4 2 roll ArrowB lineto pop pop } {moveto} ifelse
17445 % \end{macrocode}
17446 % remove the mark
17447 % \begin{macrocode}
17448 pop
17449 } ifelse
17450 >
17451 % \end{macrocode}
17452 % \end{macro}
17453 %
17454 % \begin{macro}{\POE@getcomprange}
17455 % \begin{macrocode}
17456 \def\POE@getcomprange#1-#2\@nil{%
17457 \ifx\\#2\\%
17458 \ifx\\#1\\%
17459 % \end{macrocode}
17460 % empty option, use the current component ID
17461 % \begin{macrocode}
17462 \@tempcnta=\POE@cnt
17463 \@tempcntb=\POE@cnt
17464 \else
17465 % \end{macrocode}
17466 % A single number was given
17467 % \begin{macrocode}
17468 \@tempcnta=#1
17469 \@tempcntb=#1
17470 % \end{macrocode}
17471 % Check if the number is valid, otherwise quit with an error.
17472 % \begin{macrocode}
17473 \ifodd
17474 \ifnum 0<\@tempcnta\ifnum\@tempcntb>\the\POE@cnt \@ne\else\z@\fi\else\@ne\fi
17475 \PackageError{pst-optexp}%
17476 {Component ID \the\@tempcnta\space is not valid,
17477 \ifnum\the\POE@cnt=0 no components have been defined\else
17478 valid range is from 1 to \the\POE@cnt\fi}
17479 \fi
17480 \fi
17481 \else
17482 \ifx\\#1\\%
17483 \@tempcnta=\@ne
17484 \else
17485 \@tempcnta=#1
17486 \fi
17487 \edef\POE@temp{\POE@getfirstchar#2\@nil}%
17488 \expandafter\ifx\POE@temp<\relax
17489 \POE@getlastcompprev#2%
17490 \else
17491 \POE@getlastcomp#2%
17492 \fi
17493 \POE@checkandfixcomprange
17494 \fi
17495 }%
17496 \def\POE@getcomprangeprev<#1-#2\@nil{%
17497 \@tempcnta=\POE@cnt
17498 \@tempcntb=\POE@cnt
17499 \ifx\\#1\\%
17500 \advance\@tempcnta by -1
17501 \else
17502 \advance\@tempcnta by -#1
17503 \fi
17504 \ifx\\#2\\\else
17505 \edef\POE@temp{\POE@getfirstchar#2\@nil}%
17506 \expandafter\ifx\POE@temp<\relax
17507 \POE@getlastcompprev#2%
17508 \else
17509 \POE@getlastcomp#2%
17510 \fi
17511 \fi
17512 \POE@checkandfixcomprange
17513 }%
17514 \def\POE@checkandfixcomprange{%
17515 \ifnum\@tempcnta>\POE@cnt
17516 \ifnum\@tempcntb>\POE@cnt
17517 \PackageError{pst-optexp}%
17518 {All components \the\@tempcnta-\the\@tempcntb\space out of range}%
17519 \fi
17520 \fi
17521 \ifnum\@tempcnta<\@ne
17522 \PackageWarning{pst-optexp}%
17523 {Component ID \the\@tempcnta\space is not valid, setting to 1.}%
17524 \@tempcnta=\@ne
17525 \else\ifnum\@tempcnta>\POE@cnt
17526 \PackageWarning{pst-optexp}%
17527 {A: Component ID \the\@tempcnta\space is not valid, setting to \MessageBreak
17528 the last defined value (\the\POE@cnt).}%
17529 \@tempcnta=\POE@cnt
17530 \fi\fi
17531 \ifnum\@tempcntb>\POE@cnt
17532 \PackageWarning{pst-optexp}%
17533 {B: Component ID \the\@tempcntb\space is not valid, setting to \MessageBreak
17534 the last defined value (\the\POE@cnt).}%
17535 \@tempcntb=\POE@cnt
17536 \else\ifnum\@tempcntb<\@ne
17537 \PackageWarning{pst-optexp}%
17538 {Component ID \the\@tempcntb\space is not valid, setting to 1.}%
17539 \@tempcntb=\@ne
17540 \fi\fi
17541 }%
17542 \def\POE@getlastcomp#1-{%
17543 \ifx\\#1\\%
17544 \ifnum\@tempcnta>\POE@cnt
17545 \PackageError{pst-optexp}{All components \the\@tempcnta- out of range.}%
17546 \fi%
17547 \@tempcntb=\POE@cnt
17548 \else
17549 \@tempcntb=#1\relax
17550 \fi
17551 }%
17552 \def\POE@getlastcompprev<#1-{%
17553 \@tempcntb=\POE@cnt
17554 \ifx\\#1\\%
17555 \advance\@tempcntb by -1
17556 \else
17557 \advance\@tempcntb by -#1
17558 \fi
17559 }%
17560 % \end{macrocode}
17561 % \end{macro}
17562 %
17563 % \begin{macro}{\POE@getcomps}
17564 % \begin{macrocode}
17565 \def\POE@getcomps#1#2{%
17566 \def\POE@aftercomps{\addto@pscode{#1 \POE@comps }#2}%
17567 \def\POE@comps{}%
17568 \POE@getcomps@i%
17569 }%
17570 \def\POE@getcomps@i{%
17571 \@ifnextchar(%)
17572 {\POE@getplanenode@i}%
17573 {\POE@getcomps@ii}
17574 }%
17575 \def\POE@getcomps@ii{%
17576 \@ifnextchar\bgroup{\POE@getcomps@iii}{\POE@aftercomps}%
17577 }%
17578 \def\POE@getfirstchar#1#2\@nil{#1}%
17579 \def\POE@getprevcompid<#1\@nil{%
17580 \ifx\\#1\\%
17581 \number\numexpr\POE@cnt-1\relax
17582 \else
17583 \number\numpexp\POE@cnt-#1\relax
17584 \fi
17585 }%
17586 \def\POE@getcomps@iii#1{%
17587 \edef\POE@temp{\POE@getfirstchar#1{}\@nil}%
17588 \ifx\POE@temp\@empty
17589 \POE@getcomp{(\oenode{}{})}%
17590 \else\expandafter\ifx\POE@temp(\relax%)
17591 \POE@getplanenode#1%
17592 \else\ifnum9<1\POE@temp\relax
17593 \expandafter\POE@getcomprange#1-\@nil
17594 \POE@getcomp{%
17595 (\POE@str@basicname@prefix\POE@str@basicname@default)
17596 \the\@tempcnta\space\the\@tempcntb\space GetCompRange %
17597 }%
17598 \else\expandafter\ifx\POE@temp<\relax
17599 \expandafter\POE@getcomprangeprev#1-\@nil
17600 \POE@getcomp{%
17601 (\POE@str@basicname@prefix\POE@str@basicname@default)
17602 \the\@tempcnta\space\the\@tempcntb\space GetCompRange %
17603 }%
17604 \else\expandafter\ifx\POE@temp-\relax
17605 \POE@getcomprange#1-\@nil
17606 \POE@getcomp{%
17607 (\POE@str@basicname@prefix\POE@str@basicname@default)
17608 \the\@tempcnta\space\the\@tempcntb\space GetCompRange %
17609 }%
17610 \else
17611 \POE@checkcompname{#1}%
17612 \POE@getcomp{(\oenode{}{#1})}%
17613 \fi\fi\fi\fi\fi%
17614 \POE@getcomps@i%
17615 }%
17616 % \end{macrocode}
17617 % \end{macro}
17618 %
17619 % \begin{macro}{\POE@getplanenode}
17620 % \begin{macrocode}
17621 \def\POE@getplanenode(#1){%
17622 \pst@@getcoor{#1}%
17623 \advance\POE@nodecnt by 1
17624 \POE@getcomp{%
17625 {\pst@coor} {0 1}
17626 (\POE@str@basicname@default N@\the\POE@nodecnt)
17627 {\tx@UserCoor} NewTempNodeComp
17628 (\POE@str@basicname@default N@\the\POE@nodecnt)
17629 }%
17630 }%
17631 \def\POE@getplanenode@i(#1){\POE@getplanenode(#1)\POE@getcomps@i}%
17632 % \end{macrocode}
17633 % \end{macro}
17634 %
17635 % \begin{macro}{\POE@getcomp}
17636 % \begin{macrocode}
17637 \def\POE@getcomp#1{%
17638 \ifx\POE@comps\@empty
17639 \edef\POE@tempc{#1}%
17640 \else
17641 \edef\POE@tempd{#1}%
17642 \fi
17643 \edef\POE@comps{#1 \POE@comps}%
17644 }%
17645 % \end{macrocode}
17646 % \end{macro}
17647 % \begin{macro}{\POE@normalizecomps}
17648 % Expands all component parameters by resolving the ranges, i.e. {1-3}
17649 % becomes {1}{2}{3}. Nodes are wrapped with brackets, if necessary:
17650 % (1,1) becomes {(1,1)}.
17651 % \begin{macrocode}
17652 \def\POE@normalizecomps#1{%
17653 \def\POE@aftercomps{\expandafter#1\POE@comps}%
17654 \def\POE@comps{}%
17655 \POE@normalizecomps@i%
17656 }%
17657 \def\POE@normalizecomps@i{%
17658 \@ifnextchar(%)
17659 {\POE@normalizecomps@ii}%
17660 {\POE@normalizecomps@iii}
17661 }%
17662 \def\POE@normalizecomps@ii(#1){%
17663 \edef\POE@comps{\POE@comps{(#1)}}%
17664 \POE@normalizecomps@i
17665 }%
17666 \def\POE@normalizecomps@iii{%
17667 \@ifnextchar\bgroup{\POE@normalizecomps@iv}{\POE@aftercomps}%
17668 }%
17669 % \end{macrocode}
17670 %
17671 % Analyze the content of the comp id and expand it accordingly.
17672 % \begin{macrocode}
17673 \def\POE@normalizecomps@iv#1{%
17674 \edef\POE@temp{\POE@getfirstchar#1{}\@nil}%
17675 \let\POE@tempb\POE@getcomprange
17676 \ifnum9<1\POE@temp\relax
17677 \def\POE@tempa{1}%
17678 \else\expandafter\ifx\POE@temp-\relax
17679 \def\POE@tempa{1}%
17680 \else\expandafter\ifx\POE@temp<\relax
17681 \def\POE@tempa{1}%
17682 \let\POE@tempb\POE@getcomprangeprev
17683 \else
17684 \def\POE@tempa{0}%
17685 \fi\fi\fi
17686 \ifodd\POE@tempa
17687 \POE@tempb#1-\@nil
17688 \ifnum\@tempcnta<\@tempcntb \def\POE@rel{<}\def\POE@inc{\@ne}%
17689 \else \def\POE@rel{>}\def\POE@inc{\m@ne}\fi
17690 \advance\@tempcntb\POE@inc
17691 \whiledo{\@tempcnta\POE@rel\@tempcntb}{%
17692 \edef\POE@comps{\POE@comps{\the\@tempcnta}}%
17693 \advance\@tempcnta\POE@inc
17694 }%
17695 \else
17696 \edef\POE@comps{\POE@comps{#1}}%
17697 \fi
17698 \POE@normalizecomps@i%
17699 }%
17700 % \end{macrocode}
17701 % \end{macro}
17702 %
17703 % \subsection{Automatic connections}
17704 %
17705 % \begin{macro}{\POE@PresetWireConn}
17706 % Draw automatic wires for electrical components.
17707 % \begin{macrocode}
17708 \def\POE@PresetWireConn{%
17709 \ifPOE@startbox\else
17710 \ifPOE@wirepresetin@
17711 \drawwire@{WireIn}(\oenodeRefA{}){}
17712 \else\ifPOE@fiberin@
17713 \drawfiber@{FiberIn}(\oenodeRefA{}){}
17714 \fi\fi
17715 \fi
17716 \ifPOE@endbox\else
17717 \ifPOE@wirepresetout@
17718 \drawwire@{WireOut}{}(\oenodeRefB{})
17719 \else\ifPOE@fiberout@
17720 \drawfiber@{FiberOut}{}(\oenodeRefB{})
17721 \fi\fi
17722 \fi
17723 }%
17724 % \end{macrocode}
17725 % \end{macro}
17726 % \begin{macro}{\POE@PresetFiberConn}
17727 % Draw automatic fiber or wires for fiber components.
17728 % \begin{macrocode}
17729 \def\POE@PresetFiberConn{%
17730 \ifPOE@startbox\else
17731 \ifPOE@fiberpresetin@
17732 \drawfiber@{FiberIn}(\oenodeRefA{}){}
17733 \else\ifPOE@wirein@
17734 \drawwire@{WireIn}(\oenodeRefA{}){}
17735 \fi\fi
17736 \fi
17737 \ifPOE@endbox\else
17738 \ifPOE@fiberpresetout@
17739 \drawfiber@{FiberOut}{}(\oenodeRefB{})
17740 \else\ifPOE@wireout@
17741 \drawwire@{WireOut}{}(\oenodeRefB{})
17742 \fi\fi
17743 \fi
17744 }%
17745 % \end{macrocode}
17746 % \end{macro}
17747 %
17748 % \begin{macro}{\POE@InternalConn}
17749 % \begin{macrocode}
17750 \def\POE@InternalConn{%
17751 \ifPOE@beam
17752 \ifPOE@endbox
17753 \drawbeam[raytrace=false](\oenodeRefA{}){}
17754 \else\ifPOE@startbox
17755 \drawbeam[raytrace=false]{}(\oenodeRefB{})
17756 \else
17757 \drawbeam[raytrace=false](\oenodeRefA{}){}(\oenodeRefB{})
17758 \fi\fi
17759 \else
17760 \ifPOE@startbox\else
17761 \ifPOE@fiberin@
17762 \drawfiber@{FiberIn}(\oenodeRefA{}){}
17763 \else\ifPOE@wirein@
17764 \drawwire@{WireIn}(\oenodeRefA{}){}
17765 \fi\fi
17766 \fi
17767 \ifPOE@endbox\else
17768 \ifPOE@fiberout@
17769 \drawfiber@{FiberOut}{}(\oenodeRefB{})
17770 \else\ifPOE@wireout@
17771 \drawwire@{WireOut}{}(\oenodeRefB{})
17772 \fi\fi
17773 \fi
17774 \fi
17775 }%
17776 % \end{macrocode}
17777 % \end{macro}
17778 %
17779 % \begin{macro}{\POE@usefiberorwirestyle}
17780 % \begin{macrocode}
17781 \def\POE@usefiberorwirestyle{%
17782 \ifPOE@usefiberstyle
17783 \psset{style=Fiber, arrows=-, ArrowInside=-}%
17784 \else\ifPOE@usewirestyle
17785 \psset{style=Wire, arrows=-, ArrowInside=-}%
17786 \fi\fi
17787 }%
17788 % \end{macrocode}
17789 % \end{macro}
17790 %
17791 % \section{Accessing component nodes}
17792 % \begin{macro}{\POE@checkcompname}
17793 % Check if a component with name \#1 was already defined.
17794 % \begin{macrocode}
17795 \def\POE@checkcompname#1{%
17796 \@expandtwoargs\in@{,#1,}{,\POE@complist,}%
17797 \ifin@\else
17798 \PackageError{pst-optexp}{Component '#1' is undefined}
17799 \fi
17800 }%
17801 % \end{macrocode}
17802 % \end{macro}
17803 %
17804 % \begin{macro}{\oenode}
17805 % Get the full node name of the node \#1 defined in component \#2.
17806 % \begin{macrocode}
17807 \def\oenode#1#2{%
17808 \POE@str@basicname@prefix%
17809 \ifx\\#2\\%
17810 \POE@str@basicname@default\the\POE@cnt
17811 \else
17812 \ifnum9<1#2
17813 \POE@str@basicname@default
17814 #2%
17815 \else
17816 \POE@prevnode#2\@nil
17817 \POE@str@basicname@sep%
17818 \fi%
17819 \fi%
17820 #1%
17821 }%
17822 % \end{macrocode}
17823 % \end{macro}
17824 %
17825 % \begin{macro}{POE@prevnode}
17826 % \begin{macrocode}
17827 \def\POE@prevnode#1#2\@nil{%
17828 \ifx<#1%
17829 \POE@str@basicname@default
17830 \ifx\\#2\\%
17831 \number\numexpr\POE@cnt-1\relax
17832 \else
17833 \number\numexpr\POE@cnt-#2\relax
17834 \fi
17835 \else
17836 #1#2%
17837 \fi
17838 }%
17839 % \end{macrocode}
17840 % \end{macro}
17841 %
17842 % Define some special nodes, which should be accessed always via these macros.
17843 %
17844 % \begin{macro}{\oenodeExt}
17845 % The external node which is set with \opt{extnode}.
17846 % \begin{macrocode}
17847 \def\oenodeExt#1{\oenode{\POE@str@extnode@postfix}{#1}}%
17848 % \end{macrocode}
17849 % \end{macro}
17850 % \begin{macro}{\oenodeIn}
17851 % The first (input) node of the component.
17852 % \begin{macrocode}
17853 \def\oenodeIn#1{\oenode{1}{#1}}%
17854 % \end{macrocode}
17855 % \end{macro}
17856 % \begin{macro}{\oenodeOut}
17857 % The last (output) node of the component
17858 % \begin{macrocode}
17859 \def\oenodeOut#1{\oenode{N}{#1}}%
17860 % \end{macrocode}
17861 % \end{macro}
17862 % \begin{macro}{\oenodeCenter}
17863 % The center node of the component.
17864 % \begin{macrocode}
17865 \def\oenodeCenter#1{\oenode{Center}{#1}}%
17866 % \end{macrocode}
17867 % \end{macro}
17868 % \begin{macro}{\oenodeLabel}
17869 % The transformed label node of the component
17870 % \begin{macrocode}
17871 \def\oenodeLabel#1{\oenode{Label}{#1}}%
17872 % \end{macrocode}
17873 % \end{macro}
17874 % \begin{macro}{\oenodeRefA}
17875 % The first reference node which is used for positioning of the
17876 % component. For dipoles it is equivalent to the (\#1) node.
17877 % \begin{macrocode}
17878 \def\oenodeRefA#1{\oenode{A}{#1}}%
17879 % \end{macrocode}
17880 % \end{macro}
17881 % \begin{macro}{\oenodeRefB}
17882 % The second reference node, for dipoles it is equivalent to the (\#2)
17883 % node.
17884 % \begin{macrocode}
17885 \def\oenodeRefB#1{\oenode{B}{#1}}%
17886 % \end{macrocode}
17887 % \end{macro}
17888 % \begin{macro}{\oenodeRotref}
17889 % The rotation reference node.
17890 % \begin{macrocode}
17891 \def\oenodeRotref#1{\oenode{Rotref}{#1}}%
17892 % \end{macrocode}
17893 % \end{macro}
17894 % \begin{macro}{\oenodeTrefA}
17895 % The transformed first reference node, after applying parameters
17896 % \opt{compshift}, \opt{compoffset} and \opt{angle}.
17897 % \begin{macrocode}
17898 \def\oenodeTrefA#1{\oenode{TrefA}{#1}}%
17899 % \end{macrocode}
17900 % \end{macro}
17901 % \begin{macro}{\oenodeTrefB}
17902 % The transformed second reference node.
17903 % \begin{macrocode}
17904 \def\oenodeTrefB#1{\oenode{TrefB}{#1}}%
17905 % \end{macrocode}
17906 % \end{macro}
17907 % \begin{macro}{\oenode@RefA}
17908 % The first reference node, after it was projected on the reflection
17909 % plane of a tripole, at distance 1 from the center.
17910 % \begin{macrocode}
17911 \def\oenode@RefA#1{\oenode{@A}{#1}}%
17912 % \end{macrocode}
17913 % \end{macro}
17914 % \begin{macro}{\oenode@RefB}
17915 % The second referencen node, projected on the reflection plane.
17916 % \begin{macrocode}
17917 \def\oenode@RefB#1{\oenode{@B}{#1}}%
17918 % \end{macrocode}
17919 % \end{macro}
17920 % \begin{macro}{\oenode@TrefA}
17921 % The transformed, projected first reference node.
17922 % \begin{macrocode}
17923 \def\oenode@TrefA#1{\oenode{@TrefA}{#1}}%
17924 % \end{macrocode}
17925 % \end{macro}
17926 % \begin{macro}{\oenode@TrefB}
17927 % The transformed, projected second reference node.
17928 % \begin{macrocode}
17929 \def\oenode@TrefB#1{\oenode{@TrefB}{#1}}%
17930 % \end{macrocode}
17931 % \end{macro}
17932 % \begin{macro}{\oenode@Origin}
17933 % The origin of the component, available only for tripoles. Introduced
17934 % to be able to compute the angle between AO and BO at later times
17935 % (for \cs{rightangleprism} and \cs{optprism}.
17936 % \begin{macrocode}
17937 \def\oenode@Origin#1{\oenode{Origin}{#1}}%
17938 % \end{macrocode}
17939 % \end{macro}
17940 % \begin{macro}{oenode@Path}
17941 % Use this macro for internal use with \cs{pssavepath}.
17942 % \begin{macrocode}
17943 \def\oenode@Path#1{\oenode{Path@#1}{}}%
17944 % \end{macrocode}
17945 % \end{macro}
17946 % \begin{macro}{\oenodeIfc}
17947 % The node of the interface no. \#1 of component \#2. Only integer
17948 % number, N or C are allowed. You should always use this e.g. to
17949 % access coupler nodes.
17950 % \begin{macrocode}
17951 \def\oenodeIfc#1#2{%
17952 \ifnum9<1#1 %
17953 \oenode{#1}{#2}%
17954 \else\ifx#1N %
17955 \oenode{#1}{#2}%
17956 \else\ifx#1C %
17957 \oenode{#1}{#2}%
17958 \else
17959 \PackageWarning{pst-optexp}{%
17960 \string\oenodeIfc\space node argument must be\MessageBreak
17961 integer, 'N', or 'C'.}
17962 \fi\fi\fi
17963 }%
17964 % \end{macrocode}
17965 % \end{macro}
17966 % \begin{macro}{\oenodeBeam}
17967 % The end point of the last beam path which was saved with number \#1
17968 % (default is 1).
17969 % \begin{macrocode}
17970 \def\oenodeBeam#1{%
17971 \POE@str@basicname@prefix\POE@str@basicname@default Beam%
17972 \ifx\\#1\\1\else#1\fi
17973 }%
17974 % \end{macrocode}
17975 % \end{macro}
17976 % \begin{macro}{\oenodeBeamUp}
17977 % The upper end point of the last wide beam path saved with number \#1
17978 % (default is 1).
17979 % \begin{macrocode}
17980 \def\oenodeBeamUp#1{%
17981 \POE@str@basicname@prefix\POE@str@basicname@default BeamUp%
17982 \ifx\\#1\\1\else#1\fi
17983 }%
17984 % \end{macrocode}
17985 % \end{macro}
17986 % \begin{macro}{\oenodeBeamLow}
17987 % The lower end point of the last wide beam path saved with number \#1
17988 % (default is 1).
17989 % \begin{macrocode}
17990 \def\oenodeBeamLow#1{%
17991 \POE@str@basicname@prefix\POE@str@basicname@default BeamLow%
17992 \ifx\\#1\\1\else#1\fi
17993 }%
17994 % \end{macrocode}
17995 % \end{macro}
17996 %
17997 % \begin{macro}{\POE@beamvec}
17998 % Generic macro to load the Postscript coordinates of the direction
17999 % vector of the last beam segment (upper, lower, single, specified
18000 % with \#1) saved with number \#2.
18001 % \begin{macrocode}
18002 \def\POE@beamvec#1#2{%
18003 \POE@dict{%
18004 /prevVec#1\ifx\\#2\\1\else#2\fi\space dup
18005 currentdict exch known { load exec }{ pop 0 0 } ifelse
18006 }%
18007 }%
18008 \def\oeBeamVec#1{\POE@beamvec{}{#1}}%
18009 \def\oeBeamVecUp#1{\POE@beamvec{Up}{#1}}%
18010 \def\oeBeamVecLow#1{\POE@beamvec{Low}{#1}}%
18011 \def\oeBeamVecMedian#1{%
18012 \oeBeamVecUp{#1} \oeBeamVecLow{#1} \POE@dict{VecAdd NormalizeVec}
18013 }%
18014 \def\oeBeamCenter#1{%
18015 \psGetNodeCenter{\oenodeBeamUp{#1}} \oenodeBeamUp{#1}.x \oenodeBeamUp{#1}.y
18016 \psGetNodeCenter{\oenodeBeamLow{#1}} \oenodeBeamLow{#1}.x \oenodeBeamLow{#1}.y
18017 \POE@dict{VecAdd 0.5 VecScale}
18018 }%
18019 % \end{macrocode}
18020 % \end{macro}
18021 %
18022 % \section{Components}
18023 %
18024 % \begin{macro}{\POE@useifccode}
18025 % \begin{macro}{\begin@CompIfc}
18026 % \begin{macrocode}
18027 \def\POE@useifccode{%
18028 \POE@Verb{%
18029 [ \pst@code
18030 \ifPOE@allowbeaminside true \else false \fi
18031 \ifPOE@forcebeaminside true \else false \fi
18032 (\oenode{}{}) {\tx@ScreenCoor}
18033 NewOptexpComp
18034 }%
18035 \gdef\pst@code{}%
18036 }%
18037 \def\begin@CompIfc{%
18038 \begingroup
18039 }%
18040 \def\end@CompIfc{%
18041 \addto@pscode{ false }%
18042 \POE@useifccode
18043 \endgroup
18044 \ignorespaces
18045 }%
18046 \def\end@AmbCompIfc{%
18047 \addto@pscode{ true }%
18048 \POE@useifccode
18049 \endgroup
18050 \ignorespaces
18051 }%
18052 % \end{macrocode}
18053 % \end{macro}
18054 % \end{macro}
18055 % \begin{macro}{\newOptexpComp@}
18056 % \begin{macrocode}
18057 \def\newOptexpComp@#1#2{%
18058 \POE@Verb{%
18059 \tx@NodeScale
18060 [ #1 #2
18061 \ifPOE@allowbeaminside true \else false \fi
18062 \ifPOE@forcebeaminside true \else false \fi
18063 (\oenode{}{}) {\tx@ScreenCoor}
18064 NewOptexpComp
18065 }%
18066 \ignorespaces}%
18067 % \end{macrocode}
18068 % \end{macro}
18069 %
18070 % \begin{macro}{\newOptexpComp}
18071 % \begin{macrocode}
18072 \def\newOptexpComp#1{%
18073 \newOptexpComp@{#1}{false}%
18074 \ignorespaces}%
18075 % \end{macrocode}
18076 % \end{macro}
18077 %
18078 % \begin{macro}{\newOptexpCompAmb}
18079 % \begin{macrocode}
18080 \def\newOptexpCompAmb#1{%
18081 \newOptexpComp@{#1}{true}%
18082 \ignorespaces}%
18083 % \end{macrocode}
18084 % \end{macro}
18085 %
18086 % \begin{macro}{\newOptexpFiberComp}
18087 % \begin{macrocode}
18088 \def\newOptexpFiberComp#1{%
18089 \POE@Verb{%
18090 \tx@NodeScale
18091 [ #1 (\oenode{}{}) {\tx@ScreenCoor}
18092 NewOptexpFiberComp
18093 }%
18094 \ignorespaces}%
18095 % \end{macrocode}
18096 % \end{macro}
18097 %
18098 % \begin{macro}{newOptexpElecComp}
18099 % This may change at later times.
18100 % \begin{macrocode}
18101 \let\newOptexpElecComp\newOptexpFiberComp
18102 % \end{macrocode}
18103 % \end{macro}
18104 %
18105 % \begin{macro}{\optplane}
18106 % Define an invisible plane which is used only for ray tracing. The first node
18107 % is the origin, the second one is the difference vector.
18108 % \begin{macrocode}
18109 \def\optplane{%
18110 \@ifnextchar[%]
18111 {\optplane@i}{\optplane@i[]}%
18112 }%
18113 \def\optplane@i[#1](#2){%
18114 \pst@getcoor{#2}\POE@tempa
18115 % \end{macrocode}
18116 % Set the height to 0 to circumvent problems with the NA beeing too low
18117 % \begin{macrocode}
18118 \optplate[#1, plateheight=0, linestyle=none]%
18119 (! \POE@tempa exch 1 sub exch \tx@UserCoor)%
18120 (! \POE@tempa exch 1 add exch \tx@UserCoor)%
18121 \ignorespaces}%
18122 % \end{macrocode}
18123 % \end{macro}
18124 %
18125 % \begin{macro}{\POE@SaveBeamParameters}
18126 % Save the current beam parameters. This is used to be able to set a
18127 % source beam with the usual beam parameters.
18128 % \begin{macrocode}
18129 \def\POE@SaveBeamParameters{%
18130 \let\POE@tempA\POE@key@beamangle
18131 \let\POE@tempB\POE@key@beamdiv
18132 \let\POE@tempC\POE@key@beamwidth
18133 \let\POE@tempD\POE@key@beamalign
18134 \let\POE@key@beamangle\relax
18135 \let\POE@key@beamdiv\relax
18136 \let\POE@key@beamwidth\relax
18137 \let\POE@key@beamalign\relax
18138 }%
18139 % \end{macrocode}
18140 % \end{macro}
18141 %
18142 % \begin{macro}{\POE@SetSourceAndRestoreBeamParameters}
18143 % \begin{macrocode}
18144 \def\POE@SetSourceAndRestoreBeamParameters{%
18145 \let\POE@key@sourcebeamangle\POE@key@beamangle
18146 \let\POE@key@sourcebeamdiv\POE@key@beamdiv
18147 \let\POE@key@sourcebeamwidth\POE@key@beamwidth
18148 \let\POE@key@sourcebeamalign\POE@key@beamalign
18149 \let\POE@key@beamangle\POE@tempA
18150 \let\POE@key@beamdiv\POE@tempB
18151 \let\POE@key@beamwidth\POE@tempC
18152 \let\POE@key@beamalign\POE@tempD
18153 }%
18154 % \end{macrocode}
18155 % \end{macro}
18156 %
18157 % \begin{macro}{\POE@HandleSourceBeam}
18158 % Load beam properties from the first component on the stack, if it is
18159 % an optical source. Also handle the beamalign=firstcomp case, since
18160 % this also depends on the first component.
18161 % \begin{macrocode}
18162 \def\POE@HandleSourceBeam{%
18163 \addto@pscode{%
18164 counttomark 0 eq not {
18165 dup cvn load dup /source known {
18166 /source get { def } forall
18167 }{ pop } ifelse
18168 } if
18169 % \end{macrocode}
18170 % Handle the beamalign=firstcomp case. Calculate the angle of the first
18171 % component's reference line and set the beamalign parameter to
18172 % absolute.
18173 % \begin{macrocode}
18174 beamalign firstcomp eq {
18175 dup dup (Center) NodeName tx@NodeDict exch known not {
18176 % \end{macrocode}
18177 % If we have no node called \opt{\ldots Center}, the first object isn't
18178 % a component, but a node. Switch to relative alignment.
18179 % \begin{macrocode}
18180 pop /beamalign relative def
18181 } {
18182 RelConnAngle@tref exch atan /beamangle exch def
18183 /beamalign absolute def
18184 } ifelse
18185 } if
18186 }%
18187 }%
18188 % \end{macrocode}
18189 % \end{macro}
18190 %
18191 % \begin{macro}{\begin@OptexpObj}
18192 % \begin{macrocode}
18193 \def\begin@OptexpObj{%
18194 \global\advance\POE@cnt by 1
18195 \addbefore@par{compname={}}%
18196 \pst@killglue
18197 \begingroup
18198 \POE@insideobjtrue
18199 \POE@Verb{InitOptexpComp }%
18200 \POE@SaveBeamParameters
18201 \use@par
18202 \POE@SetSourceAndRestoreBeamParameters
18203 % \end{macrocode}
18204 % The \opt{compshift} refers to the $y$-direction, shifting in $x$-direction
18205 % is done by \opt{abspos} or \opt{position}
18206 % \begin{macrocode}
18207 \let\POE@key@comp@Yshift\POE@key@compshift%
18208 \let\POE@key@comp@Xshift\POE@key@compoffset%
18209 \edef\POE@refnodeA{\oenodeRefA{}}%
18210 \edef\POE@refnodeB{\oenodeRefB{}}%
18211 \edef\POE@trefnodeA{\oenodeTrefA{}}%
18212 \edef\POE@trefnodeB{\oenodeTrefB{}}%
18213 \def\POE@transformnodes{%
18214 \POE@transformnode{\oenodeRefA{}}{\oenodeTrefA{}}%
18215 \POE@transformnode{\oenodeRefB{}}{\oenodeTrefB{}}%
18216 }%
18217 \def\tx@Line{Line }%
18218 }%
18219 % \end{macrocode}
18220 % \end{macro}
18221 %
18222 % \begin{macro}{\begin@OptexpTripole}
18223 % \begin{macrocode}
18224 \let\POE@disablepos\relax
18225 \def\begin@OptexpTripole{%
18226 \begin@OptexpObj
18227 % \end{macrocode}
18228 % for multipoles the default shifting is in $x$-direction
18229 % \begin{macrocode}
18230 \def\POE@key@comp@Xshift{\POE@key@compshift\space neg }%
18231 \let\POE@key@comp@Yshift\POE@key@compoffset
18232 % \end{macrocode}
18233 % The positioning parameters are disabled, because \opt{compshift} does the job for tripoles.
18234 % \begin{macrocode}
18235 \def\POE@disablepos{%
18236 \let\POE@key@abspos\@empty
18237 \let\POE@key@position\@empty
18238 }%
18239 \POE@positionrefnodes
18240 }%
18241 % \end{macrocode}
18242 % \end{macro}
18243 %
18244 % \begin{macro}{\POE@positionrefnodes}
18245 % \begin{macrocode}
18246 \def\POE@positionrefnodes{%
18247 \edef\POE@refnodeA{\oenode@RefA{}}%
18248 \edef\POE@refnodeB{\oenode@RefB{}}%
18249 \edef\POE@trefnodeA{\oenode@TrefA{}}%
18250 \edef\POE@trefnodeB{\oenode@TrefB{}}%
18251 \def\POE@transformnodes{%
18252 \POE@transformnode{\oenodeRefA{}}{\oenodeTrefA{}}%
18253 \POE@transformnode{\oenodeRefB{}}{\oenodeTrefB{}}%
18254 \POE@transformnode{\oenode@RefA{}}{\oenode@TrefA{}}%
18255 \POE@transformnode{\oenode@RefB{}}{\oenode@TrefB{}}%
18256 }%
18257 }%
18258 % \end{macrocode}
18259 % \end{macro}
18260 %
18261 % \begin{macro}{\POE@unsetbeamparameters}
18262 % Unset some beam parameters which might be used by \cs{optsource}.
18263 % \begin{macrocode}
18264 \def\POE@unsetbeamparameters{%
18265 \let\POE@key@beamangle\relax
18266 \let\POE@key@beamdiv\relax
18267 \let\POE@key@beamwidth\relax
18268 }%
18269 % \end{macrocode}
18270 % \end{macro}
18271 %
18272 % \begin{macro}{\end@OptexpObj}
18273 % \begin{macrocode}
18274 \def\end@OptexpObj{%
18275 \ifnum9<1\POE@key@compname\else
18276 \POE@Verb{
18277 (\oenode{}{\POE@key@compname})
18278 (\oenode{}{\the\POE@cnt}) CompAlias }%
18279 \fi
18280 \endgroup
18281 \ignorespaces%
18282 }%
18283 % \end{macrocode}
18284 % \end{macro}
18285 %
18286 % \begin{macro}{\end@OptexpDipole}
18287 % \begin{macrocode}
18288 \let\end@OptexpDipole\end@OptexpObj
18289 % \end{macrocode}
18290 % \end{macro}
18291 %
18292 % \begin{macro}{\end@OptexpTripole}
18293 % \begin{macrocode}
18294 \let\end@OptexpTripole\end@OptexpObj
18295 % \end{macrocode}
18296 % \end{macro}
18297 %
18298 % \begin{macro}{\addafter@par}
18299 % Analog to \cs{addbefore@par} from pstricks.tex, but inserts new options at
18300 % the end of the current token register. This can be useful to preset options
18301 % that are not allowed to be changed by the user.
18302 % \begin{macrocode}
18303 \def\addafter@par#1{%
18304 \ifx\pst@par\@empty
18305 \def\pst@par{#1}%
18306 \else
18307 \toks@{#1}%
18308 \pst@toks\expandafter{\pst@par}%
18309 \edef\pst@par{\the\pst@toks,\the\toks@}%
18310 \fi%
18311 }%
18312 % \end{macrocode}
18313 % \end{macro}
18314 %
18315 % \begin{macrocode}
18316 \def\POE@clwh{CLW \pst@number\psxunit 2 mul div }%
18317 \def\POE@clw{CLW \pst@number\psxunit div }%
18318 \let\POE@restorerefnodes\relax
18319 % \end{macrocode}
18320 %
18321 % New high-level macros
18322 % 1) Allow a compressed notation of all provided elements, as most of the organizing code
18323 % is mostly equal.
18324 %
18325 % 2) Provide a rather easy-to-use interface for the user to allow new user-defined elements
18326 %
18327 % \begin{macro}{\newOptexpDipole}
18328 % \begin{macrocode}
18329 \def\newOptexpDipole{%
18330 \@ifnextchar[%]
18331 {\POE@newdipole}{\POE@newdipole[]}%
18332 }%
18333 % \end{macrocode}
18334 % \end{macro}
18335 %
18336 % \begin{macro}{\newOptexpTripole}
18337 % \begin{macrocode}
18338 \def\newOptexpTripole{%
18339 \@ifnextchar[%]
18340 {\POE@newtripole}{\POE@newtripole[]}%
18341 }%
18342 % \end{macrocode}
18343 % \end{macro}
18344 % \begin{macro}{\newOptexpFiberDipole}
18345 % \begin{macrocode}
18346 \def\newOptexpFiberDipole{%
18347 \@ifnextchar[%]
18348 {\POE@newfiberdipole}{\POE@newfiberdipole[]}%
18349 }%
18350 % \end{macrocode}
18351 % \end{macro}
18352 %
18353 % \begin{macro}{\POE@newdipole}
18354 % \begin{macrocode}
18355 \def\POE@newdipole[#1]#2{%
18356 \@ifnextchar\bgroup
18357 {\POE@newdipole@i[#1]{#2}}{\POE@newdipole@i[#1]{#2}{}}%
18358 }%
18359 % \end{macrocode}
18360 % \end{macro}
18361 % \begin{macro}{\POE@newdipole@i}
18362 % \begin{macrocode}
18363 \def\POE@newdipole@i[#1]#2#3{%
18364 \@ifundefined{#2@i}{%
18365 \@namedef{#2}{\pst@object{#2}}%
18366 \expandafter\def\csname #2@i\endcsname(##1)(##2){%
18367 \@ifnextchar\bgroup%
18368 {\@nameuse{#2@ii}(##1)(##2)}%
18369 {\@nameuse{#2@ii}(##1)(##2){}}%
18370 }%
18371 \expandafter\def\csname #2@ii\endcsname(##1)(##2)##3{%
18372 \addbefore@par{#3}%
18373 \addafter@par{#1}%
18374 \begin@OptexpObj
18375 \ifPOE@backlayer
18376 \POE@regNodes{##1}{##2}
18377 \fi
18378 \POE@drawcomponent{#2}{##3}
18379 \ifPOE@backlayer
18380 \POE@Verb{ (1) (N) (\oenode{}{}) CorrectDipoleIfc }%
18381 \@ifundefined{#2@conn}{\POE@InternalConn}{\@nameuse{#2@conn}}%
18382 \fi
18383 \end@OptexpDipole
18384 }%
18385 \@ifundefined{#2@nodes}{\expandafter\def\csname #2@nodes\endcsname{\POE@dipole@nodes}}{}%
18386 }{%
18387 \PackageError{pst-optexp}{%
18388 dipole component '#2' already defined}%
18389 }%
18390 \ignorespaces}%
18391 % \end{macrocode}
18392 % \end{macro}
18393 %
18394 % \begin{macro}{\POE@newfiberdipole}
18395 % \begin{macrocode}
18396 \def\POE@newfiberdipole[#1]#2{%
18397 \@ifnextchar\bgroup
18398 {\POE@newfiberdipole@i[#1]{#2}}{\POE@newfiberdipole@i[#1]{#2}{}}%
18399 }%
18400 % \end{macrocode}
18401 % \end{macro}
18402 % \begin{macro}{\POE@newfiberdipole@i}
18403 % \begin{macrocode}
18404 \def\POE@newfiberdipole@i[#1]#2#3{%
18405 \@ifundefined{#2@i}{%
18406 \@namedef{#2}{\pst@object{#2}}%
18407 \expandafter\def\csname #2@i\endcsname(##1)(##2){%
18408 \@ifnextchar\bgroup%
18409 {\@nameuse{#2@ii}(##1)(##2)}%
18410 {\@nameuse{#2@ii}(##1)(##2){}}%
18411 }%
18412 \expandafter\def\csname #2@ii\endcsname(##1)(##2)##3{%
18413 \addbefore@par{#3}%
18414 \addafter@par{#1}%
18415 \begin@OptexpObj
18416 \ifPOE@backlayer
18417 \POE@regNodes{##1}{##2}
18418 \fi
18419 \POE@drawcomponent{#2}{##3}
18420 \ifPOE@backlayer
18421 \POE@Verb{ (1) (N) (\oenode{}{}) CorrectDipoleIfc }%
18422 \POE@PresetFiberConn
18423 \fi
18424 \end@OptexpDipole
18425 }%
18426 \@ifundefined{#2@nodes}{\expandafter\def\csname #2@nodes\endcsname{\POE@fiberdipole@nodes}}{}%
18427 }{%
18428 \PackageError{pst-optexp}{%
18429 fiber dipole object '#2' already defined}%
18430 }%
18431 \ignorespaces}%
18432 % \end{macrocode}
18433 % \end{macro}
18434 %
18435 % \begin{macro}{\POE@newtripole}
18436 % \begin{macrocode}
18437 \def\POE@newtripole[#1]#2{%
18438 \@ifnextchar\bgroup
18439 {\POE@newtripole@i[#1]{#2}}{\POE@newtripole@i[#1]{#2}{}}%
18440 }%
18441 % \end{macrocode}
18442 % \end{macro}
18443 % \begin{macro}{\POE@newtripole@i}
18444 % \begin{macrocode}
18445 \def\POE@newtripole@i[#1]#2#3{%
18446 \@ifundefined{#2@i}{%
18447 \@namedef{#2}{\pst@object{#2}}%
18448 \expandafter\def\csname #2@i\endcsname(##1)(##2)(##3){%
18449 \@ifnextchar\bgroup{\@nameuse{#2@ii}(##1)(##2)(##3)}%
18450 {\@nameuse{#2@ii}(##1)(##2)(##3){}}%
18451 }%
18452 \expandafter\def\csname #2@ii\endcsname(##1)(##2)(##3)##4{%
18453 \addbefore@par{#3}%
18454 \addafter@par{ref@angle=0,#1}%
18455 \begin@OptexpTripole
18456 \ifPOE@backlayer
18457 \POE@calcNodes{##1}{##2}{##3}%
18458 \POE@regNodes{##1}{##3}%
18459 \fi
18460 \POE@drawcomponent{#2}{##4}
18461 \ifPOE@backlayer
18462 \POE@InternalConn
18463 \fi
18464 \end@OptexpTripole
18465 }%
18466 \@ifundefined{#2@nodes}{\expandafter\def\csname #2@nodes\endcsname{\POE@tripole@nodes}}{}%
18467 }{%
18468 \PackageError{pst-optexp}{%
18469 tripole object '#2' already defined}%
18470 }%
18471 \ignorespaces}%
18472 % \end{macrocode}
18473 % \end{macro}
18474 %
18475 % \begin{macro}{\optaom}
18476 % \begin{macrocode}
18477 \def\optaom{\pst@object{optaom}}%
18478 \def\optaom@i(#1)(#2)(#3){%
18479 \@ifnextchar\bgroup
18480 {\optaom@ii(#1)(#2)(#3)}%
18481 {\optaom@ii(#1)(#2)(#3){}}%
18482 }%
18483 \def\optaom@ii(#1)(#2)(#3)#4{%
18484 \addafter@par{ref@angle=180}%
18485 \begin@OptexpTripole
18486 \ifPOE@backlayer
18487 \ifx\POE@key@abspos\@empty
18488 \ifx\POE@key@position\@empty
18489 \psLNode(#1)(#2){0.5}{\oenode{Tmp}{}}
18490 \else
18491 \psLNode(#1)(#2){\POE@key@position}{\oenode{Tmp}{}}
18492 \fi
18493 \else
18494 \psLDNode(#1)(#2){\POE@key@abspos}{\oenode{Tmp}{}}
18495 \fi
18496 \POE@calcNodes{#1}{\oenode{Tmp}{}}{#3}%
18497 \POE@regNodes{#1}{#3}
18498 \fi
18499 \POE@drawcomponent{optaom}{#4}
18500 \ifPOE@backlayer
18501 \POE@InternalConn
18502 \fi
18503 \end@OptexpTripole
18504 \ignorespaces}%
18505 % \end{macrocode}
18506 % \end{macro}
18507 %
18508 % \begin{macro}{\optcoupler}
18509 % \begin{macrocode}
18510 \def\optcoupler{\pst@object{optcoupler}}%
18511 \def\optcoupler@i(#1)(#2){%
18512 \@ifnextchar(%)
18513 {\optcoupler@ii(#1)(#2)}%
18514 {\optcoupler@ii(#1)(#1)(#2)(#2)}%
18515 }%
18516 \def\optcoupler@ii(#1)(#2)(#3)(#4){%
18517 \@ifnextchar\bgroup%
18518 {\optcoupler@iii(#1)(#2)(#3)(#4)}%
18519 {\optcoupler@iii(#1)(#2)(#3)(#4){}}%
18520 }%
18521 \def\optcoupler@iii(#1)(#2)(#3)(#4)#5{%
18522 \begin@OptexpObj
18523 \ifPOE@backlayer
18524 \ifx\POE@key@coupleralign\POE@str@top
18525 \pnode(#1){\oenodeRefA{}}
18526 \pnode(#3){\oenodeRefB{}}
18527 \else\ifx\POE@key@coupleralign\POE@str@bottom
18528 \pnode(#2){\oenodeRefA{}}
18529 \pnode(#4){\oenodeRefB{}}
18530 \else
18531 \pst@getcoor{#1}\POE@tempa%
18532 \pst@getcoor{#2}\POE@tempb%
18533 \pnode(!\POE@tempa \POE@tempb
18534 \POE@dict{VecAdd 0.5 VecScale}
18535 \tx@UserCoor){\oenodeRefA{}}
18536 \pst@getcoor{#3}\POE@tempa%
18537 \pst@getcoor{#4}\POE@tempb%
18538 \pnode(!\POE@tempa \POE@tempb
18539 \POE@dict{VecAdd 0.5 VecScale}
18540 \tx@UserCoor){\oenodeRefB{}}
18541 \fi\fi
18542 \fi
18543 \POE@drawcomponent{optcoupler}{#5}
18544 \ifPOE@backlayer
18545 \POE@Verb{%
18546 (1) (3) (\oenode{}{}) CorrectDipoleIfc
18547 (2) (4) (\oenode{}{}) CorrectDipoleIfc
18548 }%
18549 \ifPOE@fiberpresetin@
18550 \ifPOE@fiberpresetin@top
18551 \drawfiber@{FiberIn1}[stopnode=1](#1){}
18552 \fi
18553 \ifPOE@fiberpresetin@bottom
18554 \drawfiber@{FiberIn2}[stopnode=2](#2){}
18555 \fi
18556 \fi
18557 \ifPOE@fiberpresetout@
18558 \ifPOE@fiberpresetout@top
18559 \drawfiber@{FiberOut1}[startnode=3]{}(#3)
18560 \fi
18561 \ifPOE@fiberpresetout@bottom
18562 \drawfiber@{FiberOut2}[startnode=N]{}(#4)
18563 \fi
18564 \fi
18565 \fi
18566 \end@OptexpObj
18567 }%
18568 % \end{macrocode}
18569 % \end{macro}
18570 %
18571 %
18572 % \begin{macro}{\wdmsplitter}
18573 % \begin{macrocode}
18574 \def\wdmsplitter{\pst@object{wdmsplitter}}%
18575 \def\wdmsplitter@i{%
18576 \def\my@aftercoors{\wdmsplitter@ii}%
18577 \POE@couplernodecount=0\relax
18578 \def\coupler@coors{}%
18579 \coupler@@getcoors
18580 }
18581 \def\wdmsplitter@ii{%
18582 \@ifnextchar\bgroup%
18583 {\wdmsplitter@iii}%
18584 {\wdmsplitter@iii{}}%
18585 }%
18586 \def\wdmsplitter@iii#1{%
18587 \ifnum\POE@couplernodecount>1\else
18588 \PackageError{pst-optexp}%
18589 {A wdmsplitter expects at least two nodes, one input and one output node}%
18590 \fi
18591 \begin@OptexpObj
18592 \ifPOE@backlayer
18593 % \end{macrocode}
18594 % Use first coordinate pair as RefA
18595 % \begin{macrocode}
18596 \pnode(! [ \coupler@coors 1 \POE@dict{GetCoordinatePair} \tx@UserCoor){\oenodeRefA{}}
18597 \ifx\POE@key@coupleralign\POE@str@top
18598 % \end{macrocode}
18599 % For top alignment, use first output coordinate pair, i.e. second coordinate pair as RefB
18600 % \begin{macrocode}
18601 \pnode(! [ \coupler@coors 2 \POE@dict{GetCoordinatePair} \tx@UserCoor){\oenodeRefB{}}
18602 \else\ifx\POE@key@coupleralign\POE@str@bottom
18603 % \end{macrocode}
18604 % For bottom alignment, use last output coordinate pair
18605 % \begin{macrocode}
18606 \pnode(! [ \coupler@coors counttomark 2 idiv \POE@dict{GetCoordinatePair} \tx@UserCoor){\oenodeRefB{}}
18607 \else
18608 % \end{macrocode}
18609 % Use median of all output coordinate pairs as RefB
18610 % \begin{macrocode}
18611 \pnode(! [ \coupler@coors
18612 % \end{macrocode}
18613 % remove input node from stack
18614 % \begin{macrocode}
18615 pop pop
18616 % \end{macrocode}
18617 % count number of output coordinate pair, keep that number and save it behind the mark
18618 % \begin{macrocode}
18619 counttomark 2 idiv dup counttomark 1 add 1 roll
18620 1 sub { \POE@dict{VecAdd} } repeat
18621 % \end{macrocode}
18622 % divide by number of output coordinate pairs and remove mark
18623 % \begin{macrocode}
18624 4 -1 roll 1 exch div \POE@dict{VecScale} 3 -1 roll pop \tx@UserCoor){\oenodeRefB{}}
18625 \fi\fi
18626 \fi
18627 \POE@drawcomponent{wdmsplitter}{#1}
18628 \ifPOE@backlayer
18629 \POE@Verb{%
18630 2 1 \the\POE@couplernodecount\space
18631 {
18632 inttostr (1) exch (\oenode{}{}) CorrectDipoleIfc
18633 } for
18634 }%
18635 \ifPOE@fiberpresetin@
18636 \drawfiber@{FiberIn}[stopnode=1](! [ \coupler@coors 1 \POE@dict{GetCoordinatePair} \tx@UserCoor){}
18637 \fi
18638 \ifPOE@fiberpresetout@
18639 \ifPOE@fiberpresetout@top
18640 \drawfiber@{FiberOut1}[startnode=2]{}(! [ \coupler@coors 2 \POE@dict{GetCoordinatePair} \tx@UserCoor)
18641 \fi
18642 \ifPOE@fiberpresetout@bottom
18643 \drawfiber@{FiberOut2}[startnode=N]{}(! [ \coupler@coors \the\POE@couplernodecount\space \POE@dict{GetCoordinatePair} \tx@UserCoor)
18644 \fi
18645 \fi
18646 % \end{macrocode}
18647 % If top and bottom fibers are drawn, we must also draw all other output fibers
18648 % \begin{macrocode}
18649 \ifPOE@fiberpresetout@top\ifPOE@fiberpresetout@bottom
18650 \@tempcnta=\POE@couplernodecount
18651 \advance\@tempcnta by -3
18652 \ifnum0<\@tempcnta
18653 \multido{\i=3+1}{\the\@tempcnta}{%
18654 \drawfiber@{FiberOut}[startnode=\i]{}(! [ \coupler@coors \i\space \POE@dict{GetCoordinatePair} \tx@UserCoor)
18655 }%
18656 \fi
18657 \fi\fi
18658 \fi
18659 \end@OptexpObj
18660 }%
18661 % \end{macrocode}
18662 % \end{macro}
18663 %
18664 % \begin{macro}{\wdmcoupler}
18665 % \begin{macrocode}
18666 \def\wdmcoupler{\pst@object{wdmcoupler}}%
18667 \def\wdmcoupler@i{%
18668 \def\my@aftercoors{%
18669 % \end{macrocode}
18670 % Subtract one, because we counted all nodes. However, we can always access the last
18671 % node by N, so we more often use the second last, i.e the last input node
18672 % \begin{macrocode}
18673 \advance\POE@couplernodecount by -1\relax%
18674 \wdmcoupler@ii}%
18675 \POE@couplernodecount=0\relax
18676 \def\coupler@coors{}%
18677 \coupler@@getcoors
18678 }
18679 % \end{macrocode}
18680 % \begin{macro}{\coupler@@getcoors}
18681 % Read in a variable number of node coordinates. The coordinates are saved in \cs{coupler@coors},
18682 % their number in \cs{POE@couplernodecount}.
18683 % \begin{macrocode}
18684 \def\coupler@@getcoors(#1){%
18685 \advance\POE@couplernodecount by \@ne\relax%
18686 \pst@@getcoor{#1}%
18687 \edef\coupler@coors{\pst@coor\coupler@coors}%
18688 \@ifnextchar({\coupler@@getcoors}{\my@aftercoors}%
18689 }
18690 % \end{macrocode}
18691 % \end{macro}
18692 % \begin{macrocode}
18693 \def\wdmcoupler@ii{%
18694 \@ifnextchar\bgroup%
18695 {\wdmcoupler@iii}%
18696 {\wdmcoupler@iii{}}%
18697 }%
18698 \def\wdmcoupler@iii#1{%
18699 \ifnum\POE@couplernodecount>0\else
18700 \PackageError{pst-optexp}%
18701 {A wdmcoupler expects at least two nodes, one input and one output node}%
18702 \fi
18703 \begin@OptexpObj
18704 \ifPOE@backlayer
18705 % \end{macrocode}
18706 % Use last coordinate pair as RefB
18707 % \begin{macrocode}
18708 \pnode(! [ \coupler@coors \the\POE@couplernodecount\space 1 add \POE@dict{GetCoordinatePair} \tx@UserCoor){\oenodeRefB{}}
18709 \ifx\POE@key@coupleralign\POE@str@top
18710 % \end{macrocode}
18711 % For top alignment, use first coordinate pair as RefA
18712 % \begin{macrocode}
18713 \pnode(! [ \coupler@coors \POE@dict{GetFirstInputCoordinatePair} \tx@UserCoor){\oenodeRefA{}}
18714 \else\ifx\POE@key@coupleralign\POE@str@bottom
18715 % \end{macrocode}
18716 % For bottom alignment, use second last coordinate pair as RefA
18717 % \begin{macrocode}
18718 \pnode(! [ \coupler@coors \POE@dict{GetLastInputCoordinatePair} \tx@UserCoor){\oenodeRefA{}}
18719 \else
18720 % \end{macrocode}
18721 % Use median of all input coordinate pairs as RefA
18722 % \begin{macrocode}
18723 \pnode(! [ \coupler@coors
18724 % \end{macrocode}
18725 % remove output node from stack
18726 % \begin{macrocode}
18727 counttomark -2 roll pop pop
18728 % \end{macrocode}
18729 % count number of input coordinate pair, keep that number and save it behind the mark
18730 % \begin{macrocode}
18731 counttomark 2 idiv dup counttomark 1 add 1 roll
18732 1 sub { \POE@dict{VecAdd} } repeat
18733 % \end{macrocode}
18734 % divide by number of input coordinate pairs and remove mark
18735 % \begin{macrocode}
18736 4 -1 roll 1 exch div \POE@dict{VecScale} 3 -1 roll pop \tx@UserCoor){\oenodeRefA{}}
18737 \fi\fi
18738 \fi
18739 \POE@drawcomponent{wdmcoupler}{#1}
18740 \ifPOE@backlayer
18741 \POE@Verb{%
18742 1 1 \the\POE@couplernodecount\space
18743 {
18744 inttostr \the\POE@couplernodecount\space 1 add inttostr (\oenode{}{}) CorrectDipoleIfc
18745 } for
18746 }%
18747 \ifPOE@fiberpresetout@
18748 \drawfiber@{FiberOut}[startnode=N]{}(\oenodeRefB{})
18749 \fi
18750 \ifPOE@fiberpresetin@
18751 \ifPOE@fiberpresetin@top
18752 \drawfiber@{FiberIn1}[stopnode=1](! [ \coupler@coors 1 \POE@dict{GetCoordinatePair} \tx@UserCoor){}
18753 \fi
18754 \ifPOE@fiberpresetin@bottom
18755 \drawfiber@{FiberIn2}[stopnode=\the\POE@couplernodecount](! [ \coupler@coors \the\POE@couplernodecount\space \POE@dict{GetCoordinatePair} \tx@UserCoor){}
18756 \fi
18757 % \end{macrocode}
18758 % If top and bottom fibers are drawn, we must also draw all other input fibers
18759 % \begin{macrocode}
18760 \ifPOE@fiberpresetin@top\ifPOE@fiberpresetin@bottom
18761 \@tempcnta=\POE@couplernodecount
18762 \advance\@tempcnta by -2
18763 \ifnum0<\@tempcnta
18764 \multido{\i=2+1}{\the\@tempcnta}{%
18765 \drawfiber@{FiberIn}[stopnode=\i](! [ \coupler@coors \i\space \POE@dict{GetCoordinatePair} \tx@UserCoor){}
18766 }%
18767 \fi
18768 \fi\fi
18769 \fi
18770 \fi
18771 \end@OptexpObj
18772 }%
18773 % \end{macrocode}
18774 % \end{macro}
18775 %
18776 % \begin{macro}{\optcirculator}
18777 % \begin{macrocode}
18778 \def\optcirculator{\pst@object{optcirculator}}%
18779 \def\optcirculator@i(#1)(#2)(#3){%
18780 \@ifnextchar\bgroup%
18781 {\optcirculator@ii(#1)(#2)(#3)}%
18782 {\optcirculator@ii(#1)(#2)(#3){}}%
18783 }%
18784 \def\POE@calcCircRefNodes#1#2#3{%
18785 \ifPOE@backlayer
18786 \POE@regNodes{#1}{#2}
18787 \ifx\POE@key@position\@empty
18788 \ifx\POE@key@abspos\@empty
18789 \POE@positionrefnodes
18790 \pst@getcoor{#1}\POE@tempa%
18791 \pst@getcoor{#2}\POE@tempc%
18792 \pst@getcoor{#3}\POE@tempb%
18793 \pnode(! \POE@dict{%
18794 \POE@tempa \tx@UserCoor 2 copy 2 copy
18795 \POE@tempc \tx@UserCoor 4 2 roll @ABVect
18796 2 copy 2 copy 10 4 roll
18797 \POE@tempb \tx@UserCoor 6 -2 roll @ABVect
18798 4 2 roll tx@EcldDict begin Project end VecAdd
18799 2 copy 6 -2 roll -0.5 VecScale VecAdd
18800 }){\oenode@RefA{}}%
18801 \pnode(! \POE@dict{4 2 roll 0.5 VecScale VecAdd})%
18802 {\oenode@RefB{}}%
18803 \fi
18804 \fi
18805 \fi
18806 }%
18807 \def\optcirculator@ii(#1)(#2)(#3)#4{%
18808 \addafter@par{ref@angle=0}%
18809 \begin@OptexpObj
18810 \POE@calcCircRefNodes{#1}{#2}{#3}%
18811 \POE@drawcomponent{optcirculator}{#4}
18812 \ifPOE@backlayer
18813 \ifPOE@fiberpresetin@top
18814 \drawfiber@{FiberIn}[stopnode=1](#1){}
18815 \fi
18816 \ifPOE@fiberpresetout@
18817 \ifPOE@fiberpresetout@top
18818 \drawfiber@{FiberOut1}[startnode=N]{}(#2)
18819 \fi
18820 \ifPOE@fiberpresetout@bottom
18821 \drawfiber@{FiberOut2}[startnode=2, fiberalign=center]{}(#3)
18822 \fi
18823 \fi
18824 \fi
18825 \end@OptexpObj
18826 }%
18827 % \end{macrocode}
18828 % \end{macro}
18829 %
18830 % \begin{macro}{\fiberbox}
18831 % \begin{macrocode}
18832 \def\fiberbox{\pst@object{fiberbox}}%
18833 \def\fiberbox@i(#1)(#2){%
18834 \@ifnextchar(%)
18835 {\fiberbox@ii(#1)(#2)}%
18836 {\fiberbox@ii(#1)(#2)()()}%
18837 }%
18838 \def\fiberbox@ii(#1)(#2)(#3)(#4){%
18839 \@ifnextchar\bgroup%
18840 {\fiberbox@iii(#1)(#2)(#3)(#4)}%
18841 {\fiberbox@iii(#1)(#2)(#3)(#4){}}%
18842 }%
18843 \def\fiberbox@iii(#1)(#2)(#3)(#4)#5{%
18844 \begin@OptexpObj
18845 \ifnum\POE@key@fiberboxcountin=1
18846 \ifnum\POE@key@fiberboxcountout=1
18847 \ifdim\POE@key@fiberboxheight pt=0pt
18848 \PackageError{pst-optexp}{%
18849 Cannot determine height of 1x1 fiberbox automatically,
18850 use fiberboxheight}%
18851 \fi
18852 \fi
18853 \fi
18854 \ifPOE@backlayer
18855 \ifx\\#3#4\\%
18856 \POE@regNodes{#1}{#2}
18857 \POE@Verb{/@@inht 0 def /@@outht 0 def}%
18858 \else
18859 \pst@getcoor{#1}\POE@tempa%
18860 \pst@getcoor{#2}\POE@tempb%
18861 \pst@getcoor{#3}\POE@tempc%
18862 \pst@getcoor{#4}\POE@tempd%
18863 \pnode(!\POE@tempa \POE@tempb
18864 \POE@dict{VecAdd 0.5 VecScale}
18865 \tx@UserCoor){\oenodeRefA{}}
18866 \pnode(!\POE@tempc \POE@tempd
18867 \POE@dict{VecAdd 0.5 VecScale}
18868 \tx@UserCoor){\oenodeRefB{}}
18869 \POE@regNodes@
18870 \POE@Verb{%
18871 gsave
18872 STV CP T
18873 /N@\oenodeRefA{} @GetCenter
18874 /N@\oenodeRefB{} @GetCenter @ABVect NormalizeVec
18875 90 matrix rotate dtransform 2 copy
18876 \POE@tempa \POE@tempb @ABVect
18877 \tx@UserCoor DotProd abs 3 1 roll
18878 \POE@tempc \POE@tempd @ABVect
18879 \tx@UserCoor DotProd abs
18880 grestore
18881 /@@outht ED /@@inht ED
18882 }%
18883 \fi
18884 \fi
18885 \POE@drawcomponent{fiberbox}{#5}
18886 \ifPOE@backlayer
18887 \ifx\\#3#4\\%
18888 % \end{macrocode}
18889 % Connect only, if the fiberbox has a single related interface node.
18890 % \begin{macrocode}
18891 \ifnum\POE@key@fiberboxcountin=1
18892 \ifPOE@fiberpresetin@
18893 \drawfiber@{FiberIn}(#1){}
18894 \else\ifPOE@wirein@
18895 \drawwire@{WireIn}(#1){}
18896 \fi\fi
18897 \fi
18898 \ifnum\POE@key@fiberboxcountout=1
18899 \ifPOE@fiberpresetout@
18900 \drawfiber@{FiberOut}{}(#2)
18901 \else\ifPOE@wireout@
18902 \drawwire@{WireOut}{}(#2)
18903 \fi\fi
18904 \fi
18905 \else
18906 % \end{macrocode}
18907 % If four reference nodes are specified, connect all of them with the respective interface
18908 % nodes they are aligned to.
18909 % \begin{macrocode}
18910 \ifPOE@fiberpresetin@top
18911 \drawfiber@{FiberIn1}(#1){}
18912 \else\ifPOE@wirein@top
18913 \drawwire@{WireIn1}(#1){}
18914 \fi\fi
18915 \ifPOE@fiberpresetin@bottom
18916 \drawfiber@{FiberIn2}(#2){}
18917 \else\ifPOE@wirein@bottom
18918 \drawwire@{WireIn2}(#2){}
18919 \fi\fi
18920 \ifPOE@fiberpresetout@top
18921 \drawfiber@{FiberOut1}{}(#3)
18922 \else\ifPOE@wireout@top
18923 \drawwire@{WireOut1}{}(#3)
18924 \fi\fi
18925 \ifPOE@fiberpresetout@bottom
18926 \drawfiber@{FiberOut2}{}(#4)
18927 \else\ifPOE@wireout@bottom
18928 \drawwire@{WireOut2}{}(#4)
18929 \fi\fi
18930 \fi
18931 \fi
18932 \end@OptexpObj
18933 }%
18934 % \end{macrocode}
18935 % \end{macro}
18936 %
18937 % \begin{macro}{\POE@calcNodes}
18938 % Some of the components need three points to be positioned.
18939 % These are:
18940 %
18941 % \begin{enumerate}
18942 % \item starting point of the beam (in the PS-Code: (XA,YA))
18943 % \item reflection point on the surface (XG, YG)
18944 % \item end point (XB,YB)
18945 % \end{enumerate}
18946 %
18947 % With these three points \cs{poe@calcNodes} calculates two new points 'tempNode@A'
18948 % and 'tempNode@B', between which the component is placed by the macro
18949 % \cs{poe@drawcomponent} in the way, that 'angle of incidence' == 'angle of deflection'
18950 % regarding the reflection surface (mirror, diagonal of the beamsplitter,
18951 % grid etc.)
18952 % \begin{macrocode}
18953 \def\POE@calcNodes#1#2#3{{%
18954 \pst@getcoor{#1}\POE@tempa%
18955 \pst@getcoor{#2}\POE@tempb%
18956 \pst@getcoor{#3}\POE@tempc%
18957 \pnode(! \POE@dict{%
18958 \POE@tempa \tx@UserCoor
18959 \POE@tempc \tx@UserCoor
18960 \POE@tempb \tx@UserCoor
18961 calcNodes /exch@ref@\oenode{}{} ED
18962 X@A Y@A}){\oenode@RefA{}}%
18963 \pnode(! \POE@dict{X@B Y@B}){\oenode@RefB{}}%
18964 \pnode(#2){\oenode@Origin{}}%
18965 }\ignorespaces}%
18966 % \end{macrocode}
18967 % \end{macro}
18968 %
18969 % \begin{macro}{\POE@calcAngle}
18970 % Calculate the angle between the vectors A->O and B->0, which is
18971 % needed by \cs{rightangleprism} and \cs{optprism}. Also calculate the
18972 % angle difference between 'Winkelhalbierende' and
18973 % 'Seitenhalbierende', which is required for some corrections in
18974 % \cs{rightangleprism}.
18975 % \begin{macrocode}
18976 \def\POE@calcAngle{%
18977 \POE@Verb{%
18978 gsave
18979 STV CP T
18980 /N@\oenode@Origin{} @GetCenter 2 copy
18981 /N@\oenodeRefA{} @GetCenter VecSub /ay ED /ax ED
18982 /N@\oenodeRefB{} @GetCenter VecSub /by ED /bx ED
18983 % \end{macrocode}
18984 % Winkelhalbierende (cx, cy)
18985 % \begin{macrocode}
18986 ax ay NormalizeVec bx by NormalizeVec VecAdd
18987 2 copy Pyth abs 1e-4 lt {
18988 % \end{macrocode}
18989 % vectors a and b are antiparallel
18990 % \begin{macrocode}
18991 pop pop
18992 ax ay 90 matrix rotate dtransform
18993 } if
18994 NormalizeVec 2 copy
18995 % \end{macrocode}
18996 % Seitenhalbierende
18997 % \begin{macrocode}
18998 ax ay bx by VecAdd
18999 2 copy Pyth abs 1e-4 lt {
19000 % \end{macrocode}
19001 % vectors a and b are parallel
19002 % \begin{macrocode}
19003 pop pop ax ay
19004 } if
19005 NormalizeVec
19006 4 copy 4 copy
19007 DotProd Acos 5 1 roll Chirality mul
19008 /dOEangle exch def
19009 ax ay Pyth bx by Pyth
19010 2 copy dup mul exch dup mul add
19011 ax bx sub ay by sub Pyth dup mul exch sub
19012 3 1 roll -2 mul mul div Acos /OEangle exch def
19013 % \end{macrocode}
19014 % project vector (ax, by) on the normal to the bisector
19015 % \begin{macrocode}
19016 neg exch ax ay \tx@UserCoor DotProd abs /@myht exch def
19017 grestore
19018 }%
19019 \ignorespaces}%
19020 % \end{macrocode}
19021 % \end{macro}
19022 %
19023 % \begin{macro}{\POE@saveDiffractionNodes}
19024 % \begin{macrocode}
19025 \def\POE@saveDiffractionNodes{%
19026 \POE@Verb{%
19027 gsave
19028 STV CP T
19029 /N@\oenodeRefA{} @GetCenter
19030 /N@\oenode@Origin{} @GetCenter @ABVect exch atan /myangle ED
19031 /N@\oenode@Origin{} @GetCenter
19032 /N@\oenodeRefB{} @GetCenter @ABDist /mydist ED
19033 grestore
19034 }%
19035 \pnode(! \POE@dict{mydist myangle 180 sub} PtoC \tx@UserCoor){\oenode{DO0}{}}%
19036 \multido{\i=1+1}{\POE@key@diffractionorders}{%
19037 \pnode(! \POE@dict{mydist myangle 180 sub 180 OEangle sub \i\space mul } add PtoC \tx@UserCoor){\oenode{DO\i}{}}%
19038 \pnode(! \POE@dict{mydist myangle 180 sub 180 OEangle sub \i\space mul } sub PtoC \tx@UserCoor){\oenode{DO-\i}{}}%
19039 }%
19040 \ignorespaces}%
19041 % \end{macrocode}
19042 % \end{macro}
19043 %
19044 % \begin{macro}{\POE@regNodes}
19045 % If a macro needs only two points, they are equivalent to
19046 % 'tempNode@A' and 'tempNode@B'. But for easier implementation of other
19047 % macros the given points are assigned to the temporary nodes.
19048 % \begin{macrocode}
19049 \def\POE@regNodes#1#2{%
19050 \pnode(#1){\oenodeRefA{}}
19051 \pnode(#2){\oenodeRefB{}}
19052 \POE@regNodes@
19053 \ignorespaces}%
19054 % \end{macrocode}
19055 % \end{macro}
19056 %
19057 % \begin{macro}{\POE@regNodes@}
19058 % Some additional work which needs to be done in \cs{POE@regNodes}, but must be
19059 % called separately in some cases (e.g. \cs{fiberbox}).
19060 % \begin{macrocode}
19061 \def\POE@regNodes@{%
19062 \POE@Verb{%
19063 /@xref [\POE@key@extnode@xrefs] def
19064 /@yref [\POE@key@extnode@yrefs] def
19065 /@@ang
19066 \ifx\POE@key@innercompalign\POE@str@absolute
19067 /N@\POE@refnodeA\space /N@\POE@refnodeB\space SlopeAngle
19068 \else
19069 0
19070 \fi def
19071 }%
19072 \ifx\POE@key@extnodealign\POE@str@absolute
19073 \POE@Verb{%
19074 /N@\POE@refnodeA\space @GetCenter /N@\POE@refnodeB\space @GetCenter
19075 @ABVect exch
19076 dup 0 gt 3 1 roll 0 eq exch 0 lt and or
19077 { /RefFac -1 def } if
19078 }%
19079 \fi
19080 \ignorespaces}%
19081 % \end{macrocode}
19082 % \end{macro}
19083 %
19084 % \begin{macro}{\POE@pnode@shiftedrot}
19085 % Define a new node \#3 shifted by (\#1) relative to existing node \#2.
19086 % Aditionally rotate the new node by \#4 degree around existing node as origin.
19087 % \begin{macrocode}
19088 \def\POE@pnode@shiftedrot(#1)#2#3#4{%
19089 \pst@getcoor{#1}\POE@temp%
19090 \pnode(! \POE@dict{
19091 /N@#2 @GetCenter \POE@temp
19092 #4 \POE@key@labelrefangle\space add matrix rotate dtransform
19093 VecAdd \tx@UserCoor }){#3}%
19094 \psset[optexp]{ref@angle=0}
19095 }%
19096 % \end{macrocode}
19097 % \end{macro}
19098 %
19099 % \begin{macro}{\POE@nlput}
19100 % We cannot use \cs{nlput} from \opt{pst-node}, because that does not work
19101 % correctly for negative distances together with \opt{nrot=:U}, which happens
19102 % for \opt{position=start}.
19103 % \begin{macrocode}
19104 \def\POE@nlput{\pst@object{POE@nlput}}
19105 \def\POE@nlput@i(#1)(#2)#3#4{%
19106 \begin@SpecialObj
19107 \POE@LDNode(#1)(#2){#3}
19108 \pcline[linestyle=none,fillstyle=none, arrows=-, ArrowInside=-](temp@nlputA)(temp@nlputB)%
19109 \ncput[npos=0.5]{#4}%
19110 \end@SpecialObj}
19111 % \end{macrocode}
19112 % \end{macro}
19113 %
19114 % \begin{macro}{\POE@LDNode}
19115 % \begin{macrocode}
19116 \def\POE@LDNode(#1)(#2)#3{%
19117 \pst@getcoor{#1}\pst@tempA%
19118 \pst@getcoor{#2}\pst@tempB%
19119 \pnode(!
19120 \pst@tempA \tx@UserCoor /YA ED /XA ED
19121 \pst@tempB \tx@UserCoor /YB ED /XB ED
19122 /dx XB XA sub def
19123 /dy YB YA sub def
19124 /angle dy dx Atan def
19125 XA #3 1 sub angle cos mul add
19126 YA #3 1 sub angle sin mul add ){temp@nlputA}%
19127 \pnode(!
19128 \pst@tempA \tx@UserCoor /YA ED /XA ED
19129 \pst@tempB \tx@UserCoor /YB ED /XB ED
19130 /dx XB XA sub def
19131 /dy YB YA sub def
19132 /angle dy dx Atan def
19133 XA #3 1 add angle cos mul add
19134 YA #3 1 add angle sin mul add ){temp@nlputB}%
19135 }
19136 % \end{macrocode}
19137 % \end{macro}
19138 %
19139 % \begin{macro}{\POE@putlabelrelative}
19140 % Used to put the label for labelref=relative
19141 % \begin{macrocode}
19142 \def\POE@putlabelrelative#1{%
19143 \nput[labelsep=0]{\POE@key@labelangle}%
19144 {\oenodeLabel{}}%
19145 {\rput[\POE@key@labelalign](0,0){\POE@key@labelstyle #1}}%
19146 }%
19147 % \end{macrocode}
19148 % \end{macro}
19149 %
19150 % \begin{macro}{\POE@putcomp}
19151 % Place the component in argument \#1 and define a new node
19152 % \oenodeLabel{} for positioning of the label.
19153 % \begin{macrocode}
19154 \def\POE@putcomp#1{%
19155 \rput(! \POE@key@comp@Xshift\space\POE@key@comp@Yshift){%
19156 \pnode(! \POE@dict{
19157 \POE@key@rotate@xref\space
19158 \POE@key@rotate@yref\space
19159 DefineExtNode}){\oenodeRotref{}}%
19160 \psrotate(\oenodeRotref{}){!\POE@key@angle}{%
19161 #1%
19162 \POE@pnode@shiftedrot(0,\POE@key@labeloffset)%
19163 {\oenodeCenter{}}%
19164 {\oenodeLabel{}}%
19165 {\POE@key@labelangle}%
19166 }%
19167 }%
19168 }%
19169 % \end{macrocode}
19170 % \end{macro}
19171 %
19172 % \begin{macro}{\POE@putlabel}
19173 % Positioning of the label depending on the reference coordinates.
19174 % Needs possibly a previously defined node \cs{oenodeLabel} which
19175 % marks exactly the position of the label relative to the component.
19176 % This is defined by calling \cs{poe@putcomp}.
19177 % \begin{macrocode}
19178 \def\POE@putlabel#1{%
19179 \def\POE@temp{#1}%
19180 % \end{macrocode}
19181 % Put the label only if it's not empty.
19182 % \begin{macrocode}
19183 \ifx\POE@temp\@empty
19184 % \end{macrocode}
19185 % Place the correct 'global' label node when the label is empty.
19186 % \begin{macrocode}
19187 \ifx\POE@key@labelref\POE@str@global
19188 \nput[labelsep=\POE@key@labeloffset]%
19189 {\POE@key@labelangle}%
19190 {\oenodeCenter{}}%
19191 {\pnode(0,0){\oenodeLabel{}}}%
19192 \fi
19193 \else
19194 % \end{macrocode}
19195 % For \opt{global} positioning, the label is placed in global coordinate system
19196 % with respect to the center node.
19197 % \begin{macrocode}
19198 \ifx\POE@key@labelref\POE@str@global
19199 \nput[labelsep=\POE@key@labeloffset]%
19200 {\POE@key@labelangle}%
19201 {\oenodeCenter{}}%
19202 {\pnode(0,0){\oenodeLabel{}}%
19203 \rput[\POE@key@labelalign](0,0){\POE@key@labelstyle\oelabel{#1}}}%
19204 % \end{macrocode}
19205 % Rotate the label node together with the component, but do not rotate the label
19206 % text itself.
19207 % \begin{macrocode}
19208 \else\ifx\POE@key@labelref\POE@str@relgrav
19209 \rput[\POE@key@labelalign](\oenodeLabel{}){%
19210 \POE@key@labelstyle\oelabel{#1}}%
19211 % \end{macrocode}
19212 % Rotate label node and label text with the component.
19213 % \begin{macrocode}
19214 \else\ifx\POE@key@labelref\POE@str@relative
19215 \begingroup
19216 % \end{macrocode}
19217 % Redefine InitNC only for positioning of the label with labelref=relative
19218 % \begin{macrocode}
19219 \pst@def{InitNC}< % kindly contributed by Herbert Voss
19220 /b ED /a ED
19221 /NodeSepTypeB ED /NodeSepTypeA ED
19222 /NodeSepB ED /NodeSepA ED
19223 /OffsetB ED /OffsetA ED
19224 tx@NodeDict a known tx@NodeDict b known and dup {
19225 /NodeA a load def /NodeB b load def
19226 NodeA GetCenter NodeB GetCenter
19227 4 copy exch 4 -1 roll 2 copy gt
19228 { pop pop pop pop /yB ED /xB ED /yA ED /xA ED }
19229 { eq 3 1 roll lt and
19230 { /yB ED /xB ED /yA ED /xA ED}
19231 { /yA ED /xA ED /yB ED /xB ED} ifelse
19232 } ifelse
19233 } if >%
19234 \ncline[linestyle=none,fillstyle=none, npos=, arrows=-, ArrowInside=-]%
19235 {\POE@trefnodeA}{\POE@trefnodeB}%
19236 \ifx\POE@key@position\@empty
19237 \ifx\POE@key@abspos\@empty
19238 \ncput[nrot=:U,npos=]{\POE@putlabelrelative{\oelabel{#1}}}%
19239 \else
19240 \POE@nlput[nrot=:U](\POE@trefnodeA)(\POE@trefnodeB)%
19241 {\POE@key@abspos}{\POE@putlabelrelative{\oelabel{#1}}}%
19242 \fi
19243 \else
19244 \ncput[nrot=:U, npos=\POE@key@position]%
19245 {\POE@putlabelrelative{\oelabel{#1}}}%
19246 \fi
19247 \endgroup
19248 \fi\fi\fi
19249 \fi
19250 }%
19251 % \end{macrocode}
19252 % \end{macro}
19253 %
19254 % \subsection{Free-ray components}
19255 %
19256 % Define all free-ray dipoles
19257 % \begin{macrocode}
19258 \newOptexpDipole{lens}
19259 \newOptexpDipole{asphericlens}
19260 \newOptexpDipole{pinhole}
19261 \newOptexpDipole{crystal}
19262 \newOptexpDipole{polarization}
19263 \newOptexpDipole{optbox}
19264 \newOptexpDipole{optsource}{position=start}
19265 \newOptexpDipole{optplate}
19266 \newOptexpDipole{optretplate}
19267 \newOptexpDipole{optdetector}{position=end}
19268 \newOptexpDipole{optdiode}{allowbeaminside=false}
19269 \newOptexpDipole{doveprism}
19270 \newOptexpDipole{glanthompson}
19271 \newOptexpDipole{parabolicmirror}{position=end, ref@angle=-90}
19272 \newOptexpDipole{axicon}
19273 \newOptexpDipole{optwedge}
19274 % \end{macrocode}
19275 %
19276 % Define all free-ray tripoles
19277 % \begin{macrocode}
19278 \newOptexpTripole{mirror}
19279 \newOptexpTripole[ref@angle=45]{beamsplitter}
19280 \newOptexpTripole{optgrating}
19281 \newOptexpTripole[ref@angle=90]{transmissiongrating}
19282 \newOptexpTripole[ref@angle=45]{pentaprism}
19283 \newOptexpTripole[ref@angle=45]{rightangleprism}
19284 \newOptexpTripole[ref@angle=45]{optprism}
19285 \newOptexpTripole{oapmirror}
19286 % \end{macrocode}
19287 %
19288 % \begin{macro}{\optdipole}
19289 % \begin{macrocode}
19290 \def\optdipole{\pst@object{optdipole}}
19291 \def\optdipole@i(#1)(#2){%
19292 \@ifnextchar\bgroup%
19293 {\optdipole@iii(#1)(#2)}%
19294 {\optdipole@ii(#1)(#2)}%
19295 }%
19296 \def\optdipole@ii(#1)(#2){%
19297 \optdipole@v(#1)(#2){}{}%
19298 }%
19299 \def\optdipole@iii(#1)(#2)#3{%
19300 \@ifnextchar\bgroup%
19301 {\optdipole@iv(#1)(#2){#3}}%
19302 {\optdipole@v(#1)(#2){#3}}%
19303 }%
19304 \def\optdipole@iv(#1)(#2)#3#4{%
19305 \addbefore@par{innercompalign=relative}%
19306 \begin@OptexpObj
19307 \ifPOE@backlayer
19308 \POE@regNodes{#1}{#2}%
19309 \fi
19310 \def\optdipole@comp{\psrotate(0,0){!\POE@dict{@@ang}}{#3}}%
19311 \POE@drawcomponent{optdipole}{#4}%
19312 \ifPOE@backlayer
19313 \POE@InternalConn
19314 \fi
19315 \end@OptexpObj
19316 }%
19317 % \end{macrocode}
19318 % Only one argument given, decide if this is supposed to be the label,
19319 % or the component.
19320 % \begin{macrocode}
19321 \def\optdipole@v(#1)(#2)#3{%
19322 \addbefore@par{innercompalign=relative}%
19323 \begin@OptexpObj
19324 \ifPOE@backlayer
19325 \POE@regNodes{#1}{#2}
19326 \fi
19327 \ifx\POE@key@optdipolecomp\@empty
19328 \def\optdipole@comp{\psrotate(0,0){!\POE@dict{@@ang}}{#3}}%
19329 \POE@drawcomponent{optdipole}{}
19330 \else
19331 \def\optdipole@comp{\psrotate(0,0){!\POE@dict{@@ang}}{\POE@key@optdipolecomp}}%
19332 \POE@drawcomponent{optdipole}{#3}
19333 \fi
19334 \ifPOE@backlayer
19335 \POE@InternalConn
19336 \fi
19337 \end@OptexpObj
19338 }%
19339 \def\optdipole@nodes{\POE@dipole@nodes}
19340 % \end{macrocode}
19341 % \end{macro}
19342 %
19343 % \begin{macro}{\optdipole@ref}
19344 % \begin{macrocode}
19345 \def\optdipole@ref{%
19346 \POE@setref{%
19347 /@@x \POE@key@optdipolewidth\space 0.5 mul def
19348 /@@y \POE@key@optdipoleheight\space 0.5 mul def
19349 }%
19350 }%
19351 % \end{macrocode}
19352 % \end{macro}
19353 %
19354 % \begin{macro}{\opttripole}
19355 % \begin{macrocode}
19356 \def\opttripole{\pst@object{opttripole}}
19357 \def\opttripole@i(#1)(#2)(#3){%
19358 \@ifnextchar\bgroup
19359 {\opttripole@iii(#1)(#2)(#3)}%
19360 {\opttripole@ii(#1)(#2)(#3)}%
19361 }%
19362 \def\opttripole@ii(#1)(#2)(#3){%
19363 \opttripole@v(#1)(#2)(#3){}{}%
19364 }%
19365 \def\opttripole@iii(#1)(#2)(#3)#4{%
19366 \@ifnextchar\bgroup
19367 {\opttripole@iv(#1)(#2)(#3){#4}}%
19368 {\opttripole@v(#1)(#2)(#3){#4}}%
19369 }%
19370 \def\opttripole@iv(#1)(#2)(#3)#4#5{%
19371 \addafter@par{ref@angle=0}
19372 \begin@OptexpTripole
19373 \ifPOE@backlayer
19374 \POE@calcNodes{#1}{#2}{#3}%
19375 \POE@regNodes{#1}{#3}%
19376 \fi
19377 \def\opttripole@comp{#4}%
19378 \POE@drawcomponent{opttripole}{#5}
19379 \ifPOE@backlayer
19380 \POE@InternalConn
19381 \fi
19382 \end@OptexpTripole
19383 }%
19384 % \end{macrocode}
19385 % Only one argument given, decide if this is supposed to be the label, or the component
19386 % \begin{macrocode}
19387 \def\opttripole@v(#1)(#2)(#3)#4{%
19388 \addafter@par{ref@angle=0}
19389 \begin@OptexpTripole
19390 \ifPOE@backlayer
19391 \POE@calcNodes{#1}{#2}{#3}%
19392 \POE@regNodes{#1}{#3}%
19393 \fi
19394 \ifx\POE@key@opttripolecomp\@empty
19395 \def\opttripole@comp{#3}%
19396 \POE@drawcomponent{opttripole}{}%
19397 \else
19398 \def\opttripole@comp{\POE@key@opttripolecomp}%
19399 \POE@drawcomponent{opttripole}{#4}%
19400 \fi
19401 \ifPOE@backlayer
19402 \POE@InternalConn
19403 \fi
19404 \end@OptexpTripole
19405 }%
19406 \def\opttripole@nodes{\POE@tripole@nodes}
19407 % \end{macrocode}
19408 % \end{macro}
19409 %
19410 % \begin{macro}{\fibercollimator}
19411 % \begin{macrocode}
19412 \def\fibercollimator{\pst@object{fibercollimator}}
19413 \def\fibercollimator@i(#1)(#2){%
19414 \def\POE@tempa{#1}%
19415 \def\POE@tempb{#2}%
19416 \def\POE@tempc{}%
19417 \def\POE@tempd{}%
19418 \@ifnextchar(%)
19419 {\fibercollimator@ii}{\fibercollimator@iv}%
19420 }%
19421 \def\fibercollimator@ii(#1){%
19422 \def\POE@tempc{#1}%
19423 \@ifnextchar(%)
19424 {\fibercollimator@iii}{\fibercollimator@iv}%
19425 }%
19426 \def\fibercollimator@iii(#1){%
19427 \def\POE@tempd{#1}%
19428 \fibercollimator@iv
19429 }%
19430 \def\fibercollimator@iv{%
19431 \@ifnextchar\bgroup{\fibercollimator@v}{\fibercollimator@v{}}%
19432 }%
19433 \def\fibercollimator@v#1{%
19434 \addbefore@par{allowbeaminside=false}%
19435 \begin@OptexpObj
19436 \ifPOE@backlayer
19437 \POE@regNodes{\POE@tempa}{\POE@tempb}%
19438 \fi
19439 \POE@drawcomponent{fibercollimator}{#1}
19440 \ifPOE@backlayer
19441 \ifPOE@beam
19442 \drawbeam(\oenodeRefA{}){}
19443 \fi
19444 \ifPOE@fiberpresetout@
19445 \ifx\@empty\POE@tempc
19446 \drawfiber{}(\oenodeRefB{})
19447 \else\ifx\@empty\POE@tempd
19448 \psbezier[style=FiberOut](\oenodeOut{})(\POE@tempb)%
19449 (\POE@tempb)(\POE@tempc)%
19450 \else
19451 \psbezier[style=FiberOut](\oenodeOut{})(\POE@tempb)%
19452 (\POE@tempc)(\POE@tempd)%
19453 \fi\fi
19454 \fi
19455 \fi
19456 \end@OptexpObj
19457 }%
19458 % \end{macrocode}
19459 % \end{macro}
19460 %
19461 % Define all fiber dipoles
19462 % \begin{macrocode}
19463 \newOptexpFiberDipole{optfiber}{newOptComp={}}
19464 \newOptexpFiberDipole{optamp}
19465 \newOptexpFiberDipole{optmzm}
19466 \newOptexpFiberDipole{optfilter}{allowbeaminside=false}
19467 \newOptexpFiberDipole{polcontrol}
19468 \newOptexpFiberDipole{optisolator}
19469 \newOptexpFiberDipole{optfiberpolarizer}
19470 \newOptexpFiberDipole{optswitch}
19471 \newOptexpFiberDipole{fiberdelayline}
19472 % \end{macrocode}
19473 %
19474 % \begin{macro}{\POE@drawcomponent}
19475 % This macro is called by every unit
19476 % The first parameter contains the label, the second one the drawing code
19477 % \begin{macrocode}
19478 \def\POE@drawcomponent#1#2{%
19479 \def\POE@comp{%
19480 \ifPOE@backlayer
19481 \pnode(!\POE@dict{@@x0 @@y0}){\oenodeCenter{}}
19482 \@nameuse{#1@nodes}
19483 \fi
19484 \ifPOE@frontlayer
19485 \@nameuse{#1@comp}
19486 \fi
19487 \ifx\POE@key@extnode\@empty\else
19488 \ifPOE@backlayer
19489 \multido{\i=1+1}{\POE@key@extnode@cnt}{%
19490 \pnode(! \POE@dict{
19491 @xref \i\space 1 sub get
19492 @yref \i\space 1 sub get
19493 DefineExtNode}){\oenode{Ext\i}{}}%
19494 \pnode(\oenode{Ext1}{}){\oenodeExt{}}%
19495 }%
19496 \POE@Verb{%
19497 tx@NodeDict begin /N@\oenodeExt{} load
19498 \ifnum9<1\POE@key@compname
19499 /N@ExtNode
19500 \else
19501 /N@\POE@key@compname ExtNode
19502 \fi
19503 ED end
19504 }%
19505 \fi
19506 \fi
19507 }%
19508 \@ifundefined{#1@ref}{}{\@nameuse{#1@ref}}%
19509 \begingroup
19510 \ifPOE@endbox
19511 \psset[optexp]{abspos={%
19512 \POE@dict{%
19513 /N@\POE@refnodeA\space @GetCenter \tx@UserCoor
19514 /N@\POE@refnodeB\space @GetCenter \tx@UserCoor
19515 @ABDist @@x0 @@x add add
19516 }%
19517 }}%
19518 \else\ifPOE@startbox
19519 \psset[optexp]{abspos={\POE@dict{ @@x0 neg @@x sub }}}%
19520 \fi\fi
19521 \POE@disablepos
19522 \ncline[linestyle=none,fillstyle=none,npos=,arrows=-,ArrowInside=-]%
19523 {\POE@refnodeA}{\POE@refnodeB}%
19524 % \end{macrocode}
19525 % Positioning of the component
19526 % \begin{macrocode}
19527 \psset{style=OptComp}%
19528 % \end{macrocode}
19529 % linestyle to use, if component should be marked as optional
19530 % \begin{macrocode}
19531 \ifPOE@component@optional
19532 \psset{style=OptionalStyle}%
19533 \fi
19534 % \end{macrocode}
19535 % If parameter \opt{position} is given, use it for \opt{npos}.
19536 % \begin{macrocode}
19537 \ifx\POE@key@abspos\@empty
19538 % \end{macrocode}
19539 % Then check if absolute positioning with \opt{abspos} is wanted.
19540 % \begin{macrocode}
19541 \ifx\POE@key@position\@empty
19542 \ncput[nrot=:U,npos=]{\POE@putcomp{\POE@comp}}%
19543 \else
19544 \ncput[nrot=:U,npos=\POE@key@position]{\POE@putcomp{\POE@comp}}%
19545 \fi
19546 \else
19547 \POE@nlput[nrot=:U](\POE@refnodeA)(\POE@refnodeB)%
19548 {\POE@key@abspos}{\POE@putcomp{\POE@comp}}%
19549 \fi
19550 \endgroup
19551 \ifPOE@backlayer
19552 \POE@transformnodes
19553 \fi
19554 \ifPOE@frontlayer
19555 \POE@putlabel{#2}%
19556 \fi
19557 % \end{macrocode}
19558 % Show some special dots for debugging
19559 % \begin{macrocode}
19560 \ifPOE@debug@showoptdots
19561 \ifPOE@frontlayer
19562 \psdot[linecolor=red](\oenodeCenter{})
19563 \psdot[linecolor=red, dotstyle=x, dotscale=1.5](\oenodeLabel{})
19564 \psdot[linecolor=black](\oenodeRefA{})
19565 \psdot[linecolor=black](\oenodeRefB{})
19566 \psdot[linecolor=black, dotstyle=x,
19567 dotscale=1.5](\oenodeTrefA{})
19568 \psdot[linecolor=black, dotstyle=x,
19569 dotscale=1.5](\oenodeTrefB{})
19570 \fi
19571 \fi
19572 \ifPOE@debug@showinterfaces
19573 \ifPOE@frontlayer
19574 \POE@drawinterfaces[style=IfcStyle]
19575 \fi
19576 \fi
19577 \ifPOE@debug@showifcnodes
19578 \ifPOE@frontlayer
19579 \POE@ifcnodes[style=IfcNodeStyle]
19580 \fi
19581 \fi
19582 \ignorespaces}%
19583 % \end{macrocode}
19584 % \end{macro}
19585 %
19586 % \begin{macro}{POE@setref}
19587 % \begin{macrocode}
19588 \let\POE@setref\POE@Verb
19589 % \end{macrocode}
19590 % \end{macro}
19591 %
19592 % \begin{macro}{POE@transformnode}
19593 % Transform node \opt{\#1} according to the positioning parameters
19594 % (\opt{compshift}, \opt{position}, and \opt{abspos}) with respect to the
19595 % rotation reference node and define it as \opt{\#2}.
19596 % \begin{macrocode}
19597 \def\POE@transformnode#1#2{%
19598 \pnode(!
19599 \POE@dict{%
19600 /N@\oenodeRotref{} @GetCenter 2 copy
19601 /N@#1 @GetCenter
19602 \POE@key@comp@Xshift\space\POE@key@comp@Yshift\space
19603 \tx@ScreenCoor VecAdd 4 2 roll @ABVect
19604 \POE@key@angle\space matrix rotate dtransform VecAdd
19605 \tx@UserCoor
19606 }){#2}%
19607 }%
19608 % \end{macrocode}
19609 % \end{macro}
19610 %
19611 % \begin{macro}{\POE@ifcnodes}
19612 % \begin{macrocode}
19613 \def\POE@ifcnodes{\pst@object{POE@ifcnodes}}
19614 \def\POE@ifcnodes@i{%
19615 \begin@SpecialObj%
19616 \solid@star%
19617 \addto@pscode{
19618 \psk@dotsize
19619 \@nameuse{psds@\psk@dotstyle}
19620 \POE@dict{[ (\oenode{}{}) false GetInternalBeamNodes %]
19621 counttomark 2 idiv { Dot } repeat
19622 pop}
19623 }%
19624 \end@SpecialObj
19625 }%
19626 % \end{macrocode}
19627 % \end{macro}
19628 %
19629 % \begin{macro}{\POE@drawinterfaces}
19630 % \begin{macrocode}
19631 \def\POE@drawinterfaces{\pst@object{POE@drawinterfaces}}
19632 \def\POE@drawinterfaces@i{%
19633 \begin@OpenObj%
19634 \addto@pscode{%
19635 \psk@dotsize
19636 \@nameuse{psds@\psk@dotstyle}
19637 \pst@optexpdict
19638 /\oenode{}{} load begin
19639 1 1 N {
19640 IfcName load begin
19641 X Y
19642 CompMtrx transform CM itransform 2 copy
19643 currentdict /RX known { 0 0 }{ DX DY } ifelse
19644 CompMtrx dtransform CM idtransform 2 copy
19645 NAlow 0 eq NAup 0 eq and {
19646 -0.5 VecScale 4 2 roll 0.5 VecScale
19647 } {
19648 \tx@UserCoor NAlow VecScale 4 2 roll \tx@UserCoor NAup VecScale
19649 } ifelse
19650 end
19651 8 -2 roll VecAdd moveto VecAdd lineto
19652 } for
19653 end end }%
19654 \pst@stroke
19655 \use@pscode
19656 \end@OpenObj
19657 }%
19658 % \end{macrocode}
19659 % \end{macro}
19660 %
19661 % \begin{macro}{POE@extnodes}
19662 % \begin{macrocode}
19663 \def\POE@extnodes{\pst@object{POE@extnodes}}
19664 \def\POE@extnodes@i#1{%
19665 \begin@SpecialObj
19666 \let\POE@setref\addto@pscode
19667 \addto@pscode{\pst@optexpdict InitOptexpComp }
19668 \@ifundefined{#1@ref}{}{\@nameuse{#1@ref}}%
19669 \solid@star%
19670 \addto@pscode{
19671 \psk@dotsize
19672 \@nameuse{psds@\psk@dotstyle}
19673 @@x 0 eq { [0] }{ [ @@x neg 0 @@x ] } ifelse
19674 {
19675 @@y 0 eq { [0] }{ [@@y neg 0 @@y ] } ifelse
19676 {
19677 exch dup 3 1 roll
19678 @@x0 add exch @@y0 add \tx@ScreenCoor
19679 /\oenode{}{} load begin CompMtrx end transform CM itransform
19680 Dot
19681 } forall
19682 pop
19683 } forall
19684 end
19685 }%
19686 \end@SpecialObj
19687 }%
19688 % \end{macrocode}
19689 % \end{macro}
19690 %
19691 % \begin{macro}{\POE@tripole@nodes}
19692 % \begin{macrocode}
19693 \def\POE@tripole@nodes{%
19694 \newOptexpComp{{0 0} {1 0} @@x neg @@x refl {PlainIfc} 1}%
19695 \ignorespaces}%
19696 % \end{macrocode}
19697 % \end{macro}
19698 %
19699 % \begin{macro}{\POE@dipole@nodes}
19700 % \begin{macrocode}
19701 \def\POE@dipole@nodes{%
19702 \newOptexpComp{%
19703 {@@x0 @@x sub 0} {0 1} @@y0 @@y sub @@y0 @@y add trans {PlainIfc}
19704 @@x 0 eq not {
19705 {@@x0 @@x add 0} {0 1} @@y0 @@y sub @@y0 @@y add trans {PlainIfc}
19706 } if \POE@key@n }%
19707 \ignorespaces}%
19708 % \end{macrocode}
19709 % \end{macro}
19710 %
19711 % \begin{macro}{POE@fiberdipole@nodes}
19712 % \begin{macrocode}
19713 \def\POE@fiberdipole@nodes{%
19714 \newOptexpFiberComp{%
19715 {@@x0 @@x sub 0}
19716 @@x 0 eq not {
19717 {@@x0 @@x add 0}
19718 } if }%
19719 \ignorespaces}%
19720 % \end{macrocode}
19721 % \end{macro}
19722 %
19723 % \begin{macrocode}
19724 \let\POE@elecdipole@nodes\POE@fiberdipole@nodes
19725 % \end{macrocode}
19726 %
19727 % \begin{macro}{POE@comp@rectangle}
19728 % \begin{macrocode}
19729 \def\POE@comp@rectangle{%
19730 \psframe[dimen=outer](!\POE@dict{@@x neg @@y0 @@y sub})%
19731 (!\POE@dict{@@x @@y0 @@y add})%
19732 }%
19733 % \end{macrocode}
19734 % \end{macro}
19735 %
19736 % \subsection{Free-ray components}
19737 %
19738 % \subsubsection{mirror}
19739 %
19740 % \begin{macro}{\mirror@ref}
19741 % \begin{macrocode}
19742 \def\mirror@ref{%
19743 \ifdim\POE@key@mirrorradius pt=0pt
19744 \ifx\POE@key@mirrortype\POE@str@piezo
19745 \POE@setref{/@@y0 \pst@number\psyunit def}%
19746 \bgroup
19747 \psset{style=PiezoMirror}%
19748 \POE@setref{%
19749 \pst@number\psyunit @@y0 div
19750 \POE@key@mirrorwidth\space 0.5 mul mul 2.5 div /@@y0 ED
19751 }%
19752 \egroup
19753 \else
19754 \POE@setref{/@@x \POE@key@mirrorwidth\space 0.5 mul def}%
19755 \ifx\POE@key@mirrortype\POE@str@plain\else
19756 \POE@setref{\POE@key@mirrordepth\space 0.5 mul dup /@@y0 ED /@@y ED}%
19757 \fi
19758 \fi
19759 \else
19760 \POE@setref{/@@x \POE@key@mirrorwidth\space 0.5 mul def}%
19761 \ifx\POE@key@mirrortype\POE@str@plain\else
19762 \POE@setref{\POE@key@mirrordepth\space 0.5 mul dup /@@y0 ED /@@y ED}%
19763 \fi
19764 \fi
19765 }%
19766 % \end{macrocode}
19767 % \end{macro}
19768 %
19769 % \begin{macro}{\mirror@nodes}
19770 % \begin{macrocode}
19771 \def\mirror@nodes{%
19772 \begin@CompIfc
19773 % \end{macrocode}
19774 % Add this one reflective interface in any case
19775 % \begin{macrocode}
19776 \ifdim\POE@key@mirrorradius pt=0pt
19777 \addto@pscode{%
19778 {0 0} {1 0}
19779 \POE@key@mirrorwidth\space -0.5 mul dup neg
19780 refl {PlainIfc} }%
19781 \else
19782 \addto@pscode{%
19783 {0 0} {0 \POE@key@mirrorradius\space neg}
19784 \POE@key@mirrorwidth\space -0.5 mul dup neg
19785 refl {CurvedIfc} }%
19786 \fi
19787 % \end{macrocode}
19788 % A second interface exists only for semitrans mirrors
19789 % \begin{macrocode}
19790 \ifx\POE@key@mirrortype\POE@str@semitrans
19791 % \end{macrocode}
19792 % if no second mirror radius was specified, use the same curvature of the first interface.
19793 % \begin{macrocode}
19794 \ifx\POE@key@mirrorradiusB\@empty
19795 \ifdim\POE@key@mirrorradius pt=0pt
19796 \addto@pscode{%
19797 {0 \POE@key@mirrordepth} {1 0}
19798 @@x neg @@x trans {PlainIfc} }%
19799 \else
19800 \addto@pscode{%
19801 {0 \POE@key@mirrordepth}
19802 {0 \POE@key@mirrorradius\space neg}
19803 \POE@key@mirrorwidth\space -0.5 mul dup neg
19804 trans {CurvedIfc} }%
19805 \fi
19806 \else
19807 % \end{macrocode}
19808 % the second interface is plain if it should not have the curvature of the first interface.
19809 % \begin{macrocode}
19810 \addto@pscode{%
19811 {0 \POE@key@mirrordepth
19812 dup \POE@key@mirrorradius\space mul 0 lt {
19813 dup sign \POE@key@mirrorradius\space @@x capHeight mul add
19814 } if}
19815 {1 0} @@x neg @@x trans {PlainIfc} }%
19816 \fi
19817 % \end{macrocode}
19818 % Rearrange the two interfaces depending on the sign of mirrordepth
19819 % \begin{macrocode}
19820 \addto@pscode{%
19821 \ifdim\POE@key@mirrordepth pt<-0.0001pt
19822 12 6 roll 2
19823 \else
19824 \ifdim\POE@key@mirrordepth pt< 0.0001pt
19825 6 {pop} repeat
19826 \fi
19827 1
19828 \fi
19829 \POE@key@n
19830 }%
19831 \end@AmbCompIfc
19832 \else
19833 \addto@pscode{1 }%
19834 \end@CompIfc
19835 \fi
19836 \pnode(0,0){\oenodeCenter{}}
19837 }%
19838 % \end{macrocode}
19839 % \end{macro}
19840 %
19841 % \begin{macro}{\mirror@comp}
19842 % \begin{macrocode}
19843 \def\mirror@comp{%
19844 \edef\@ht{%
19845 \POE@key@mirrorwidth\space\pst@number\psyunit mul 0.5 mul %
19846 }%
19847 \edef\@dp{\POE@key@mirrordepth\space\pst@number\psxunit mul }%
19848 \edef\@r{\POE@key@mirrorradius\space\pst@number\psxunit mul }%
19849 \edef\@postcode{%
19850 neg 5 -1 roll exch 5 2 roll 90 add exch 90 add exch ArcR %
19851 }%
19852 \edef\@extpostcode{%
19853 neg \@dp add 5 -1 roll exch 5 2 roll 90 add exch 90 add %
19854 }%
19855 \ifdim\POE@key@mirrorradius pt=0pt
19856 % \end{macrocode}
19857 % plain mirror
19858 % \begin{macrocode}
19859 \edef\@ht{\POE@key@mirrorwidth\space 0.5 mul }%
19860 \ifx\POE@key@mirrortype\POE@str@piezo
19861 \psframe[style=PiezoMirror,
19862 dimen=outer](! \@ht 4 div 0)%
19863 (! \@ht -4 div \@ht 2.5 div)
19864 \ifx\POE@key@extnode\@empty
19865 \psbezier[fillstyle=none](! 0 \@ht 2.5 div)%
19866 (! 0 \@ht 1.5 div)%
19867 (! \@ht 2 div \@ht 2 div)%
19868 (! \@ht 4 div \@ht)
19869 \fi
19870 \else\ifx\POE@key@mirrortype\POE@str@extended
19871 \psframe[style=ExtendedMirror]%
19872 (! \@ht neg \POE@key@mirrordepth\space )%
19873 (! \@ht 0)
19874 \else\ifx\POE@key@mirrortype\POE@str@semitrans
19875 \psframe[style=SemitransMirror]%
19876 (! \@ht neg \POE@key@mirrordepth\space )%
19877 (! \@ht 0)
19878 \fi\fi\fi
19879 \ifx\POE@key@mirrortype\POE@str@semitrans
19880 \psline[linewidth=\POE@key@mirrorlinewidth]%
19881 (! \@ht neg 0)(! \@ht 0)
19882 \else
19883 \psline[linewidth=\POE@key@mirrorlinewidth]%
19884 (! \@ht neg \POE@clwh)(! \@ht \POE@clwh)
19885 \fi
19886 \else
19887 % \end{macrocode}
19888 % concave/convex mirror
19889 % \begin{macrocode}
19890 \ifdim\POE@key@mirrorradius pt<0pt
19891 \def\POE@temparc{arc }
19892 \else
19893 \def\POE@temparc{arcn }
19894 \fi
19895 \ifodd
19896 \ifx\POE@key@mirrortype\POE@str@extended 1
19897 \else\ifx\POE@key@mirrortype\POE@str@semitrans 1
19898 \else 0
19899 \fi\fi
19900 % \end{macrocode}
19901 % extended or semitrans mirrortype
19902 % \begin{macrocode}
19903 \bgroup
19904 \ifx\POE@key@mirrortype\POE@str@extended
19905 \psset{style=ExtendedMirror}
19906 \else\ifx\POE@key@mirrortype\POE@str@semitrans
19907 \psset{style=SemitransMirror}
19908 \fi\fi
19909 \begin@ClosedObj
19910 \addto@pscode{%
19911 \pst@optexpdict \@ht \@r rightCurvedIfc \@postcode
19912 \ifx\POE@key@mirrorradiusB\@empty
19913 \@ht \@r rightCurvedIfc \@extpostcode \POE@temparc
19914 \else
19915 0 \@dp
19916 % \end{macrocode}
19917 % For positive mirrorradius and positive mirror depth, add the cap
19918 % height so that mirrordepth is the minimum mirror depth. For both
19919 % negative radius and depth, subtract the cap height.
19920 % \begin{macrocode}
19921 \POE@key@mirrordepth\space\POE@key@mirrorradius\space
19922 mul 0 gt {
19923 dup sign \@r \@ht capHeight mul add
19924 } if
19925 rlineto 2 \@ht mul 0 rlineto
19926 \fi
19927 closepath end}%
19928 \end@ClosedObj
19929 \egroup
19930 \fi
19931 % \end{macrocode}
19932 % draw the reflective interface
19933 % \begin{macrocode}
19934 \bgroup
19935 \psset{linewidth=\POE@key@mirrorlinewidth, fillstyle=none}
19936 \begin@OpenObj
19937 \addto@pscode{\POE@dict{ \@ht \@r rightCurvedIfc \@postcode }}%
19938 \end@OpenObj
19939 \egroup
19940 \fi
19941 \ifPOE@variable
19942 \psarc[style=VariableStyle]%
19943 (! \POE@key@mirrorwidth\space 0.5 mul 0.4 sub
19944 \ifdim\POE@key@mirrorradius pt=0pt
19945 0
19946 \else
19947 \POE@key@mirrorradius\space dup \POE@dict{sign} neg exch
19948 \POE@key@mirrorwidth\space 0.5 mul \POE@dict{capHeight} mul
19949 \fi){0.6}{-20}{20}
19950 \psarc[style=VariableStyle]%
19951 (! 0.4 \POE@key@mirrorwidth\space 0.5 mul sub
19952 \ifdim\POE@key@mirrorradius pt=0pt
19953 0
19954 \else
19955 \POE@key@mirrorradius\space dup \POE@dict{sign} neg exch
19956 \POE@key@mirrorwidth\space 0.5 mul \POE@dict{capHeight} mul
19957 \fi){0.6}{160}{200}
19958 \fi
19959 }%
19960 % \end{macrocode}
19961 % \end{macro}
19962 %
19963 % \subsubsection{parabolicmirror}
19964 %
19965 % \begin{macro}{\parabolicmirror@nodes}
19966 % \begin{macrocode}
19967 \def\parabolicmirror@nodes{%
19968 \pssavepath[linestyle=none, arrows=-,ArrowInside=-]{\oenode@Path{A}}{%
19969 \parametricplot[algebraic, VarStep, VarStepEpsilon=1e-7, plotstyle=cspline]%
19970 {0}{\POE@key@parmirrorheight\space 0.5 mul}%
19971 {-\POE@key@parmirrorwidth/(0.25*\POE@key@parmirrorheight^2)*t^2|-t}}
19972 \pssavepath[linestyle=none, arrows=-,ArrowInside=-]{\oenode@Path{B}}{%
19973 \parametricplot[algebraic, VarStep, VarStepEpsilon=1e-7, plotstyle=cspline]%
19974 {0}{\POE@key@parmirrorheight\space 0.5 mul}%
19975 {-\POE@key@parmirrorwidth/(0.25*\POE@key@parmirrorheight^2)*t^2|t}}
19976 \newOptexpComp{%
19977 {-\POE@key@parmirrorwidth\space 0.16 mul \POE@key@parmirrorheight\space -0.2 mul}
19978 tx@IntersectDict /\PIT@name{\oenode@Path{A}} get 0 0 refl {PathIfc}
19979 {0 0} {1 0} 0 0 trans {PlainIfc}
19980 {-\POE@key@parmirrorwidth\space 0.16 mul \POE@key@parmirrorheight\space 0.2 mul}
19981 tx@IntersectDict /\PIT@name{\oenode@Path{B}} get 0 0 refl {PathIfc}
19982 1 }%
19983 \ignorespaces}%
19984 % \end{macrocode}
19985 % \end{macro}
19986 %
19987 % \begin{macro}{\parabolicmirror@comp}
19988 % \begin{macrocode}
19989 \def\parabolicmirror@comp{%
19990 \pstracecurve{\oenode@Path{A}}
19991 \pstracecurve{\oenode@Path{B}}
19992 \ignorespaces}
19993 % \end{macrocode}
19994 % \end{macro}
19995 %
19996 % \subsubsection{lens}
19997 %
19998 % \begin{macro}{\lens@ref}
19999 % \begin{macrocode}
20000 \def\lens@ref{%
20001 \ifdim\POE@key@lensradiusleft pt=0pt
20002 \edef\@th{0 }%
20003 \else
20004 \edef\@th{%
20005 \ifPOE@thicklens
20006 \POE@key@lenswidth\space 0.5 mul
20007 \else
20008 \ifdim\POE@key@lensradiusleft pt<0pt
20009 \POE@key@lensheight\space 0.075 mul
20010 \else
20011 \POE@key@lensradiusleft
20012 \POE@key@lensheight\space 0.5 mul capHeight
20013 \fi
20014 \fi
20015 \space}%
20016 \fi
20017 \ifdim\POE@key@lensradiusright pt=0pt\else
20018 \edef\@th{%
20019 \@th\space
20020 \ifPOE@thicklens
20021 \POE@key@lenswidth\space 0.5 mul
20022 \else
20023 \ifdim\POE@key@lensradiusright pt<0pt
20024 \POE@key@lensheight\space 0.075 mul
20025 \else
20026 \POE@key@lensradiusright
20027 \POE@key@lensheight\space 0.5 mul capHeight
20028 \fi
20029 \fi
20030 \space add
20031 \space}%
20032 \fi
20033 \POE@setref{%
20034 /@@y \POE@key@lensheight\space 0.5 mul def
20035 /@@x \@th 0.5 mul def
20036 }%
20037 }%
20038 % \end{macrocode}
20039 % \end{macro}
20040 %
20041 % \begin{macro}{\lens@nodes}
20042 % \begin{macrocode}
20043 \def\lens@nodes{%
20044 \newOptexpComp{%
20045 {@@x neg 0}
20046 \ifdim\POE@key@lensradiusleft pt=0pt
20047 {0 1}
20048 \POE@key@lensheight\space -0.5 mul dup neg
20049 trans {PlainIfc}
20050 \else
20051 {\POE@key@lensradiusleft\space 0}
20052 \POE@key@lensheight\space -0.5 mul dup neg
20053 trans {CurvedIfc}
20054 \fi
20055 {@@x 0}
20056 \ifdim\POE@key@lensradiusright pt=0pt
20057 {0 1}
20058 \POE@key@lensheight\space -0.5 mul dup neg
20059 trans {PlainIfc}
20060 \else
20061 {\POE@key@lensradiusright\space neg 0}
20062 \POE@key@lensheight\space -0.5 mul dup neg
20063 trans {CurvedIfc}
20064 \fi
20065 \POE@key@n
20066 }%
20067 }%
20068 % \end{macrocode}
20069 % \end{macro}
20070 %
20071 % \begin{macro}{\lens@comp}
20072 % \begin{macrocode}
20073 \def\lens@comp{%
20074 \addbefore@par{linejoin=1}%
20075 \begin@ClosedObj
20076 \addto@pscode{\pst@optexpdict }%
20077 \def\@th{0}%
20078 \def\@wd{\POE@key@lenswidth\space\pst@number\psxunit mul 2 div }%
20079 \def\@ht{\POE@key@lensheight\space\pst@number\psyunit mul 2 div }%
20080 \def\@rL{\POE@key@lensradiusleft\space\pst@number\psrunit mul }%
20081 \def\@rR{\POE@key@lensradiusright\space\pst@number\psrunit mul }%
20082 \ifdim\POE@key@lensradiusleft pt=0pt\else
20083 \addto@pscode{ \@ht \@rL leftCurvedIfc }%
20084 \fi
20085 \ifdim\POE@key@lensradiusright pt=0pt\else
20086 \addto@pscode{ \@ht \@rR rightCurvedIfc }%
20087 \fi
20088 \def\@@x{@@x \pst@number\psxunit mul }%
20089 % \end{macrocode}
20090 % Check some special cases:
20091 %
20092 % 1) Left is plain - right concave / convex
20093 % \begin{macrocode}
20094 \ifdim\POE@key@lensradiusleft pt=0pt
20095 \ifdim\POE@key@lensradiusright pt=0pt\else
20096 \addto@pscode{%
20097 \@@x sub neg 5 1 roll
20098 \@@x neg \@ht neg moveto ArcR
20099 \@@x neg \@ht lineto
20100 }%
20101 \fi
20102 \fi
20103 % \end{macrocode}
20104 % 2) Right is plain - left concave / convex
20105 % \begin{macrocode}
20106 \ifdim\POE@key@lensradiusright pt=0pt
20107 \ifdim\POE@key@lensradiusleft pt=0pt\else
20108 \addto@pscode{%
20109 \@@x sub 5 1 roll
20110 \@@x \@ht moveto ArcL
20111 \@@x \@ht neg lineto
20112 }%
20113 \fi
20114 \fi
20115 % \end{macrocode}
20116 % 3) right and left are both curved
20117 % \begin{macrocode}
20118 \ifdim\POE@key@lensradiusright pt=0pt\else
20119 \ifdim\POE@key@lensradiusleft pt=0pt\else
20120 \addto@pscode{%
20121 \@@x dup
20122 7 1 roll sub neg 5 1 roll
20123 ArcR sub 5 1 roll ArcL
20124 }%
20125 \fi
20126 \fi
20127 \addto@pscode{closepath 1 setlinejoin end }%
20128 \end@ClosedObj
20129 \ignorespaces}%
20130 % \end{macrocode}
20131 % \end{macro}
20132 %
20133 % \subsubsection{Aspheric lens}
20134 %
20135 % \begin{macro}{\asphericlens@nodes}
20136 % \begin{macrocode}
20137 \def\asphericlens@nodes{%
20138 \def\POE@asphere##1{%
20139 (##1)^2*(1/(\POE@key@asphereradiusleft*(1+sqrt(1-(1+\POE@key@asphereconstant)*(##1)^2/\POE@key@asphereradiusleft^2)))+%
20140 (##1)^2*(\POE@key@asphereAfour %
20141 + (##1)^2*(\POE@key@asphereAsix %
20142 + ((##1)^2*(\POE@key@asphereAeight %
20143 + \POE@key@asphereAten*(##1)^2)))))}%
20144 \def\POE@arcright##1{%
20145 (##1)^2/(\POE@key@asphereradiusright*sqrt(1-(##1)^2/\POE@key@asphereradiusright^2))}%
20146 \POE@Verb{%
20147 tx@Dict begin
20148 /POEasphereleftx0 (\POE@asphere{0.5*\POE@key@asphereheight}) AlgParser cvx exec def
20149 /POEasphererightx0
20150 \ifdim\POE@key@asphereradiusright pt>0pt
20151 (\POE@arcright{0.5*\POE@key@asphereheight}) AlgParser cvx exec
20152 \else
20153 0
20154 \fi
20155 def
20156 \POE@key@aspherewidth\space POEasphereleftx0 POEasphererightx0 add sub dup 0 gt {
20157 POEasphererightx0 add /POEasphererightx0 exch def
20158 } {
20159 pop
20160 } ifelse
20161 end
20162 }%
20163 \pssavepath[linestyle=none, arrows=-,ArrowInside=-]{\oenode@Path{A}}{%
20164 \psparametricplot[algebraic, plotstyle=cspline]%
20165 {\POE@key@asphereheight\space -0.5 mul}%
20166 {\POE@key@asphereheight\space 0.5 mul}%
20167 {\POE@asphere{t}-POEasphereleftx0|t}}%
20168 \ifdim\POE@key@asphereradiusright pt>0pt
20169 \pssavepath[linestyle=none, arrows=-,ArrowInside=-]{\oenode@Path{B}}{%
20170 \psparametricplot[algebraic, plotstyle=cspline]%
20171 {\POE@key@asphereheight\space 0.5 mul}%
20172 {\POE@key@asphereheight\space -0.5 mul}%
20173 {-\POE@arcright{t}+POEasphererightx0|t}}%
20174 \fi
20175 \newOptexpComp{%
20176 {POEasphereleftx0 neg 0} tx@IntersectDict /\PIT@name{\oenode@Path{A}} get 0 0 trans {PathIfc}
20177 {POEasphererightx0 0}
20178 \ifdim\POE@key@asphereradiusright pt>0pt
20179 tx@IntersectDict /\PIT@name{\oenode@Path{B}} get 0 0 trans {PathIfc}
20180 \else
20181 {0 1} 0 0 trans {PlainIfc}
20182 \fi
20183 \POE@key@n }%
20184 }%
20185 % \end{macrocode}
20186 % \end{macro}
20187 %
20188 % \begin{macro}{\asphericlens@comp}
20189 % \begin{macrocode}
20190 \def\asphericlens@comp{%
20191 \pscustom[arrows=-]{%
20192 \pstracecurve{\oenode@Path{A}}%
20193 \ifdim\POE@key@asphereradiusright pt>0pt
20194 \pstracecurve{\oenode@Path{B}}
20195 \else
20196 \lineto(!POEasphererightx0 \POE@key@asphereheight\space 0.5 mul)
20197 \lineto(!POEasphererightx0 \POE@key@asphereheight\space -0.5 mul)
20198 \fi
20199 \closepath}%
20200 }%
20201 % \end{macrocode}
20202 % \end{macro}
20203 %
20204 % \subsubsection{pinhole}
20205 %
20206 % \begin{macro}{\pinhole@ref}
20207 % \begin{macrocode}
20208 \def\pinhole@ref{%
20209 \POE@setref{/@@y \POE@key@outerheight\space 0.5 mul def}%
20210 \ignorespaces}%
20211 % \end{macrocode}
20212 % \end{macro}
20213 %
20214 % \begin{macro}{\pinhole@nodes}
20215 % \begin{macrocode}
20216 \def\pinhole@nodes{%
20217 \newOptexpComp{%
20218 {-1e-4 0} {0 1} @@y0 @@y sub @@y0 @@y add trans {PlainIfc}
20219 {0 0} {0 1} \POE@key@innerheight\space -0.5 mul dup neg
20220 trans {PlainIfc}
20221 {1e-4 0} {0 1} @@y0 @@y sub @@y0 @@y add trans {PlainIfc}
20222 \POE@key@n }%
20223 \ignorespaces}%
20224 % \end{macrocode}
20225 % \end{macro}
20226 %
20227 % \begin{macro}{\pinhole@comp}
20228 % \begin{macrocode}
20229 \def\pinhole@comp{%
20230 \ifdim\POE@key@phwidth pt=0pt
20231 \psline[linewidth=\POE@key@phlinewidth]%
20232 (! 0 \POE@key@outerheight\space 2 div)%
20233 (! 0 \POE@key@innerheight\space 2 div)%
20234 \psline[linewidth=\POE@key@phlinewidth]%
20235 (! 0 \POE@key@outerheight\space -2 div)%
20236 (! 0 \POE@key@innerheight\space -2 div)%
20237 \else
20238 \pspolygon*[linestyle=none]%
20239 (! 0 \POE@key@innerheight\space 2 div)%
20240 (! 0 \POE@key@outerheight\space 2 div)%
20241 (! \POE@key@phwidth\space\POE@key@outerheight\space 2 div)%
20242 (! \POE@key@phwidth\space\POE@key@innerheight\space dup neg
20243 \POE@key@outerheight\space add 2 div add 2 div)%
20244 \pspolygon*[linestyle=none]%
20245 (! 0 \POE@key@innerheight\space -2 div)%
20246 (! 0 \POE@key@outerheight\space -2 div)%
20247 (! \POE@key@phwidth\space\POE@key@outerheight\space -2 div)%
20248 (! \POE@key@phwidth\space\POE@key@innerheight\space dup neg
20249 \POE@key@outerheight\space add 2 div add -2 div)%
20250 \fi
20251 \ignorespaces}%
20252 % \end{macrocode}
20253 % \end{macro}
20254 %
20255 % \subsubsection{beamsplitter}
20256 %
20257 % \begin{macro}{\beamsplitter@ref}
20258 % \begin{macrocode}
20259 \def\beamsplitter@ref{%
20260 \POE@setref{/@@x \POE@key@bssize\space 0.5 sqrt mul def }%
20261 }%
20262 % \begin{macro}{\beamsplitter@nodes}
20263 % \begin{macrocode}
20264 \def\beamsplitter@nodes{%
20265 \edef\@bs@wd{\POE@key@bssize\space 0.5 mul }%
20266 \ifx\POE@key@bsstyle\POE@str@cube
20267 \newOptexpCompAmb{%
20268 {\@bs@wd 2 sqrt div neg dup} {-1 1} \@bs@wd neg \@bs@wd
20269 trans {PlainIfc}
20270 {\@bs@wd 2 sqrt div dup neg} {1 1} \@bs@wd neg \@bs@wd
20271 trans {PlainIfc}
20272 {0 0} {1 0} \@bs@wd 2 sqrt mul dup neg exch
20273 trans {PlainIfc}
20274 {\@bs@wd 2 sqrt div dup} {-1 1} \@bs@wd neg \@bs@wd
20275 trans {PlainIfc}
20276 {\@bs@wd 2 sqrt div neg dup neg} {1 1} \@bs@wd neg \@bs@wd
20277 trans {PlainIfc}
20278 3 \POE@key@n
20279 }%
20280 \else\ifx\POE@key@bsstyle\POE@str@plate
20281 \newOptexpCompAmb{%
20282 {0 0} {1 0} \@bs@wd neg \@bs@wd trans {PlainIfc} 1 1 }%
20283 \fi\fi
20284 \ignorespaces}%
20285 % \end{macrocode}
20286 % \end{macro}
20287 %
20288 % \begin{macro}{\beamsplitter@comp}
20289 % \begin{macrocode}
20290 \def\beamsplitter@comp{%
20291 \edef\@bs@wd{\POE@key@bssize\space 2.0 div }%
20292 \ifx\POE@key@bsstyle\POE@str@cube
20293 \psline[arrows=cc-cc](! \@bs@wd neg 2 sqrt mul 0)
20294 (! \@bs@wd 2 sqrt mul 0)
20295 \rput[c]{45}(0,0){%
20296 \psframe(! \@bs@wd neg \@bs@wd neg)(! \@bs@wd \@bs@wd)
20297 }
20298 \else\ifx\POE@key@bsstyle\POE@str@plate
20299 \psline(! \@bs@wd neg 2 sqrt mul 0)(! \@bs@wd 2 sqrt mul 0)
20300 \fi\fi
20301 \ignorespaces}%
20302 % \end{macrocode}
20303 % \end{macro}
20304 %
20305 % \subsubsection{crystal}
20306 %
20307 % \begin{macro}{\crystal@ref}
20308 % \begin{macrocode}
20309 \def\crystal@ref{%
20310 \let\POE@key@optboxwidth\POE@key@crystalwidth
20311 \let\POE@key@optboxheight\POE@key@crystalheight
20312 \optbox@ref
20313 }%
20314 % \end{macrocode}
20315 % \end{macro}
20316 %
20317 % \begin{macro}{\crystal@comp}
20318 % \begin{macrocode}
20319 \def\crystal@comp{%
20320 \edef\@wd{\POE@key@crystalwidth\space 0.5 mul }
20321 \edef\@ht{\POE@key@crystalheight\space 0.5 mul }
20322 \psframe(! \@wd neg \@ht neg)(! \@wd \@ht)
20323 \ifPOE@voltage%
20324 \psline(!\@wd 4 div 3 mul neg \@ht)%
20325 (! \@wd 4 div 3 mul neg \@ht 0.16 add)
20326 \pscircle[fillstyle=solid, fillcolor=white]%
20327 (! \@wd 4 div 3 mul neg \@ht 0.2 add){0.04}
20328 \psline(! \@wd 4 div 3 mul neg \@ht neg)%
20329 (! \@wd 4 div 3 mul neg \@ht neg 0.2 sub)%
20330 \psline(! \@wd 4 div 3 mul neg 0.15 sub \@ht neg 0.2 sub)%
20331 (! \@wd 4 div 3 mul neg 0.15 add \@ht neg 0.2 sub)%
20332 \fi
20333 \ifPOE@lamp
20334 \rput(! \@wd \@ht){%
20335 \psset{style=CrystalLamp}%
20336 \rput(0, 0.4){\crystal@lamp}%
20337 }%
20338 \fi
20339 \ifdim\POE@key@caxislength pt=0pt\else
20340 \def\@cl{%
20341 \POE@key@caxislength\space
20342 \ifPOE@caxisinv -1 mul\space\fi
20343 }%
20344 \psline[style=CrystalCaxis](! 0 \@cl \POE@dict{sign} \@ht mul)%
20345 (! 0 \@cl \POE@dict{sign} neg \@ht mul \@cl sub)%
20346 \fi
20347 \ignorespaces}%
20348 % \end{macrocode}
20349 % \end{macro}
20350 %
20351 % \begin{macro}{\crystal@lamp}
20352 % \begin{macrocode}
20353 \def\crystal@lamp{%
20354 \pscurve[fillstyle=none](-0.015, 0)(-0.03, -0.045)(-0.06, -0.075)%
20355 (-0.075, -0.15)(0, -0.21)(0.075, -0.15)(0.06, -0.075)%
20356 (0.03, -0.045)(0.015, 0)
20357 \multido{\i=-30+40}{7}{%
20358 \rput{\i}(0, -0.135){%
20359 \psline(-0.105, 0)(-0.18, 0)
20360 }%
20361 }%
20362 \ignorespaces}%
20363 % \end{macrocode}
20364 % \end{macro}
20365 %
20366 % \subsubsection{polarization}
20367 %
20368 % \begin{macro}{\polarization@comp}
20369 % \begin{macrocode}
20370 \def\polarization@comp{%
20371 \edef\@sz{\POE@key@polsize\space 0.5 mul }%
20372 \psset{style=Polarization}%
20373 \ifx\POE@key@poltype\POE@str@parallel
20374 \psline[arrows=<->](! 0 \@sz neg)(! 0 \@sz)
20375 \fi
20376 \ifx\POE@key@poltype\POE@str@perp
20377 \psdot(0,0)
20378 \pscircle[fillstyle=none](0,0){0.12}
20379 \fi
20380 \ifx\POE@key@poltype\POE@str@misc
20381 \psline[arrows=<->](! 0 \@sz neg)(! 0 \@sz)
20382 \psdot(0,0)
20383 \pscircle[fillstyle=none](0,0){0.12}
20384 \fi
20385 \ifx\POE@key@poltype\POE@str@rcirc
20386 \psellipticarc[fillstyle=none, arrows=->]%
20387 (0,0)(! \@sz 2 div \@sz){20}{-20}
20388 \fi
20389 \ifx\POE@key@poltype\POE@str@lcirc
20390 \psellipticarc[fillstyle=none, arrows=<-]%
20391 (0,0)(! \@sz 2 div \@sz){20}{-20}
20392 \fi
20393 \ignorespaces}%
20394 % \end{macrocode}
20395 % \end{macro}
20396 %
20397 % \subsubsection{optgrating}
20398 %
20399 % \begin{macro}{\optgrating@ref}
20400 % \begin{macrocode}
20401 \def\optgrating@ref{%
20402 \POE@setref{/@@x \POE@key@gratingwidth\space 0.5 mul def}%
20403 }%
20404 % \end{macrocode}
20405 % \end{macro}
20406 %
20407 % \begin{macro}{\optgrating@comp}
20408 % \begin{macrocode}
20409 \def\optgrating@comp{%
20410 \edef\@cnt{\POE@key@gratingcount\space}%
20411 \edef\@wd{\POE@key@gratingwidth\space 0.5 mul }%
20412 \ifdim\POE@key@gratingheight pt<\POE@key@gratingdepth pt
20413 \edef\@ht{\POE@key@gratingdepth\space}%
20414 \else
20415 \edef\@ht{\POE@key@gratingheight\space}%
20416 \fi
20417 % \end{macrocode}
20418 % Shift the grating by its depth if gratingalign is set to 'center'.
20419 % \begin{macrocode}
20420 \ifx\POE@key@gratingalign\POE@str@top
20421 \edef\@dp{\POE@key@gratingdepth\space}%
20422 \edef\@bl{0 }%
20423 \else
20424 \edef\@dp{0 }%
20425 \edef\@bl{\POE@key@gratingdepth\space neg }%
20426 \edef\@ht{\@ht \POE@key@gratingdepth\space sub }%
20427 \fi
20428 \edef\@step{\POE@key@gratingwidth\space\@cnt div }%
20429 \ifx\POE@key@gratingtype\POE@str@blazed
20430 \pscustom[linewidth=\POE@key@gratinglinewidth, linejoin=1]{%
20431 \psline[liftpen=1](! \@wd \@dp)(! \@wd \@ht)%
20432 (! \@wd neg \@ht)(! \@wd neg \@dp)%
20433 \multido{\i=0+1}{\POE@key@gratingcount}{%
20434 \psline[liftpen=1]%
20435 (! \@wd neg \i\space \@step mul add \@dp)%
20436 (! \@wd neg \i\space
20437 \ifPOE@reverse\else 1 add \fi \@step mul add \@bl)%
20438 (! \@wd neg \i\space 1 add \@step mul add \@dp)%
20439 }%
20440 \closepath
20441 }%
20442 \else\ifx\POE@key@gratingtype\POE@str@binary
20443 \pscustom[linewidth=\POE@key@gratinglinewidth, linejoin=1]{%
20444 \psline[liftpen=1](! \@wd \@dp)(! \@wd \@ht)%
20445 (! \@wd neg \@ht)(! \@wd neg \@dp)%
20446 \multido{\i=0+1}{\POE@key@gratingcount}{%
20447 \psline[liftpen=1]%
20448 (! \@wd neg \i\space \@step mul add \@dp)%
20449 (! \@wd neg \i\space \@step mul add \@bl)%
20450 (! \@wd neg \i\space 0.5 add \@step mul add \@bl)%
20451 (! \@wd neg \i\space 0.5 add \@step mul add \@dp)%
20452 (! \@wd neg \i\space 1 add \@step mul add \@dp)%
20453 }%
20454 \closepath
20455 }%
20456 \fi\fi
20457 \ifPOE@variable
20458 \psarc[style=VariableStyle]%
20459 (! \POE@key@gratingwidth\space 0.5 mul 0.4 sub
20460 \POE@key@gratingheight\space 0.5 mul){0.6}{-20}{20}
20461 \psarc[style=VariableStyle]%
20462 (! 0.4 \POE@key@gratingwidth\space 0.5 mul sub
20463 \POE@key@gratingheight\space 0.5 mul){0.6}{160}{200}
20464 \fi
20465 \ignorespaces}%
20466 % \end{macrocode}
20467 % \end{macro}
20468 %
20469 % \subsubsection{transmissiongrating}
20470 %
20471 % \begin{macro}{\transmissiongrating@ref}
20472 % \begin{macrocode}
20473 \def\transmissiongrating@ref{%
20474 \POE@calcAngle
20475 \POE@setref{/@@x \POE@key@gratingwidth\space 0.5 mul def}%
20476 \edef\POE@key@angle{%
20477 \POE@dict{ exch@ref@\oenode{}{} { -90 }{ 90 } ifelse }
20478 \POE@key@angle\space add
20479 }%
20480 \POE@Verb{%
20481 @xref @yref
20482 exch@ref@\oenode{}{} {
20483 [ exch { neg } forall ]
20484 } if
20485 /@xref ED
20486 exch@ref@\oenode{}{} {
20487 [ exch { neg } forall ]
20488 } if
20489 /@yref ED
20490 }%
20491 }%
20492 % \end{macrocode}
20493 % \end{macro}
20494 %
20495 % \begin{macro}{\transmissiongrating@nodes}
20496 % \begin{macrocode}
20497 \def\transmissiongrating@nodes{%
20498 \newOptexpComp{%
20499 {0 0} {1 0} \POE@key@gratingwidth\space -0.5 mul dup neg
20500 refltrans {PlainIfc} 1}%
20501 }%
20502 \let\transmissiongrating@comp\optgrating@comp
20503 % \end{macrocode}
20504 % \end{macro}
20505 %
20506 % \subsubsection{optbox}
20507 %
20508 % \begin{macro}{\optbox@ref}
20509 % \begin{macrocode}
20510 \def\optbox@ref{%
20511 \POE@setref{%
20512 /@@x \POE@key@optboxwidth\space 0.5 mul def
20513 /@@y \POE@key@optboxheight\space 0.5 mul def
20514 }%
20515 }%
20516 % \end{macrocode}
20517 % \end{macro}
20518 %
20519 % \begin{macro}{\optbox@comp}
20520 % \begin{macrocode}
20521 \let\optbox@comp\POE@comp@rectangle
20522 % \end{macrocode}
20523 % \end{macro}
20524 %
20525 % \subsubsection{optsource}
20526 %
20527 % \begin{macro}{\optsource@ref}
20528 % \begin{macrocode}
20529 \def\optsource@ref{%
20530 \let\POE@key@optboxwidth\POE@key@sourcewidth
20531 \let\POE@key@optboxheight\POE@key@sourceheight
20532 \optbox@ref
20533 }%
20534 % \end{macrocode}
20535 % \end{macro}
20536 %
20537 % \begin{macro}{\optsource@nodes}
20538 % \begin{macrocode}
20539 \def\optsource@nodes{%
20540 \POE@dipole@nodes
20541 \POE@Verb{%
20542 \oenode{}{} begin
20543 4 dict dup /source exch def begin
20544 \if\POE@key@sourcebeamangle\relax\else
20545 /beamangle \POE@key@sourcebeamangle\space def
20546 \fi
20547 \if\POE@key@sourcebeamdiv\relax\else
20548 /beamdiv \POE@key@sourcebeamdiv\space def
20549 \fi
20550 \if\POE@key@sourcebeamwidth\relax\else
20551 /beamwidth \POE@key@sourcebeamwidth\space def
20552 \fi
20553 \if\POE@key@sourcebeamalign\relax\else
20554 /beamalign \POE@key@sourcebeamalign\space def
20555 \fi
20556 end
20557 source length 0 eq { currentdict /source undef } if
20558 end }%
20559 }%
20560 %
20561 % \begin{macro}{\optsource@comp}
20562 % \begin{macrocode}
20563 \let\optsource@comp\POE@comp@rectangle
20564 % \end{macrocode}
20565 % \end{macro}
20566 %
20567 % \subsubsection{optplate}
20568 %
20569 % \begin{macro}{\optplate@ref}
20570 % \begin{macrocode}
20571 \def\optplate@ref{%
20572 \POE@setref{/@@y \POE@key@plateheight\space 0.5 mul def }%
20573 }%
20574 % \end{macrocode}
20575 % \end{macro}
20576 %
20577 % \begin{macro}{\optplate@comp}
20578 % \begin{macrocode}
20579 \def\optplate@comp{%
20580 \psline[linewidth=\POE@key@platelinewidth]%
20581 (! \POE@dict{0 @@y neg})(! \POE@dict{0 @@y})
20582 \ignorespaces}%
20583 % \end{macrocode}
20584 % \end{macro}
20585 %
20586 % \subsubsection{optdetector}
20587 %
20588 % \begin{macro}{\optdetector@ref}
20589 % \begin{macrocode}
20590 \def\optdetector@ref{%
20591 \ifx\POE@key@detsize\@empty
20592 \POE@setref{%
20593 /@@y \POE@key@detheight\space 0.5 mul def
20594 /@@x \POE@key@detwidth\space 0.5 mul def
20595 }%
20596 \else
20597 \POE@setref{%
20598 /@@y \POE@key@detsize\space 0.5 mul def
20599 /@@x \POE@key@detsize\space 0.5 mul
20600 \ifx\POE@key@dettype\POE@str@round 0.5 mul\fi
20601 \space def
20602 }%
20603 \fi
20604 }%
20605 % \end{macrocode}
20606 % \end{macro}
20607 %
20608 % \begin{macro}{\optdetector@nodes}
20609 % \begin{macrocode}
20610 \def\optdetector@nodes{%
20611 \POE@dipole@nodes
20612 \ifx\POE@key@dettype\POE@str@round
20613 \pnode(! \POE@dict{@@x0 @@x -0.2 mul add} 0){\oenodeCenter{}}%
20614 \fi
20615 }%
20616 % \end{macrocode}
20617 % \end{macro}
20618 %
20619 % \begin{macro}{\optdetector@comp}
20620 % \begin{macrocode}
20621 \def\optdetector@comp{%
20622 \ifx\POE@key@dettype\POE@str@round
20623 \psellipticwedge(!\POE@dict{@@x0 @@x sub @@y0})%
20624 (!\POE@dict{@@x 2 mul @@y}){-90}{90}%
20625 \else\ifx\POE@key@dettype\POE@str@diode
20626 \ifx\POE@key@detsize\@empty
20627 \ifdim\POE@key@detwidth pt<\POE@key@detheight pt
20628 \def\@sz{\POE@key@detwidth\space 0.5 mul }%
20629 \else
20630 \def\@sz{\POE@key@detheight\space 0.5 mul }%
20631 \fi
20632 \else
20633 \def\@sz{\POE@key@detsize\space 0.5 mul }%
20634 \fi
20635 \POE@comp@rectangle
20636 \bgroup
20637 \psset{style=DetectorStyle}
20638 \pspolygon(! \@sz -0.2 mul \@sz -0.4 mul)%
20639 (! \@sz 0.6 mul \@sz -0.4 mul)%
20640 (! \@sz 0.2 mul \@sz 0.4 mul)%
20641 \psline(! \@sz -0.2 mul \@sz 0.4 mul \POE@clwh add)%
20642 (! \@sz 0.6 mul \@sz 0.4 mul \POE@clwh add)
20643 \psset{arrows=->, arrowinset=0, arrowscale=0.8}%
20644 \psline(! \@sz -0.8 mul \@sz 0.3 mul)%
20645 (! \@sz -0.3 mul \@sz 0.15 mul)%
20646 \psline(! \@sz -0.8 mul 0)(! \@sz -0.3 mul \@sz -0.15 mul)%
20647 \egroup
20648 \fi\fi
20649 \ignorespaces}%
20650 % \end{macrocode}
20651 % \end{macro}
20652 %
20653 % \begin{macro}{optdetector@conn}
20654 % \begin{macrocode}
20655 \def\optdetector@conn{%
20656 \ifPOE@startbox\else
20657 \ifPOE@beam
20658 \drawbeam[raytrace=false](\oenodeRefA{}){}
20659 \else\ifPOE@fiberin@
20660 \drawfiber@{FiberIn}(\oenodeRefA{}){}
20661 \else\ifPOE@wirein@
20662 \drawwire@{WireIn}(\oenodeRefA{}){}
20663 \fi\fi\fi
20664 \fi
20665 \ifPOE@endbox\else
20666 \ifPOE@wirepresetout@
20667 \drawwire@{WireOut}{}(\oenodeRefB{})
20668 \else\ifPOE@fiberout@
20669 \drawfiber@{FiberOut}{}(\oenodeRefB{})
20670 \fi\fi
20671 \fi
20672 }%
20673 % \end{macrocode}
20674 % \end{macro}
20675 % \subsubsection{optretplate}
20676 %
20677 % \begin{macro}{\optretplate@ref}
20678 % \begin{macrocode}
20679 \def\optretplate@ref{%
20680 \POE@setref{%
20681 /@@y \POE@key@plateheight\space 0.5 mul def
20682 /@@x \POE@key@platewidth\space 0.5 mul def
20683 }%
20684 }%
20685 % \end{macrocode}
20686 % \end{macro}
20687 %
20688 % \begin{macro}{\optretplate@comp}
20689 % \begin{macrocode}
20690 \def\optretplate@comp{%
20691 \edef\@ht{\POE@key@plateheight\space 0.5 mul }%
20692 \edef\@wd{\POE@key@platewidth\space 0.5 mul }%
20693 \psframe(! \@wd neg \@ht neg)(! \@wd \@ht)
20694 \psline{cc-cc}(! \@wd neg \@ht)(! \@wd \@ht neg)
20695 \ignorespaces}%
20696 % \end{macrocode}
20697 % \end{macro}
20698 %
20699 % \subsubsection{optdiode}
20700 %
20701 % \begin{macro}{\optdiode@ref}
20702 % \begin{macrocode}
20703 \def\optdiode@ref{%
20704 \POE@setref{%
20705 \POE@key@optdiodesize\space 0.5 mul dup dup /@@y ED /@@x ED
20706 0.4 mul /@@sz ED
20707 }%
20708 }%
20709 % \end{macrocode}
20710 % \end{macro}
20711 %
20712 % \begin{macro}{\optdiode@comp}
20713 % \begin{macrocode}
20714 \def\optdiode@comp{%
20715 \POE@comp@rectangle
20716 \pspolygon(!\POE@dict{@@sz neg dup})
20717 (!\POE@dict{@@sz neg @@sz})
20718 (!\POE@dict{@@sz 0})
20719 \psline(!\POE@dict{@@sz \POE@clwh add @@sz})%
20720 (!\POE@dict{@@sz \POE@clwh add @@sz neg})
20721 \ignorespaces}%
20722 % \end{macrocode}
20723 % \end{macro}
20724 %
20725 % \subsubsection{doveprism}
20726 %
20727 % \begin{macro}{doveprism@ref}
20728 % \begin{macrocode}
20729 \def\doveprism@ref{%
20730 \POE@setref{/@@x \POE@key@doveprismwidth\space 0.5 mul def
20731 /@@y \POE@key@doveprismheight\space 0.5 mul def}%
20732 }%
20733 % \end{macrocode}
20734 % \end{macro}
20735 % \begin{macro}{\doveprism@nodes}
20736 % \begin{macrocode}
20737 \def\doveprism@nodes{%
20738 \newOptexpComp{%
20739 /@htsq @@y 2 sqrt mul def
20740 {@@x neg @@y add 0} {1 1}
20741 @htsq neg @htsq trans {PlainIfc}
20742 {0 @@y neg} {1 0}
20743 @@x neg dup neg
20744 refl {PlainIfc}
20745 {@@x @@y sub 0} {-1 1}
20746 @htsq neg @htsq trans {PlainIfc}
20747 \POE@key@n true
20748 }%
20749 \ignorespaces}%
20750 % \end{macrocode}
20751 % \end{macro}
20752 %
20753 % \begin{macro}{\doveprism@comp}
20754 % \begin{macrocode}
20755 \def\doveprism@comp{%
20756 \pspolygon(!\POE@dict{@@x neg @@y neg})%
20757 (!\POE@dict{@@x @@y neg})%
20758 (!\POE@dict{@@x @@y 2 mul sub @@y})%
20759 (!\POE@dict{@@y 2 mul @@x sub @@y})
20760 \ignorespaces}%
20761 % \end{macrocode}
20762 % \end{macro}
20763 %
20764 % \subsubsection{glanthompson}
20765 %
20766 % \begin{macro}{\glanthompson@ref}
20767 % \begin{macrocode}
20768 \def\glanthompson@ref{%
20769 \POE@setref{%
20770 /@@x \POE@key@glanthompsonwidth\space 0.5 mul def
20771 /@@y \POE@key@glanthompsonheight\space 0.5 mul def
20772 }%
20773 }%
20774 % \end{macrocode}
20775 % \end{macro}
20776 %
20777 % \begin{macro}{\glanthompson@nodes}
20778 % \begin{macrocode}
20779 \def\glanthompson@nodes{%
20780 \newOptexpCompAmb{%
20781 {@@x neg 0} {0 1} @@x neg @@x trans {PlainIfc}
20782 {@@x 0} {0 1} @@x neg @@x trans {PlainIfc}
20783 {\POE@key@glanthompsongap\space -0.5 mul 0} {@@x neg @@y} 0 0 trans {PlainIfc}
20784 {0 @@y neg} {1 0} @@y neg @@y trans {PlainIfc}
20785 {0 @@y} {1 0} @@y neg @@y trans {PlainIfc}
20786 3 \POE@key@n
20787 }
20788 }%
20789 % \end{macrocode}
20790 % \end{macro}
20791 %
20792 % \begin{macro}{\glanthompson@comp}
20793 % \begin{macrocode}
20794 \def\glanthompson@comp{%
20795 \ifdim\POE@key@glanthompsongap pt>0pt
20796 \pspolygon(!\POE@dict{@@x neg @@y})%
20797 (!\POE@dict{@@x neg @@y neg})%
20798 (!\POE@dict{@@x \POE@key@glanthompsongap\space sub @@y neg})
20799 \pspolygon(!\POE@dict{@@x neg \POE@key@glanthompsongap\space add @@y})%
20800 (!\POE@dict{@@x @@y})%
20801 (!\POE@dict{@@x @@y neg})%
20802 \else
20803 \psframe(!\POE@dict{@@x neg @@y neg})(!\POE@dict{@@x @@y})
20804 \psline[arrows=cc-cc](!\POE@dict{@@x neg @@y})(!\POE@dict{@@x @@y neg})
20805 \fi
20806 }%
20807 % \end{macrocode}
20808 % \end{macro}
20809 % \subsubsection{pentaprism}
20810 %
20811 % \begin{macro}{\pentaprism@nodes}
20812 % \begin{macrocode}
20813 \def\pentaprism@nodes{%
20814 \edef\@sz{\POE@key@pentaprismsize\space}%
20815 \newOptexpComp{%
20816 {\@sz 2 sqrt -2 mul div dup } {-1 1}
20817 \@sz -0.5 mul dup neg trans {PlainIfc}
20818 {\@sz 2 sqrt div 67.5 cos \@sz mul
20819 67.5 sin 2 mul div sub \@sz 2 div}
20820 {67.5 cos \@sz mul 67.5 sin div neg \@sz}
20821 \@sz 22.5 cos div -0.5 mul dup neg refl {PlainIfc}
20822 {\@sz 2 sqrt div neg 67.5 cos \@sz mul
20823 67.5 sin 2 mul div add \@sz 2 div}
20824 {67.5 cos \@sz mul 67.5 sin div \@sz}
20825 \@sz 22.5 cos div -0.5 mul dup neg refl {PlainIfc}
20826 {\@sz 2 sqrt 2 mul div dup neg} {1 1}
20827 \@sz -0.5 mul dup neg trans {PlainIfc}
20828 \POE@key@n
20829 }%
20830 }%
20831 % \end{macrocode}
20832 % \end{macro}
20833 %
20834 % \begin{macro}{\pentaprism@comp}
20835 % \begin{macrocode}
20836 \def\pentaprism@comp{%
20837 \edef\@sz{\POE@key@pentaprismsize\space}%
20838 \pscustom{%
20839 \psline(! \@sz 2 sqrt div 0)%
20840 (! \@sz 2 sqrt div 67.5 cos \@sz mul
20841 67.5 sin div sub \@sz)%
20842 (! 67.5 cos \@sz mul 67.5 sin div \@sz
20843 2 sqrt div sub \@sz)%
20844 (! \@sz 2 sqrt div neg 0)%
20845 (! 0 \@sz 2 sqrt div neg)%
20846 \closepath
20847 }%
20848 }%
20849 % \end{macrocode}
20850 % \end{macro}
20851 %
20852 % \subsubsection{optprism}
20853 %
20854 % \begin{macro}{\optprism@ref}
20855 % \begin{macrocode}
20856 \def\optprism@ref{%
20857 \POE@calcAngle
20858 \ifx\POE@key@prismtype\POE@str@reflective
20859 \edef\POE@key@labelrefangle{180}%
20860 \fi
20861 }%
20862 % \end{macrocode}
20863 % \end{macro}
20864 %
20865 % \begin{macro}{\optprism@nodes}
20866 % \begin{macrocode}
20867 \def\optprism@nodes{%
20868 \edef\@sz{\POE@key@prismsize\space}%
20869 \edef\@ang{\POE@key@prismangle\space 0.5 mul\space}%
20870 \edef\@hshift{%
20871 \ifx\POE@key@prismalign\POE@str@auto
20872 \POE@dict{OEangle} 1e-5 lt {
20873 0
20874 } {
20875 \@sz 0.6 mul \@ang tan mul \POE@dict{OEangle} 0.5 mul tan div
20876 } ifelse
20877 \else
20878 0
20879 \fi
20880 }%
20881 \begingroup
20882 \edef\POE@temp{\ifx\POE@key@prismtype\POE@str@reflective neg \fi}%
20883 \pnode(! 0 \@hshift neg){\oenodeCenter{}}%
20884 \newOptexpComp{%
20885 {\@sz -0.6 mul \@ang tan mul \@hshift neg}
20886 {90 \@ang sub dup cos exch sin \POE@temp}
20887 \@sz \@ang cos div dup -0.4 mul exch 0.6 mul trans {PlainIfc}
20888 {\@sz 0.6 mul \@ang tan mul \@hshift neg}
20889 {90 \@ang add dup cos exch sin \POE@temp}
20890 \@sz \@ang cos div dup -0.4 mul exch 0.6 mul trans {PlainIfc}
20891 % \end{macrocode}
20892 % Need to change the order of the two interfaces on the stack and add an
20893 % additional interface.
20894 % \begin{macrocode}
20895 \ifx\POE@key@prismtype\POE@str@reflective
20896 12 6 roll
20897 {0 \@sz 0.4 mul \@hshift sub }
20898 {1 0} \@ang tan \@sz mul dup neg exch refl {PlainIfc}
20899 12 6 roll
20900 \fi
20901 \POE@key@n true }%
20902 \endgroup
20903 }%
20904 % \end{macrocode}
20905 % \end{macro}
20906 %
20907 % \begin{macro}{\optprism@comp}
20908 % \begin{macrocode}
20909 \def\optprism@comp{%
20910 \edef\@sz{\POE@key@prismsize\space}%
20911 \edef\@altan{\POE@key@prismangle\space 0.5 mul tan }%
20912 \edef\@hshift{%
20913 \ifx\POE@key@prismalign\POE@str@auto
20914 \POE@dict{OEangle} 1e-5 lt {
20915 0
20916 } {
20917 \@sz 0.6 mul \@altan mul \POE@dict{OEangle} 0.5 mul tan div
20918 } ifelse
20919 \else
20920 0
20921 \fi
20922 }%
20923 \edef\POE@temp{\ifx\POE@key@prismtype\POE@str@reflective -1 mul \fi}%
20924 \pspolygon(! \@sz neg \@altan mul \@sz -0.4 mul \POE@temp \@hshift sub)
20925 (! \@sz \@altan mul \@sz -0.4 mul \POE@temp \@hshift sub)
20926 (! 0 \@sz 0.6 mul \POE@temp \@hshift sub)
20927 }%
20928 % \end{macrocode}
20929 % \end{macro}
20930 %
20931 % \subsubsection{rightangleprism}
20932 %
20933 % \begin{macro}{\rightangleprism@ref}
20934 % All tripole components are aligned such, that the x-axis is normal
20935 % to the angle bisector (Winkelhalbierende), but for the right angle
20936 % prism the x-axis must be oriented normal to the bisector
20937 % (Seitenhalbierende). So we must correct for the difference in both
20938 % orientations, which is stored in dOEangle.
20939 % \begin{macrocode}
20940 \def\rightangleprism@ref{%
20941 \POE@calcAngle
20942 \POE@Verb{%
20943 /@htA @myht def
20944 /@OEtrafo {dOEangle matrix rotate dtransform } bind def
20945 }%
20946 % \end{macrocode}
20947 % Correct also the label reference angle for nonsymmetric reference nodes.
20948 % \begin{macrocode}
20949 \let\POE@temp\POE@key@labelrefangle
20950 \edef\POE@key@labelrefangle{\POE@temp \POE@dict{dOEangle add} }%
20951 }%
20952 % \end{macrocode}
20953 % \end{macro}
20954 %
20955 % \begin{macro}{\rightangleprism@nodes}
20956 % \begin{macrocode}
20957 \def\rightangleprism@nodes{%
20958 \edef\@sz{\POE@key@raprismsize\space 0.5 mul }%
20959 \POE@Verb{%
20960 \ifx\POE@key@raprismalign\POE@str@auto
20961 /@corrshift {} bind def
20962 \else
20963 /@corrshift {@htA sub \@sz 0.5 mul add } bind def%
20964 \fi
20965 }%
20966 \newOptexpComp{%
20967 {@htA neg @htA \@sz sub @corrshift @OEtrafo} {1 0 @OEtrafo}
20968 @htA \@sz sub @htA trans {PlainIfc}
20969 {@htA neg 0 @corrshift @OEtrafo} {1 1 @OEtrafo}
20970 @htA 2 sqrt mul dup \@sz 0.5 sqrt div sub exch refl {PlainIfc}
20971 {@htA 0 @corrshift @OEtrafo} {-1 1 @OEtrafo}
20972 @htA 2 sqrt mul dup \@sz 0.5 sqrt div sub exch refl {PlainIfc}
20973 {@htA dup \@sz sub @corrshift @OEtrafo} {1 0 @OEtrafo}
20974 @htA neg \@sz @htA sub trans {PlainIfc}
20975 \POE@key@n
20976 }%
20977 \ignorespaces}%
20978 % \end{macrocode}
20979 % \end{macro}
20980 %
20981 % \begin{macro}{\rightangleprism@comp}
20982 % \begin{macrocode}
20983 \def\rightangleprism@comp{%
20984 \edef\@sz{\POE@key@raprismsize\space 0.5 mul }%
20985 \ifx\POE@key@raprismalign\POE@str@auto
20986 \pspolygon(!\POE@dict{\@sz neg @htA \@sz sub @OEtrafo})
20987 (!\POE@dict{\@sz @htA \@sz sub @OEtrafo})
20988 (! 0 \POE@dict{@htA @OEtrafo})%
20989 \else
20990 \pspolygon(!\POE@dict{\@sz \@sz -0.5 mul @OEtrafo})%
20991 (!\POE@dict{\@sz neg \@sz -0.5 mul @OEtrafo})%
20992 (!\POE@dict{0 \@sz 0.5 mul @OEtrafo})
20993 \fi
20994 \ignorespaces}%
20995 % \end{macrocode}
20996 % \end{macro}
20997 %
20998 % \subsubsection{optaom}
20999 %
21000 % \begin{macro}{\optaom@ref}
21001 % \begin{macrocode}
21002 \def\optaom@ref{%
21003 \POE@setref{/@@x \POE@key@aomwidth\space 0.5 mul def }%
21004 \POE@setref{/@@y \POE@key@aomheight\space 0.5 mul def }%
21005 \POE@calcAngle
21006 \ifx\POE@key@aomalign\POE@str@symmetric\else
21007 \edef\POE@key@angle{\POE@key@angle\space 180 \POE@dict{OEangle} sub 0.5 mul sub }%
21008 \fi
21009 \edef\POE@key@angle{\POE@key@angle\space 180 add }%
21010 }%
21011 % \end{macrocode}
21012 % \end{macro}
21013 %
21014 % \begin{macro}{\optaom@nodes}
21015 % \begin{macrocode}
21016 \def\optaom@nodes{%
21017 \ifodd
21018 \ifx\POE@key@aomalign\POE@str@symmetric
21019 \ifx\POE@key@aomreflalign\POE@str@parallel 1\else 0\fi
21020 \else 0\fi
21021 % \end{macrocode}
21022 %
21023 % A 'parallel' reflection interface is possible only, if the aomalign is
21024 % symmetric, because otherwise it is probable, that the incoming beam is
21025 % parallel to that interface.
21026 % \begin{macrocode}
21027 \newOptexpCompAmb{%
21028 {@@x neg 0} {0 1} @@y neg @@y
21029 trans {PlainIfc}
21030 {0 0}
21031 \ifx\POE@key@aomalign\POE@str@symmetric
21032 {1 0}
21033 \else
21034 {1 0 180 OEangle sub 0.5 mul matrix rotate dtransform}
21035 \fi
21036 0 0 trans {PlainIfc}
21037 {@@x @@y} {0 1} @@y -2 mul 0
21038 trans {PlainIfc}
21039 {@@x @@y neg} {0 1} 0 @@y 2 mul
21040 trans {PlainIfc}
21041 2 1
21042 }%
21043 \else
21044 \newOptexpCompAmb{%
21045 {@@x neg 0} {0 1} @@y neg @@y trans {PlainIfc}
21046 {0 0}
21047 \ifx\POE@key@aomalign\POE@str@symmetric
21048 {0 1}
21049 \else
21050 {0 1 180 OEangle sub 0.5 mul matrix rotate dtransform}
21051 \fi
21052 0 0 refltrans {PlainIfc}
21053 {@@x @@y} {0 1} @@y -2 mul 0
21054 trans {PlainIfc}
21055 {@@x @@y neg} {0 1} 0 @@y 2 mul
21056 trans {PlainIfc}
21057 2 1
21058 }%
21059 \fi
21060 \POE@Verb{%
21061 gsave
21062 tx@Dict begin
21063 STV {CP T} stopped pop
21064 end
21065 (C) (\oenode{}{}) GetPlaneVec 2 copy
21066 /N@\oenodeRefA{} @GetCenter
21067 /N@\oenodeCenter{} @GetCenter
21068 @ABVect 90 matrix rotate dtransform
21069 NormalVec ReflectVec ToVec dup
21070 \oenode{}{} begin
21071 {0 0} exch 0 0 refltrans name (C-1) {PlainIfc} {sc} NewCompIfc
21072 (C) (C1) IfcAlias
21073 2 1 \POE@key@diffractionorders\space {% vec i
21074 2 copy neg dup 5 string cvs (C) exch strcat % vec i vec -i (C-i)
21075 3 -1 roll exec 4 -1 roll % vec i (C-i) X Y -i
21076 1 add 180 OEangle sub 0.5 mul mul
21077 matrix rotate dtransform ToVec % vec i (C-i) {X' Y'}
21078 {0 0} exch 0 0 refltrans name 7 -1 roll {PlainIfc} {sc} NewCompIfc
21079 2 copy 3 -1 roll 5 string cvs (C) exch strcat % vec i vec i (C-i)
21080 3 -1 roll exec 4 -1 roll % vec i (Ci) X Y i
21081 1 add 180 OEangle sub 0.5 mul mul
21082 matrix rotate dtransform ToVec % vec i (Ci) {X' Y'}
21083 {0 0} exch 0 0 refltrans name 7 -1 roll {PlainIfc} {sc} NewCompIfc
21084 } for pop
21085 /grating true def
21086 end
21087 grestore
21088 }%
21089 \POE@saveDiffractionNodes
21090 \ignorespaces}%
21091 % \end{macrocode}
21092 % \end{macro}
21093 %
21094 % \begin{macro}{\optaom@comp}
21095 % \begin{macrocode}
21096 \def\optaom@comp{%
21097 \POE@comp@rectangle
21098 \ifx\POE@key@aomcomp\POE@str@default
21099 \multido{\i=0+1}{\POE@key@aomgratingcount}{%
21100 \psrline(!\POE@dict{@@x -0.7 mul \POE@key@aomgratingcount\space 2 div dup 1.5 add
21101 @@y exch div exch 0.5 sub \i\space sub mul})%
21102 (!\POE@dict{@@x 1.4 mul 0})%
21103 }%
21104 \else
21105 \POE@key@aomcomp
21106 \fi
21107 \ignorespaces}%
21108 % \end{macrocode}
21109 % \end{macro}
21110 %
21111 % \subsubsection{off-axis parabolic mirror}
21112 %
21113 % \begin{macro}{\oapmirror@nodes}
21114 % \begin{macrocode}
21115 \def\oapmirror@nodes{%
21116 \POE@calcAngle
21117 \POE@Verb{%
21118 gsave
21119 STV CP T
21120 /N@\oenodeRefA{} @GetCenter
21121 /N@\oenodeCenter{} @GetCenter
21122 @ABVect NormalizeVec 2 copy
21123 90 matrix rotate dtransform
21124 /N@\oenodeRefB{} @GetCenter
21125 /N@\oenodeCenter{} @GetCenter @ABVect
21126 \tx@UserCoor 2 copy 6 2 roll
21127 grestore
21128 DotProd tx@Dict begin /POEzonalradius ED end
21129 DotProd
21130 % y = ax^2, a = 1/(2x_0^2) (-h + sqrt(h^2 + x_0^2)), x_0 = @zonalradius.
21131 tx@Dict begin
21132 dup /POEoapheight ED neg dup dup mul POEzonalradius dup mul add sqrt add 0.5 POEzonalradius dup mul div mul
21133 dup /POEoappar ED
21134 /POEangle 180 OEangle sub 0.5 mul POEzonalradius 0 gt { -1 mul 180 add } if DegToRad def
21135 end
21136 }%
21137 \def\POE@tempX{((POEoappar*(t^2))-(0.25/POEoappar)+POEoapheight)}%
21138 \def\POE@tempY{(-t+POEzonalradius)}%
21139 \pssavepath[linestyle=none, arrows=-,ArrowInside=-]{\oenode@Path{A}}{%
21140 \psparametricplot[algebraic]%
21141 {POEzonalradius dup 0 gt {\POE@key@oapmirroraperture@outer}{\POE@key@oapmirroraperture@inner} ifelse add}%
21142 {POEzonalradius dup 0 gt {\POE@key@oapmirroraperture@inner}{\POE@key@oapmirroraperture@outer} ifelse sub}%
21143 {(cos(POEangle)*\POE@tempX+sin(POEangle)*\POE@tempY)|(cos(POEangle)*\POE@tempY-sin(POEangle)*\POE@tempX)}}%
21144 \newOptexpComp{%
21145 {0 0} tx@IntersectDict /\PIT@name{\oenode@Path{A}} get 0 0 refl {PathIfc}
21146 1 }%
21147 \ignorespaces}%
21148 % \end{macrocode}
21149 % \end{macro}
21150 %
21151 % \begin{macro}{\oapmirror@comp}
21152 % \begin{macrocode}
21153 \def\oapmirror@comp{%
21154 \pstracecurve{\oenode@Path{A}}%
21155 \ignorespaces}%
21156 % \end{macrocode}
21157 % \end{macro}
21158 %
21159 % \subsubsection{Axicon}
21160 %
21161 % \begin{macro}{axicon@nodes}
21162 % \begin{macrocode}
21163 \def\axicon@nodes{%
21164 \POE@setref{%
21165 /@@right \POE@key@axiconheight\space 0.5 mul \POE@key@axiconangle\space dup sin exch cos div mul def
21166 @@right \POE@key@axiconwidth\space max 0.5 mul /@@x exch def
21167 /@@y \POE@key@axiconheight\space 0.5 mul def
21168 /@@right
21169 }%
21170 \pssavepath[linestyle=none, arrows=-,ArrowInside=-]{\oenode@Path{A}}{%
21171 \psline(!\POE@dict{@@x @@right sub @@y})
21172 (!\POE@dict{@@x 0})
21173 (!\POE@dict{@@x @@right sub @@y neg})
21174 }%
21175 \newOptexpComp{%
21176 {@@x neg 0} {0 1} @@y neg @@y trans {PlainIfc}
21177 {@@x 0}
21178 tx@IntersectDict /\PIT@name{\oenode@Path{A}} get 0 0 trans {PathIfc}
21179 \POE@key@n }%
21180 }%
21181 % \end{macrocode}
21182 % \end{macro}
21183 %
21184 % \begin{macro}{axicon@comp}
21185 % \begin{macrocode}
21186 \def\axicon@comp{%
21187 \pspolygon[arrows=-]%
21188 (!\POE@dict{@@x neg @@y})(!\POE@dict{@@x @@right sub @@y})
21189 (!\POE@dict{@@x 0})(!\POE@dict{@@x @@right sub @@y neg})
21190 (!\POE@dict{@@x neg @@y neg})
21191 %(!\POE@key@axiconwidth\space neg \POE@key@axiconheight\space -0.5 mul)
21192 %(!\POE@key@axiconwidth\space neg \POE@key@axiconheight\space 0.5 mul)
21193 %(! 0 \POE@key@axiconheight\space 0.5 mul)
21194 %(! \POE@key@axiconheight\space 0.5 mul \POE@key@axiconangle\space tan mul 0)
21195 %(! 0 \POE@key@axiconheight\space -0.5 mul)
21196 }%
21197 % \end{macrocode}
21198 % \end{macro}
21199 %
21200 % \subsubsection{optwedge}
21201 %
21202 % \begin{macro}{optwedge@nodes}
21203 % \begin{macrocode}
21204 \def\optwedge@nodes{%
21205 \POE@Verb{%
21206 /@@xl \POE@key@wedgeheight\space \POE@key@wedgeangleleft\space tan mul def
21207 /@@xr \POE@key@wedgeheight\space \POE@key@wedgeangleright\space tan mul def
21208 /@@xa \POE@key@wedgewidth\space @@xl @@xr add sub dup 0 gt {0.5 mul}{pop 0} ifelse def
21209 }%
21210 \newOptexpComp{%
21211 {@@xl @@xa add -0.5 mul 0} {\POE@key@wedgeangleleft\space tan 1} 0 0 trans {PlainIfc}
21212 {@@xr @@xa add 0.5 mul 0} {\POE@key@wedgeangleright\space tan -1} 0 0 trans {PlainIfc}
21213 \POE@key@n }%
21214 }%
21215 % \end{macrocode}
21216 % \end{macro}
21217 %
21218 % \begin{macro}{optwedge@comp}
21219 % \begin{macrocode}
21220 \def\optwedge@comp{%
21221 \pspolygon[arrows=-](!\POE@dict{@@xa} \POE@key@wedgeheight\space 0.5 mul)
21222 (!\POE@dict{@@xa @@xr} add \POE@key@wedgeheight\space -0.5 mul)
21223 (!\POE@dict{@@xa @@xl} add neg \POE@key@wedgeheight\space -0.5 mul)
21224 (!\POE@dict{@@xa} neg \POE@key@wedgeheight\space 0.5 mul)
21225 }%
21226 % \end{macrocode}
21227 % \end{macro}
21228 %
21229 % \subsection{Fiber components}
21230 %
21231 % \subsubsection{optfiber}
21232 %
21233 % \begin{macro}{optfiber@ref}
21234 % \begin{macrocode}
21235 \def\optfiber@ref{%
21236 \POE@setref{%
21237 /@@x \POE@key@fiberloopsep\space\POE@key@fiberloops\space
21238 1 sub mul 0.5 mul def
21239 }%
21240 }%
21241 % \end{macrocode}
21242 % \end{macro}
21243 % \begin{macro}{\optfiber@nodes}
21244 % \begin{macrocode}
21245 \def\optfiber@nodes{%
21246 \newOptexpFiberComp{{@@x neg 0} {@@x 0}}%
21247 \ignorespaces}%
21248 % \end{macrocode}
21249 % \end{macro}
21250 %
21251 % \begin{macro}{\optfiber@comp}
21252 % \begin{macrocode}
21253 \def\optfiber@comp{%
21254 \pscustom[style=Fiber, arrows=-]{%
21255 \multido{\i=0+1}{\POE@key@fiberloops}{%
21256 \parametricplot[liftpen=1, plotpoints=100]{0}{1}{%
21257 t 360 mul sin 1 t 360 mul cos sub
21258 \POE@key@fiberloopradius\space dup 3 1 roll mul 3 1 roll mul
21259 \POE@key@fiberloops\space 1 sub -2 div \i\space add
21260 \POE@key@fiberloopsep\space mul add exch
21261 }%
21262 }%
21263 }%
21264 \ignorespaces}%
21265 % \end{macrocode}
21266 % \end{macro}
21267 %
21268 % \subsubsection{optmzm}
21269 %
21270 % \begin{macro}{\optmzm@ref}
21271 % \begin{macrocode}
21272 \def\optmzm@ref{%
21273 \POE@setref{%
21274 /@@x \POE@key@optmzmwidth\space 0.5 mul def
21275 /@@y \POE@key@optmzmheight\space 0.5 mul def
21276 }%
21277 }%
21278 % \end{macrocode}
21279 % \end{macro}
21280 %
21281 % \begin{macro}{\optmzm@comp}
21282 % \begin{macrocode}
21283 \def\optmzm@comp{%
21284 \POE@comp@rectangle
21285 \begingroup
21286 \POE@usefiberorwirestyle
21287 \psline(! \POE@dict{@@x} neg 0)(! \POE@dict{@@x} -0.7 mul 0)%
21288 (! \POE@dict{@@x} -0.4 mul \POE@dict{@@y} 0.6 mul)%
21289 (! \POE@dict{@@x 0.4 mul @@y 0.6 mul})%
21290 (! \POE@dict{@@x} 0.7 mul 0)(! \POE@dict{@@x} 0)%
21291 (! \POE@dict{@@x} 0.7 mul 0)%
21292 (! \POE@dict{@@x 0.4 mul @@y -0.6 mul})%
21293 (! \POE@dict{@@x -0.4 mul @@y -0.6 mul})%
21294 (! \POE@dict{@@x} -0.7 mul 0)%
21295 \endgroup
21296 \ignorespaces}%
21297 % \end{macrocode}
21298 % \end{macro}
21299 %
21300 % \subsubsection{optfilter}
21301 %
21302 % \begin{macro}{\optfilter@ref}
21303 % \begin{macrocode}
21304 \def\optfilter@ref{%
21305 \POE@setref{%
21306 \POE@key@filtersize\space 0.5 mul dup /@@y ED /@@x ED
21307 \ifx\POE@key@innercompalign\POE@str@absolute\else
21308 /@@ang \POE@key@filterangle\space def
21309 \fi
21310 }%
21311 }%
21312 \let\optfilter@nodes\POE@dipole@nodes
21313 % \end{macrocode}
21314 % \end{macro}
21315 %
21316 % \begin{macro}{\optfilter@comp}
21317 % \begin{macrocode}
21318 \def\optfilter@comp{%
21319 \def\POE@filter@curve{%
21320 \parametricplot[plotstyle=curve,arrows=-]{-1}{1}{%
21321 \POE@dict{@@x} dup t mul 0.7 mul exch t Pi mul RadtoDeg
21322 90 add cos 0.2 mul mul}%
21323 }%
21324 \def\POE@strike@line{%
21325 \psline(!\POE@dict{@@x -0.3 mul @@y -0.15 mul})%
21326 (!\POE@dict{@@x 0.3 mul @@y 0.15 mul})
21327 }%
21328 \POE@comp@rectangle
21329 \psrotate(\oenodeCenter{}){!\POE@dict{@@ang}}{%
21330 \psset{style=FilterStyle}%
21331 \ifx\POE@key@filtertype\POE@str@bandpass
21332 \rput(!\POE@dict{0 @@x -0.5 mul}){\POE@strike@line\POE@filter@curve}
21333 \rput(0, 0){%
21334 \POE@usefiberorwirestyle
21335 \POE@filter@curve}
21336 \rput(!\POE@dict{0 @@x 0.5 mul}){\POE@strike@line\POE@filter@curve}
21337 \else\ifx\POE@key@filtertype\POE@str@bandstop
21338 \begingroup
21339 \POE@usefiberorwirestyle
21340 \rput(!\POE@dict{0 @@x -0.5 mul}){\POE@filter@curve}
21341 \rput(!\POE@dict{0 @@x 0.5 mul}){\POE@filter@curve}
21342 \endgroup
21343 \rput(0,0){\POE@strike@line\POE@filter@curve}
21344 \else\ifx\POE@key@filtertype\POE@str@lowpass
21345 \rput(!\POE@dict{0 @@x -0.5 mul}){%
21346 \POE@usefiberorwirestyle
21347 \POE@filter@curve}
21348 \rput(0, 0){\POE@strike@line\POE@filter@curve}
21349 \rput(!\POE@dict{0 @@x 0.5 mul}){\POE@strike@line\POE@filter@curve}
21350 \else\ifx\POE@key@filtertype\POE@str@highpass
21351 \rput(!\POE@dict{0 @@x 0.5 mul}){%
21352 \POE@usefiberorwirestyle
21353 \POE@filter@curve}
21354 \rput(0, 0){\POE@strike@line\POE@filter@curve}
21355 \rput(!\POE@dict{0 @@x -0.5 mul}){\POE@strike@line\POE@filter@curve}
21356 \fi\fi\fi\fi
21357 }%
21358 \ignorespaces}%
21359 % \end{macrocode}
21360 % \end{macro}
21361 %
21362 %\subsubsection{optamp}
21363 %
21364 % \begin{macro}{optamp@ref}
21365 % \begin{macrocode}
21366 \def\optamp@ref{%
21367 \POE@setref{%
21368 /@@x \POE@key@optampwidth\space 0.5 mul def
21369 /@@y \POE@key@optampheight\space 0.5 mul def
21370 }%
21371 }%
21372 % \end{macrocode}
21373 % \end{macro}
21374 % \begin{macro}{\optamp@nodes}
21375 % \begin{macrocode}
21376 \def\optamp@nodes{%
21377 \newOptexpFiberComp{{@@x neg 0} {@@x 0}}%
21378 }%
21379 % \end{macrocode}
21380 % \end{macro}
21381 %
21382 % \begin{macro}{\optamp@comp}
21383 % \begin{macrocode}
21384 \def\optamp@comp{%
21385 \pspolygon(!\POE@dict{@@x 0})%
21386 (!\POE@dict{@@x neg @@y})%
21387 (!\POE@dict{@@x neg @@y neg})
21388 }%
21389 % \end{macrocode}
21390 % \end{macro}
21391 %
21392 %\subsubsection{polcontrol}
21393 %
21394 % \begin{macro}{polcontrol@ref}
21395 % \begin{macrocode}
21396 \def\polcontrol@ref{%
21397 \ifx\POE@key@polcontroltype\POE@str@linear
21398 \POE@setref{/@@x \POE@key@polcontrolsize\space 2 mul def}%
21399 \else
21400 \POE@setref{/@@x \POE@key@polcontrolsize\space 1.5 mul def}%
21401 \fi
21402 }%
21403 % \end{macrocode}
21404 % \end{macro}
21405 % \begin{macro}{\polcontrol@nodes}
21406 % \begin{macrocode}
21407 \def\polcontrol@nodes{%
21408 \newOptexpFiberComp{{@@x neg 0} {@@x 0}}%
21409 }%
21410 % \end{macrocode}
21411 % \end{macro}
21412 %
21413 % \begin{macro}{\polcontrol@comp}
21414 % \begin{macrocode}
21415 \def\polcontrol@comp{%
21416 \edef\@sz{\POE@key@polcontrolsize\space}%
21417 \ifPOE@optexpenv
21418 \psline[style=Fiber, arrows=-, ArrowInside=-](\oenodeIn{})(\oenodeOut{})
21419 \fi
21420 \bgroup
21421 \POE@usefiberorwirestyle
21422 \ifx\POE@key@polcontroltype\POE@str@linear
21423 \multips(! -2 \@sz mul \@sz)(! 2 \@sz mul 0){3}{%
21424 \pscircle(0,0){\POE@key@polcontrolsize}%
21425 }%
21426 \else
21427 \pscircle(! -1.5 \@sz mul \@sz neg){\POE@key@polcontrolsize}
21428 \pscircle(! 0 \@sz){\POE@key@polcontrolsize}%
21429 \pscircle(! 1.5 \@sz mul \@sz neg){\POE@key@polcontrolsize}
21430 \fi
21431 \egroup
21432 \ifPOE@optexpenv\else
21433 \psline[style=Fiber, arrows=-, ArrowInside=-](\oenodeIn{})(\oenodeOut{})
21434 \fi
21435 \ignorespaces}%
21436 % \end{macrocode}
21437 % \end{macro}
21438 %
21439 % \subsubsection{optisolator}
21440 %
21441 % \begin{macro}{\optisolator@ref}
21442 % \begin{macrocode}
21443 \def\optisolator@ref{%
21444 \POE@setref{%
21445 /@@x \POE@key@isolatorwidth\space 0.5 mul def
21446 /@@y \POE@key@isolatorheight\space 0.5 mul def
21447 }%
21448 }%
21449 % \end{macrocode}
21450 % \end{macro}
21451 %
21452 % \begin{macro}{\optisolator@comp}
21453 % \begin{macrocode}
21454 \def\optisolator@comp{%
21455 \POE@comp@rectangle
21456 \psline[style=IsolatorArrow, arrows=->]%
21457 (!\POE@dict{@@x neg 0.6 mul 0})%
21458 (!\POE@dict{@@x 0.6 mul 0})
21459 \ignorespaces}%
21460 % \end{macrocode}
21461 % \end{macro}
21462 %
21463 % \subsubsection{optfiberpolarizer}
21464 % \begin{macro}{\optfiberpolarizer@ref}
21465 % \begin{macrocode}
21466 \def\optfiberpolarizer@ref{%
21467 \POE@setref{%
21468 /@@x \POE@key@fiberpolwidth\space 0.5 mul def
21469 /@@y \POE@key@fiberpolheight\space 0.5 mul def
21470 }%
21471 }%
21472 % \end{macrocode}
21473 % \end{macro}
21474 %
21475 % \begin{macro}{\optfiberpolarizer@comp}
21476 % \begin{macrocode}
21477 \def\optfiberpolarizer@comp{%
21478 \POE@comp@rectangle
21479 \psline(!\POE@dict{@@x -0.2 mul @@y neg})(!\POE@dict{@@x 0.2 mul @@y})
21480 \ignorespaces}%
21481 % \end{macrocode}
21482 % \end{macro}
21483 %
21484 % \subsubsection{optswitch}
21485 %
21486 % \begin{macro}{\optswitch@ref}
21487 % \begin{macrocode}
21488 \def\optswitch@ref{%
21489 \POE@setref{%
21490 /@@x \POE@key@switchwidth\space 0.5 mul def
21491 /@@y \POE@key@switchheight\space 0.5 mul def
21492 }%
21493 }%
21494 % \end{macrocode}
21495 % \end{macro}
21496 %
21497 % \begin{macro}{\optswitch@comp}
21498 % \begin{macrocode}
21499 \def\optswitch@comp{%
21500 \POE@comp@rectangle
21501 % \end{macrocode}
21502 % storing the linewidth of the object allows for some aesthetic fine tuning
21503 % \begin{macrocode}
21504 \pstVerb{tx@Dict begin /@lw \POE@clw def end}%
21505 \bgroup
21506 \POE@usefiberorwirestyle
21507 \psset{arrows=-, ArrowInside=-}%
21508 \psline(! \POE@dict{@@x} neg 0)(! \POE@dict{@@x} -0.6 mul @lw sub 0)%
21509 \psline(! \POE@dict{@@x} 0.6 mul 0)(! \POE@dict{@@x} 0)%
21510 \egroup
21511 \ifx\POE@key@switchstyle\POE@str@closed%
21512 \bgroup
21513 \POE@usefiberorwirestyle
21514 \psdot[dotsize=3\pslinewidth](! \POE@dict{@@x} 0.6 mul 0)%
21515 \psdot[dotsize=3\pslinewidth](! \POE@dict{@@x} -0.6 mul 0)%
21516 \psline[arrows=-, ArrowInside=-, linewidth=1.5\pslinewidth]%
21517 (! \POE@dict{@@x} -0.6 mul @lw)(! \POE@dict{@@x} 0.6 mul @lw)%
21518 \egroup
21519 \else
21520 \psline[arrows=-, ArrowInside=-, linewidth=1.5\pslinewidth]%
21521 (! \POE@dict{@@x} -0.6 mul @lw add @lw 0.5 mul)%
21522 (! \POE@dict{@@x 0.45 mul @@y 0.6 mul})%
21523 \pscircle(! \POE@dict{@@x} -0.6 mul 0){\pslinewidth}%
21524 \psdot[dotsize=3\pslinewidth](! \POE@dict{@@x} 0.6 mul 0)%
21525 \fi
21526 \ignorespaces}%
21527 % \end{macrocode}
21528 % \end{macro}
21529 %
21530 % \subsubsection{fiberdelayline}
21531 %
21532 % \begin{macro}{\fiberdelayline@ref}
21533 % \begin{macrocode}
21534 \def\fiberdelayline@ref{%
21535 \POE@setref{%
21536 /@@y \POE@key@fdlheight\space 0.5 mul def
21537 /@@x \POE@key@fdlwidth\space 0.5 mul def
21538 }%
21539 }%
21540 % \end{macrocode}
21541 % \end{macro}
21542 % \begin{macrocode}
21543 \def\POE@get@yarrowscale#1 #2 #3 #4\@nil{%
21544 \def\POE@tempA{#3\space}%
21545 }%
21546 % \end{macrocode}
21547 % \begin{macro}{\fiberdelayline@comp}
21548 % \begin{macrocode}
21549 \def\fiberdelayline@comp{%
21550 \POE@comp@rectangle
21551 \begingroup
21552 \psset{style=FdlArrow}
21553 \use@par
21554 \pst@expandafter\POE@get@yarrowscale{\psk@arrowscale}\@nil
21555 \def\@arrowshift{%
21556 \psk@arrowlength\space \psk@arrowsize\space
21557 \pst@number\pslinewidth\space mul add mul
21558 \POE@tempA mul
21559 @@y 2.9 mul @@x 0.6 mul atan 2 copy cos mul 3 1 roll sin mul
21560 \tx@UserCoor abs exch abs exch\space
21561 }%
21562 \psline(! \POE@dict{@@x -0.4 mul @@y -1.6 mul})%
21563 (! \POE@dict{@@x 0.2 mul @@y 1.3 mul \@arrowshift VecAdd})
21564 \endgroup
21565 \ignorespaces}%
21566 % \end{macrocode}
21567 % \end{macro}
21568 %
21569 % \begin{macrocode}
21570 \newOptexpDipole{optarrowcomp}{}
21571 \def\optarrowcomp@ref{%
21572 \POE@setref{%
21573 \ifx\POE@key@arrowcompshape\POE@str@rectangle
21574 /@@x \POE@key@arrowcompwidth\space 0.5 mul def
21575 /@@y \POE@key@arrowcompheight\space 0.5 mul def
21576 \else
21577 \POE@key@arrowcompwidth\space\POE@key@arrowcompheight\space
21578 min 0.5 mul dup /@@x ED /@@y ED
21579 \fi
21580 \POE@key@arrowcompangle\space dup 0 gt {
21581 { dup 180 ge { 180 sub } { exit } ifelse } loop
21582 } {
21583 { dup 0 lt { 180 add } { exit } ifelse } loop
21584 } ifelse dup /@arrowangle ED dup dup
21585 @@y @@x atan gt exch @@y @@x neg atan lt and {
21586 /@@dy @@y def
21587 tan @@y exch div /@@dx ED
21588 }{
21589 /@@dx @@x def
21590 tan @@x mul /@@dy ED
21591 } ifelse
21592 }%
21593 }%
21594 \def\optarrowcomp@comp{%
21595 \ifx\POE@key@arrowcompshape\POE@str@rectangle
21596 \POE@comp@rectangle
21597 \else
21598 \pscircle(!\POE@dict{@@x0 @@y0}){!\POE@dict{@@x}}
21599 \fi
21600 \begingroup
21601 % \end{macrocode}
21602 % Set the style and execute the options directly, so we can use the correct
21603 % arrowscale and linewidth for the calculations.
21604 % \begin{macrocode}
21605 \psset{style=ArrowCompStyle}
21606 \use@par
21607 \pst@expandafter\POE@get@yarrowscale{\psk@arrowscale}\@nil
21608 \def\@arrowshift{%
21609 \psk@arrowlength\space \psk@arrowsize\space
21610 \pst@number\pslinewidth\space mul add mul
21611 \POE@tempA mul
21612 @arrowangle 2 copy cos mul 3 1 roll sin mul
21613 \tx@UserCoor\space
21614 }%
21615 \ifx\POE@key@arrowcompshape\POE@str@rectangle
21616 \psline(!\POE@dict{@@dx -1.5 mul @@dy -1.5 mul})%
21617 (!\POE@dict{@@dx 1.3 mul @@dy 1.3 mul \@arrowshift VecAdd})
21618 \else
21619 \psline(!\POE@dict{@arrowangle dup cos @@x -1.5 mul mul exch sin @@x -1.5 mul mul})
21620 (!\POE@dict{@arrowangle dup cos @@x 1.3 mul mul exch sin @@x 1.3 mul mul \@arrowshift VecAdd})
21621 \fi
21622 \endgroup
21623 \ignorespaces}%
21624 % \end{macrocode}
21625 %
21626 % \begin{macrocode}
21627 \newOptexpDipole{optbarcomp}{}
21628 \def\optbarcomp@ref{%
21629 \POE@setref{%
21630 \ifx\POE@key@barcompshape\POE@str@rectangle
21631 /@@x \POE@key@barcompwidth\space 0.5 mul def
21632 /@@y \POE@key@barcompheight\space 0.5 mul def
21633 \else
21634 \POE@key@barcompwidth\space\POE@key@barcompheight\space
21635 min 0.5 mul dup /@@x ED /@@y ED
21636 \fi
21637 \POE@key@barcompangle\space dup 0 gt {
21638 { dup 180 ge { 180 sub } { exit } ifelse } loop
21639 } {
21640 { dup 0 lt { 180 add } { exit } ifelse } loop
21641 } ifelse dup /@barangle ED dup dup
21642 @@y @@x atan gt exch @@y @@x neg atan lt and {
21643 /@@dy @@y def
21644 tan @@y exch div /@@dx ED
21645 }{
21646 /@@dx @@x def
21647 tan @@x mul /@@dy ED
21648 } ifelse
21649 }%
21650 }%
21651 \def\optbarcomp@comp{%
21652 \ifx\POE@key@barcompshape\POE@str@rectangle
21653 \POE@comp@rectangle
21654 \psline[style=BarCompStyle](!\POE@dict{ @@dx neg @@dy neg })%
21655 (!\POE@dict{@@dx @@dy})
21656 \else
21657 \pscircle(!\POE@dict{@@x0 @@y0}){!\POE@dict{@@x}}
21658 \psline[style=BarCompStyle]%
21659 (!\POE@dict{@barangle dup cos @@x neg mul exch sin @@x neg mul})
21660 (!\POE@dict{@barangle dup cos @@x mul exch sin @@x mul})
21661 \fi
21662 \ignorespaces}%
21663 % \end{macrocode}
21664 %
21665 %
21666 % \subsubsection{fiberbox}
21667 % \begin{macro}{fiberbox@ref}
21668 % \begin{macrocode}
21669 \def\fiberbox@ref{%
21670 \POE@setref{%
21671 /@@x \POE@key@fiberboxwidth\space 0.5 mul def
21672 @@inht 0 eq @@outht 0 eq and {
21673 /@@inht \POE@key@fiberboxcountin\space\POE@key@fiberboxsepin\space mul def
21674 /@@outht \POE@key@fiberboxcountout\space\POE@key@fiberboxsepout\space mul def
21675 } if
21676 @@inht \POE@key@fiberboxcountin\space dup 1 add 3 1 roll div mul
21677 @@outht \POE@key@fiberboxcountout\space dup 1 add 3 1 roll div mul
21678 max
21679 \POE@key@fiberboxheight\space dup @@inht @@outht max gt {
21680 exch
21681 } if pop 0.5 mul /@@y exch def
21682 }%
21683 }%
21684 % \end{macrocode}
21685 % \end{macro}
21686 % \begin{macro}{\fiberbox@nodes}
21687 % \begin{macrocode}
21688 \def\fiberbox@nodes{%
21689 \newOptexpFiberComp{%
21690 0 1 \POE@key@fiberboxcountin\space 1 sub {
21691 \POE@key@fiberboxcountin\space 1 sub 0.5 mul dup 3 -1 roll sub exch
21692 0 gt {
21693 @@inht \POE@key@fiberboxcountin\space 1 sub div mul
21694 } if
21695 @@x neg exch ToVec
21696 } for
21697 0 1 \POE@key@fiberboxcountout\space 1 sub {
21698 \POE@key@fiberboxcountout\space 1 sub 0.5 mul dup 3 -1 roll sub exch
21699 0 gt {
21700 @@outht \POE@key@fiberboxcountout\space 1 sub div mul
21701 } if
21702 @@x exch ToVec
21703 } for
21704 }
21705 }%
21706 \let\fiberbox@comp\POE@comp@rectangle
21707 % \end{macrocode}
21708 % \end{macro}
21709 %
21710 %
21711 % \subsubsection{optcoupler}
21712 % \begin{macro}{\optcoupler@nodes}
21713 % \begin{macrocode}
21714 \def\optcoupler@nodes{%
21715 \newOptexpFiberComp{%
21716 {@@x neg @@y0 @@sep add}
21717 {@@x neg @@y0 @@sep sub}
21718 {@@x @@y0 @@sep add}
21719 {@@x @@y0 @@sep sub} }%
21720 \pnode(0,0){\oenodeCenter{}}
21721 }%
21722 % \end{macrocode}
21723 % \end{macro}
21724 %
21725 % \begin{macro}{\POE@coupler@ref}
21726 % \begin{macrocode}
21727 \def\POE@coupler@ref{%
21728 \POE@setref{%
21729 /@@x \POE@key@couplerwidth\space 0.5 mul def
21730 \ifx\POE@key@couplertype\POE@str@none
21731 \ifx\POE@key@couplersep\@empty
21732 /@@y \POE@key@couplerheight\space 0.5 mul 0.05 0.2 0.8 mul div mul def
21733 \else
21734 /@@y \POE@key@couplersep\space 0.5 mul def
21735 \fi
21736 /@@sep @@y def
21737 \else
21738 /@@y \POE@key@couplerheight\space 0.5 mul def
21739 \ifx\POE@key@couplersep\@empty
21740 \ifx\POE@key@couplertype\POE@str@ellipse
21741 /@@sep @@y 0.05 0.2 0.8 mul div mul def
21742 \else
21743 /@@sep @@y 0.5 mul def
21744 \fi
21745 \else
21746 /@@sep \POE@key@couplersep\space 0.5 mul def
21747 \fi
21748 \fi
21749 /@@y0 @@sep
21750 \ifx\POE@key@coupleralign\POE@str@bottom
21751 \else\ifx\POE@key@coupleralign\POE@str@top
21752 neg
21753 \else
21754 pop 0
21755 \fi\fi
21756 def
21757 }%
21758 }%
21759 % \end{macrocode}
21760 % \end{macro}
21761 %
21762 % \begin{macrocode}
21763 \let\optcoupler@ref\POE@coupler@ref
21764 % \end{macrocode}
21765 %
21766 % \begin{macro}{\wdmcoupler@ref}
21767 % The \cs{wdmcoupler} and \cs{wdmsplitter} need a little correction for centered alignment and \opt{couplertype} set to \opt{none}.
21768 % \begin{macrocode}
21769 \def\wdmcoupler@ref{%
21770 \POE@coupler@ref
21771 \ifx\POE@key@couplertype\POE@str@none
21772 \ifx\POE@key@coupleralign\POE@str@center
21773 \POE@setref{/@@y 0 def }%
21774 \fi
21775 \fi
21776 }%
21777 \let\wdmsplitter@ref\wdmcoupler@ref
21778 % \end{macrocode}
21779 % \end{macro}
21780 %
21781 % \begin{macro}{\optcoupler@comp}
21782 % \begin{macrocode}
21783 \def\optcoupler@comp{%
21784 \ifx\POE@key@couplertype\POE@str@none
21785 \psline[style=Fiber](\oenode{1}{})(\oenode{3}{})
21786 \psline[style=Fiber](\oenode{2}{})(\oenode{N}{})
21787 \fi
21788 \POE@coupler@comp
21789 }%
21790 % \end{macrocode}
21791 % \end{macro}
21792 %
21793 % \begin{macro}{\POE@coupler@comp}
21794 % \begin{macrocode}
21795 \def\POE@coupler@comp{%
21796 \ifx\POE@key@couplertype\POE@str@none
21797 \else\ifx\POE@key@couplertype\POE@str@ellipse
21798 \psellipse(! 0 \POE@dict{@@y0})(! \POE@dict{@@x @@y})
21799 \else
21800 \POE@comp@rectangle
21801 \ifx\POE@key@couplertype\POE@str@cross
21802 \psline(! \POE@dict{@@x -0.5 mul @@y0 @@y 0.5 mul sub})%
21803 (! \POE@dict{@@x 0.5 mul @@y0 @@y 0.5 mul add})%
21804 \psline(! \POE@dict{@@x -0.5 mul @@y0 @@y 0.5 mul add})%
21805 (! \POE@dict{@@x 0.5 mul @@y0 @@y 0.5 mul sub})%
21806 \fi
21807 \fi\fi
21808 \ifx\POE@key@couplertype\POE@str@cross\else
21809 \ifPOE@variable
21810 \begingroup
21811 % \end{macrocode}
21812 % we set the style this way to be able to access the arrow and line parameters
21813 % already before the psline command
21814 % \begin{macrocode}
21815 \psset{style=VariableCoupler}
21816 \use@par
21817 \pst@expandafter\POE@get@yarrowscale{\psk@arrowscale}\@nil
21818 \def\@arrowshift{%
21819 \psk@arrowlength\space\psk@arrowsize\space
21820 \pst@number\pslinewidth\space mul add mul
21821 \POE@tempA mul
21822 1.6 0.8 atan 2 copy cos mul 3 1 roll sin mul
21823 \tx@UserCoor abs exch abs exch\space
21824 }%
21825 \psline(!\POE@dict{@@x -0.4 mul @@y0 @@x sub})%
21826 (!\POE@dict{@@x 0.4 mul @@x 0.7 mul @@y0 add
21827 \@arrowshift VecAdd})
21828 \endgroup
21829 \fi
21830 \fi
21831 }%
21832 % \end{macrocode}
21833 % \end{macro}
21834 %
21835 % \subsubsection{wdmcoupler}
21836 % \begin{macro}{\wdmcoupler@nodes}
21837 % \begin{macrocode}
21838 \def\wdmcoupler@nodes{%
21839 \newOptexpFiberComp{%
21840 % \end{macrocode}
21841 % A coupler may have only a single input node, which must then be duplicated
21842 % \begin{macrocode}
21843 /@@nodecount \the\POE@couplernodecount\space dup 1 le { pop 2 } if def
21844 @@y0 \POE@key@couplersep\space 0.5 mul add
21845 \POE@key@couplersep\space @@nodecount 1 sub div
21846 \ifx\POE@key@couplertype\POE@str@none
21847 \ifx\POE@key@coupleralign\POE@str@center
21848 pop pop @@y0 0
21849 \fi
21850 \fi
21851 1 1 @@nodecount
21852 {
21853 3 copy 1 sub mul sub exch pop [ @@x neg 3 -1 roll ] cvx 3 1 roll
21854 } for
21855 pop pop
21856 {@@x 0}
21857 }%
21858 \pnode(0,0){\oenodeCenter{}}
21859 }%
21860 % \end{macrocode}
21861 % \end{macro}
21862 %
21863 % \begin{macro}{\wdmcoupler@comp}
21864 % \begin{macrocode}
21865 \def\wdmcoupler@comp{%
21866 \ifx\POE@key@couplertype\POE@str@none
21867 \ifx\POE@key@coupleralign\POE@str@top
21868 \psline[style=Fiber](\oenode{1}{})(\oenodeOut{})
21869 \psline[style=Fiber]%
21870 (!/N@\oenodeOut{} \POE@dict{@GetCenter}
21871 \tx@UserCoor \POE@key@couplersep\space sub)(\oenode{2}{})
21872 \else
21873 \psline[style=Fiber](\oenode{\the\POE@couplernodecount}{})(\oenodeOut{})
21874 \ifx\POE@key@coupleralign\POE@str@bottom
21875 \psline[style=Fiber]%
21876 (!/N@\oenodeOut{} \POE@dict{@GetCenter}
21877 \tx@UserCoor \POE@key@couplersep\space add)(\oenode{1}{})
21878 \fi
21879 \fi
21880 \fi
21881 \POE@coupler@comp
21882 }%
21883 % \end{macrocode}
21884 % \end{macro}
21885 %
21886 % \subsubsection{wdmsplitter}
21887 % \begin{macro}{\wdmsplitter@nodes}
21888 % \begin{macrocode}
21889 \def\wdmsplitter@nodes{%
21890 \newOptexpFiberComp{%
21891 {@@x neg 0}
21892 % \end{macrocode}
21893 % A coupler may have only a single output node, which must then be duplicated
21894 % \begin{macrocode}
21895 /@@nodecount \the\POE@couplernodecount\space dup 2 gt { 1 sub } if def
21896 @@y0 \POE@key@couplersep\space 0.5 mul add
21897 \POE@key@couplersep\space @@nodecount 1 sub div
21898 \ifx\POE@key@couplertype\POE@str@none
21899 \ifx\POE@key@coupleralign\POE@str@center
21900 pop pop @@y0 0
21901 \fi
21902 \fi
21903 1 1 @@nodecount
21904 {
21905 3 copy 1 sub mul sub exch pop [ @@x 3 -1 roll ] cvx 3 1 roll
21906 } for
21907 pop pop
21908 }%
21909 \pnode(0,0){\oenodeCenter{}}
21910 }%
21911 % \end{macrocode}
21912 % \end{macro}
21913 %
21914 % \begin{macro}{\wdmsplitter@comp}
21915 % \begin{macrocode}
21916 \def\wdmsplitter@comp{%
21917 \ifx\POE@key@couplertype\POE@str@none
21918 \ifx\POE@key@coupleralign\POE@str@top
21919 \psline[style=Fiber](\oenodeIn{})(\oenode{2}{})
21920 \psline[style=Fiber](! \POE@dict{/N@\oenodeIn{} @GetCenter}
21921 \tx@UserCoor \POE@key@couplersep\space sub)(\oenode{N}{})
21922 \else
21923 \psline[style=Fiber](\oenodeIn{})(\oenode{N}{})
21924 \ifx\POE@key@coupleralign\POE@str@bottom
21925 \psline[style=Fiber](! \POE@dict{/N@\oenodeIn{} @GetCenter}
21926 \tx@UserCoor \POE@key@couplersep\space add)(\oenode{2}{})
21927 \fi
21928 \fi
21929 \fi
21930 \POE@coupler@comp
21931 }%
21932 % \end{macrocode}
21933 % \end{macro}
21934 %
21935 % \subsubsection{optcirculator}
21936 %
21937 % \begin{macro}{optcirculator@ref}
21938 % \begin{macrocode}
21939 \def\optcirculator@ref{%
21940 \POE@setref{\POE@key@optcircsize\space 0.5 mul dup /@@x ED /@@y ED }%
21941 }%
21942 % \end{macrocode}
21943 % \end{macro}
21944 % \begin{macro}{\optcirculator@nodes}
21945 % \begin{macrocode}
21946 \def\optcirculator@nodes{%
21947 \newOptexpFiberComp{{@@x neg 0} {0 @@y neg} {@@x 0}}%
21948 }%
21949 % \end{macrocode}
21950 % \end{macro}
21951 %
21952 % \begin{macro}{\optcirculator@comp}
21953 % \begin{macrocode}
21954 \def\optcirculator@comp{%
21955 \edef\@sz{\POE@key@optcircsize\space 0.5 mul }%
21956 \pscircle(0,0){! \@sz}
21957 \psarc[style=OptCircArrow](0,0)%
21958 {! \POE@key@optcircsize\space 0.5 mul}%
21959 {\POE@key@optcircangleA}%
21960 {\POE@key@optcircangleB}
21961 }%
21962 % \end{macrocode}
21963 % \end{macro}
21964 %
21965 % \subsubsection{fibercollimator}
21966 %
21967 % \begin{macro}{fibercollimator@ref}
21968 % \begin{macrocode}
21969 \def\fibercollimator@ref{%
21970 \POE@setref{%
21971 /@@x \POE@key@fibercolwidth\space 0.5 mul def
21972 /@@y \POE@key@fibercolheight\space 0.5 mul def}%
21973 }%
21974 % \end{macrocode}
21975 % \end{macro}
21976 % \begin{macro}{\fibercollimator@nodes}
21977 % \begin{macrocode}
21978 \def\fibercollimator@nodes{%
21979 \pnode(!\POE@dict{@@x neg} 0){\oenodeIn{}}
21980 \newOptexpComp{{@@x neg 0} {0 1} @@y neg @@y trans {PlainIfc}
21981 {@@x 0} {0 1} 0 0 trans {PlainIfc} 1 }%
21982 }%
21983 % \end{macrocode}
21984 % \end{macro}
21985 %
21986 % \begin{macro}{\fibercollimator@comp}
21987 % \begin{macrocode}
21988 \def\fibercollimator@comp{%
21989 \pspolygon(!\POE@dict{@@x neg \POE@clwh add @@y neg})%
21990 (!\POE@dict{@@x 0})%
21991 (!\POE@dict{@@x neg \POE@clwh add @@y})
21992 }%
21993 % \end{macrocode}
21994 % \end{macro}
21995 %
21996 % \subsection{Electrical components}
21997 %
21998 % \subsubsection{elecsynthesizer}
21999 %
22000 % \subsubsection{elecmixer}
22001 %
22002 % \begin{macro}{\elecmixer}
22003 % \begin{macrocode}
22004 \def\elecmixer{\pst@object{elecmixer}}%
22005 \def\elecmixer@i(#1)(#2)(#3){%
22006 \@ifnextchar\bgroup%
22007 {\elecmixer@ii(#1)(#2)(#3)}%
22008 {\elecmixer@ii(#1)(#2)(#3){}}%
22009 }%
22010 \def\elecmixer@ii(#1)(#2)(#3)#4{%
22011 \addafter@par{ref@angle=0}%
22012 \begin@OptexpObj
22013 \POE@calcCircRefNodes{#1}{#2}{#3}%
22014 \POE@drawcomponent{elecmixer}{#4}
22015 \ifPOE@backlayer
22016 \ifPOE@wirepresetin@top
22017 \drawwire@{WireIn}[stopnode=1](#1){}
22018 \else\ifPOE@fiberin@top
22019 \drawfiber@{FiberIn}[stopnode=1](#1){}
22020 \fi\fi
22021 \ifPOE@wirepresetout@top
22022 \drawwire@{WireOut1}[startnode=N]{}(#2)
22023 \else\ifPOE@fiberout@top
22024 \drawfiber@{FiberOut1}[startnode=N]{}(#2)
22025 \fi\fi
22026 \ifPOE@wirepresetout@bottom
22027 \drawwire@{WireOut2}[startnode=2, wirealign=center]{}(#3)
22028 \else\ifPOE@fiberout@bottom
22029 \drawfiber@{FiberOut2}[starnode=2, fiberalign=center]{}(#3)
22030 \fi\fi
22031 \fi
22032 \end@OptexpObj
22033 }%
22034 % \end{macrocode}
22035 % \end{macro}
22036 %
22037 % \begin{macro}{elecmixer@ref}
22038 % \begin{macrocode}
22039 \def\elecmixer@ref{%
22040 \POE@setref{\POE@key@elecmixersize\space 0.5 mul dup /@@x ED /@@y ED }%
22041 }%
22042 % \end{macrocode}
22043 % \end{macro}
22044 % \begin{macro}{\elecmixer@nodes}
22045 % \begin{macrocode}
22046 \def\elecmixer@nodes{%
22047 \newOptexpElecComp{{@@x neg 0} {0 @@y neg} {@@x 0}}%
22048 }%
22049 % \end{macrocode}
22050 % \end{macro}
22051 %
22052 % \begin{macro}{\elecmixer@comp}
22053 % \begin{macrocode}
22054 \def\elecmixer@comp{%
22055 \edef\@sz{\POE@key@elecmixersize\space 0.5 mul }%
22056 \pscircle(0,0){! \@sz}
22057 \psline(!\@sz 2 sqrt div neg dup)(!\@sz 2 sqrt div dup)
22058 \psline(!\@sz 2 sqrt div dup neg exch)(!\@sz 2 sqrt div dup neg)
22059 }%
22060 % \end{macrocode}
22061 % \end{macro}
22062 %
22063 % \subsubsection{Electrical coupler}
22064 %
22065 % \begin{macro}{\eleccoupler}
22066 % \begin{macrocode}
22067 \def\eleccoupler{\pst@object{eleccoupler}}%
22068 \def\eleccoupler@i(#1)(#2){%
22069 \@ifnextchar(%)
22070 {\eleccoupler@ii(#1)(#2)}%
22071 {\eleccoupler@ii(#1)(#1)(#2)(#2)}%
22072 }%
22073 \def\eleccoupler@ii(#1)(#2)(#3)(#4){%
22074 \@ifnextchar\bgroup%
22075 {\eleccoupler@iii(#1)(#2)(#3)(#4)}%
22076 {\eleccoupler@iii(#1)(#2)(#3)(#4){}}%
22077 }%
22078 \def\eleccoupler@iii(#1)(#2)(#3)(#4)#5{%
22079 \begin@OptexpObj
22080 \ifPOE@backlayer
22081 \ifx\POE@key@eleccoupleralign\POE@str@top
22082 \pnode(#1){\oenodeRefA{}}
22083 \pnode(#3){\oenodeRefB{}}
22084 \else\ifx\POE@key@eleccoupleralign\POE@str@bottom
22085 \pnode(#2){\oenodeRefA{}}
22086 \pnode(#4){\oenodeRefB{}}
22087 \else
22088 \pst@getcoor{#1}\POE@tempa%
22089 \pst@getcoor{#2}\POE@tempb%
22090 \pnode(!\POE@tempa \POE@tempb
22091 \POE@dict{VecAdd 0.5 VecScale}
22092 \tx@UserCoor){\oenodeRefA{}}
22093 \pst@getcoor{#3}\POE@tempa%
22094 \pst@getcoor{#4}\POE@tempb%
22095 \pnode(!\POE@tempa \POE@tempb
22096 \POE@dict{VecAdd 0.5 VecScale}
22097 \tx@UserCoor){\oenodeRefB{}}
22098 \fi\fi
22099 \fi
22100 \POE@drawcomponent{eleccoupler}{#5}
22101 \ifPOE@backlayer
22102 \POE@Verb{%
22103 (1) (3) (\oenode{}{}) CorrectDipoleIfc
22104 (2) (4) (\oenode{}{}) CorrectDipoleIfc
22105 }%
22106 \ifPOE@wirepresetin@top
22107 \drawwire@{WireIn1}[stopnode=1](#1){}
22108 \else\ifPOE@fiberin@top
22109 \drawfiber@{FiberIn1}[stopnode=1](#1){}
22110 \fi\fi
22111 \ifPOE@wirepresetout@top
22112 \drawwire@{WireOut1}[startnode=3](#3){}
22113 \else\ifPOE@fiberout@top
22114 \drawfiber@{FiberOut1}[startnode=3](#3){}
22115 \fi\fi
22116 \ifx\POE@key@eleccouplertype\POE@str@directional
22117 \ifx\POE@key@eleccouplerinput\POE@str@left
22118 \ifPOE@wirepresetout@bottom
22119 \drawwire@{WireOut2}[startnode=N](#4){}
22120 \else\ifPOE@fiberout@bottom
22121 \drawfiber@{FiberOut2}[startnode=N](#4){}
22122 \fi\fi
22123 \else
22124 \ifPOE@wirepresetin@bottom
22125 \drawwire@{WireIn2}[stopnode=2](#2){}
22126 \else\ifPOE@fiberin@bottom
22127 \drawfiber@{FiberIn2}[stopnode=2](#2){}
22128 \fi\fi
22129 \fi
22130 \else
22131 \ifPOE@wirepresetout@bottom
22132 \drawwire@{WireOut2}[startnode=N](#4){}
22133 \else\ifPOE@fiberout@bottom
22134 \drawfiber@{FiberOut2}[startnode=N](#4){}
22135 \fi\fi
22136 \ifPOE@wirepresetin@bottom
22137 \drawwire@{WireIn2}[stopnode=2](#2){}
22138 \else\ifPOE@fiberin@bottom
22139 \drawfiber@{FiberIn2}[stopnode=2](#2){}
22140 \fi\fi
22141 \fi
22142 \fi
22143 \end@OptexpObj
22144 }%
22145 % \end{macrocode}
22146 % \end{macro}
22147 %
22148 % \begin{macro}{\eleccoupler@ref}
22149 % \begin{macrocode}
22150 \def\eleccoupler@ref{%
22151 \POE@setref{%
22152 /@@x \POE@key@eleccouplerwidth\space 0.5 mul def
22153 /@@y \POE@key@eleccouplerheight\space 0.5 mul def
22154 \ifx\POE@key@eleccouplersep\@empty
22155 /@@sep @@y 0.75 mul def
22156 \else
22157 /@@sep \POE@key@eleccouplersep\space 0.5 mul def
22158 \fi
22159 /@@y0 @@sep
22160 \ifx\POE@key@eleccoupleralign\POE@str@bottom
22161 \else\ifx\POE@key@eleccoupleralign\POE@str@top
22162 neg
22163 \else
22164 pop 0
22165 \fi\fi
22166 def
22167 }%
22168 }%
22169 % \end{macrocode}
22170 % \end{macro}
22171 %
22172 % \begin{macro}{\eleccoupler@nodes}
22173 % \begin{macrocode}
22174 \def\eleccoupler@nodes{%
22175 \newOptexpElecComp{%
22176 {@@x neg @@y0 @@sep add}
22177 {@@x neg @@y0 @@sep sub}
22178 {@@x @@y0 @@sep add}
22179 {@@x @@y0 @@sep sub} }%
22180 \pnode(0,0){\oenodeCenter{}}
22181 }%
22182 % \end{macrocode}
22183 % \end{macro}
22184 %
22185 % \begin{macro}{\eleccoupler@comp}
22186 % \begin{macrocode}
22187 \def\eleccoupler@comp{%
22188 \POE@comp@rectangle
22189 \psline(!\POE@dict{@@x -0.7 mul @@y0 @@sep sub @@y 0.15 mul add})%
22190 (!\POE@dict{@@x 0.7 mul @@y0 @@sep add @@y 0.15 mul sub})%
22191 \psline(!\POE@dict{@@x 0.7 mul @@y0 @@sep sub @@y 0.15 mul add})%
22192 (!\POE@dict{@@x -0.7 mul @@y0 @@sep add @@y 0.15 mul sub})%
22193 \psline[style=Wire, arrows=-, ArrowInside=-](\oenodeIfc{1}{})(\oenodeIfc{3}{})
22194 \ifx\POE@key@eleccouplertype\POE@str@directional
22195 \ifx\POE@key@eleccouplerinput\POE@str@left
22196 \psline[style=Wire, arrows=-, ArrowInside=-]([Xnodesep=-0.1]\oenodeIfc{2}{})(\oenodeIfc{N}{})
22197 \else
22198 \psline[style=Wire, arrows=-, ArrowInside=-](\oenodeIfc{2}{})([Xnodesep=0.1]\oenodeIfc{N}{})
22199 \fi
22200 \pscustom[style=OptComp]{%
22201 \moveto(!\POE@dict{@@x 0.15 add
22202 \ifx\POE@key@eleccouplerinput\POE@str@left neg \fi
22203 @@y0 @@sep sub 0.14 add})
22204 \rlineto(0,-0.04)
22205 \multido{\rx=0.12+-0.08}{4}{%
22206 \rlineto(0.05,-0.02)
22207 \rlineto(-0.1,-0.04)
22208 \rlineto(0.05,-0.02)
22209 }%
22210 \rlineto(0,-0.04)
22211 }%
22212 \else
22213 \psline[style=Wire, arrows=-, ArrowInside=-](\oenodeIfc{2}{})(\oenodeIfc{N}{})
22214 \fi
22215 }%
22216 % \end{macrocode}
22217 % \end{macro}
22218 %
22219 % \begin{macro}{\newOptexpElecDipole}
22220 % \begin{macrocode}
22221 \def\newOptexpElecDipole{%
22222 \@ifnextchar[%]
22223 {\POE@newelecdipole}{\POE@newelecdipole[]}%
22224 }%
22225 % \end{macrocode}
22226 % \end{macro}
22227 %
22228 % \begin{macro}{\POE@newfiberdipole}
22229 % \begin{macrocode}
22230 \def\POE@newelecdipole[#1]#2{%
22231 \@ifnextchar\bgroup
22232 {\POE@newelecdipole@i[#1]{#2}}{\POE@newelecdipole@i[#1]{#2}{}}%
22233 }%
22234 % \end{macrocode}
22235 % \end{macro}
22236 % \begin{macro}{\POE@newelecdipole@i}
22237 % \begin{macrocode}
22238 \def\POE@newelecdipole@i[#1]#2#3{%
22239 \@ifundefined{#2@i}{%
22240 \@namedef{#2}{\pst@object{#2}}%
22241 \expandafter\def\csname #2@i\endcsname(##1)(##2){%
22242 \@ifnextchar\bgroup%
22243 {\@nameuse{#2@ii}(##1)(##2)}%
22244 {\@nameuse{#2@ii}(##1)(##2){}}%
22245 }%
22246 \expandafter\def\csname #2@ii\endcsname(##1)(##2)##3{%
22247 \addbefore@par{#3}%
22248 \addafter@par{#1}%
22249 \begin@OptexpObj
22250 \ifPOE@backlayer
22251 \POE@regNodes{##1}{##2}
22252 \fi
22253 \POE@drawcomponent{#2}{##3}
22254 \ifPOE@backlayer
22255 \POE@Verb{ (1) (N) (\oenode{}{}) CorrectDipoleIfc }%
22256 \POE@PresetWireConn
22257 \fi
22258 \end@OptexpDipole
22259 }%
22260 \@ifundefined{#2@nodes}{\expandafter\def\csname #2@nodes\endcsname{\POE@elecdipole@nodes}}{}%
22261 }{%
22262 \PackageError{pst-optexp}{%
22263 elecdipole component '#2' already defined}%
22264 }%
22265 \ignorespaces}%
22266 % \end{macrocode}
22267 % \end{macro}
22268 % \begin{macro}{\elecsynthesizer@ref}
22269 % \begin{macrocode}
22270 \newOptexpElecDipole{elecsynthesizer}{position=start, innercompalign=absolute}
22271 \def\elecsynthesizer@ref{%
22272 \POE@setref{%
22273 \POE@key@synthwidth\space 0.5 mul
22274 \POE@key@synthheight\space 0.5 mul
22275 2 copy min /@@sz ED
22276 \ifx\POE@key@synthshape\POE@str@circle
22277 pop pop @@sz dup
22278 \fi
22279 /@@y ED /@@x ED
22280 }%
22281 }%
22282 % \end{macrocode}
22283 % \end{macro}
22284 %
22285 % \begin{macro}{\elecsynthesizer@comp}
22286 % \begin{macrocode}
22287 \def\elecsynthesizer@comp{%
22288 \ifx\POE@key@synthshape\POE@str@circle
22289 \pscircle(!\POE@dict{@@x0 @@y0}){!\POE@dict{@@x}}
22290 \else
22291 \POE@comp@rectangle
22292 \fi
22293 \psrotate(\oenodeCenter{}){!\POE@dict{@@ang}}{%
22294 \psset{style=SynthStyle}%
22295 \begingroup
22296 % \end{macrocode}
22297 % Negative units are not possible with parametric or function plots.
22298 % \begin{macrocode}
22299 \let\POE@tempA\@empty
22300 \let\POE@tempB\@empty
22301 \ifdim\psxunit<0pt
22302 \psset{xunit=-\psxunit}
22303 \def\POE@tempA{-1 mul\space}%
22304 \fi
22305 \ifdim\psyunit<0pt
22306 \psset{yunit=-\psyunit}
22307 \def\POE@tempB{-1 mul\space}%
22308 \fi
22309 \ifx\POE@key@synthtype\POE@str@sine
22310 \parametricplot[plotpoints=100]{-1}{1}{%
22311 \POE@dict{@@sz 0.7 mul t mul t 180 mul \POE@tempA sin @@y -0.35 mul mul \POE@tempB }}%
22312 \else\ifx\POE@key@synthtype\POE@str@pulse
22313 \psplot[plotpoints=100]{-0.25}{0.25}{2.7182818 x 0.04 div dup mul neg exp 0.3 mul 0.13 sub \POE@tempB}%
22314 \fi\fi
22315 \endgroup
22316 \ifx\POE@key@synthtype\POE@str@rectangle
22317 \psline(!\POE@dict{@@sz -0.7 mul @@sz -0.35 mul})%
22318 (!\POE@dict{@@sz 0.7 mul -1 1 \POE@key@synthrectwidth\space sub 2 mul add mul @@sz -0.35 mul})%
22319 (!\POE@dict{@@sz 0.7 mul -1 1 \POE@key@synthrectwidth\space sub 2 mul add mul @@sz 0.35 mul})%
22320 (!\POE@dict{@@sz 0.7 mul @@sz 0.35 mul})%
22321 (!\POE@dict{@@sz 0.7 mul @@sz -0.35 mul})
22322 \else\ifx\POE@key@synthtype\POE@str@sawtooth
22323 \psline(!\POE@dict{@@sz -0.6 mul @@sz -0.4 mul})%
22324 (!\POE@dict{@@sz 0.6 mul @@sz 0.4 mul})%
22325 (!\POE@dict{@@sz 0.6 mul @@sz -0.4 mul})
22326 \else\ifx\POE@key@synthtype\POE@str@triangle
22327 \psline(!\POE@dict{@@sz -0.6 mul @@sz -0.4 mul})%
22328 (!\POE@dict{0 @@sz 0.4 mul})%
22329 (!\POE@dict{@@sz 0.6 mul @@sz -0.4 mul})
22330 \else
22331 \@ifundefined{elecsynthesizer@custom}{}{\elecsynthesizer@custom}%
22332 \fi\fi\fi}%
22333 }%
22334 % \end{macrocode}
22335 % \end{macro}
22336 %</stylefile>
22337 %
22338 % \chapter{The Postscript header file}
22339 % \makeatletter
22340 %^^A Copied this definition from doc.sty and changed it not to add a
22341 %^^A backslash to the Postscript procedure name in the index.
22342 % \def\SpecialIndex@#1#2{%
22343 % \@SpecialIndexHelper@#1\@nil
22344 % \def\@tempb{ }%
22345 % \ifcat \@tempb\@gtempa
22346 % \special@index{\quotechar\space\actualchar
22347 % \string\verb\quotechar*\verbatimchar
22348 % \quotechar\space\verbatimchar#2}%
22349 % \else
22350 % \def\@tempb##1##2\relax{\ifx\relax##2\relax
22351 % \def\@tempc{\special@index{\quotechar##1\actualchar
22352 % \string\verb\quotechar*\verbatimchar
22353 % \quotechar##1\verbatimchar#2}}%
22354 % \else
22355 % \def\@tempc{\special@index{##1##2\actualchar
22356 % \string\verb\quotechar*\verbatimchar##1##2\verbatimchar#2}}%
22357 % \fi}%
22358 % \expandafter\@tempb\@gtempa\relax
22359 % \@tempc
22360 % \fi}
22361 % \makeatother
22362 %
22363 %<*prolog>
22364 %
22365 % This is the dictionary where all components are stored in.
22366 % \begin{macrocode}
22367 /tx@OptexpDict 200 dict def
22368 tx@OptexpDict begin
22369 /DebugOE false def
22370 /DebugDepth 0 def
22371 /DebugBegin {
22372 DebugOE {
22373 /DebugProcName ED
22374 DebugDepth 2 mul string
22375 0 1 DebugDepth 2 mul 1 sub {
22376 dup 2 mod 0 eq { (|) }{( )} ifelse
22377 3 -1 roll dup 4 2 roll
22378 putinterval
22379 } for
22380 DebugProcName strcat ==
22381 /DebugDepth DebugDepth 1 add def
22382 }{
22383 pop
22384 } ifelse
22385 } bind def
22386 /DebugEnd {
22387 DebugOE {
22388 /DebugDepth DebugDepth 1 sub def
22389 DebugDepth 2 mul 2 add string
22390 0 1 DebugDepth 2 mul 1 sub {
22391 dup 2 mod 0 eq { (|) }{ ( ) } ifelse
22392 3 -1 roll dup 4 2 roll
22393 putinterval
22394 } for
22395 dup DebugDepth 2 mul (+-) putinterval
22396 ( done) strcat ==
22397 } if
22398 } bind def
22399 /DebugMsg {
22400 DebugOE {
22401 DebugDepth 1 add 2 mul string
22402 0 1 DebugDepth 2 mul 1 add {
22403 dup 2 mod 0 eq { (|) }{( )} ifelse
22404 3 -1 roll dup 4 2 roll
22405 putinterval
22406 } for
22407 exch strcat ==
22408 }{
22409 pop
22410 } ifelse
22411 } bind def
22412 % \end{macrocode}
22413 % \begin{macro}{strcat}
22414 % Concatenate two strings and leave the result on the stack
22415 % \begin{pssyntax}
22416 % \PSstring{str1} \PSstring{str2} \PSop{strcat} \PSstring{str1str2}
22417 % \end{pssyntax}
22418 % \begin{macrocode}
22419 /strcat {
22420 exch 2 copy
22421 length exch length add
22422 string dup dup 5 2 roll
22423 copy length exch
22424 putinterval
22425 } bind def
22426 % \end{macrocode}
22427 % \end{macro}
22428 %
22429 % \begin{macro}{nametostr}
22430 % Convert a literal name to string. This is required, because some PSTricks
22431 % parameter like \opt{angleA} do not allow round braces in the argument, so
22432 % some string must be passed as name and then converted to a string.
22433 % \begin{pssyntax}
22434 % \PSname{name} \PSop{nametostr} \PSstring{name}
22435 % \end{pssyntax}
22436 % \begin{macrocode}
22437 /nametostr {
22438 dup length string cvs
22439 } bind def
22440 % \end{macrocode}
22441 % \end{macro}
22442 %
22443 % \begin{macro}{PrintWarning}
22444 % Print a warning about the raytracing. This is enabled or disabled via option
22445 % \opt{pswarning}.
22446 % \begin{macrocode}
22447 /PrintWarning {
22448 (Warning pst-optexp: ) exch strcat (\n) strcat print
22449 } bind def
22450 /CompUnknownWarning {
22451 (Component ') exch strcat (' unknown) strcat Warning
22452 } bind def
22453 /OneFiberCompWarning {
22454 (Found only one unsupported component in beam path, drawing no beam) Warning
22455 } bind def
22456 /FiberCompWarning {
22457 (Found an unsupported component in beam path, stopping beam path) Warning
22458 } bind def
22459 % \end{macrocode}
22460 % \end{macro}
22461 %
22462 % \begin{macro}{inttostr}
22463 % Convert an integer to a string.
22464 % \begin{pssyntax}
22465 % \PSvar{int} \PSop{inttostr} \PSstring{int}
22466 % \end{pssyntax}
22467 % \begin{macrocode}
22468 /inttostr {
22469 dup type /integertype eq {
22470 dup log 1 add floor cvi string cvs
22471 } if
22472 } bind def
22473 % \end{macrocode}
22474 % \end{macro}
22475 %
22476 % \begin{macro}{calcNodes}
22477 % Calculate the reference node coordinates for reflective components and
22478 % stores them as \PSvar{X@A}, \PSvar{Y@A}, \PSvar{X@B} and \PSvar{Y@B}.
22479 % \begin{pssyntax}
22480 % \PSvar{XA} \PSvar{YA} \PSvar{XB} \PSvar{YB} \PSvar{XG} \PSvar{YG} \PSop{calcNodes}
22481 % \end{pssyntax}
22482 % \begin{macrocode}
22483 /calcNodes {
22484 (calcNode) DebugBegin
22485 /YG exch def /XG exch def
22486 /by exch YG sub def
22487 /bx exch XG sub def
22488 /ay YG 3 -1 roll sub def
22489 /ax XG 3 -1 roll sub def
22490 ax ay NormalizeVec bx by NormalizeVec VecAdd
22491 2 copy Pyth abs 1e-4 lt {
22492 pop pop ax ay -90 matrix rotate dtransform
22493 } if
22494 /cy ED /cx ED
22495 /c ax bx add ay by add Pyth def
22496 % \end{macrocode}
22497 % If $c=0$, then set the coordinates of the vector manually depending whether
22498 % \PSvar{a} and \PSvar{b} are parallel or antiparallel.
22499 % \begin{macrocode}
22500 c 0 eq {
22501 ax ay bx by DotProd 0 gt {
22502 % \end{macrocode}
22503 % $\text{dotprod} > 0$, i.e. \PSvar{a} and \PSvar{b} are parallel.
22504 % \begin{macrocode}
22505 /cx ax def
22506 /cy ay def
22507 }{
22508 /cx ay def
22509 /cy ax neg def
22510 } ifelse
22511 } if
22512 cx cy NormalizeVec 2 copy
22513 XG YG VecAdd /Y@A ED /X@A ED
22514 XG YG 4 2 roll VecSub /Y@B ED /X@B ED
22515 % \end{macrocode}
22516 % Test the chirality (the order) of the input points. Input angles $> 90$\textdegree
22517 % don't make sense, in this case we exhange the calculated reference nodes.
22518 % \begin{macrocode}
22519 true
22520 ax by mul ay bx mul sub 0 le {
22521 pop false
22522 Y@A X@A
22523 /X@A X@B def
22524 /Y@A Y@B def
22525 /X@B exch def
22526 /Y@B exch def
22527 } if
22528 DebugEnd
22529 } bind def
22530 % \end{macrocode}
22531 % \end{macro}
22532 %
22533 % \begin{macro}{capHeight}
22534 % Calculate the height \PSvar{a} of a pole cap, used for curved interfaces.
22535 % \begin{pssyntax}
22536 % \PSvar{R} \PSvar{h} \PSop{capHeight} \PSvar{a}
22537 % \end{pssyntax}
22538 % \PSvar{R} is the circle radius and \PSvar{h} the width of the pole cap.
22539 % \begin{macrocode}
22540 /capHeight {
22541 dup mul neg exch abs dup 3 1 roll dup mul add sqrt sub
22542 } bind def
22543 % \end{macrocode}
22544 % \end{macro}
22545 %
22546 % \begin{macro}{leftCurvedIfc}
22547 % Calculate some parameters for the «left» interface of a lens. Defines and
22548 % \PSname{ArcL} which is used later in the code to actually draw the interface
22549 % curve.
22550 % \begin{pssyntax}
22551 % \PSvar{h R1} \PSop{leftCurvedIfc} \PSvar{y |R1| alpha\textunderscore b
22552 % alpha\textunderscore t R1}
22553 % \end{pssyntax}
22554 % \begin{macrocode}
22555 /leftCurvedIfc {
22556 /R1 exch def /h exch def
22557 0 R1 abs dup R1 h capHeight exch sub R1 sign mul dup
22558 h exch atan exch
22559 h neg exch atan
22560 R1 0 lt {
22561 /ArcL /arcn load def
22562 } {
22563 /ArcL /arc load def
22564 } ifelse
22565 R1
22566 } bind def
22567 % \end{macrocode}
22568 % \end{macro}
22569 %
22570 % \begin{macro}{rightCurvedIfc}
22571 % Analogous to \PSname{leftCurvedIfc} for «right» interfaces, defines
22572 % \PSname{ArcR} for later use.
22573 % \begin{pssyntax}
22574 % \PSvar{h R2} \PSop{rightCurvedIfc} \PSvar{y |R2| alpha\textunderscore b
22575 % alpha\textunderscore t R2}
22576 % \end{pssyntax}
22577 % \begin{macrocode}
22578 /rightCurvedIfc {
22579 /R2 exch def /h exch def
22580 0 R2 abs dup R2 h capHeight sub R2 sign mul dup
22581 h neg exch atan exch
22582 h exch atan
22583 R2 0 lt {
22584 /ArcR /arcn load def
22585 } {
22586 /ArcR /arc load def
22587 } ifelse
22588 R2
22589 } bind def
22590 % \end{macrocode}
22591 % \end{macro}
22592 %
22593 % \begin{macro}{SlopeAngle}
22594 % Calculate slope angle of a line from \PSname{nodeA} to \PSname{nodeB}.
22595 % \begin{pssyntax}
22596 % \PSname{nodeB} \PSname{nodeA} \PSop{SlopeAngle} \PSvar{angle}
22597 % \end{pssyntax}
22598 % \begin{macrocode}
22599 /SlopeAngle {
22600 (SlopeAngle) DebugBegin
22601 @GetCenter 3 -1 roll @GetCenter @ABVect exch atan
22602 DebugEnd
22603 } bind def
22604 % \end{macrocode}
22605 % \end{macro}
22606 %
22607 % \begin{macro}{DefineExtNode}
22608 % Constructs the coordinates of an external node based on values that have
22609 % been set beforehand. \PSvar{xref} and \PSvar{yref} are the values which are
22610 % defined by \opt{extnode} parameter. \PSvar{RefFac} is defined by parameter
22611 % \opt{extnodealign}, which determines it the reference of the external node
22612 % position should be the global coordinate system, or the line between the
22613 % reference nodes.
22614 % \begin{pssyntax}
22615 % \PSvar{xref yref} \PSop{DefineExtNode} \PSvar{X Y}
22616 % \end{pssyntax}
22617 % \begin{macrocode}
22618 /DefineExtNode {%
22619 (DefineExtNode) DebugBegin
22620 @@y mul RefFac mul @@y0 add
22621 exch @@x mul RefFac mul @@x0 add exch
22622 DebugEnd
22623 } bind def
22624 % \end{macrocode}
22625 % \end{macro}
22626 %
22627 % \begin{macro}{GetInternalNodeNames}
22628 % Push all internal node names of \PSstring{basicname} on the
22629 % stack. If \PSvar{reverse} is \PSvar{true}, the names are pushed in
22630 % reverse order.
22631 % \begin{pssyntax}
22632 % \PSstring{basicname} \PSvar{reverse} \PSop{GetInternalNodeNames}
22633 % \PSname{N@basicnameN} \ldots{} \PSname{N@basicname1} (if
22634 % \PSvar{reverse = false})
22635 % \end{pssyntax}
22636 % \begin{macrocode}
22637 /GetInternalNodeNames {
22638 (GetInternalNodeNames) DebugBegin
22639 /reverse ED
22640 dup cvn load /N get dup
22641 reverse { -1 1 } { 1 1 3 -1 roll } ifelse
22642 { inttostr
22643 3 -1 roll dup 4 1 roll exch NodeName 3 1 roll
22644 } for
22645 pop pop
22646 DebugEnd
22647 } bind def
22648 % \end{macrocode}
22649 % \end{macro}
22650 %
22651 % \begin{macro}{GetInternalBeamNodes}
22652 % This is like \PSvar{GetInternalNodeNames}, but leaves the node
22653 % coordinates on the stack
22654 % \begin{pssyntax}
22655 % \PSstring{basicnodename} \PSvar{reverse} \PSop{GetInternalBeamNodes}
22656 % \PSvar{XN YN \ldots\ X1 Y1} (if \PSvar{reverse = false})
22657 % \end{pssyntax}
22658 % \begin{macrocode}
22659 /GetInternalBeamNodes {
22660 (GetInternalBeamNodes) DebugBegin
22661 [ 3 1 roll GetInternalNodeNames ]
22662 { @GetCenter } forall
22663 DebugEnd
22664 } bind def
22665 % \end{macrocode}
22666 % \end{macro}
22667 %
22668 % \begin{macro}{InitOptexpComp}
22669 % Initialize some global variables for positioning of external
22670 % nodes. This is called at the beginning of every component.
22671 % \begin{macrocode}
22672 /InitOptexpComp {%
22673 /@@x 0 def
22674 /@@y 0 def
22675 /@@x0 0 def
22676 /@@y0 0 def
22677 /@xref [0] def
22678 /@yref [0] def
22679 /RefFac 1 def
22680 } bind def
22681 % \end{macrocode}
22682 % \end{macro}
22683 %
22684 % \begin{macro}{NewTempNodeComp}
22685 % If \cs{draw*beam} is invoked with a node as parameter, a
22686 % temporary \cs{optplane} is defined. The plane vector of this temporary plane
22687 % is set such that it is perpendicular to the connection between the node and the following
22688 % interface node.
22689 %
22690 % This is the only procedure which sets the \PSname{adjustRel} flag
22691 % which indicates adjustment of the plane vector rotation depending on
22692 % the incoming or outgoing connection direction.
22693 %
22694 % For an explanation of all other dictionary members, please see
22695 % \PSvar{NewOptexpComp}.
22696 % \begin{pssyntax}
22697 % \PSproc{x y} \PSproc{dx dy} \PSstring{name} \PSproc{scaling}
22698 % \PSop{NewTempNodeComp}
22699 % \end{pssyntax}
22700 % \begin{macrocode}
22701 /NewTempNodeComp {
22702 (NewTempNodeComp) DebugBegin
22703 /sc ED
22704 dup cvn
22705 6 dict dup 3 1 roll def begin
22706 /ambiguous false def
22707 /allowbeaminside false def
22708 /forcebeaminside false def
22709 /name ED
22710 /correct false def
22711 % \end{macrocode}
22712 % This definition does not work like for \PSvar{NewOptexpComp}, because
22713 % a current point may not be available. Therefore, we translate to the
22714 % $(X, Y)$ node and define $X = Y = 0$.
22715 % \begin{macrocode}
22716 {0 0} exch 3 -1 roll exec
22717 gsave
22718 translate
22719 /CompMtrx CM def
22720 grestore
22721 /N 1 def
22722 /n bgRefIndex def
22723 5 dict dup dup /P@1 ED /P@N ED
22724 begin
22725 /mode trans def
22726 {} 0 0 PlainIfc
22727 end
22728 /adjustRel true def
22729 end
22730 DebugEnd
22731 } bind def
22732 % \end{macrocode}
22733 % \end{macro}
22734 %
22735 % \begin{macro}{CurvedIfc}
22736 % Defines a curved interface.
22737 % \begin{pssyntax}
22738 % \PSproc{X Y} \PSproc{DX DY} \PSproc{scl} \PSvar{NAlow NAup} \PSop{CurvedIfc}
22739 % \end{pssyntax}
22740 % \begin{macrocode}
22741 /CurvedIfc {
22742 5 2 roll
22743 2 copy 5 3 roll exec 3 -1 roll exec VecAdd
22744 5 -1 roll exec /Y ED /X ED
22745 exch exec 3 -1 roll 3 copy exec /RY ED /RX ED
22746 3 1 roll NormalizeVec 3 -1 roll exec
22747 tx@Dict begin Pyth end dup
22748 3 1 roll mul 1.00001 mul /NAup ED
22749 mul 1.00001 mul /NAlow ED
22750 } bind def
22751 % \end{macrocode}
22752 % \end{macro}
22753 %
22754 % \begin{macro}{PlainIfc}
22755 % \begin{pssyntax}
22756 % \PSproc{X Y} \PSproc{DX DY} \PSproc{scl} \PSvar{NAlow NAup} \PSop{PlainIfc}
22757 % \end{pssyntax}
22758 % \begin{macrocode}
22759 /PlainIfc {
22760 5 2 roll
22761 dup 3 -1 roll exec NormalizeVec 3 -1 roll exec 2 copy /DY ED /DX ED
22762 tx@Dict begin Pyth end dup 4 2 roll
22763 exch exec 3 -1 roll exec /Y ED /X ED
22764 3 1 roll mul 1.00001 mul /NAup ED
22765 mul 1.00001 mul /NAlow ED
22766 } bind def
22767 % \end{macrocode}
22768 % \end{macro}
22769 %
22770 % \begin{macro}{PathIfc}
22771 % Define an interface which is given by an arbitrary path.
22772 % \begin{pssyntax}
22773 % \PSproc{X Y} \PSarray{path} \PSproc{scl} \PSvar{NAlow NAup} \PSop{PathIfc}
22774 % \end{pssyntax}
22775 % \begin{macrocode}
22776 /PathIfc {
22777 pop pop /NAup 0 def /NAlow 0 def
22778 % \end{macrocode}
22779 % This kind of interface doesn't allow to switch off the NA-settings,
22780 % because the interface is defined only inside the NA.
22781 % \begin{macrocode}
22782 3 1 roll /Path ED
22783 exec 3 -1 roll exec /Y ED /X ED
22784 } bind def
22785 % \end{macrocode}
22786 % \end{macro}
22787 % \begin{macro}{NewCompIfc}
22788 % Defines a new interface of a component, must be called within \PSvar{NewOptexpComp}.
22789 % \begin{pssyntax}
22790 % \PSproc{x y} \PSproc{dx dy|rx ry} \PSvar{NAlow NAup mode}
22791 % \PSstring{CompName} \PSstring{Name} \PSproc{New\ldots Ifc} \PSproc{scaling}
22792 % \PSop{NewCompIfc}
22793 % \end{pssyntax}
22794 % \begin{psarglist}
22795 % \psargitem{\PSproc{x y}} The coordinates of the interface node which lies on the optical axis.??
22796 % \psargitem{\PSproc{dx dy | rx ry}} For a plane interface, this is the vector that describes the plane, for a curved interface this is the
22797 % \psargitem{\PSvar{NAlow NAup}}
22798 % \psargitem{\PSvar{mode}} An integer which characterizes if an interface is
22799 % reflective or transmittive. You should use the predefined variable
22800 % \PSname{refl} and \PSname{trans} for this.
22801 % \psargitem{\PSstring{CompName}} The name of the component we are in.
22802 % \psargitem{\PSstring{Name}} The name of the new interface. It is prefixed by «P@».
22803 % \psargitem{\PSproc{\ldots Ifc}} Contain the actual procedure to define the
22804 % concrete interface type, can be \PSproc{PlainIfc}, \PSproc{CurvedIfc} or \PSproc{PathIfc}.
22805 % \end{psarglist}
22806 % \begin{macrocode}
22807 /NewCompIfc {
22808 /scl ED
22809 /next ED
22810 dup (P@) exch strcat cvn
22811 6 dict dup
22812 3 1 roll def
22813 begin
22814 3 -1 roll
22815 /mode ED
22816 6 -1 roll dup 7 -1 roll
22817 {scl} 8 -2 roll next
22818 end
22819 % \end{macrocode}
22820 % store a new node \PSname{N@NameX}, with X=1..N this node always
22821 % represents the intersection of an untilted and unshifted incoming beam
22822 % on the optical axis with the respective interface
22823 % \begin{macrocode}
22824 exec scl ToVec 3 1 roll NodeName @NewNode
22825 } bind def
22826 % \end{macrocode}
22827 % \end{macro}
22828 %
22829 % Define some constants.
22830 %
22831 % These are used for checks of the \opt{beamalign} and \opt{fiberalign} parameters.
22832 % \begin{macrocode}
22833 /relative 0 def /absolute 1 def /center 2 def /firstcomp 3 def
22834 % \end{macrocode}
22835 %
22836 % These constants are used to describe the characteristics of interfaces.
22837 % \begin{macrocode}
22838 /refl 0 def /trans 1 def /absorb 2 def /refltrans 3 def /auto 4 def /undefined -1 def
22839 % \end{macrocode}
22840 %
22841 % These give the ordering of the internal interfaces of a component.
22842 % \begin{macrocode}
22843 /desc 0 def /asc 1 def /amb 2 def
22844 % \end{macrocode}
22845 %
22846 % The possible status after computing the outgoing vector at an interface.
22847 % \begin{macrocode}
22848 /ok 0 def /tir 1 def /missed 2 def
22849 /bgRefIndex 0 def
22850 % \end{macrocode}
22851 %
22852 % \begin{macro}{NewOptexpComp}
22853 % \PSvar{NewOptexpComp} creates a new dictionary that contains everything needed
22854 % for an optical component. It contains the following variables:
22855 % \begin{psarglist}
22856 % \psargitem{\PSvar{n}} The basic refractive index which was set for the
22857 % component. This may be overwritten with the \opt{n} option of the
22858 % \nxLcs{drawbeam} macros.
22859 %
22860 % \psargitem{\PSvar{CompMtrx}} The transformation matrix at time of
22861 % the component definition. The method is the same as for the
22862 % \nxLPack{pst-node} nodes.
22863 %
22864 % \psargitem{\PSvar{name}} The name of the component. This is build of
22865 % several components which are put together in the \TeX\ code.
22866 %
22867 % \psargitem{\PSvar{N}} The number of interfaces of the component.
22868 %
22869 % \psargitem{\PSvar{P@1\ldots P@N}} The actual
22870 % interfaces. \PSvar{P@1} and \PSvar{P@N} are always defined, even if
22871 % \PSvar{N = 1}. In that case the two names link to the same
22872 % dictionary, so that changes in one of them are automatically present
22873 % also in the second one.
22874 %
22875 % \psargitem{\PSproc{sc}} The scaling procedure for the coordinates to convert
22876 % from \TeX{} to Postscript scaling. In should always be defined as
22877 % \PSproc{\textbackslash psxunit, \textbackslash psyunit}.
22878 %
22879 % \psargitem{\PSvar{ambiguous}} There is a class of components, which have a central interface
22880 % \PSvar{P@C} which can be either transmittive or reflective,
22881 % depending on the previous and following component positions. The
22882 % mode of the \PSvar{P@C} is determined at the time of the beam
22883 % drawing and requires special attention.
22884 %
22885 % \psargitem{\PSvar{correct}} If \opt{true}, the input vectors after
22886 % the transmittive interfaces are corrected when using
22887 % \opt{connectifc}.
22888 % \end{psarglist}
22889 %
22890 % \begin{pssyntax}
22891 % \PSvar{[} \PSproc{x y} \PSproc{dx dy | rx ry} \PSvar{NAlow NAup}
22892 % \PSvar{type} \PSproc{\ldots Ifc}
22893 % \PSvar{\ldots{} [n] correct? amb? allowbeaminside? forcebeaminside?}
22894 % \PSstring{CompName} \PSproc{scaling} \PSop{NewOptexpComp}
22895 % \end{pssyntax}
22896 % \begin{macrocode}
22897 /NewOptexpComp {
22898 (NewOptexpComp) DebugBegin
22899 /sc ED dup cvn
22900 gsave
22901 13 dict dup 3 1 roll def begin
22902 /name ED
22903 /forcebeaminside ED
22904 /allowbeaminside ED
22905 /ambiguous ED
22906 /grating false def
22907 dup type /booleantype eq not { false } if /correct ED
22908 tx@Dict begin
22909 STV {CP T} stopped pop
22910 end
22911 /CompMtrx CM def
22912 grestore
22913 counttomark dup 6 idiv dup /N ED 6 mul eq { 1 } if
22914 cvx 1 EvalRefIndex /n ED
22915 % \end{macrocode}
22916 % This defines for ambiguous components, which interface coincides with the
22917 % ambiguous interface. 0 indicates that there is no ambiguous interface.
22918 % \begin{macrocode}
22919 ambiguous {
22920 /ambIfc ED
22921 }{
22922 /ambIfc 0 def
22923 } ifelse
22924 1 N eq {
22925 % \end{macrocode}
22926 % only a single plane is specified, create the aliases.
22927 % \begin{macrocode}
22928 name (1) 3 -1 roll {sc} NewCompIfc
22929 (1) (2) IfcCopy
22930 (2) (N) IfcAlias
22931 }{
22932 N -1 1 { %
22933 inttostr exch name 3 1 roll {sc} NewCompIfc
22934 } for
22935 N inttostr (N) IfcAlias
22936 } ifelse
22937 ambiguous ambIfc 0 gt and {
22938 ambIfc inttostr (C) IfcCopy
22939 } if
22940 end
22941 pop
22942 DebugEnd
22943 } bind def
22944 % \end{macrocode}
22945 % \end{macro}
22946 %
22947 % \begin{macro}{NewOptexpFiberComp}
22948 % \begin{pssyntax}
22949 % \PSvar{[} \PSvar{x y} \ldots
22950 % \PSstring{CompName} \PSproc{scaling} \PSop{NewOptexpFiberComp}
22951 % \end{pssyntax}
22952 % \begin{macrocode}
22953 /NewOptexpFiberComp {
22954 (NewOptexpFiberComp) DebugBegin
22955 /sc ED dup cvn
22956 gsave
22957 12 dict dup 3 1 roll def begin
22958 /name ED
22959 tx@Dict begin
22960 STV {CP T} stopped pop
22961 end
22962 /CompMtrx CM def
22963 grestore
22964 counttomark /N ED
22965 1 N eq {
22966 % \end{macrocode}
22967 % only a single plane is specified, create the aliases.
22968 % \begin{macrocode}
22969 {0 1} 0 0 trans name (1) {PlainIfc} {sc} NewCompIfc
22970 (1) (2) IfcCopy
22971 (2) (N) IfcAlias
22972 }{
22973 N -1 1 {
22974 inttostr
22975 {0 1} 0 0 absorb name 6 -1 roll {PlainIfc} {sc} NewCompIfc
22976 } for
22977 N inttostr (N) IfcAlias
22978 } ifelse
22979 end
22980 pop
22981 DebugEnd
22982 } bind def
22983 % \end{macrocode}
22984 % \end{macro}
22985 %
22986 % \begin{macro}{IfcCopy}
22987 % Copy an interface \PSvar{from} to an interface \PSvar{to}, must be called
22988 % within the respective component dictionary. This involves also copying the
22989 % node associated with the interface.
22990 % \begin{pssyntax}
22991 % \PSvar{from} \PSvar{to} \PSop{CopyIfc}
22992 % \end{pssyntax}
22993 % \begin{macrocode}
22994 /IfcCopy {
22995 2 copy IfcName exch IfcName load dup
22996 length dict copy def
22997 name exch NodeName name 3 -1 roll NodeName
22998 tx@NodeDict begin
22999 load dup length dict copy def
23000 end
23001 } bind def
23002 % \end{macrocode}
23003 % \end{macro}
23004 %
23005 % \begin{macro}{IfcAlias}
23006 % Create an alias of an interface. This involves creating also an
23007 % alias for the associated node. Must be called withing
23008 % \PSvar{NewOptexpComp}.
23009 %
23010 % \begin{pssyntax}
23011 % \PSstring{OrigPN} \PSstring{AliasPN} \PSop{IfcAlias}
23012 % \end{pssyntax}
23013 % \begin{macrocode}
23014 /IfcAlias {
23015 2 copy IfcName exch IfcName load def
23016 tx@NodeDict begin
23017 name exch NodeName name 3 -1 roll NodeName load def
23018 end
23019 } bind def
23020 % \end{macrocode}
23021 % \end{macro}
23022 %
23023 % \begin{macro}{CompAlias}
23024 % Components which have a \opt{compname} assigned, must also be
23025 % available by their component number. Here, all necessary
23026 % informations (nodes, component dictionary) are referenced such that
23027 % any information is accessible via number or name.
23028 % \begin{pssyntax}
23029 % \PSstring{NameStem} \PSstring{IDStem} \PSop{CompAlias}
23030 % \end{pssyntax}
23031 % \begin{macrocode}
23032 /CompAlias {
23033 % \end{macrocode}
23034 % Copy the component dictionary
23035 % \begin{macrocode}
23036 2 copy cvn dup currentdict exch known {
23037 load def
23038 } {
23039 pop
23040 } ifelse
23041 tx@NodeDict begin
23042 % \end{macrocode}
23043 % Copy all interface nodes of the component.
23044 % \begin{macrocode}
23045 1 {
23046 3 copy inttostr dup
23047 3 1 roll 2 copy NodeName
23048 currentdict exch known {
23049 NodeName load 3 1 roll NodeName ED
23050 1 add
23051 } {
23052 pop (N) NodeName load 3 1 roll
23053 pop (N) NodeName ED
23054 pop exit
23055 } ifelse
23056 } loop
23057 % \end{macrocode}
23058 % Copy all other nodes associated with the component (reference nodes, center
23059 % node, label node etc).
23060 % \begin{macrocode}
23061 mark (A) (B) (@A) (@B) (Center) (Label) (Rotref)
23062 (TrefA) (TrefB) (@TrefA) (@TrefB) (Ext) (Origin)
23063 counttomark {
23064 counttomark 3 add -2 roll 2 copy counttomark 1 add 2 roll
23065 3 -1 roll dup 4 1 roll NodeName dup
23066 currentdict exch known {
23067 load 3 1 roll exch NodeName ED
23068 } {
23069 pop pop pop
23070 } ifelse
23071 } repeat pop
23072 % \end{macrocode}
23073 % Copy additional external nodes, the maximum is 8 (all combinations of
23074 % l, r, t, b, c). Old and new node name stems are still on the stack.
23075 % \begin{macrocode}
23076 exch 1 1 8 {
23077 3 copy
23078 (Ext) exch 5 string cvs strcat dup 3 1 roll
23079 NodeName 3 1 roll NodeName
23080 dup currentdict exch known {
23081 load def pop
23082 } {
23083 pop pop pop exit
23084 } ifelse
23085 } for
23086 pop pop
23087 end
23088 } bind def
23089 % \end{macrocode}
23090 % \end{macro}
23091 %
23092 % \begin{macro}{GetPlaneVec}
23093 % Push the coordinates of the plane vector on the stack, for curved interfaces
23094 % this is the tangent at the interface node.
23095 % \begin{pssyntax}
23096 % \PSvar{IfcNum} \PSstring{CompName} \PSop{GetPlaneVec} \PSvar{dX dY}
23097 % \end{pssyntax}
23098 % \begin{macrocode}
23099 /GetPlaneVec {
23100 (GetPlaneVec) DebugBegin
23101 cvn load begin
23102 IfcName load begin
23103 currentdict /RX known {
23104 RX RY CompMtrx dtransform CM idtransform
23105 neg exch
23106 } {
23107 DX DY CompMtrx dtransform CM idtransform
23108 } ifelse
23109 end
23110 end
23111 DebugEnd
23112 } bind def
23113 % \end{macrocode}
23114 % \end{macro}
23115 %
23116 % \begin{macro}{GetIfcCenter}
23117 % Get the center node of a interface, either by specifying the name of the component and the interface number
23118 % \begin{pssyntax}
23119 % \PSvar{IfcNum} \PSstring{CompName} \PSop{GetIfcCenter} \PSvar{X Y}
23120 % \end{pssyntax}
23121 % or by passing an interface procedure generated by \PSvar{PushAllPlanesOnStack}.
23122 % \begin{pssyntax}
23123 % \PSproc{Ifc} \PSop{GetIfcCenter} \PSvar{X Y}
23124 % \end{pssyntax}
23125 % \begin{macrocode}
23126 /GetIfcCenter {
23127 (GetIfcCenter) DebugBegin
23128 dup type /stringtype eq not {
23129 dup xcheck not {
23130 % \end{macrocode}
23131 % ambiguous
23132 % \begin{macrocode}
23133 0 get (C) exch
23134 } {
23135 exec pop pop pop
23136 } ifelse
23137 } if
23138 cvn load begin
23139 IfcName load begin
23140 currentdict /RX known {
23141 X RX sub Y RY sub
23142 } {
23143 X Y
23144 } ifelse
23145 CompMtrx transform CM itransform
23146 end
23147 end
23148 DebugEnd
23149 } bind def
23150 % \end{macrocode}
23151 % \end{macro}
23152 %
23153 % \begin{macro}{GetIfcCenterCorr}
23154 % Get the coordinates of an interface node. This checks if corrected
23155 % coordinates for proper connection handling are available.
23156 % \begin{pssyntax}
23157 % \PSvar{IfcNum} \PSstring{CompName} \PSop{GetIfcCenterCorr} \PSvar{X|XCorr Y|YCorr}
23158 % \end{pssyntax}
23159 % \begin{macrocode}
23160 /GetIfcCenterCorr {
23161 (GetIfcCenterCorr) DebugBegin
23162 cvn load begin
23163 IfcName load begin
23164 currentdict /XCorr known {
23165 XCorr YCorr
23166 }{
23167 X Y
23168 } ifelse
23169 currentdict /RX known {
23170 RX neg RY neg VecAdd
23171 } if
23172 CompMtrx transform CM itransform
23173 end
23174 end
23175 DebugEnd
23176 } bind def
23177 % \end{macrocode}
23178 % \end{macro}
23179 %
23180 % \begin{macro}{TransformInVec}
23181 % Transform the input vector as specified with \opt{beamangle} and
23182 % \opt{beamdiv} from coordinates relative to the connection between first and
23183 % second components to absolute coordinates.
23184 % \begin{pssyntax}
23185 % \PSproc{Ifc2} \PSproc{Ifc1} \PSproc{InVec} \PSop{TransformInVec} \PSproc{InVec'}
23186 % \end{pssyntax}
23187 % \begin{macrocode}
23188 /TransformInVec {
23189 (TransformInVec) DebugBegin
23190 3 1 roll
23191 GetIfcCenter 4 2 roll
23192 GetIfcCenter 5 -2 roll
23193 @ABVect
23194 3 -1 roll exec 2 copy 6 2 roll
23195 0 eq exch 0 eq and not {
23196 % \end{macrocode}
23197 % invec != (0,0)
23198 % \begin{macrocode}
23199 exch atan matrix rotate dtransform
23200 } {
23201 4 2 roll pop pop
23202 } ifelse
23203 ToVec
23204 DebugEnd
23205 } bind def
23206 % \end{macrocode}
23207 % \end{macro}
23208 %
23209 % \begin{macro}{TransformStartPos}
23210 % Startpos is relative to the connection between first and second components
23211 % transform to absolute coordinates and shift by first plane center
23212 % Plane2 Plane1 \PSproc{StartPos} -> \PSproc{StartPos'+Plane1Center}
23213 % \begin{macrocode}
23214 /TransformStartPos {
23215 (TransformStartPos) DebugBegin
23216 exec 2 copy 6 2 roll 0 eq exch 0 eq and not
23217 3 1 roll GetIfcCenter 4 2 roll
23218 GetIfcCenter 5 2 roll {
23219 2 copy 8 2 roll
23220 @ABVect exch atan matrix rotate dtransform
23221 VecAdd
23222 } {
23223 6 2 roll pop pop pop pop
23224 } ifelse
23225 ToVec
23226 DebugEnd
23227 } bind def
23228 % \end{macrocode}
23229 % \end{macro}
23230 %
23231 % \begin{macro}{GetNearestPlane}
23232 % \begin{pssyntax}
23233 % \PSvar{X Y} \PSstring{CompName} \PSop{GetNearestPlane} \PSvar{PlaneNumber}
23234 % \end{pssyntax}
23235 % \begin{macrocode}
23236 /GetNearestPlane {
23237 (GetNearestPlane) DebugBegin
23238 3 copy 1 exch GetIfcCenter @ABDist /dist ED /nearestPlane 1 def
23239 dup cvn load /N get 2 1 3 -1 roll {
23240 % \end{macrocode}
23241 % iterate through plane 2 to plane N of CompName
23242 % \begin{macrocode}
23243 4 copy exch GetIfcCenter @ABDist dup dist lt {
23244 /dist ED /nearestPlane ED
23245 } {
23246 pop pop
23247 } ifelse
23248 } for
23249 pop pop pop nearestPlane
23250 DebugEnd
23251 } bind def
23252 % \end{macrocode}
23253 % \end{macro}
23254 %
23255 % \begin{macro}{PushAmbCompPlanesOnStack}
23256 % Components which do not have an unambiguous behaviour (beamslitter, can
23257 % transmit and reflect) like lenses (transmission only) or mirrors (reflection
23258 % only), must be evaluated to see which mode should be used. Argument is
23259 % [(name) draw], draw is a boolean which is true if the inner beams should be
23260 % drawn.
23261 % \begin{macrocode}
23262 /PushAmbCompPlanesOnStack {
23263 (PushAmbCompPlanesOnStack) DebugBegin
23264 currentdict /outToPlane undef
23265 PN IfcCnt eq not {
23266 % \end{macrocode}
23267 % not the last component, there should be another one on the stack
23268 % \begin{macrocode}
23269 exch dup 3 1 roll % nextifc ambcomp nextifc
23270 dup xcheck not {
23271 % \end{macrocode}
23272 % the next component is also ambiguous, use its center point as reference.
23273 % \begin{macrocode}
23274 0 get (C) exch
23275 } {
23276 % \end{macrocode}
23277 % otherwise use the interface on the stack
23278 % \begin{macrocode}
23279 exec pop pop pop
23280 } ifelse
23281 [ 3 1 roll ] cvx /outToPlane ED
23282 % \end{macrocode}
23283 % outToPlane is \PSproc{(PN) (compName)}
23284 % \begin{macrocode}
23285 } if
23286 % \end{macrocode}
23287 % the old plane number, without counting the additional planes of the current ambcomp
23288 % \begin{macrocode}
23289 /IfcCntTmp IfcCnt def
23290 % \end{macrocode}
23291 % Load some parameters from \opt{ambcomp}
23292 % \begin{macrocode}
23293 aload pop /draw ED /name ED
23294 name cvn load /N get dup /N ED
23295 % \end{macrocode}
23296 % If the ambiguous component has only one interface, there exists no internal beam
23297 % \begin{macrocode}
23298 1 eq { /draw true def } if
23299 % \end{macrocode}
23300 % \PSvar{CurrTmp} is the current point of the beam on the interface
23301 % prior to the ambiguos component, \PSvar{CurrVecTmp} its outgoing
23302 % vector. For wide beams, the lower ray is used. These vectors will be
23303 % changed inside this procedure.
23304 % \begin{macrocode}
23305 currentdict /Curr known {
23306 /CurrTmp /Curr load def
23307 /CurrVecTmp /CurrVec load def
23308 } {
23309 /CurrTmp /CurrLow load def
23310 /CurrVecTmp /CurrVecLow load def
23311 } ifelse
23312 PN 1 eq {
23313 % \end{macrocode}
23314 % If it is the first interface, the starting point is always the (C)
23315 % plane, the mode is set arbitrarily to transmittive.
23316 % \begin{macrocode}
23317 [ (C) name name GetRefIndex trans draw] cvx
23318 % \end{macrocode}
23319 % Now check which is the outgoing plane
23320 % \begin{macrocode}
23321 name /outToPlane load GetNextPlane
23322 dup 0 eq not {
23323 % \end{macrocode}
23324 % If there is one, i.e. if \PSvar{GetNextPlane} leaves something not
23325 % equal to \PSvar{0} on the stack, this is the plane.
23326 % \begin{macrocode}
23327 [ exch name bgRefIndex trans draw ] cvx exch
23328 /IfcCntTmp IfcCntTmp 1 add def
23329 } {
23330 pop
23331 } ifelse
23332 }{
23333 % \end{macrocode}
23334 % It is not the first component, check which interface of the component
23335 % is the nearest one to the current beam point and save its name in
23336 % \PSvar{firstPlane}.
23337 % \begin{macrocode}
23338 CurrTmp name GetNearestPlane dup /firstPlane ED
23339 name isAmbiguousIfc not {
23340 % \end{macrocode}
23341 % The first interface is not the ambiguous one, put it on the stack and
23342 % calculated the new beam vector.
23343 % \begin{macrocode}
23344 firstPlane name
23345 name firstPlane GetIfcMode
23346 connectifc { bgRefIndex }{ name GetRefIndex } ifelse
23347 CurrTmp CurrVecTmp
23348 10 dict begin HandleInterface end pop
23349 ToVec /CurrVecTmp ED ToVec /CurrTmp ED
23350 [ firstPlane name
23351 connectifc {
23352 bgRefIndex
23353 }{
23354 name GetRefIndex
23355 } ifelse
23356 name firstPlane GetIfcMode
23357 % \end{macrocode}
23358 % always draw to first interface
23359 % \begin{macrocode}
23360 true ] cvx
23361 /IfcCntTmp IfcCntTmp 1 add def
23362 } if
23363 PN IfcCnt eq {
23364 % \end{macrocode}
23365 % Its the last comp, just put the ambiguous interface on the stack, the mode is irrelevant.
23366 % \begin{macrocode}
23367 [ (C) name
23368 name GetRefIndex
23369 trans draw ] cvx
23370 IfcCntTmp IfcCnt gt { exch } if
23371 }{
23372 % \end{macrocode}
23373 % Otherwise put the ambiguous interface on the stack and check its mode.
23374 % \begin{macrocode}
23375 beamdiffractionorder null eq not name cvn load /grating get and {
23376 % \end{macrocode}
23377 % A grating (AOM) and a beamdiffractionorder was selected. In that case,
23378 % \opt{beammode} has no effect, and for beamdiffractionorder=0 the
23379 % interface is transmittive, otherwise refl or refltrans
23380 % \begin{macrocode}
23381 beamdiffractionorder dup 0 eq { pop () } if
23382 (C) exch 20 string cvs strcat
23383 dup (P@) exch strcat cvn name cvn load exch known not {
23384 % \end{macrocode}
23385 % The choosen beamdiffractionorder is not defined, select the closest one and issue a warning
23386 % \begin{macrocode}
23387 pop beamdiffractionorder dup sign neg 1 {
23388 (C) exch 5 string cvs dup 3 1 roll strcat
23389 dup (P@) exch strcat cvn name cvn load exch known {
23390 3 -1 roll pop
23391 (Diffraction order ) beamdiffractionorder 5 string cvs strcat
23392 ( is not defined, using ) 4 -1 roll strcat strcat Warning
23393 exit
23394 } {
23395 pop
23396 } ifelse
23397 } for
23398 } if
23399 /@@centerifc ED
23400 mark @@centerifc name name GetRefIndex
23401 beamdiffractionorder 0 eq {
23402 trans
23403 }{
23404 name @@centerifc GetIfcMode refltrans eq {
23405 refltrans
23406 }{
23407 refl
23408 } ifelse
23409 } ifelse
23410 }{
23411 /@@centerifc (C) def
23412 [ @@centerifc name
23413 name GetRefIndex
23414 beammode auto eq {
23415 CurrVecTmp @@centerifc name GetPlaneVec
23416 name @@centerifc GetIfcMode refltrans eq { -90 matrix rotate dtransform } if
23417 NormalVec outToPlane GetIfcCenter @@centerifc name GetIfcCenter @ABVect DotProd
23418 0 lt {
23419 trans
23420 }{
23421 name @@centerifc GetIfcMode
23422 refltrans eq {
23423 refltrans
23424 }{
23425 refl
23426 } ifelse
23427 } ifelse
23428 } {
23429 beammode dup refl eq {
23430 % \end{macrocode}
23431 % in case, the ambiguous interface is refltrans
23432 % \begin{macrocode}
23433 pop name @@centerifc GetIfcMode dup refltrans eq not { pop refl } if
23434 } if
23435 } ifelse
23436 } ifelse
23437 dup 6 1 roll
23438 % \end{macrocode}
23439 % if the ambiguous interface is the first, always draw to it
23440 % \begin{macrocode}
23441 IfcCntTmp IfcCnt eq { true }{ draw } ifelse
23442 ] cvx
23443 @@centerifc name 4 -1 roll
23444 connectifc { bgRefIndex }{ name GetRefIndex } ifelse
23445 CurrTmp CurrVecTmp
23446 10 dict begin HandleInterface end pop
23447 ToVec /CurrVecTmp ED ToVec /CurrTmp ED
23448 % \end{macrocode}
23449 % now check which is the outgoing plane
23450 % \begin{macrocode}
23451 name /outToPlane load GetNextPlane
23452 dup dup name isAmbiguousIfc exch 0 eq or not {
23453 [ exch name bgRefIndex trans draw ] cvx exch
23454 firstPlane name isAmbiguousIfc not { 3 -1 roll } if
23455 /IfcCntTmp IfcCntTmp 1 add def
23456 } {
23457 pop
23458 % \end{macrocode}
23459 % The ambiguous interface is the last one, correct it to have the bgRefIndex.
23460 % \begin{macrocode}
23461 exec 3 -1 roll pop bgRefIndex 3 1 roll [ 6 1 roll ] cvx
23462 firstPlane name isAmbiguousIfc not { exch } if
23463 } ifelse
23464 } ifelse
23465 } ifelse
23466 /IfcCnt IfcCntTmp def
23467 DebugEnd
23468 } bind def
23469 % \end{macrocode}
23470 % \end{macro}
23471 %
23472 % \begin{macro}{GetNextPlane}
23473 % \PSstring{comp} \PSproc{outToPlane} \PSop{GetNextPlane} \PSvar{PlaneNumber}
23474 % \begin{macrocode}
23475 /GetNextPlane {
23476 (GetNextPlane) DebugBegin
23477 2 copy (C) 3 -1 roll
23478 GetIfcCenter 3 -1 roll
23479 exec GetIfcCenter
23480 4 2 roll 4 copy @ABVect ToVec /Vec ED
23481 @ABDist /centerDist ED
23482 /sprod 1 def
23483 /nextPlane 0 def
23484 exch dup 3 1 roll
23485 cvn load dup /ambIfc get /ambIfc ED /N get 1 1 3 -1 roll {
23486 % \end{macrocode}
23487 % iterate through all interfaces of CompName which do not coincide with the ambiguous interface
23488 % \begin{macrocode}
23489 dup ambIfc eq not {
23490 3 copy 3 -1 roll 2 copy
23491 GetPlaneVec Vec 4 2 roll NormalVec
23492 Vec DotProd dup sprod lt 5 2 roll
23493 GetIfcCenter 3 -1 roll exec GetIfcCenter @ABDist
23494 centerDist lt and
23495 centerDist -1 eq { pop dup 0 gt } if
23496 { /sprod ED /nextPlane ED } { pop pop } ifelse
23497 } {
23498 pop
23499 } ifelse
23500 } for
23501 pop pop nextPlane
23502 DebugEnd
23503 } bind def
23504 % \end{macrocode}
23505 % \end{macro}
23506 %
23507 % \begin{macro}{TraceBeam}
23508 % [ CompN ... Comp1 \PSproc{options} \PSproc{start point} \PSvar{beamangle}
23509 % -> Yn Xn drawToN? ... Y1 X1 drawTo1? Y0 X0
23510 % \begin{macrocode}
23511 /TraceBeam {
23512 (Tracebeam) DebugBegin
23513 AngToVec /InVec ED /StartPoint ED
23514 /oldbeaminsidelast currentdict /beaminsidelast known {
23515 beaminsidelast
23516 } {
23517 false
23518 } ifelse def
23519 % \end{macrocode}
23520 % execute options
23521 % \begin{macrocode}
23522 exec
23523 connectifc {
23524 /nbeam bgRefIndex def
23525 } if
23526 /startinside startinside beaminsidefirst or def
23527 /stopinside stopinside beaminsidelast or def
23528 /PrevCorrect false def
23529 PrearrangePlanes
23530 PushAllPlanesOnStack
23531 currentdict /lastVecTmp known {
23532 lastVecTmp beamangle matrix rotate dtransform ToVec
23533 } {
23534 counttomark 2 ge beamalign relative eq and {
23535 2 copy /InVec load TransformInVec
23536 } {
23537 /InVec load
23538 } ifelse
23539 } ifelse
23540 /CurrVec ED
23541 currentdict /lastBeamPointTmp known {
23542 /lastBeamPointTmp load /Curr ED
23543 }{
23544 counttomark 2 ge {
23545 2 copy /StartPoint load TransformStartPos
23546 } {
23547 /StartPoint load
23548 } ifelse
23549 /Curr ED
23550 } ifelse
23551 counttomark /IfcCnt ED
23552 % \end{macrocode}
23553 % Init the refractive index
23554 % \begin{macrocode}
23555 /n1 bgRefIndex def
23556 /PN 1 def
23557 (start looping) DebugMsg
23558 {
23559 PN IfcCnt gt {
23560 exit
23561 } if
23562 (checked) DebugMsg
23563 beampathcount 0 eq {
23564 cleartomark mark exit
23565 } if
23566 % \end{macrocode}
23567 % iterate over all planes
23568 % \begin{macrocode}
23569 dup xcheck not {
23570 % \end{macrocode}
23571 % array, not executable
23572 % \begin{macrocode}
23573 PushAmbCompPlanesOnStack
23574 } if
23575 exec
23576 /draw ED /Mode ED /n2 ED 2 copy /CompName ED /IfcNum ED
23577 GetIfcCenter ToVec /CurrCenter ED
23578 Curr CurrVec
23579 connectifc PrevCorrect PN 2 gt and PN 2 eq or and {
23580 CurrVec CurrCenter PrevCenter PrevMode
23581 currentdict /relAngle known
23582 { relAngle } { 0 } ifelse connectInterfaces
23583 /relAngle ED
23584 } if
23585 % \end{macrocode}
23586 % Adjust the alignment of a node interface, if it is to be aligned
23587 % perpendicular to the beam vector (beamnodealign=vector).
23588 % \begin{macrocode}
23589 CompName cvn load begin
23590 currentdict /adjustRel known aligntovector and {
23591 IfcNum IfcName load begin
23592 currentdict /RX known not {
23593 % \end{macrocode}
23594 % Only exchange the coordinates of the beam vector, the sign is not
23595 % important for the interface vector.
23596 % \begin{macrocode}
23597 2 copy neg exch CM dtransform CompMtrx idtransform
23598 /DY ED /DX ED
23599 } if
23600 end
23601 } if
23602 end
23603 IfcNum CompName Mode n2 8 4 roll HandleInterface
23604 missed eq {
23605 counttomark PN 1 sub 3 mul sub {pop} repeat
23606 (The beam missed an interface) Warning exit
23607 exit
23608 } if
23609 PN 1 eq {
23610 pop pop
23611 /draw beaminsidefirst oldbeaminsidelast xor def
23612 } {
23613 ToVec /CurrVec ED
23614 } ifelse
23615 2 copy
23616 ToVec /Curr ED
23617 draw PN beampathskip 1 add gt and
23618 counttomark 3 roll
23619 /PrevCenter /CurrCenter load def
23620 /lastBeamPointTmp /Curr load def
23621 currentdict /lastVecTmp known {
23622 /prevVecTmp /lastVecTmp load def
23623 /lastVecTmp /CurrVec load def
23624 } {
23625 /CurrVec load dup /lastVecTmp ED /prevVecTmp ED
23626 } ifelse
23627 /PrevMode Mode def
23628 CompName cvn load /correct get /PrevCorrect ED
23629 PN IfcCnt eq {
23630 exit
23631 } {
23632 CurrVec 0 eq exch 0 eq and {
23633 IfcCnt PN sub {pop} repeat
23634 (Total internal reflection occured, this is not supported)
23635 Warning
23636 exit
23637 } if
23638 beampathcount 1 add PN eq {
23639 IfcCnt PN sub {pop} repeat
23640 exit
23641 } if
23642 /PN PN 1 add def
23643 } ifelse
23644 } loop
23645 DebugEnd
23646 } bind def
23647 % \end{macrocode}
23648 % \end{macro}
23649 %
23650 %
23651 % \begin{macro}{sign}
23652 % \begin{macrocode}
23653 /sign {
23654 0 ge { 1 } { -1 } ifelse
23655 } bind def
23656 % \end{macrocode}
23657 % \end{macro}
23658 %
23659 % \begin{macro}{Chirality}
23660 % \begin{macrocode}
23661 /Chirality {
23662 4 -1 roll mul 3 1 roll mul sub sign
23663 } bind def
23664 % \end{macrocode}
23665 % \end{macro}
23666 %
23667 % \begin{macro}{TraceInterfacePath}
23668 % \begin{macrocode}
23669 /TraceInterfacePath {
23670 tx@IntersectDict begin
23671 /ArrowA { {currentpoint} stopped {moveto}{pop pop pop pop} ifelse } def
23672 {} TraceCurveOrPath
23673 currentdict /ArrowA undef
23674 end
23675 } bind def
23676 % \end{macrocode}
23677 % \end{macro}
23678 %
23679 % \begin{macro}{TraceAndFillWideBeam}
23680 % Fill a wide beam. This has an own procedure, because each segment
23681 % of the beam must be filled separately.
23682 % \begin{pssyntax}
23683 % \PSvar{[} \PSstring{CompN} \PSvar{\ldots{}} \PSstring{Comp1}
23684 % \PSproc{options} \PSproc{start point up} \PSvar{beamangle\_up}
23685 % \PSproc{start point low} \PSvar{beamangle\_low} \PSop{FillWideBeam}
23686 % \end{pssyntax}
23687 % \begin{macrocode}
23688 /TraceAndFillWideBeam {
23689 (TraceAndFillWideBeam) DebugBegin
23690 AngToVec /InvecLow ED /StartLow ED
23691 AngToVec /InvecUp ED /StartUp ED
23692 % \end{macrocode}
23693 % execute user options
23694 % \begin{macrocode}
23695 exec
23696 connectifc {
23697 /nbeam bgRefIndex def
23698 } if
23699 /startinside startinside beaminsidefirst or def
23700 /stopinside stopinside beaminsidelast or def
23701 % \end{macrocode}
23702 % Number of segments already drawn
23703 % \begin{macrocode}
23704 /DrawnSegm 0 def
23705 % \end{macrocode}
23706 % whether the previous plane required correction of the input vector (used only with \opt{connectifc})
23707 % \begin{macrocode}
23708 /PrevCorrect false def
23709 PrearrangePlanes
23710 PushAllPlanesOnStack
23711 currentdict /lastVecTmpUp known
23712 currentdict /lastVecTmpLow known and {
23713 /CurrVecLow lastVecTmpLow beamangle matrix rotate dtransform ToVec def
23714 /CurrVecUp lastVecTmpUp beamangle matrix rotate dtransform ToVec def
23715 }{
23716 % \end{macrocode}
23717 % If the \opt{beamangle} is not absolute, use the connection between the first
23718 % two planes as reference and transform the input vectors accordingly.
23719 % \begin{macrocode}
23720 beamalign relative eq counttomark 2 ge and {
23721 2 copy /InvecLow load TransformInVec /CurrVecLow ED
23722 2 copy /InvecUp load TransformInVec /CurrVecUp ED
23723 } {
23724 /CurrVecLow /InvecLow load def
23725 /CurrVecUp /InvecUp load def
23726 } ifelse
23727 } ifelse
23728 % \end{macrocode}
23729 % If \opt{loadbeampoints} is set, the nodes \PSname{lastBeamPointTmpLow} and
23730 % \PSname{lastBeamPointTmpUp} are defined and used as starting points.
23731 % \begin{macrocode}
23732 currentdict /lastBeamPointTmpLow known
23733 currentdict /lastBeamPointTmpUp known and {
23734 /lastBeamPointTmpLow load /CurrLow ED
23735 /lastBeamPointTmpUp load /CurrUp ED
23736 % \end{macrocode}
23737 % The lower and upper beam vectors must possibly swapped if the
23738 % intersection points are loaded from a previous beam, but the beam
23739 % divergence is specified manually for this beam only. We must make
23740 % sure, that negative divergence gives a contracting beam.
23741 % \begin{macrocode}
23742 loadbeam not beamdiv 0 eq not and {
23743 CurrVecLow CurrVecUp Chirality
23744 CurrLow CurrUp @ABVect CurrVecLow CurrVecUp VecAdd Chirality 0 lt { neg } if
23745 beamdiv sign eq not {
23746 /CurrVecLow load /CurrVecUp load /CurrVecLow ED /CurrVecUp ED
23747 } if
23748 } if
23749 } {
23750 % \end{macrocode}
23751 % Transform the beam vectors relative to the connection between the first two interfaces.
23752 % \begin{macrocode}
23753 counttomark 2 ge {
23754 2 copy /StartLow load TransformStartPos /CurrLow ED
23755 2 copy /StartUp load TransformStartPos /CurrUp ED
23756 } {
23757 /StartLow load /CurrLow ED
23758 /StartUp load /CurrUp ED
23759 } ifelse
23760 } ifelse
23761 /PrevVecUp /CurrVecUp load def
23762 /PrevVecLow /CurrVecLow load def
23763 % \end{macrocode}
23764 % \PSvar{IfcCnt} is the number of interfaces pushed on the stack by
23765 % \PSvar{PushAllPlanesOnStack}. This number may be corrected later if an
23766 % ambiguous components is among them.
23767 % \begin{macrocode}
23768 counttomark /IfcCnt ED
23769 /n1 bgRefIndex def
23770 /CurrR false def
23771 /CurrPath false def
23772 /CurrUpT false def
23773 /CurrLowT false def
23774 /ret missed def
23775 /PN 1 def
23776 {
23777 PN IfcCnt gt {
23778 exit
23779 } if
23780 beampathcount 0 eq {
23781 cleartomark mark exit
23782 } if
23783 dup xcheck not {
23784 % \end{macrocode}
23785 % Found an array (not executable) instead of a procedure. This is an ambiguous
23786 % component, resolve the interfaces depending on the input vector and
23787 % surrounding interfaces. This can change \PSvar{IfcCnt}.
23788 % \begin{macrocode}
23789 PushAmbCompPlanesOnStack
23790 } if
23791 % \end{macrocode}
23792 % push the interface on the stack
23793 % \begin{macrocode}
23794 exec
23795 % \end{macrocode}
23796 % \PSvar{draw} indicates if the beam to the current interface should be drawn.
23797 % \begin{macrocode}
23798 PN beampathskip 1 add gt and /draw ED
23799 % \end{macrocode}
23800 % \PSvar{Mode} stores the mode (transmittive or reflective) of the current interface.
23801 % \begin{macrocode}
23802 /Mode ED /n2 ED 2 copy /CompName ED /IfcNum ED
23803 % \end{macrocode}
23804 % \PSvar{CurrPCenter} holds the coordinates of the current interface center.
23805 % \begin{macrocode}
23806 GetIfcCenter ToVec /CurrPCenter ED
23807 /oldn1 n1 def
23808 % \end{macrocode}
23809 % Adjust the alignment of a node interface, if it is to be aligned
23810 % perpendicular to the beam vector (beamnodealign=vector). The alignment
23811 % is carried out with the median vector of upper and lower beam.
23812 % \begin{macrocode}
23813 CompName cvn load /adjustRel known aligntovector and {
23814 connectifc PrevCorrect PN 2 gt and PN 2 eq or and {
23815 CurrVecUp CurrVecUp CurrPCenter PrevPCenter PrevMode
23816 currentdict /relAngleUp known { relAngleUp } { 0 } ifelse
23817 connectInterfaces pop
23818 CurrVecLow CurrVecLow CurrPCenter PrevPCenter PrevMode
23819 currentdict /relAngleLow known { relAngleLow } { 0 } ifelse
23820 connectInterfaces pop
23821 } {
23822 CurrVecUp CurrVecLow
23823 } ifelse
23824 VecAdd NormalizeVec
23825 CompName cvn load begin
23826 IfcNum IfcName load begin
23827 currentdict /RX known not {
23828 CM dtransform CompMtrx idtransform
23829 /DX ED neg /DY ED
23830 } {
23831 pop pop
23832 } ifelse
23833 end
23834 end
23835 } if
23836 % \end{macrocode}
23837 % Calculate new upper vector and intersection point
23838 % \begin{macrocode}
23839 CurrUp CurrVecUp
23840 connectifc PrevCorrect PN 2 gt and PN 2 eq or and {
23841 CurrVecUp CurrPCenter PrevPCenter PrevMode
23842 currentdict /relAngleUp known { relAngleUp } { 0 } ifelse
23843 connectInterfaces /relAngleUp ED
23844 } if
23845 /PrevUp /CurrUp load def
23846 /PrevUpT /CurrUpT load def
23847 /PrevPath /CurrPath load def
23848 IfcNum CompName Mode n2 8 4 roll HandleInterface
23849 dup /ret ED
23850 missed eq {
23851 counttomark {pop} repeat
23852 (The upper beam missed an interface) Warning exit
23853 } if
23854 ToVec /CurrVecUp ED
23855 ToVec /CurrUp ED
23856 currentdict /isectT known currentdict /isectPath known and {
23857 /CurrUpT isectT def
23858 /CurrPath isectPath def
23859 } if
23860 /n1 oldn1 def
23861 % \end{macrocode}
23862 % Calculate new lower vector and intersection point
23863 % \begin{macrocode}
23864 /PrevLow /CurrLow load def
23865 /PrevLowT /CurrLowT load def
23866 CurrLow CurrVecLow
23867 connectifc PrevCorrect PN 2 gt and PN 2 eq or and {
23868 CurrVecLow CurrPCenter PrevPCenter PrevMode
23869 currentdict /relAngleLow known { relAngleLow } { 0 } ifelse
23870 connectInterfaces /relAngleLow ED
23871 } if
23872 IfcNum CompName Mode n2 8 4 roll HandleInterface
23873 dup missed eq {
23874 /ret ED
23875 (The lower beam missed an interface) Warning
23876 counttomark {pop} repeat exit
23877 } if
23878 tir eq ret tir eq or {
23879 /ret tir def
23880 } {
23881 /ret ok def
23882 } ifelse
23883 ToVec /CurrVecLow ED
23884 ToVec /CurrLow ED
23885 % \end{macrocode}
23886 % lower done
23887 % \begin{macrocode}
23888 currentdict /isectT known {
23889 /CurrLowT isectT def
23890 } if
23891 /PrevR CurrR def
23892 PrevR type /realtype eq {
23893 /CurrCenter load /PrevCenter ED
23894 } if
23895 IfcNum CompName isCurvedIfc {
23896 IfcNum CompName LoadIfc
23897 tx@Dict begin Pyth end /CurrR ED
23898 ToVec /CurrCenter ED
23899 } {
23900 /CurrR false def
23901 /CurrCenter false def
23902 } ifelse
23903 IfcNum CompName isPathIfc not {
23904 /CurrPath false def
23905 /CurrLowT false def
23906 /CurrUpT false def
23907 } if
23908 PN 1 gt currentdict /fillBeam known and {
23909 draw {
23910 /DrawnSegm DrawnSegm 1 add def
23911 PrevUp moveto CurrUp lineto
23912 IfcNum CompName isCurvedIfc {
23913 CurrCenter CurrUp CurrLow
23914 4 copy 3 -1 roll eq 3 1 roll eq and {
23915 6 {pop} repeat
23916 } {
23917 TangentCrosspoint
23918 CurrLow CurrR arct
23919 } ifelse
23920 } {
23921 IfcNum CompName isPathIfc {
23922 CurrPath CurrUpT CurrLowT TraceInterfacePath
23923 } {
23924 CurrLow lineto
23925 } ifelse
23926 } ifelse
23927 PrevLow lineto
23928 PrevPath type /booleantype eq not {
23929 PrevPath PrevLowT PrevUpT TraceInterfacePath
23930 } {
23931 PrevR type /booleantype eq not {
23932 PrevCenter PrevLow PrevUp
23933 4 copy 3 -1 roll eq 3 1 roll eq and {
23934 6 {pop} repeat
23935 } {
23936 TangentCrosspoint
23937 PrevUp PrevR arct
23938 } ifelse
23939 } {
23940 PrevUp lineto
23941 } ifelse
23942 } ifelse
23943 } if
23944 Mode refl eq draw and
23945 draw not DrawnSegm 0 gt and or {
23946 fillBeam newpath
23947 /DrawnSegm 0 def
23948 } if
23949 } if
23950 PN 1 eq {
23951 % \end{macrocode}
23952 % At the first interface, we only determine the actual intersection
23953 % points with the interfaces, the beam vectors are not changed and must
23954 % be reset to the previous values.
23955 % \begin{macrocode}
23956 /CurrVecUp /PrevVecUp load def
23957 /CurrVecLow /PrevVecLow load def
23958 } if
23959 % \end{macrocode}
23960 % If the beam should also be stroked, push the coordinates and the 'draw' information on the stack
23961 % \begin{macrocode}
23962 strokeBeam {
23963 CurrUp draw CurrLow draw counttomark 1 add 6 roll
23964 } if
23965 PN IfcCnt eq ret tir eq or
23966 beampathcount 1 add PN eq or {
23967 DrawnSegm 0 gt currentdict /fillBeam known and {
23968 fillBeam newpath
23969 /DrawnSegm 0 def
23970 } if
23971 IfcCnt PN sub {pop} repeat
23972 ret tir eq {
23973 (Total internal reflection occured, this is not supported)
23974 Warning
23975 } if
23976 exit
23977 } if
23978 /PN PN 1 add def
23979 /PrevVecUp /CurrVecUp load def
23980 /PrevVecLow /CurrVecLow load def
23981 /PrevPCenter /CurrPCenter load def
23982 /PrevMode Mode def
23983 CompName cvn load /correct get /PrevCorrect ED
23984 } loop
23985 DrawnSegm 0 gt currentdict /fillBeam known and {
23986 fillBeam newpath
23987 /DrawnSegm 0 def
23988 } if
23989 ret missed eq not {
23990 % \end{macrocode}
23991 % Check if Up and Low must be swapped for next beam. This depends both
23992 % on the relative orientation (chirality) of the incoming beam vector
23993 % and the vector between the two intersection points CurrUp and CurrLow,
23994 % and the direction of the beam vector.
23995 %
23996 % The intersection points are swapped if the angle of the beam vector is
23997 % between $90°+\epsilon$ and $-90°+\epsilon$ and the chirality is
23998 % positive, or if the beam vector points to the right, positive
23999 % half-circle and the chirality is negative. The $\epsilon$ is
24000 % introduced to get the correct order for $\pm 90°$ despite numerical
24001 % errors.
24002 % \begin{macrocode}
24003 CurrLow CurrUp @ABVect % from Low to Up
24004 PrevVecUp PrevVecLow VecAdd
24005 2 copy 6 2 roll
24006 Chirality 0 lt
24007 3 1 roll 2 copy pop -1e-5 lt
24008 3 1 roll exch 1e-5 lt exch 0 lt and or xor {
24009 % \end{macrocode}
24010 % swap upper and lower beam points for next beam
24011 % \begin{macrocode}
24012 /lastBeamPointTmpUp /CurrLow load def
24013 /lastBeamPointTmpLow /CurrUp load def
24014 /lastVecTmpUp /CurrVecLow load def
24015 /lastVecTmpLow /CurrVecUp load def
24016 } {
24017 /lastBeamPointTmpLow /CurrLow load def
24018 /lastBeamPointTmpUp /CurrUp load def
24019 /lastVecTmpUp /CurrVecUp load def
24020 /lastVecTmpLow /CurrVecLow load def
24021 } ifelse
24022 /lastVecTmpUp load /lastVecTmpLow load
24023 /prevVecLow ED /prevVecUp ED
24024 } if
24025 DebugEnd
24026 } bind def
24027 % \end{macrocode}
24028 % \end{macro}
24029 %
24030 % \begin{macro}{DrawbeamPrepare}
24031 % Prepare the data points for drawing with \PSop{DrawbeamSimple} and
24032 % \PSop{DrawbeamArrowInside}.
24033 % \begin{macrocode}
24034 /DrawbeamPrepare {
24035 % \end{macrocode}
24036 % Remove trailing empty line parts.
24037 % \begin{macrocode}
24038 {
24039 counttomark 6 le { exit } if
24040 3 index not { pop pop pop }{ exit } ifelse
24041 } loop
24042 % \end{macrocode}
24043 % Remove heading empty line parts. Note, that the first point must not have
24044 % 'draw = true', because it is the starting point which we have to move to.
24045 % \begin{macrocode}
24046 {
24047 counttomark 3 le { exit } if
24048 counttomark 3 sub index not {
24049 counttomark -3 roll pop pop pop
24050 }{
24051 exit
24052 } ifelse
24053 } loop
24054 } bind def
24055 % \end{macrocode}
24056 % \end{macro}
24057 %
24058 % \begin{macro}{DrawbeamSimple}
24059 % \begin{macrocode}
24060 /DrawbeamSimple {
24061 pop 5 copy 3 -1 roll pop
24062 ArrowA pop pop pop pop
24063 counttomark 3 idiv -1 2 {
24064 pop {
24065 lineto
24066 }{
24067 moveto
24068 } ifelse
24069 } for
24070 {CP 4 2 roll ArrowB lineto pop pop } {moveto} ifelse
24071 } bind def
24072 % \end{macrocode}
24073 % \end{macro}
24074 %
24075 % \begin{macro}{DrawbeamArrowInside}
24076 % This is the /Line definition from \opt{pstricks-add}, adapted to the beam path
24077 % structure which includes the boolean values to indicate if a line is drawn, or
24078 % if we use moveto. There was no way to patch the original definition to account
24079 % for the moveto parts and avoid duplicating the code.
24080 % \begin{macrocode}
24081 /DrawbeamArrowInside {
24082 6 copy pop
24083 /y1 ED /x1 ED pop /y2 ED /x2 ED
24084 /Alpha y2 y1 sub x2 x1 sub Atan def
24085 pop 3 -1 roll 5 1 roll
24086 ArrowA
24087 % \end{macrocode}
24088 % dx add, and dy add, to get the current point at the end of the arrow tip.
24089 % \begin{macrocode}
24090 x1 Alpha cos arrowlength mul add
24091 y1 Alpha sin arrowlength mul add
24092 5 -1 roll 3 1 roll true
24093 /N N 1 sub def
24094 N {
24095 6 copy pop
24096 /y1 ED /x1 ED pop /y2 ED /x2 ED /draw ED
24097 % \end{macrocode}
24098 % Check for line segment length and draw the arrow only, if the segment is long
24099 % enough. This is in first place to avoid drawing an inside arrow for the
24100 % pinhole which has three interfaces instead of one so that it can be used as
24101 % real spatial filter.
24102 % \begin{macrocode}
24103 x1 y1 x2 y2 @ABDist dup
24104 arrowminlength ge
24105 exch arrowmaxlength dup 0 lt
24106 3 1 roll le or and {
24107 x1 y1
24108 arrowpos 1 gt {
24109 /Alpha y2 y1 sub x2 x1 sub Atan def
24110 /dArrowPos dArrowPosStart abs def
24111 /ArrowPos ArrowPosStart def
24112 arrowno {
24113 /ArrowPos ArrowPos dArrowPos add def
24114 x1 Alpha cos ArrowPos mul add
24115 y1 Alpha sin ArrowPos mul add
24116 6 index { ArrowInside } if
24117 pop pop
24118 } repeat
24119 }{
24120 arrowno 1 gt {
24121 1.0 arrowno 1.0 add div
24122 }{
24123 dArrowPosStart
24124 } ifelse /dArrowPos ED
24125 /ArrowPos ArrowPosStart def
24126 arrowno {
24127 /ArrowPos ArrowPos dArrowPos add def
24128 x2 x1 sub ArrowPos mul x1 add
24129 y2 y1 sub ArrowPos mul y1 add
24130 6 index { ArrowInside } if
24131 pop pop
24132 } repeat
24133 } ifelse
24134 pop pop
24135 } if
24136 draw {Lineto}{moveto} ifelse
24137 } repeat
24138 {CP 4 2 roll ArrowB lineto pop pop } {moveto} ifelse
24139 } bind def
24140 % \end{macrocode}
24141 % \end{macro}
24142 %
24143 % \begin{macro}{isAmbiguous}
24144 % Check if \PSvar{compname} is ambiguous, i.e. if it can have alternating beam
24145 % paths depending on the input and output plane (e.g. beamsplitter can either
24146 % transmit or reflect a beam).
24147 % \begin{pssyntax}
24148 % \PSstring{compname} \PSop{isAmbiguous} \PSvar{boolean}
24149 % \end{pssyntax}
24150 % \begin{macrocode}
24151 /isAmbiguous {
24152 cvn load dup /ambiguous known {
24153 /ambiguous get
24154 } {
24155 pop false
24156 } ifelse
24157 } bind def
24158 % \end{macrocode}
24159 % \end{macro}
24160 %
24161 % \begin{macro}{isAmbiguousIfc}
24162 % Check if interface \PSvar{IfcNum} is the ambiguous interface of \PSvar{compname}.
24163 % \begin{pssyntax}
24164 % \PSvar{IfcNum} \PSstring{compname} \PSop{isAmbiguousIfc} \PSvar{boolean}
24165 % \end{pssyntax}
24166 % \begin{macrocode}
24167 /isAmbiguousIfc {
24168 cvn load dup /ambiguous known {
24169 /ambIfc get eq
24170 } {
24171 pop pop false
24172 } ifelse
24173 } bind def
24174 % \end{macrocode}
24175 % \end{macro}
24176 %
24177 % \begin{macro}{isCurvedIfc}
24178 % Check if interface \PSvar{IfcNum} of componente \PSvar{compname} is curved.
24179 % \begin{pssyntax}
24180 % \PSvar{IfcNum} \PSstring{compname} \PSop{isCurvedIfc} \PSvar{bool}
24181 % \end{pssyntax}
24182 % \begin{macrocode}
24183 /isCurvedIfc {
24184 cvn load begin
24185 IfcName load /RX known
24186 end
24187 } bind def
24188 % \end{macrocode}
24189 % \end{macro}
24190 %
24191 % \begin{macro}{isPathIfc}
24192 % Check if interface \PSvar{IfcNum} of componente \PSvar{compname} is an arbitrary path.
24193 % \begin{pssyntax}
24194 % \PSvar{IfcNum} \PSstring{compname} \PSop{isPathIfc} \PSvar{bool}
24195 % \end{pssyntax}
24196 % \begin{macrocode}
24197 /isPathIfc {
24198 cvn load begin
24199 IfcName load /Path known
24200 end
24201 } bind def
24202 % \end{macrocode}
24203 % \end{macro}
24204 %
24205 % \begin{macro}{HandleInterface}
24206 % \begin{pssyntax}
24207 % \PSvar{IfcNum} \PSstring{CompName} \PSvar{mode n2 X0 Y0 Xin Yin}
24208 % \PSop{HandleInterface}
24209 % \PSvar{X0' Y0' Xout Yout status}
24210 % \end{pssyntax}
24211 % \begin{macrocode}
24212 /HandleInterface {
24213 (HandleInterface) DebugBegin
24214 /Yin ED /Xin ED /Y0 ED /X0 ED /n2 ED /mode ED
24215 currentdict /isectT undef currentdict /isectPath undef
24216 2 copy 2 copy LoadIfc % IfcNum name IfcNum name path
24217 dup type /arraytype eq { % is an path interface
24218 dup /isectPath exch def
24219 3 1 roll pop pop PathInterface % IfcNum name t X0' Y0' Xout Yout status
24220 dup missed eq not { 6 -1 roll /isectT exch def } if
24221 } {
24222 6 -2 roll
24223 isCurvedIfc { CurvedInterface }{ PlainInterface } ifelse
24224 } ifelse
24225 % \end{macrocode}
24226 % IfcNum CompName X0' Y0' Xout Yout status
24227 %
24228 % Check if X0' Y0' are within the numerical aperture of the interface
24229 % \begin{macrocode}
24230 dup missed eq not useNA connectifc not and and {
24231 7 3 roll 2 copy 9 2 roll
24232 4 2 roll 2 copy
24233 %% X0' Y0' Xout Yout status X0' Y0' IfcNum CompName IfcNum CompName
24234 cvn load begin IfcName load dup /NAlow get exch /NAup get end
24235 2 copy lt {
24236 4 2 roll 2 copy LoadIfc NormalizeVec
24237 6 -2 roll isCurvedIfc {
24238 neg exch
24239 } if
24240 %% ... X0' Y0' NAlow NAup X Y dXp dYp
24241 8 -2 roll 6 -2 roll
24242 %% ... NAlow NAup dXp dYp X0' Y0' X Y
24243 @ABVect DotProd
24244 dup 4 -1 roll ge 3 1 roll ge and not
24245 {
24246 pop missed
24247 } if
24248 }{
24249 6 {pop} repeat
24250 } ifelse
24251 } {
24252 7 -2 roll pop pop
24253 } ifelse
24254 DebugEnd
24255 } bind def
24256 % \end{macrocode}
24257 % \end{macro}
24258 %
24259 % \begin{macro}{LoadIfc}
24260 % \begin{pssyntax}
24261 % \PSvar{IfcNum} \PSstring{CompName} \PSop{LoadIfc} \PSvar{X Y} \PSvar{dX|RY dY|RY}
24262 % \end{pssyntax}
24263 % \begin{macrocode}
24264 /LoadIfc {
24265 (LoadIfc) DebugBegin
24266 cvn load begin
24267 IfcName load begin
24268 currentdict /Path known {
24269 Path TransformPath
24270 } {
24271 X Y
24272 CompMtrx transform CM itransform
24273 currentdict /RX known { RX RY }{ DX DY } ifelse
24274 CompMtrx dtransform CM idtransform
24275 } ifelse
24276 end
24277 end
24278 DebugEnd
24279 } bind def
24280 % \end{macrocode}
24281 % \end{macro}
24282 %
24283 % \begin{macro}{isFreeray}
24284 % Check if \PSvar{compname} is a free-ray componente by checking if there is a
24285 % refractive index associated with it.
24286 % \begin{pssyntax}
24287 % \PSstring{compname} \PSop{isFreeray} \PSvar{boolean}
24288 % \end{pssyntax}
24289 % \begin{macrocode}
24290 /isFreeray {
24291 cvn load /n known
24292 } bind def
24293 % \end{macrocode}
24294 % \end{macro}
24295 %
24296 % \begin{macro}{/compIsKnown}
24297 % Check if a component is known.
24298 % \begin{macrocode}
24299 /compIsKnown {
24300 dup type /stringtype eq { cvn } if
24301 tx@OptexpDict exch known
24302 } bind def
24303 % \end{macrocode}
24304 % \end{macro}
24305 %
24306 % \begin{macro}{PrearrangePlanes}
24307 % \begin{pssyntax}
24308 % \PSvar{[} \PSstring{CompN} \PSvar{\ldots} \PSvar{Comp1} \PSop{PrearrangePlanes}\\
24309 % \PSvar{[} \PSvar{desc|asc} \PSstring{CompN} \PSvar{\ldots} \PSvar{desc|asc} \PSstring{Comp1}
24310 % \end{pssyntax}
24311 % \begin{macrocode}
24312 /PrearrangePlanes {
24313 (PrearrangePlanes) DebugBegin
24314 counttomark dup 2 lt {
24315 dup 0 eq {
24316 (Found no component on stack, drawing no beam) PrintWarning
24317 }{
24318 % \end{macrocode}
24319 % Only one component, draw always in ascending order. We must still
24320 % check in /PushAllPlanesOnStack if the component has only one
24321 % interface.
24322 % \begin{macrocode}
24323 exch dup
24324 compIsKnown {
24325 dup isFreeray {
24326 asc exch 3 -1 roll
24327 }{
24328 OneFiberCompWarning
24329 pop
24330 } ifelse
24331 }{
24332 CompUnknownWarning
24333 } ifelse
24334 } ifelse
24335 /N 0 def
24336 }{
24337 % \end{macrocode}
24338 % We have a minimum of two components on stack
24339 % \begin{macrocode}
24340 /N ED
24341 /CompA ED dup /CompB ED
24342 % \end{macrocode}
24343 % Check, if the components have been defined
24344 % \begin{macrocode}
24345 CompA compIsKnown CompB compIsKnown and {
24346 CompA isFreeray {
24347 CompA isAmbiguous {
24348 amb dup CompA
24349 } {
24350 CompB isAmbiguous {
24351 1 CompA GetIfcCenter (C) CompB GetIfcCenter @ABDist
24352 (N) CompA GetIfcCenter (C) CompB GetIfcCenter @ABDist
24353 } {
24354 1 CompA GetIfcCenter
24355 1 CompB GetIfcCenter
24356 (N) CompB GetIfcCenter
24357 true OrderNodes exch pop
24358 (N) CompA GetIfcCenter
24359 1 CompB GetIfcCenter
24360 (N) CompB GetIfcCenter
24361 true OrderNodes exch pop
24362 } ifelse
24363 le { desc } { asc } ifelse dup CompA
24364 } ifelse
24365 counttomark 2 roll
24366 }{
24367 FiberCompWarning
24368 counttomark 1 sub { pop } repeat
24369 /N 0 def
24370 } ifelse
24371 }{
24372 % \end{macrocode}
24373 % One of the first two components was not defined, do not draw any beam
24374 % \begin{macrocode}
24375 /N 0 def
24376 CompA compIsKnown not {CompA}{CompB} ifelse
24377 CompUnknownWarning
24378 } ifelse
24379 } ifelse
24380 2 1 N {
24381 /i ED exch /CompB ED
24382 CompB compIsKnown not {
24383 counttomark i 1 sub 2 mul 1 add sub { pop } repeat
24384 CompB CompUnknownWarning
24385 exit
24386 } if
24387 CompB isFreeray not {
24388 counttomark i 1 sub 2 mul 1 add sub { pop } repeat
24389 FiberCompWarning
24390 exit
24391 } if
24392 CompB isAmbiguous not {
24393 dup desc eq { 1 } { dup amb eq { (C) }{ (N) } ifelse } ifelse
24394 CompA GetIfcCenter
24395 1 CompB GetIfcCenter
24396 (N) CompB GetIfcCenter false OrderNodes dup dup
24397 % \end{macrocode}
24398 % check if we have a NodeIfc
24399 % \begin{macrocode}
24400 4 -1 roll CompA exch 5 -1 roll CompB exch
24401 i 2 eq {
24402 % \end{macrocode}
24403 % check also the first plane
24404 % \begin{macrocode}
24405 4 copy 4 2 roll AdjustRelRot
24406 } if
24407 AdjustRelRot
24408 } {
24409 % \end{macrocode}
24410 % check if the first plane is an NodeIfc and correct its rotation, the
24411 % node ordering in CompA is irrelevant at this point, so we use desc.
24412 % \begin{macrocode}
24413 i 2 eq {
24414 CompB amb CompA desc AdjustRelRot
24415 } if
24416 pop amb dup
24417 } ifelse
24418 CompB /CompA CompB def
24419 counttomark 2 roll
24420 } for pop
24421 DebugEnd
24422 } bind def
24423 % \end{macrocode}
24424 % \end{macro}
24425 %
24426 % \begin{macro}{AdjustRelRot}
24427 % Adjusts the relative orientation of \PSstring{CompB} based on the
24428 % relative connection between \PSstring{CompA} and
24429 % \PSstring{CompB}. This is only done for ``node interfaces'', which
24430 % are created automatically when drawing beams through nodes.
24431 % \begin{pssyntax}
24432 % \PSstring{CompA} \PSvar{desc|asc} \PSstring{CompB} \PSvar{desc|asc} \PSop{AdjustRelRot}
24433 % \end{pssyntax}
24434 % \begin{macrocode}
24435 /AdjustRelRot {
24436 (AdjustRelRot) DebugBegin
24437 exch dup cvn load /adjustRel known aligntovector not and {
24438 dup dup 4 2 roll isAmbiguous {
24439 exch pop (C)
24440 }{
24441 desc eq { (N) }{ 1 } ifelse
24442 } ifelse
24443 exch GetIfcCenter 5 3 roll
24444 exch dup 3 1 roll isAmbiguous {
24445 pop (C)
24446 }{
24447 desc eq { 1 }{ (N) } ifelse
24448 } ifelse
24449 exch GetIfcCenter
24450 @ABVect exch atan exch
24451 cvn load begin
24452 adjustRel {
24453 matrix rotate CompMtrx matrix concatmatrix /CompMtrx ED
24454 /adjustRel false def
24455 } {
24456 pop
24457 } ifelse
24458 end
24459 } {
24460 pop pop pop pop
24461 } ifelse
24462 DebugEnd
24463 } bind def
24464 % \end{macrocode}
24465 % \end{macro}
24466 %
24467 % \begin{macro}{PushAllPlanesOnStack}
24468 % \begin{pssyntax}
24469 % \PSvar{[} \PSvar{desc|asc} \PSstring{CompN} \PSvar{\ldots} \PSvar{desc|asc} \PSstring{Comp1}
24470 % \PSop{PushAllPlanesOnStack}
24471 % \PSvar{[} \PSproc{PN \PSstring{CompName} n mode draw?} \PSvar{\ldots{}}
24472 % \end{pssyntax}
24473 % \begin{psarglist}
24474 % \psargitem{PN} The number of the plane of the component \PSstring{CompNameN}, can be an integer or a string.
24475 % \psargitem{CompName} The name of the component which the interface \PSvar{PN} belongs to.
24476 % \psargitem{n} The refractive index after the respective interface.
24477 % \psargitem{mode} Specifies if the interface is transmittive (\PSvar{trans}) or reflective (\PSvar{refl}).
24478 % \psargitem{draw?} Specifies if the connection to this interface should be drawn or if the current point is only moved.
24479 % \end{psarglist}
24480 % \begin{macrocode}
24481 /PushAllPlanesOnStack {
24482 (PushAllPlanesOnStack) DebugBegin
24483 counttomark 2 div cvi /@N ED
24484 1 1 @N {
24485 % \end{macrocode}
24486 % iterate over all components
24487 % \begin{macrocode}
24488 /last false def
24489 /first false def
24490 dup 1 eq {
24491 /first true def pop beaminsidefirst
24492 } {
24493 @N eq {
24494 beaminsidelast
24495 /last true def
24496 } {
24497 beaminside
24498 } ifelse
24499 } ifelse
24500 exch load dup dup
24501 /forcebeaminside get {
24502 3 -1 roll pop true
24503 } {
24504 dup /allowbeaminside get 4 -1 roll and
24505 } ifelse
24506 /drawinside ED
24507 /ambiguous get {
24508 /name get drawinside [ 3 1 roll ]
24509 counttomark 1 roll pop
24510 } {
24511 begin
24512 % \end{macrocode}
24513 % Start of the component dict.
24514 % \begin{macrocode}
24515 desc eq {
24516 N N -1 1 1
24517 } {
24518 1 1 1 N N
24519 } ifelse
24520 first {
24521 startinside not {
24522 % \end{macrocode}
24523 % first comp and we do not start inside
24524 % \begin{macrocode}
24525 5 -2 roll
24526 pop pop
24527 2 copy 5 2 roll
24528 } {
24529 startinsidecount 0 gt N startinsidecount sub 1 gt and {
24530 % \end{macrocode}
24531 % we do not use all segments of the first component
24532 % \begin{macrocode}
24533 3 -1 roll dup 4 1 roll
24534 N 1 sub startinsidecount sub mul
24535 6 -2 roll pop add dup 5 2 roll
24536 } if
24537 } ifelse
24538 } if
24539 last stopinsidecount 0 gt N stopinsidecount sub 1 gt and and {
24540 % 1 1 1 N N
24541 3 -1 roll dup 4 1 roll stopinsidecount mul
24542 6 -1 roll dup 7 1 roll add 3 1 roll pop pop dup
24543 } if
24544 5 1 roll
24545 {
24546 % \end{macrocode}
24547 % iterate over all planes
24548 % \begin{macrocode}
24549 3 1 roll 2 copy 5 -1 roll
24550 dup 3 1 roll
24551 eq first not and {
24552 % \end{macrocode}
24553 % always draw the line to the first plane of a component
24554 % \begin{macrocode}
24555 true
24556 } {
24557 % \end{macrocode}
24558 % the other beams depend on some options
24559 % \begin{macrocode}
24560 drawinside
24561 } ifelse
24562 exch dup 4 -1 roll eq {
24563 % \end{macrocode}
24564 % after the last component plane we have always air
24565 % \begin{macrocode}
24566 bgRefIndex
24567 }{
24568 % \end{macrocode}
24569 % otherwise the respective refractive index of the component
24570 % \begin{macrocode}
24571 name GetRefIndex
24572 } ifelse
24573 exch inttostr exch
24574 3 1 roll name
24575 4 1 roll
24576 dup IfcName load /mode get
24577 3 1 roll 5 1 roll
24578 [ 6 1 roll ] cvx counttomark 1 roll
24579 last {
24580 savebeampoints 1 ge stopinside not and
24581 savebeampoints 1 lt beaminsidelast not and or {
24582 exit
24583 } if
24584 } if
24585 } for pop pop
24586 end
24587 } ifelse
24588 } for
24589 DebugEnd
24590 counttomark 1 eq { pop } if
24591 } bind def
24592 % \end{macrocode}
24593 % \end{macro}
24594 %
24595 % \begin{macro}{IfcName}
24596 % Construct the interface name from \PSvar{num}.
24597 % \begin{pssyntax}
24598 % \PSvar{num} \PSop{IfcName} \PSname{P@num}
24599 % \end{pssyntax}
24600 % \begin{macrocode}
24601 /IfcName {
24602 inttostr (P@) exch strcat cvn
24603 } bind def
24604 % \end{macrocode}
24605 % \end{macro}
24606 %
24607 % \begin{macro}{GetIfcMode}
24608 % \begin{pssyntax}
24609 % \PSstring{name} \PSvar{num} \PSop{GetIfcMode} \PSvar{mode}
24610 % \end{pssyntax}
24611 % \begin{macrocode}
24612 /GetIfcMode {
24613 exch cvn load begin
24614 IfcName load /mode get
24615 end
24616 } bind def
24617 % \end{macrocode}
24618 % \end{macro}
24619 % \begin{macro}{NodeName}
24620 % Construct the node name from a string or number.
24621 % \begin{pssyntax}
24622 % \PSstring{name} \PSvar{num} \PSop{NodeName} \PSname{N@namenum}
24623 % \end{pssyntax}
24624 % \begin{macrocode}
24625 /NodeName {
24626 dup /stringtype eq not { inttostr } if
24627 strcat (N@) exch strcat cvn
24628 } bind def
24629 % \end{macrocode}
24630 % \end{macro}
24631 %
24632 % \begin{macro}{OrderNodes}
24633 % Check if node (\PSvar{XB1}, \PSvar{YB1}) or (\PSvar{XBN}, \PSvar{YBN}) is nearer to node (\PSvar{XA}, \PSvar{YA}). If it
24634 % \PSvar{B1} is nearer, push \PSvar{asc} on the stack, otherwise
24635 % \PSvar{desc}. If \PSvar{calcDist} is \opt{true} it leaves also the actual
24636 % smallest distance on the stack.
24637 % \begin{pssyntax}
24638 % \PSvar{XA YA XB1 YB1 XBN YBN calcDist} \PSop{OrderNodes} \PSvar{desc|asc} \PSvar{distance}
24639 % \end{pssyntax}
24640 % \begin{macrocode}
24641 /OrderNodes {
24642 7 1 roll 6 -2 roll 2 copy 8 2 roll
24643 @ABDist 5 1 roll @ABDist 2 copy gt {
24644 pop asc exch
24645 } {
24646 exch pop desc exch
24647 } ifelse
24648 3 -1 roll not {
24649 pop
24650 } if
24651 } bind def
24652 % \end{macrocode}
24653 % \end{macro}
24654 %
24655 % \begin{macro}{NormalVec}
24656 % Construct a normal vector $\vec{n}$ to the plane such that its
24657 % scalar product with the incomping wave vector $\vec{v}_\text{in}$ is
24658 % negative: $\vec{n}\cdot (-\vec{v}_\text{in}) > 0$.
24659 % \begin{pssyntax}
24660 % \PSvar{Xin Yin Xplane Yplane} \PSop{NormalVec} \PSvar{Xnorm Ynorm}
24661 % \end{pssyntax}
24662 % \begin{macrocode}
24663 /NormalVec {
24664 neg exch 2 copy 6 2 roll DotProd 0 gt {
24665 -1 mul exch -1 mul exch
24666 } if
24667 NormalizeVec
24668 } bind def
24669 % \end{macrocode}
24670 % \end{macro}
24671 %
24672 % \begin{macro}{DotProd}
24673 % Scalar product between two vectors.
24674 % \begin{pssyntax}
24675 % \PSvar{Xa Ya Xb Yb} \PSop{DotProd} \PSvar{val}
24676 % \end{pssyntax}
24677 % \begin{macrocode}
24678 /DotProd {
24679 3 -1 roll mul 3 1 roll mul add
24680 } bind def
24681 % \end{macrocode}
24682 % \end{macro}
24683 %
24684 % \begin{macro}{VecAngle}
24685 % Angle between two vectors $\cos(\alpha) = \frac{ab}{|a||b|}$
24686 % \begin{pssyntax}
24687 % \PSvar{Xa Ya Xb Yb} \PSop{VecAngle} \PSvar{angle}
24688 % \end{pssyntax}
24689 % \begin{macrocode}
24690 /VecAngle {
24691 4 copy 4 copy DotProd 5 1 roll
24692 tx@Dict begin
24693 Pyth 3 1 roll Pyth
24694 end mul
24695 div Acos
24696 5 2 roll mul 4 1 roll 3 -1 roll mul 3 -1 roll sub
24697 0 le { -1 }{ 1 } ifelse mul
24698 } bind def
24699 % \end{macrocode}
24700 % \end{macro}
24701 %
24702 % \begin{macro}{VecAdd}
24703 % Addition of two vectors.
24704 % \begin{pssyntax}
24705 % \PSvar{Xa Ya Xb Yb} \PSop{VecAdd} \PSvar{Xa+Xb Ya+Yb}
24706 % \end{pssyntax}
24707 % \begin{macrocode}
24708 /VecAdd {
24709 3 -1 roll add 3 1 roll add exch
24710 } bind def
24711 % \end{macrocode}
24712 % \end{macro}
24713 %
24714 % \begin{macro}{VecSub}
24715 % Subtraction of two vectors.
24716 % \begin{pssyntax}
24717 % \PSvar{Xa Ya Xb Yb} \PSop{VecSub} \PSvar{Xa-Xb Ya-Yb}
24718 % \end{pssyntax}
24719 % \begin{macrocode}
24720 /VecSub {
24721 neg 3 -1 roll add 3 1 roll neg add exch
24722 } bind def
24723 % \end{macrocode}
24724 % \end{macro}
24725 %
24726 % \begin{macro}{VecScale}
24727 % Scale a vector by a factor \PSvar{fac}.
24728 % \begin{pssyntax}
24729 % \PSvar{Xa Ya fac} \PSop{VecScale} \PSvar{fac}$\cdot$\PSvar{Xa} \PSvar{fac}$\cdot$\PSvar{Ya}
24730 % \end{pssyntax}
24731 % \begin{macrocode}
24732 /VecScale {
24733 dup 4 -1 roll mul 3 1 roll mul
24734 } bind def
24735 % \end{macrocode}
24736 % \end{macro}
24737 %
24738 % \begin{macro}{ToVec}
24739 % Convert two numbers to a procedure holding the two values. This
24740 % representation is used to save coordinate values of nodes and vectors.
24741 % \begin{pssyntax}
24742 % \PSvar{X Y} \PSop{ToVec} \PSproc{X Y}
24743 % \end{pssyntax}
24744 % \begin{macrocode}
24745 /ToVec {
24746 ToPnt cvx
24747 } bind def
24748 % \end{macrocode}
24749 % \end{macro}
24750 %
24751 % \begin{macro}{ToPnt}
24752 % Convert two numbers to an array holding the two values.
24753 % \begin{pssyntax}
24754 % \PSvar{X Y} \PSop{ToPnt} \PSarray{X Y}
24755 % \end{pssyntax}
24756 % \begin{macrocode}
24757 /ToPnt {
24758 [ 3 1 roll ]
24759 } bind def
24760 % \end{macrocode}
24761 % \end{macro}
24762 %
24763 % \begin{macro}{AngToVec}
24764 % Convert an angle to the related vector representation (normalized). The
24765 % angle is with respect to the positive $x$-axis.
24766 % \begin{pssyntax}
24767 % \PSvar{angle} \PSop{AngToVec} \PSproc{X Y}
24768 % \end{pssyntax}
24769 % \begin{macrocode}
24770 /AngToVec {
24771 dup cos exch sin ToVec
24772 } bind def
24773 % \end{macrocode}
24774 % \end{macro}
24775 %
24776 % \begin{macro}{NormalizeVec}
24777 % Normalize a vector ($X'^2 + Y'^2 = 1$)
24778 % \begin{pssyntax}
24779 % \PSvar{X Y} \PSop{NormalizeVec} \PSvar{X' Y'}
24780 % \end{pssyntax}
24781 % \begin{macrocode}
24782 /NormalizeVec {
24783 2 copy
24784 tx@Dict begin
24785 Pyth
24786 end
24787 dup 3 1 roll div 3 1 roll div exch
24788 } bind def
24789 % \end{macrocode}
24790 % \end{macro}
24791 %
24792 % \begin{macro}{@ABVect}
24793 % Vector from (Xb,Yb) to (Xa,Ya)
24794 % \begin{pssyntax}
24795 % \PSvar{Xa Ya Xb Yb} \PSop{@ABVect} \PSvar{(Ya - Yb) (Xa - Xb)}
24796 % \end{pssyntax}
24797 % \begin{macrocode}
24798 /@ABVect {
24799 3 -1 roll exch sub 3 1 roll sub exch
24800 } bind def
24801 % \end{macrocode}
24802 % \end{macro}
24803 %
24804 % \begin{macro}{@ABDist}
24805 % \begin{pssyntax}
24806 % \PSvar{Xa Ya Xb Yb} \PSop{@ABDist} \PSvar{dist}
24807 % \end{pssyntax}
24808 % \begin{macrocode}
24809 /@ABDist {
24810 3 -1 roll sub dup mul 3 1 roll sub dup mul add sqrt
24811 } bind def
24812 % \end{macrocode}
24813 % \end{macro}
24814 %
24815 % \begin{macro}{@InterLines}
24816 % Shorthand definition for \PSvar{InterLines} procedure of the
24817 % \nxLPack{pst-eucl} package. Takes care of a bug in the
24818 % \nxLPack{pst-eucl} package, that too many items are popped off the
24819 % stack if no intersection point exists.
24820 % \begin{pssyntax}
24821 % \PSvar{X1 Y1 X2 Y2 X3 Y3 X4 Y4} \PSop{@InterLines} \PSvar{X Y ret}
24822 % \end{pssyntax}
24823 % \begin{macrocode}
24824 /@InterLines {
24825 tx@EcldDict begin
24826 EqDr /D1c exch def /D1b exch def /D1a exch def
24827 EqDr /D2c exch def /D2b exch def /D2a exch def
24828 D1a D2b mul D1b D2a mul sub dup
24829 ZeroEq { % parallel lines
24830 pop 0 0 missed
24831 }{
24832 /Det exch def
24833 D1b D2c mul D1c D2b mul sub Det div
24834 D1a D2c mul D2a D1c mul sub Det div
24835 ok
24836 } ifelse
24837 end
24838 } bind def
24839 % \end{macrocode}
24840 % \end{macro}
24841 %
24842 % \begin{macro}{@GetCenter}
24843 % Shorthand definition for the \PSvar{GetCenter} procedure of the
24844 % \nxLPack{pst-node} package. Takes either a string or a literal name
24845 % for the node name \PSvar{name}.
24846 % \begin{pssyntax}
24847 % \PSname{name} \PSop{@GetCenter} \PSvar{X Y}
24848 % \end{pssyntax}
24849 % \begin{macrocode}
24850 /@GetCenter {
24851 tx@NodeDict begin load GetCenter end
24852 } bind def
24853 % \end{macrocode}
24854 % \end{macro}
24855 %
24856 % \begin{macro}{@NewNode}
24857 % Shorthand definition for creating a new pnode.
24858 % \begin{macrocode}
24859 /@NewNode {
24860 tx@NodeDict begin
24861 false exch 10 {InitPnode } NewNode
24862 end
24863 } bind def
24864 % \end{macrocode}
24865 % \end{macro}
24866 %
24867 % \begin{macro}{RefractVec}
24868 % Calculate the refracted vector, the normal plane vector must be
24869 % constructed with \PSvar{NormalVec}, see
24870 % \url{http://en.wikipedia.org/wiki/Snell%27s_law#Vector_form} for the
24871 % formulas.
24872 % \begin{pssyntax}
24873 % \PSvar{Xin Yin Xnorm Ynorm n1 n2} \PSop{RefractVec} \PSvar{Xout Yout}
24874 % \end{pssyntax}
24875 % If it would be total internal reflection, the output vector is (0, 0).
24876 % \begin{macrocode}
24877 /RefractVec {
24878 (RefractVec) DebugBegin
24879 TransformRefIndex exch TransformRefIndex exch div /n ED
24880 /Ynorm ED /Xnorm ED
24881 NormalizeVec /Yin ED /Xin ED
24882 n abs 1 eq {
24883 Xin Yin
24884 }{
24885 /costheta1 Xnorm Ynorm Xin neg Yin neg DotProd def
24886 1 n dup mul 1 costheta1 dup mul sub mul sub
24887 dup 0 lt {
24888 % \end{macrocode}
24889 % would be total internal reflection, stop
24890 % \begin{macrocode}
24891 pop 0 0
24892 } {
24893 sqrt /costheta2 ED
24894 n Xin mul n Yin mul
24895 n costheta1 mul costheta2 sub dup
24896 Xnorm mul exch Ynorm mul VecAdd
24897 } ifelse
24898 } ifelse
24899 DebugEnd
24900 } bind def
24901 % \end{macrocode}
24902 % \end{macro}
24903 %
24904 % \begin{macro}{ReflectVec}
24905 % Calculate the reflected vector, the normal plane vector must have been
24906 % constructed with \PSvar{NormalVec}.
24907 % \begin{pssyntax}
24908 % \PSvar{Xin Yin Xnorm Ynorm} \PSop{ReflectVec} \PSvar{Xout Yout}
24909 % \end{pssyntax}
24910 % \begin{macrocode}
24911 /ReflectVec {
24912 (ReflectVec) DebugBegin
24913 /Ynorm ED /Xnorm ED NormalizeVec /Yin ED /Xin ED
24914 /costheta1 Xnorm Ynorm Xin neg Yin neg DotProd def
24915 Xin Yin 2 costheta1 mul dup Xnorm mul exch Ynorm mul VecAdd
24916 DebugEnd
24917 } bind def
24918 /ReflectGratVec {
24919 (ReflectGratVec) DebugBegin
24920 /Ynorm ED /Xnorm ED NormalizeVec /Yin ED /Xin ED
24921 /costheta1 Xnorm Ynorm Xin neg Yin neg DotProd def
24922 Xin Yin -2 costheta1 mul dup Xnorm mul exch Ynorm mul VecAdd
24923 DebugEnd
24924 } bind def
24925 % \end{macrocode}
24926 % \end{macro}
24927 %
24928 % \begin{macro}{CurvedInterface}
24929 % \begin{pssyntax}
24930 % \PSvar{Xp Yp Xr Yr} \PSop{CurvedInterface} \PSvar{X0' Y0' Xout Yout status}
24931 % \end{pssyntax}
24932 % \begin{macrocode}
24933 /CurvedInterface {
24934 (CurvedInterface) DebugBegin
24935 2 copy /Yr ED /Xr ED
24936 tx@Dict begin Pyth end /radius ED /Yp ED /Xp ED
24937 /X0n X0 Xp sub def /Y0n Y0 Yp sub def
24938 tx@EcldDict begin
24939 X0n Y0n 2 copy 2 copy Xin 3 -1 roll add Yin 3 -1 roll add
24940 2 copy 6 2 roll EqDr radius InterLineCircle
24941 end
24942 4 copy
24943 0 eq 3 {exch 0 eq and} repeat {
24944 % \end{macrocode}
24945 % if all coordinates are zero we missed the circle, stop
24946 % \begin{macrocode}
24947 missed
24948 } {
24949 4 copy
24950 % \end{macrocode}
24951 % Chose which of the two intersection points to take.
24952 % \begin{macrocode}
24953 Xr neg Yr neg 2 copy
24954 8 -2 roll @ABDist
24955 5 1 roll @ABDist
24956 gt {
24957 % \end{macrocode}
24958 % «dist from first point» $>$ «dist from second point», take second point.
24959 % \begin{macrocode}
24960 4 2 roll
24961 } if pop pop
24962 Xp Yp VecAdd
24963 2 copy Xp Yp 4 2 roll @ABVect exch neg Xin Yin 4 2 roll NormalVec
24964 Xin Yin 4 2 roll
24965 % \end{macrocode}
24966 % on stack: crossing point, in vector, and normal vector
24967 % \begin{macrocode}
24968 mode trans eq {
24969 n1 n2 RefractVec
24970 2 copy 0 eq exch 0 eq and { tir } { ok } ifelse
24971 } {
24972 ReflectVec ok
24973 } ifelse /n1 n2 def
24974 5 -2 roll 2 copy 7 2 roll X0 Y0 @ABVect Xin Yin DotProd 0 lt
24975 PN 1 gt and {
24976 pop missed
24977 } if
24978 } ifelse
24979 DebugEnd
24980 } bind def
24981 % \end{macrocode}
24982 % \end{macro}
24983 %
24984 % \begin{macro}{PlainInterface}
24985 % \begin{pssyntax}
24986 % \PSvar{Xp Yp dXp dYp} \PSop{PlainInterface} \PSvar{X0' Y0' Xout Yout status}
24987 % \end{pssyntax}
24988 % \begin{macrocode}
24989 /PlainInterface {%
24990 (PlainInterface) DebugBegin
24991 /dYp ED /dXp ED /Yp ED /Xp ED
24992 Xp Yp Xp dXp add Yp dYp add X0 Y0 X0 Xin add Y0 Yin add
24993 @InterLines missed eq {
24994 0 0 missed
24995 } {
24996 Xin Yin Xin Yin dXp dYp
24997 mode refltrans eq {
24998 neg exch NormalVec ReflectVec ok
24999 } {
25000 NormalVec
25001 mode trans eq {
25002 n1 n2 RefractVec
25003 2 copy 0 eq exch 0 eq and { tir } { ok } ifelse
25004 } {
25005 ReflectVec ok
25006 } ifelse
25007 } ifelse
25008 /n1 n2 def
25009 5 -2 roll 2 copy 7 2 roll X0 Y0 @ABVect Xin Yin DotProd 0 lt
25010 PN 1 gt and {
25011 pop missed
25012 } if
25013 } ifelse
25014 DebugEnd
25015 } bind def
25016 % \end{macrocode}
25017 % \end{macro}
25018 %
25019 % \begin{macro}{PathInterface}
25020 % \begin{pssyntax}
25021 % \PSarray{path} \PSop{PathInterface} \PSvar{X0' Y0' Xout Yout status}
25022 % \end{pssyntax}
25023 % \begin{macrocode}
25024 /PathInterface {
25025 (PathInterface) DebugBegin
25026 [ [X0 Y0] [X0 Xin add Y0 Yin add] ] exch
25027 tx@IntersectDict begin IntersectLinePath end % [pathseg] t [isect]
25028 dup length 0 eq {
25029 pop pop pop 0 0 missed
25030 } {
25031 aload pop
25032 Xin Yin Xin Yin
25033 8 -2 roll exch % I.x I.y Xin Yin Xin Yin t [pathseg]
25034 exch dup 9 1 roll exch % t I.x I.y Xin Yin Xin Yin t [pathseg]
25035 dup length 2 eq { % a line
25036 exch pop
25037 aload pop aload pop 3 -1 roll aload pop VecSub % t I.x I.y Xin Yin Xin Yin dXp dYp
25038 } {
25039 exch dup cvi sub DeriveCurve
25040 } ifelse
25041 % the following part is copied from /PlainInterface
25042 NormalVec
25043 mode trans eq {
25044 n1 n2 RefractVec
25045 2 copy 0 eq exch 0 eq and { tir } { ok } ifelse
25046 } {
25047 ReflectVec ok
25048 } ifelse
25049 /n1 n2 def
25050 5 -2 roll 2 copy 7 2 roll X0 Y0 @ABVect Xin Yin DotProd 0 lt
25051 PN 1 gt and {
25052 pop missed
25053 } if
25054 % t X0' Y0' Xout Yout status
25055 } ifelse
25056 DebugEnd
25057 } bind def
25058 % \end{macrocode}
25059 % \end{macro}
25060 %
25061 % \begin{macro}{TransformRefIndex}
25062 % If the refractive index on the stack is for the background (has value
25063 % \opt{bgRefIndex}, which is \opt{0}), we replace it here with its actual
25064 % value (\opt{1}). This is necessary to distinguish between background index
25065 % and components having an index of \opt{1}, which can be changed with option
25066 % \opt{n}.
25067 % \begin{pssyntax}
25068 % \PSvar{n} \PSop{TransformRefIndex} \PSvar{n|1}
25069 % \end{pssyntax}
25070 % \begin{macrocode}
25071 /TransformRefIndex {
25072 dup bgRefIndex eq { pop 1 } if
25073 } bind def
25074 % \end{macrocode}
25075 % \end{macro}
25076 %
25077 % \begin{macro}{GetRefIndex}
25078 % Evaluate the refractive index of component \opt{name}.
25079 % \begin{pssyntax}
25080 % \PSstring{name} \PSop{GetRefIndex} \PSvar{neval}
25081 % \end{pssyntax}
25082 % \begin{macrocode}
25083 /GetRefIndex {
25084 cvn load /n get /nbeam load exch
25085 EvalRefIndex
25086 } bind def
25087 % \end{macrocode}
25088 % \end{macro}
25089 %
25090 % \begin{macro}{EvalRefIndex}
25091 % Evaluate the expression in \opt{nbeam} after setting refractive index to
25092 % \opt{n}.
25093 % \begin{pssyntax}
25094 % \PSproc{nbeam} \PSvar{n} \PSop{GetRefIndex} \PSvar{neval}
25095 % \end{pssyntax}
25096 % \begin{macrocode}
25097 /EvalRefIndex {
25098 dup bgRefIndex eq not {
25099 1 dict begin
25100 % \end{macrocode}
25101 % Store \opt{n} locally for evaluation of the mathematical expression in
25102 % \opt{nbeam}.
25103 % \begin{macrocode}
25104 /n ED
25105 exec
25106 end
25107 } if
25108 } bind def
25109 % \end{macrocode}
25110 % \end{macro}
25111 %
25112 % \begin{macro}{Sellmaier}
25113 % Calculate the refractive index for BK7 glass with the Sellmaier
25114 % equation. The wavelength must be given in nanometre. The coefficients are
25115 % taken from \href{http://en.wikipedia.org/wiki/Sellmeier_equation}.
25116 % \begin{pssyntax}
25117 % \PSvar{lambda} \PSop{Sellmaier} \PSvar{n}
25118 % \end{pssyntax}
25119 % \begin{macrocode}
25120 /Sellmaier {
25121 dup mul
25122 dup dup 1.03961212 mul exch 6000.69867 sub div
25123 exch dup dup 0.231792344 mul exch 20017.9144 sub div
25124 exch dup 1.01046945 mul exch 103.560653e6 sub div
25125 add add 1 add sqrt
25126 } bind def
25127 % \end{macrocode}
25128 % \end{macro}
25129 %
25130 % \begin{macro}{TangentCrosspoint}
25131 % Xp Yp Xt1 Yt1 Xt2 Yt2
25132 % \begin{macrocode}
25133 /TangentCrosspoint {
25134 4 copy 4 copy 14 -2 roll 2 copy
25135 6 2 roll @ABVect neg exch
25136 6 2 roll @ABVect neg exch
25137 8 -2 roll VecAdd 10 2 roll VecAdd
25138 @InterLines pop
25139 } bind def
25140 % \end{macrocode}
25141 % \end{macro}
25142 %
25143 % \begin{macro}{NearestNodeTmp}
25144 % {NodeB} CompA -> shortest distance, planenum
25145 % \begin{macrocode}
25146 /NearestNodeTmp {
25147 exch /NodeB ED
25148 /dist -1 def
25149 dup cvn load /N get dup 1 eq {
25150 [ exch (N) ]
25151 } {
25152 [ exch 1 1 3 -1 roll { } for ]
25153 } ifelse
25154 {
25155 2 copy pop
25156 GetIfcCenterCorr 2 copy
25157 NodeB @ABDist
25158 dist 0 lt {
25159 /dist ED
25160 ToVec /node ED
25161 } {
25162 dup dist lt {
25163 /dist ED
25164 ToVec /node ED
25165 } {
25166 pop pop pop
25167 } ifelse
25168 } ifelse
25169 } forall
25170 pop dist /node load
25171 } bind def
25172 % \end{macrocode}
25173 % \end{macro}
25174 %
25175 % \begin{macro}{NearestNode}
25176 % Get the coordinates of the node of \PSvar{CompA} which is nearest to
25177 % \PSvar{CompB}/\PSvar{NodeB}, or push the coordinates of
25178 % \PSvar{NodeA} on stack if it is already a node.
25179 % \begin{pssyntax}
25180 % \PSvar{CompA/NodeA} \PSvar{CompB/NodeB} \PSop{NearestNode} \PSvar{X Y}
25181 % \end{pssyntax}
25182 % \begin{macrocode}
25183 /NearestNode {
25184 (NearestNode) DebugBegin
25185 dup xcheck not { nametostr } if /CompB ED
25186 dup xcheck not {
25187 % \end{macrocode}
25188 % CompA is a component
25189 % \begin{macrocode}
25190 nametostr /CompA ED
25191 /CompB load dup xcheck not {
25192 % \end{macrocode}
25193 % CompB is a component
25194 % \begin{macrocode}
25195 /mindist -1 def
25196 [ exch false GetInternalNodeNames ]
25197 { @GetCenter ToVec
25198 CompA NearestNodeTmp
25199 exch dup mindist ge mindist 0 ge and {
25200 pop pop
25201 }{
25202 /mindist ED /minnodeA ED
25203 } ifelse
25204 } forall
25205 minnodeA
25206 } {
25207 CompA NearestNodeTmp exch pop exec
25208 } ifelse
25209 } {
25210 % \end{macrocode}
25211 % else, it is a node and we already have the appropriate coordinates on the
25212 % stack
25213 % \begin{macrocode}
25214 exec
25215 } ifelse
25216 DebugEnd
25217 } bind def
25218 % \end{macrocode}
25219 % \end{macro}
25220 %
25221 % \begin{macro}{RelConnAngle}
25222 % Calculate start angle of \cs{nccurve} from CompA to CompB
25223 %
25224 % \begin{pssyntax}
25225 % \PSvar{Xb Yb Xa Ya A B} \PSvar{fiberalign} \PSop{RelConnAngle} \PSvar{angle}
25226 % \end{pssyntax}
25227 % \begin{macrocode}
25228 /RelConnAngle {
25229 (RelConnAngle) DebugBegin
25230 /fiberalign ED
25231 dup xcheck not { nametostr } if /CompB ED
25232 dup xcheck not { nametostr } if /CompA ED
25233 /CompA load xcheck {
25234 /CompB load xcheck {
25235 % \end{macrocode}
25236 % both parameters are nodes, so the angle is that of the direct connection line.
25237 % \begin{macrocode}
25238 @ABVect exch atan
25239 } {
25240 % \end{macrocode}
25241 % B is a component, and A is a node: the angle at node A is calculated through component B
25242 % \begin{macrocode}
25243 4 copy @ABVect 6 2 roll pop pop 2 copy
25244 % \end{macrocode}
25245 % on stack: Xb-Xa Yb-Ya Xb Yb Xb Yb
25246 % \begin{macrocode}
25247 CompB (Center) NodeName @GetCenter
25248 % \end{macrocode}
25249 % on stack: Xb-Xa Yb-Ya Xb Yb Xb Yb Xbc Ybc
25250 % \begin{macrocode}
25251 4 2 roll @ABVect 4 2 roll
25252 CompB
25253 fiberalign center eq {
25254 RelConnAngle@center
25255 }{
25256 3 1 roll pop pop
25257 RelConnAngle@ref
25258 } ifelse
25259 2 copy exch atan
25260 7 3 roll 2 copy 9 -2 roll
25261 DotProd 0 gt 5 1 roll DotProd 0 gt xor { 180 add } if
25262 } ifelse
25263 } {
25264 % \end{macrocode}
25265 % A is a component, B is insignificant
25266 %
25267 % discard coordinates of B
25268 % \begin{macrocode}
25269 4 2 roll pop pop 2 copy
25270 CompA (Center) NodeName @GetCenter
25271 4 2 roll @ABVect 4 2 roll
25272 % \end{macrocode}
25273 % on stack: Xac-Xa Yac-Xa Xa Ya
25274 % \begin{macrocode}
25275 CompA fiberalign center eq {
25276 RelConnAngle@center
25277 }{
25278 3 1 roll pop pop
25279 RelConnAngle@tref
25280 } ifelse
25281 2 copy exch atan
25282 % \end{macrocode}
25283 % Xac-Xa Yac-Ya XaB-XaA YaB-YaA angleTrefline
25284 % \begin{macrocode}
25285 5 1 roll DotProd 0 gt { 180 add } if
25286 } ifelse
25287 DebugEnd
25288 } bind def
25289 % \end{macrocode}
25290 % \end{macro}
25291 %
25292 % \begin{macro}{/RelConnAngle@ref}
25293 % Calculate the vector of the reference line of \PSvar{CompA}.
25294 % \begin{pssyntax}
25295 % \PSstring{CompA} \PSop{RelConnAngle@ref} \PSvar{dX dY}
25296 % \end{pssyntax}
25297 % \begin{macrocode}
25298 /RelConnAngle@ref {
25299 dup (A) NodeName exch (B) NodeName
25300 @GetCenter 3 -1 roll @GetCenter @ABVect
25301 } bind def
25302 % \end{macrocode}
25303 % \end{macro}
25304 %
25305 % \begin{macro}{/RelConnAngle@tref}
25306 % Same as \PSname{RelConnAngle@ref} but uses the transformed reference nodes.
25307 % \begin{pssyntax}
25308 % \PSvar{CompA} \PSop{RelConnAngle@ref} \PSvar{dX dY}
25309 % \end{pssyntax}
25310 % \begin{macrocode}
25311 /RelConnAngle@tref {
25312 dup (TrefA) NodeName exch (TrefB) NodeName
25313 @GetCenter 3 -1 roll @GetCenter @ABVect
25314 } bind def
25315 % \end{macrocode}
25316 % \end{macro}
25317 %
25318 % \begin{macro}{/RelConnAngle@center}
25319 % Calculate the vector from the center node of \PSvar{CompA} to the
25320 % node \PSstring{Xa, Ya}.
25321 % \begin{pssyntax}
25322 % \PSvar{Xa Ya CompA} \PSop{RelConnAngle@center} \PSvar{dX dY}
25323 % \end{pssyntax}
25324 % \begin{macrocode}
25325 /RelConnAngle@center {
25326 (Center) NodeName @GetCenter 4 2 roll @ABVect
25327 } bind def
25328 % \end{macrocode}
25329 % \end{macro}
25330 %
25331 % \begin{macro}{GetIfcOrNodeCoord}
25332 % \begin{pssyntax}
25333 % \PSstring{IfcNum} \PSstring{CompName}/\PSproc{node} \PSop{GetIfcOrNodeCoord} \PSvar{x y}
25334 % \end{pssyntax}
25335 % \begin{macrocode}
25336 /GetIfcOrNodeCoord {
25337 (GetIfcOrNodeCoord) DebugBegin
25338 dup xcheck {
25339 exch pop exec
25340 } {
25341 nametostr exch nametostr exch GetIfcCenter
25342 } ifelse
25343 DebugEnd
25344 } bind def
25345 % \end{macrocode}
25346 % \end{macro}
25347 %
25348 % \begin{macro}{connectInterfaces}
25349 % \begin{pssyntax}
25350 % \PSproc{vec}
25351 % \end{pssyntax}
25352 % InVec Center CenterTmp PrevMode relangle
25353 % \begin{macrocode}
25354 /connectInterfaces {
25355 /relAngleTmp ED
25356 PN 2 eq {
25357 % \end{macrocode}
25358 % initialize relAngle, the angle between plane connection and input vector
25359 % \begin{macrocode}
25360 pop @ABVect NormalizeVec 4 2 roll VecAngle /relAngleTmp ED
25361 } if
25362 PN 3 ge {
25363 trans eq {
25364 % \end{macrocode}
25365 % previous plane was transmittive, recalculate the input vector
25366 % \begin{macrocode}
25367 @ABVect NormalizeVec 4 2 roll pop pop % remove Vec from stack
25368 relAngleTmp matrix rotate dtransform
25369 4 2 roll pop pop
25370 } {
25371 % \end{macrocode}
25372 % else, the previous plane was reflective, recalculate relAngle
25373 % \begin{macrocode}
25374 @ABVect NormalizeVec 4 2 roll VecAngle /relAngleTmp ED
25375 } ifelse
25376 } if
25377 relAngleTmp
25378 } bind def
25379 % \end{macrocode}
25380 % \end{macro}
25381 %
25382 % \begin{macro}{GetCompRange}
25383 % \PSstring{basename} \PSvar{start stop}
25384 % \PSop{GetCompRange} \PSstring{basenamestart} \ldots\ \PSstring{basenamestop}
25385 % \begin{macrocode}
25386 /GetCompRange {
25387 2 copy gt { 1 }{ -1 } ifelse 3 -1 roll
25388 { exch dup 3 -1 roll inttostr strcat exch} for
25389 pop
25390 } bind def
25391 % \end{macrocode}
25392 % \end{macro}
25393 %
25394 % \begin{macro}{CorrectDipoleIfc}
25395 % For a dipole which has two interface nodes (1) and (N) which are very close
25396 % together ($\text{dist} < 10^{-7}$) or which coincide, the automatic angle
25397 % estimation of the fiber connections does not work properly. So these
25398 % interfaces are separated as less as possible so that the NearestNode
25399 % procedure estimates two different distances. The changed nodes are saved
25400 % only in the interface dictionary as XCorr and YCorr. You must use these for
25401 % the fiber connections.
25402 % \begin{pssyntax}
25403 % \PSstring{node1} \PSstring{node2} \PSstring{basename} \PSop{CorrectDipoleIfc}
25404 % \end{pssyntax}
25405 % \begin{macrocode}
25406 /CorrectDipoleIfc {
25407 (CorrectDipoleIfc) DebugBegin
25408 dup dup 3 copy
25409 8 -1 roll dup 9 1 roll NodeName exch 7 -1 roll dup 7 1 roll NodeName
25410 gsave
25411 tx@Dict begin
25412 STV CP T
25413 exch @GetCenter 3 -1 roll @GetCenter
25414 end
25415 grestore
25416 4 copy @ABDist 1e-7 lt {
25417 % \end{macrocode}
25418 % The two nodes are closer together than $10^{-7}$, correct that to avoid
25419 % problems with the angle direction when drawing fibers.
25420 % \begin{macrocode}
25421 6 -1 roll
25422 gsave
25423 tx@Dict begin
25424 STV CP T
25425 (TrefA) NodeName @GetCenter 7 -1 roll
25426 (TrefB) NodeName @GetCenter
25427 end
25428 grestore
25429 @ABVect NormalizeVec 2 copy
25430 % \end{macrocode}
25431 % The floating-point precision of the Postscript interpreter is
25432 % approximately 8 digits, so in order to have an effect, the nodes must
25433 % be separated by $10^{-7}$ times the maximum coordinate value.
25434 % \begin{macrocode}
25435 8 -2 roll abs exch abs mymax -1e-6 mul VecScale
25436 8 -2 roll cvn load begin
25437 IfcName load begin
25438 X Y VecAdd /YCorr exch def /XCorr exch def
25439 end
25440 end
25441 4 2 roll abs exch abs mymax 1e-6 mul VecScale
25442 4 2 roll cvn load begin
25443 IfcName load begin
25444 X Y VecAdd /YCorr exch def /XCorr exch def
25445 end
25446 end
25447 } {
25448 10 { pop } repeat
25449 } ifelse
25450 DebugEnd
25451 } bind def
25452 % \end{macrocode}
25453 % \end{macro}
25454 %
25455 % \begin{macro}{ClipFadeValue}
25456 % Clip a number to the range [0:1].
25457 % \begin{pssyntax}
25458 % \PSvar{value} \PSop{ClipFadeValue} \PSvar{clippedvalue}
25459 % \end{pssyntax}
25460 % \begin{macrocode}
25461 /ClipFadeValue {
25462 dup 0 lt { pop 0 }{ dup 1 gt { pop 1 } if } ifelse
25463 } bind def
25464 % \end{macrocode}
25465 % \end{macro}
25466 % \begin{macro}{fadeto@}
25467 % The different fadeto modes.
25468 % \begin{macrocode}
25469 /fadeto@white {
25470 FadeFunc ClipFadeValue @S mul @H exch @B sethsbcolor
25471 } bind def
25472 /fadeto@black {
25473 FadeFunc ClipFadeValue @B mul @H exch @S exch sethsbcolor
25474 } bind def
25475 /fadeto@transparency {
25476 FadeFunc ClipFadeValue @T mul .setopacityalpha
25477 } bind def
25478 % \end{macrocode}
25479 % \end{macro}
25480 %
25481 % \begin{macro}{fadefunc@}
25482 % The default fade functions, which are selected with the parameter
25483 % 'fadefuncname'. The clipping is done afterwards.
25484 % \begin{macrocode}
25485 /fadefunc@linear {
25486 neg 1 add
25487 } bind def
25488 /fadefunc@squared {
25489 dup mul neg 1 add
25490 } bind def
25491 /fadefunc@gauss {
25492 0.4 div dup mul neg Euler exch exp
25493 } bind def
25494 /fadefunc@exp {
25495 -6 mul Euler exch exp
25496 } bind def
25497 % \end{macrocode}
25498 % \end{macro}
25499 % \begin{macro}{FadeStroke}
25500 % Implement the 'fade' linestyle.
25501 % \begin{macrocode}
25502 /FadeStroke {
25503 /FadeFunc ED /FadeToColor ED /@T ED
25504 PathLength dup /@L ED exch div /@dl ED
25505 mark
25506 { false counttomark 3 roll }
25507 { true counttomark 3 roll }
25508 {} {} pathforall
25509 currenthsbcolor /@B ED /@S ED /@H ED
25510 newpath /currL 0 def
25511 counttomark 3 idiv 1 1 3 -1 roll {
25512 pop
25513 { % lineto
25514 /y2 ED /x2 ED x2 x1 sub y2 y1 sub 2 copy
25515 dup mul exch dup mul add sqrt dup @L div exch
25516 @dl div 1 add floor dup dup
25517 4 2 roll div 5 1 roll
25518 1 1 3 -1 roll {
25519 5 copy 4 copy 2 copy eq not { fadecorrect add } if exch div VecScale
25520 6 2 roll 1 sub dup 0 eq not { fadecorrect sub } if exch div VecScale
25521 x1 y1 VecAdd moveto x1 y1 VecAdd lineto
25522 mul currL add FadeToColor
25523 stroke
25524 } for
25525 4 1 roll pop pop mul currL add /currL ED
25526 /y1 y2 def /x1 x2 def
25527 } { % moveto
25528 /y1 ED /x1 ED
25529 } ifelse
25530 } for
25531 pop
25532 } def
25533 % \end{macrocode}
25534 % \end{macro}
25535 %
25536 % \begin{macro}{TransformPath}
25537 % Transforms a path (as defined by \cs{pssavepath} from
25538 % \nxLPack{pst-intersect}) using the \opt{currentmatrix} and the
25539 % \opt{CompMtrx} of the component. That is used only by \opt{LoadIfc}.
25540 % \begin{pssyntax}
25541 % \PSarray{path} \PSop{TransformPath} \PSarray{path'}
25542 % \end{pssyntax}
25543 % \begin{macrocode}
25544 /TransformPath {
25545 mark [ 3 -1 roll aload pop
25546 counttomark 1 add counttomark 1 add exch 1 roll
25547 {
25548 counttomark 1 eq { cleartomark exit } if
25549 dup /curvetype eq {
25550 7 1 roll
25551 3 { CompMtrx transform CM itransform 7 2 roll } repeat
25552 counttomark -1 roll dup counttomark 1 roll
25553 7 roll
25554 } {
25555 3 1 roll CompMtrx transform CM itransform 3 -1 roll
25556 counttomark -1 roll dup counttomark 1 roll
25557 3 roll
25558 } ifelse
25559 } loop
25560 ]
25561 } bind def
25562 % \end{macrocode}
25563 % \end{macro}
25564 %
25565 % \begin{macro}{DeriveCurve}
25566 % Calculate the derivative of a curve at its parameter \PSvar{t}. This
25567 % works only for the special case of third-order Bezier curves.
25568 %
25569 % \begin{align*}
25570 % B(t) & = (1-t)^3 P_0 + 3(1-t)^2 t P_1 + 3(1-t)t^2 P_2 + t^3 P_3\\
25571 % B'(t) & = -3(1-t)^2 P_0 + 3(3t^2–4t+1) P_1 + 3(2t–3t^2) P_2 + 3t^2 P_3
25572 % \end{align*}
25573 % \begin{pssyntax}
25574 % \PSarray{curve} \PSvar{t} \PSop{DeriveCurve} \PSvar{dX dY}
25575 % \end{pssyntax}
25576 % \begin{macrocode}
25577 /DeriveCurve {
25578 (DeriveCurve) DebugBegin
25579 exch dup length 4 eq not {
25580 pop pop 0 0
25581 } {
25582 aload pop 5 -1 roll
25583 dup 1 exch sub dup mul -3 mul exch % P0 P1 P2 P3 C0=(-3(1-t)^2) t
25584 dup dup -4 mul 1 add exch dup mul 3 mul add 3 mul exch % P0 P1 P2 P3 C0 C1=(3(3t^2-4t+1)) t
25585 dup dup 2 mul exch dup mul -3 mul add 3 mul exch % P0 P1 P2 P3 C0 C1 C2=(3(2t-3t^2)) t
25586 dup mul 3 mul % P0 P1 P2 P3 C0 C1 C2 C3=3t^2
25587 8 copy
25588 0 6 -1 3 { -1 roll 0 get 3 -1 roll mul add } for
25589 9 1 roll
25590 0 6 -1 3 { -1 roll 1 get 3 -1 roll mul add } for
25591 } ifelse
25592 DebugEnd
25593 } bind def
25594 % \end{macrocode}
25595 % \end{macro}
25596 %
25597 % \begin{macro}{GetBezierDeriv}
25598 % Calculate the derivative of the bezier curve at the coordinate
25599 % \PSvar{t}.
25600 % \begin{equation}
25601 % C(t) = \sum_{i=0}^n B_{i,n}(t)P_i\quad\text{with}\quad B_{i,n}(t) = (n over i) t^i(1-t)^{n-i}
25602 % \end{equation}
25603 % \begin{equation}
25604 % C'(t) = \sum_{i=0}^n B'_{i,n}(t)P_i\quad\text{with}\quad B'_{i,n}(t) = (n over i)(i t^{i-1}(1-t)^{n-i} - (n-i)t^i(1-t)^{n-i-1})
25605 % \end{equation}
25606 % \begin{pssyntax}
25607 % \PSarray{[P0]\ldots[P\_n]} \PSvar{t} \PSop{DeriveBezier} \PSvar{x y}
25608 % \end{pssyntax}
25609 % \begin{macrocode}
25610 /GetBezierDeriv { % t on stack
25611 10 dict begin % hold all local
25612 /t ED
25613 /t1 1 t sub def % t1=1-t
25614 dup length /BezierOrder exch def
25615 /Points exch def
25616 /Coeff tx@FuncDict begin Pascal end BezierOrder get def % get the coefficients
25617 0 0 % initial values for x y
25618 BezierOrder -1 0 { % BezierOrder,...,2,1,0
25619 /I ED % I=BezierOrder,...,2,1,0
25620 /J BezierOrder I sub def % J=0,1,2,...,BezierOrder
25621 I 0 eq {
25622 0
25623 }{
25624 I t I 1 sub exp mul t1 J exp mul % i*t^{i-1}*(1-t)^{n-i}
25625 } ifelse
25626 J 0 eq {
25627 0
25628 } {
25629 J t I exp mul t1 J 1 sub exp mul % -(n-i)t^i(1-t)^{n-i-1}
25630 } ifelse
25631 sub Coeff J get mul
25632 Points I get aload pop 3 -1 roll VecScale VecAdd
25633 } for % x y on stack
25634 end
25635 } bind def
25636 % \end{macrocode}
25637 % \end{macro}
25638 %
25639 % This fixes a problem in pst-intersect.pro v0.4
25640 % \begin{macrocode}
25641 tx@IntersectDict begin
25642 /IntersectLinePath {
25643 3 dict begin
25644 PreparePath dup length /n exch def
25645 2 copy ElongateLine exch 3 -1 roll pop
25646 /isect [] def
25647 /t -1 def
25648 {
25649 /n n 1 sub def
25650 2 copy IntersectBeziers
25651 dup 5 1 roll LoadIntersectionPoints
25652 dup length 0 gt {
25653 /isect exch def
25654 0 get dup type /arraytype eq {
25655 aload pop add 0.5 mul
25656 } if n add /t exch def
25657 exch pop
25658 exit
25659 } {
25660 pop pop pop
25661 } ifelse
25662 } forall
25663 t isect
25664 end
25665 } bind def
25666 end
25667 % \end{macrocode}
25668 %
25669 % \begin{macro}{GetCoordinatePair}
25670 % Get the coordinate pair at position \PSvar{n} (n goes from 1 to N) and remove the other coordinates
25671 % including mark from stack
25672 % \begin{pssyntax}
25673 % [ \PSvar{xN} \PSvar{yN} ... \PSvar{x1} \PSvar{y1} \PSvar{n} \PSop{GetCoordinatePair}
25674 % \end{pssyntax}
25675 % \begin{macrocode}
25676 /GetCoordinatePair {%
25677 2 mul -2 roll counttomark 1 add 2 roll cleartomark
25678 } bind def
25679 % \end{macrocode}
25680 % \end{macro}
25681 % \begin{macrocode}
25682 /GetFirstInputCoordinatePair { 1 GetCoordinatePair } bind def
25683 % \end{macrocode}
25684 % If a coupler has only a single input node, this must be used for both nodes
25685 % \begin{macrocode}
25686 /GetLastInputCoordinatePair { counttomark 2 idiv 1 sub GetCoordinatePair } bind def
25687 % \end{macrocode}
25688 % \begin{macro}{mymax}
25689 % For some reason Adobe Distiller crashes if 'max' operator is used
25690 % with two floats which are very close (4e-5 in one case)
25691 % \begin{macrocode}
25692 /mymax {
25693 2 copy lt { exch } if pop
25694 } bind def
25695 % \end{macrocode}
25696 % \end{macro}
25697 %
25698 % \begin{macro}{debug}
25699 % Print out the last \opt{N} elements from the stack, checks for
25700 % stackunderflow. I \opt{N} is negative, the complete stack is
25701 % printed. Compared to the \PSvar{stack} operand, it prints the content of
25702 % procedures and array, which we use a lot.
25703 % \begin{pssyntax}
25704 % \PSvar{N} \PSop{debug}
25705 % \end{pssyntax}
25706 % \begin{macrocode}
25707 /debug {
25708 /@N ED count dup @N gt @N 0 ge and { pop @N } if
25709 copy @N { == } repeat
25710 } bind def
25711 % \end{macrocode}
25712 % \end{macro}
25713 %
25714 % \begin{macro}{debugComp}
25715 % Print out all parameters and planes of the component \opt{compname}.
25716 % \begin{pssyntax}
25717 % \PSstring{compname} \PSop{debugComp}
25718 % \end{pssyntax}
25719 % \begin{macrocode}
25720 /debugComp {
25721 dup (debug comp ") exch strcat ("===============) strcat ==
25722 cvn load {
25723 dup type /dicttype eq {
25724 (plane----------------) ==
25725 { == == } forall
25726 (-----------done) ==
25727 } { == } ifelse
25728 ==
25729 } forall
25730 (================== done) ==
25731 } bind def
25732 % \end{macrocode}
25733 % \end{macro}
25734 %
25735 % \begin{macrocode}
25736 end % tx@OptexpDict
25737 % \end{macrocode}
25738 %</prolog>
25739 % \Finale
25740 % \endinput
25741 %
25742 %<*indexstyle>font-size
25743 headings_flag 1
25744 heading_prefix "\\textbf{"
25745 heading_suffix "}\n"
25746 quote '"'
25747 level '!'
25748 actual '='
25749 preamble
25750 "\\begin{theindex}\n"
25751 item_1
25752 "\\par\\leavevmode\\hangindent10pt\\makebox[25pt][r]{ -- }"
25753 item_01
25754 "\\par\\leavevmode\\hangindent10pt\\makebox[25pt][r]{ -- }"
25755 item_x1
25756 "\\par\\leavevmode\\hangindent10pt\\makebox[25pt][r]{ -- }"
25757 item_2
25758 "\\par\\leavevmode\\hangindent20pt\\makebox[50pt][r]{ -- -- }"
25759 item_12
25760 "\\par\\leavevmode\\hangindent20pt\\makebox[50pt][r]{ -- -- }"
25761 item_x2
25762 "\\par\\leavevmode\\hangindent20pt\\makebox[50pt][r]{ -- -- }"
25763 %</indexstyle>