From 482524ad9e0c198448d651d2334f36e4da04e37d Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 21 Nov 2014 00:47:07 +0000 Subject: pst-optexp (20nov14) git-svn-id: svn://tug.org/texlive/trunk@35630 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/pst-optexp/Changes | 4 + .../doc/latex/pst-optexp/pst-optexp-DE.pdf | Bin 2993711 -> 3008983 bytes .../doc/latex/pst-optexp/pst-optexp-quickref.pdf | Bin 50035 -> 50068 bytes .../texmf-dist/doc/latex/pst-optexp/pst-optexp.pdf | Bin 2954610 -> 2970658 bytes Master/texmf-dist/dvips/pst-optexp/pst-optexp.pro | 73 ++++-- .../texmf-dist/makeindex/pst-optexp/pst-optexp.ist | 2 +- .../source/latex/pst-optexp/pst-optexp.dtx | 261 +++++++++++++++++++-- .../source/latex/pst-optexp/pst-optexp.ins | 2 +- .../texmf-dist/tex/latex/pst-optexp/pst-optexp.sty | 54 ++++- 9 files changed, 351 insertions(+), 45 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/pst-optexp/Changes b/Master/texmf-dist/doc/latex/pst-optexp/Changes index de5c10dbe8e..d430ae764f4 100644 --- a/Master/texmf-dist/doc/latex/pst-optexp/Changes +++ b/Master/texmf-dist/doc/latex/pst-optexp/Changes @@ -1,3 +1,7 @@ +5.1 2014-11-19 + * Added component \oapmirror. + * Added support for filled beams with path interfaces. + 5.0 2014-10-30 * Added support for arbitrary interface shapes (experimental, requires the pst-intersect package and pstricks version 2.53. diff --git a/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-DE.pdf b/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-DE.pdf index 8a77d0849b1..c55a34ec489 100644 Binary files a/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-DE.pdf and b/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-DE.pdf differ diff --git a/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-quickref.pdf b/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-quickref.pdf index 44424b372e3..fea6af3d48e 100644 Binary files a/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-quickref.pdf and b/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-quickref.pdf differ diff --git a/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp.pdf b/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp.pdf index 890605105e4..eaa0597ee92 100644 Binary files a/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp.pdf and b/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp.pdf differ diff --git a/Master/texmf-dist/dvips/pst-optexp/pst-optexp.pro b/Master/texmf-dist/dvips/pst-optexp/pst-optexp.pro index e8bfcdb9054..a824a39d9c8 100644 --- a/Master/texmf-dist/dvips/pst-optexp/pst-optexp.pro +++ b/Master/texmf-dist/dvips/pst-optexp/pst-optexp.pro @@ -9,7 +9,7 @@ %% This is a generated file. %% %% Project: pst-optexp -%% Version: 5.0 (2014/10/30) +%% Version: 5.1 (2014/11/19) %% %% Copyright (C) 2007-2014 by Christoph Bersch %% @@ -85,7 +85,7 @@ tx@OptexpDict begin dup length string cvs } bind def /PrintWarning { - (Warning pst-optexp: ) exch strcat == + (Warning pst-optexp: ) exch strcat (\n) strcat print } bind def /CompUnknownWarning { (Component ') exch strcat (' unknown) strcat Warning @@ -766,6 +766,13 @@ tx@OptexpDict begin /Chirality { 4 -1 roll mul 3 1 roll mul sub sign } bind def +/TraceInterfacePath { + tx@IntersectDict begin + /ArrowA { {currentpoint} stopped {moveto}{pop pop pop pop} ifelse } def + {} TraceCurveOrPath + currentdict /ArrowA undef + end +} bind def /TraceAndFillWideBeam { (TraceAndFillWideBeam) DebugBegin AngToVec /InvecLow ED /StartLow ED @@ -818,6 +825,9 @@ tx@OptexpDict begin counttomark /IfcCnt ED /n1 bgRefIndex def /CurrR false def + /CurrPath false def + /CurrUpT false def + /CurrLowT false def /ret missed def /PN 1 def { @@ -864,7 +874,9 @@ tx@OptexpDict begin currentdict /relAngleUp known { relAngleUp } { 0 } ifelse connectInterfaces /relAngleUp ED } if - /CurrUp load /PrevUp ED + /PrevUp /CurrUp load def + /PrevUpT /CurrUpT load def + /PrevPath /CurrPath load def IfcNum CompName Mode n2 8 4 roll HandleInterface dup /ret ED missed eq { @@ -873,8 +885,13 @@ tx@OptexpDict begin } if ToVec /CurrVecUp ED ToVec /CurrUp ED + currentdict /isectT known currentdict /isectPath known and { + /CurrUpT isectT def + /CurrPath isectPath def + } if /n1 oldn1 def - /CurrLow load /PrevLow ED + /PrevLow /CurrLow load def + /PrevLowT /CurrLowT load def CurrLow CurrVecLow connectifc PrevCorrect PN 2 gt and PN 2 eq or and { CurrVecLow CurrPCenter PrevPCenter PrevMode @@ -894,6 +911,9 @@ tx@OptexpDict begin } ifelse ToVec /CurrVecLow ED ToVec /CurrLow ED + currentdict /isectT known { + /CurrLowT isectT def + } if /PrevR CurrR def PrevR type /realtype eq { /CurrCenter load /PrevCenter ED @@ -906,6 +926,11 @@ tx@OptexpDict begin /CurrR false def /CurrCenter false def } ifelse + IfcNum CompName isPathIfc not { + /CurrPath false def + /CurrLowT false def + /CurrUpT false def + } if PN 1 gt currentdict /fillBeam known and { draw { /DrawnSegm DrawnSegm 1 add def @@ -919,19 +944,27 @@ tx@OptexpDict begin CurrLow CurrR arct } ifelse } { - CurrLow lineto + IfcNum CompName isPathIfc { + CurrPath CurrUpT CurrLowT TraceInterfacePath + } { + CurrLow lineto + } ifelse } ifelse PrevLow lineto - PrevR type /booleantype eq not { - PrevCenter PrevLow PrevUp - 4 copy 3 -1 roll eq 3 1 roll eq and { - 6 {pop} repeat + PrevPath type /booleantype eq not { + PrevPath PrevLowT PrevUpT TraceInterfacePath + } { + PrevR type /booleantype eq not { + PrevCenter PrevLow PrevUp + 4 copy 3 -1 roll eq 3 1 roll eq and { + 6 {pop} repeat + } { + TangentCrosspoint + PrevUp PrevR arct + } ifelse } { - TangentCrosspoint - PrevUp PrevR arct + PrevUp lineto } ifelse - } { - PrevUp lineto } ifelse } if Mode refl eq draw and @@ -1096,9 +1129,12 @@ tx@OptexpDict begin /HandleInterface { (HandleInterface) DebugBegin /Yin ED /Xin ED /Y0 ED /X0 ED /n2 ED /mode ED + currentdict /isectT undef currentdict /isectPath undef 2 copy 2 copy LoadIfc % IfcNum name IfcNum name path dup type /arraytype eq { % is an path interface - 3 1 roll pop pop PathInterface % IfcNum name X0' Y0' Xout Yout status + dup /isectPath exch def + 3 1 roll pop pop PathInterface % IfcNum name t X0' Y0' Xout Yout status + dup missed eq not { 6 -1 roll /isectT exch def } if } { 6 -2 roll isCurvedIfc { CurvedInterface }{ PlainInterface } ifelse @@ -1555,9 +1591,10 @@ tx@OptexpDict begin aload pop Xin Yin Xin Yin 8 -2 roll exch % I.x I.y Xin Yin Xin Yin t [pathseg] + exch dup 9 1 roll exch % t I.x I.y Xin Yin Xin Yin t [pathseg] dup length 2 eq { % a line exch pop - aload pop aload pop 3 -1 roll aload pop VecSub % I.x I.y Xin Yin Xin Yin dXp dYp + aload pop aload pop 3 -1 roll aload pop VecSub % t I.x I.y Xin Yin Xin Yin dXp dYp } { exch dup cvi sub DeriveCurve } ifelse @@ -1574,6 +1611,7 @@ tx@OptexpDict begin PN 1 gt and { pop missed } if + % t X0' Y0' Xout Yout status } ifelse DebugEnd } bind def @@ -1890,13 +1928,12 @@ tx@OptexpDict begin tx@IntersectDict begin /IntersectLinePath { 3 dict begin - PreparePath + PreparePath dup length /n exch def 2 copy ElongateLine exch 3 -1 roll pop /isect [] def /t -1 def - /n -1 def { - /n n 1 add def + /n n 1 sub def 2 copy IntersectBeziers dup 5 1 roll LoadIntersectionPoints dup length 0 gt { diff --git a/Master/texmf-dist/makeindex/pst-optexp/pst-optexp.ist b/Master/texmf-dist/makeindex/pst-optexp/pst-optexp.ist index 8ed1fee0fbb..acf16be8666 100644 --- a/Master/texmf-dist/makeindex/pst-optexp/pst-optexp.ist +++ b/Master/texmf-dist/makeindex/pst-optexp/pst-optexp.ist @@ -9,7 +9,7 @@ %% This is a generated file. %% %% Project: pst-optexp -%% Version: 5.0 (2014/10/30) +%% Version: 5.1 (2014/11/19) %% %% Copyright (C) 2007-2014 by Christoph Bersch %% diff --git a/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.dtx b/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.dtx index a7a338d24a2..fa5b2dc0c53 100644 --- a/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.dtx +++ b/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.dtx @@ -18,7 +18,7 @@ %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %\ProvidesPackage{pst-optexp} %<*stylefile> - [2014/10/30 v5.0 Optical experimental setups with PSTricks] + [2014/11/19 v5.1 Optical experimental setups with PSTricks] % % %<*driver> @@ -110,7 +110,7 @@ oenodeRotref, oenodeBeam, oenodeBeamUp, oenodeBeamLow, oenodeCenter, oenodeIfc, oeBeamVec, oeBeamVecUp, oeBeamVecLow, oeBeamVecMedian, oeBeamCenter, optplate, optretplate, pinhole, crystal, optdetector, - optdiode, doveprism, glanthompson, polarization, mirror, + optdiode, doveprism, glanthompson, polarization, mirror, parabolicmirror, oapmirror, beamsplitter, optgrating, optprism, rightangleprism, pentaprism, optaom, optdipole, opttripole, optfiber, optamp, optmzm, optfilter, optsource, polcontrol, optisolator, optswitch, fiberdelayline, @@ -3934,6 +3934,111 @@ % % \fi % +% \ifGERMAN\section{Off-axis-Parabolspiegel}\fi +% \ifENGLISH\section{Off-axis parabolic mirror}\fi +% +% \begin{ltxsyntax} +% \xLtripole{oapmirror}% +% \compitem{oapmirror}[options](in)(center)(focus){label}% +% \iffalse +%<*ignore> +% \fi +\begin{LTXexample} +\begin{pspicture}(3,2.5) + \oapmirror(3,2)(1,2)(2,0){OAP} + \drawwidebeam[beamwidth=0.5](3,2){1}(2,0) +\end{pspicture} +\end{LTXexample} +% \iffalse +% +% \fi +% \end{ltxsyntax} +% +% \begin{optionlist} +% \optitem[1]{oapmirroraperture}{\prm{num} or \prm{inner} \prm{outer}} +% \ifGERMAN +% Apertur des Spiegels bezogen auf die Eingangsrichtung. Wird eine +% Zahl angegeben, dann gibt diese die gesamte Apertur an, die vertikal +% und symmetrisch zur Verbindung zwischen \prm{in} und \prm{center} +% gemessen wird. Bei zwei Zahlen geben diese die innere und äußere +% Apertur an. +% \fi +% \ifENGLISH +% Mirror aperture with respect to the input direction. If a single +% number is given, it specifies the whole aperture, measured +% perpendicularly and symmetric to the connection from \prm{in} to +% \prm{center}. Two numbers give the inner and the outer apertures. +% \fi +% \end{optionlist} +% +% \ifGERMAN \newpage +% Die Konstruktion des Spiegels anhand der vorgegebenen Punkte geschieht +% wie folgt: Die Gerade von Knoten \prm{in} zu \prm{center} liegt +% parallel zur optischen Achse, \prm{focus} gibt den Fokuspunkt der +% Parabel an. Die Apertur des Spiegels wird mittels des Parameters +% \Lkeyword{oapmirroraperture} angegeben, gemessen senkrecht zum +% einfallenden Strahl. +% +% Die unterschiedlichen Parameter und die zugrundeliegende ganze Parabel +% sind in der folgenden Skizze dargestellt: +% \fi +% \ifENGLISH +% The mirror construction using the given nodes is done as follows: the +% line from node \prm{in} to \prm{center} is parallel to the optical +% axis, \prm{focus} specifies the focal point of the parabola. The +% mirror aperture is given by the parameter +% \Lkeyword{oapmirroraperture}, measured perpendicular to the incoming +% beam. +% +% The different parameters and the whole original parabola are shown in +% the following illustration: +% \fi +% +% \iffalse +%<*ignore> +% \fi +\ifENGLISH +\begin{LTXexample}[linerange={1-2,4-6,15-15}] +\begin{pspicture}(6,5) +\pnodes(5.5,3){In}(1.5,3){Center}(1.5,1.5){Focus} +\oapmirror[oapmirroraperture=3 2, linestyle=dashed, style=Refline](In)(Center)(Focus) +\oapmirror[oapmirroraperture=1.5, linewidth=3\pslinewidth, plotpoints=200](In)(Center)(Focus){OAP} +\multido{\r=-0.5+0.5}{3}{% + \drawbeam[beampos=\r](In){}(Focus)} +\psset{style=Refline}\color{Refline} +\psdot(In)\uput[0](In){In}\psdot(Center)\uput[180](Center){\rput[r](0,0){Center}}\psdot(Focus)\uput[-90](Focus){Focus} +\pnodes([Xnodesep=1]Center){TmpA}([Xnodesep=1,offset=0.75]Center){TmpB} +\psline[arrowscale=1.5, arrows=<->](TmpA)(TmpB)\rput[l]([Xnodesep=0.3]TmpB){outer aperture} +\pnode([Xnodesep=1,offset=-0.75]Center){TmpB} +\psline[arrowscale=1.5, arrows=<->](TmpA)(TmpB)\rput[l]([Xnodesep=0.3]TmpB){inner aperture} +\pnode(In|Focus){Tmp} +\psline[linestyle=dotted]([Xnodesep=-1.5]Focus)(Tmp)\rput[r]([offset=-0.5]Tmp){optical axis} +\end{pspicture} +\end{LTXexample} +\fi\ifGERMAN +\begin{LTXexample}[linerange={1-2,4-6,15-15}] +\begin{pspicture}(6,5) +\pnodes(5.5,3){In}(1.5,3){Center}(1.5,1.5){Focus} +\oapmirror[oapmirroraperture=3 2, linestyle=dashed, style=Refline](In)(Center)(Focus) +\oapmirror[oapmirroraperture=1.5, linewidth=3\pslinewidth, plotpoints=200](In)(Center)(Focus){OAP} +\multido{\r=-0.5+0.5}{3}{% + \drawbeam[beampos=\r](In){}(Focus)} +\psset{style=Refline}\color{Refline} +\psdot(In)\uput[0](In){In}\psdot(Center)\uput[180](Center){\rput[r](0,0){Center}}\psdot(Focus)\uput[-90](Focus){Focus} +\pnodes([Xnodesep=1]Center){TmpA}([Xnodesep=1,offset=0.75]Center){TmpB} +\psline[arrowscale=1.5, arrows=<->](TmpA)(TmpB)\rput[l]([Xnodesep=0.3]TmpB){aeussere Apertur} +\pnode([Xnodesep=1,offset=-0.75]Center){TmpB} +\psline[arrowscale=1.5, arrows=<->](TmpA)(TmpB)\rput[l]([Xnodesep=0.3]TmpB){innere Apertur} +\pnode(In|Focus){Tmp} +\psline[linestyle=dotted]([Xnodesep=-1.5]Focus)(In|Focus)\rput[r]([offset=-0.5]Tmp){optische Achse} +\end{pspicture} +\end{LTXexample} +\fi +% \iffalse +% +% \fi +% +% % \ifGERMAN\section{Strahlteiler}\fi % \ifENGLISH\section{Beamsplitter}\fi % @@ -13588,6 +13693,10 @@ % % \begin{changelog} % \patchcmd{\release}{\setlength{\itemsep}{0pt}}{\setlength{\itemsep}{0pt}\setlength{\parsep}{0pt}}{}{} +% \begin{release}{5.1}{2014-11-19} +% \item Added component \cs{oapmirror}. +% \item Added support for filled beams with path interfaces. +% \end{release} % \begin{release}{5.0}{2014-10-30} % \item Added support for arbitrary interface shapes (experimental, % requires the \opt{pst-intersect} package and \opt{pstricks} @@ -15012,6 +15121,23 @@ }% % \end{macrocode} % +% Off-axis parabolic mirror +% \begin{macrocode} +\define@key[psset]{optexp}{oapmirroraperture}{% + \pst@expandafter\POE@psset@@oapmirroraperture{#1} {} {} {}\@nil +}% +\def\POE@psset@@oapmirroraperture#1 #2 #3\@nil{% + \ifx\\#2\\% + \def\POE@key@oapmirroraperture@outer{#1 0.5 mul} + \def\POE@key@oapmirroraperture@inner{#1 0.5 mul} + \else + \pst@checknum{#1}\POE@key@oapmirroraperture@inner + \pst@checknum{#2}\POE@key@oapmirroraperture@outer + \fi +}% +\psset[optexp]{oapmirroraperture=1} +% \end{macrocode} +% % Grating % % These are the old \opt{optgrid*} parameters, which have been deprecated. @@ -18751,6 +18877,7 @@ \newOptexpTripole[ref@angle=45]{pentaprism} \newOptexpTripole[ref@angle=45]{rightangleprism} \newOptexpTripole[ref@angle=45]{optprism} +\newOptexpTripole{oapmirror} % \end{macrocode} % % \begin{macro}{\optdipole} @@ -20505,6 +20632,54 @@ % \end{macrocode} % \end{macro} % +% \subsubsection{off-axis parabolic mirror} +% +% \begin{macro}{\oapmirror@nodes} +% \begin{macrocode} +\def\oapmirror@nodes{% + \POE@calcAngle + \POE@Verb{% + gsave + STV CP T + /N@\oenodeRefA{} @GetCenter + /N@\oenodeCenter{} @GetCenter + @ABVect NormalizeVec 2 copy + 90 matrix rotate dtransform + /N@\oenodeRefB{} @GetCenter + /N@\oenodeCenter{} @GetCenter @ABVect + \tx@UserCoor 2 copy 6 2 roll + grestore + DotProd tx@Dict begin /POEzonalradius ED end + DotProd + % y = ax^2, a = 1/(2x_0^2) (-h + sqrt(h^2 + x_0^2)), x_0 = @zonalradius. + tx@Dict begin + dup /POEoapheight ED neg dup dup mul POEzonalradius dup mul add sqrt add 0.5 POEzonalradius dup mul div mul + dup /POEoappar ED + /POEangle 180 OEangle sub 0.5 mul POEzonalradius 0 gt { 90 add } if DegToRad def + end + }% + \def\POE@tempX{((POEoappar*(t^2))-(0.25/POEoappar)+POEoapheight)}% + \def\POE@tempY{(-t+POEzonalradius)}% + \pssavepath[linestyle=none, arrows=-,ArrowInside=-]{\oenode@Path{A}}{% + \psparametricplot[algebraic]% + {POEzonalradius dup 0 gt {\POE@key@oapmirroraperture@outer}{\POE@key@oapmirroraperture@inner} ifelse add}% + {POEzonalradius dup 0 gt {\POE@key@oapmirroraperture@inner}{\POE@key@oapmirroraperture@outer} ifelse sub}% + {(cos(POEangle)*\POE@tempX+sin(POEangle)*\POE@tempY)|(cos(POEangle)*\POE@tempY-sin(POEangle)*\POE@tempX)}}% + \newOptexpComp{% + {0 0} tx@IntersectDict /\PIT@name{\oenode@Path{A}} get 0 0 refl {PathIfc} + 1 }% +\ignorespaces}% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\oapmirror@comp} +% \begin{macrocode} +\def\oapmirror@comp{% + \pstracecurve{\oenode@Path{A}}% +\ignorespaces}% +% \end{macrocode} +% \end{macro} +% % \subsection{Fiber components} % % \subsubsection{optfiber} @@ -21706,7 +21881,7 @@ tx@OptexpDict begin % \opt{pswarning}. % \begin{macrocode} /PrintWarning { - (Warning pst-optexp: ) exch strcat == + (Warning pst-optexp: ) exch strcat (\n) strcat print } bind def /CompUnknownWarning { (Component ') exch strcat (' unknown) strcat Warning @@ -22925,6 +23100,18 @@ tx@OptexpDict begin % \end{macrocode} % \end{macro} % +% \begin{macro}{TraceInterfacePath} +% \begin{macrocode} +/TraceInterfacePath { + tx@IntersectDict begin + /ArrowA { {currentpoint} stopped {moveto}{pop pop pop pop} ifelse } def + {} TraceCurveOrPath + currentdict /ArrowA undef + end +} bind def +% \end{macrocode} +% \end{macro} +% % \begin{macro}{TraceAndFillWideBeam} % Fill a wide beam. This has an own procedure, because each segment % of the beam must be filled separately. @@ -23017,6 +23204,9 @@ tx@OptexpDict begin counttomark /IfcCnt ED /n1 bgRefIndex def /CurrR false def + /CurrPath false def + /CurrUpT false def + /CurrLowT false def /ret missed def /PN 1 def { @@ -23088,7 +23278,9 @@ tx@OptexpDict begin currentdict /relAngleUp known { relAngleUp } { 0 } ifelse connectInterfaces /relAngleUp ED } if - /CurrUp load /PrevUp ED + /PrevUp /CurrUp load def + /PrevUpT /CurrUpT load def + /PrevPath /CurrPath load def IfcNum CompName Mode n2 8 4 roll HandleInterface dup /ret ED missed eq { @@ -23097,11 +23289,16 @@ tx@OptexpDict begin } if ToVec /CurrVecUp ED ToVec /CurrUp ED + currentdict /isectT known currentdict /isectPath known and { + /CurrUpT isectT def + /CurrPath isectPath def + } if /n1 oldn1 def % \end{macrocode} % Calculate new lower vector and intersection point % \begin{macrocode} - /CurrLow load /PrevLow ED + /PrevLow /CurrLow load def + /PrevLowT /CurrLowT load def CurrLow CurrVecLow connectifc PrevCorrect PN 2 gt and PN 2 eq or and { CurrVecLow CurrPCenter PrevPCenter PrevMode @@ -23124,6 +23321,9 @@ tx@OptexpDict begin % \end{macrocode} % lower done % \begin{macrocode} + currentdict /isectT known { + /CurrLowT isectT def + } if /PrevR CurrR def PrevR type /realtype eq { /CurrCenter load /PrevCenter ED @@ -23136,6 +23336,11 @@ tx@OptexpDict begin /CurrR false def /CurrCenter false def } ifelse + IfcNum CompName isPathIfc not { + /CurrPath false def + /CurrLowT false def + /CurrUpT false def + } if PN 1 gt currentdict /fillBeam known and { draw { /DrawnSegm DrawnSegm 1 add def @@ -23149,22 +23354,27 @@ tx@OptexpDict begin CurrLow CurrR arct } ifelse } { - CurrLow lineto + IfcNum CompName isPathIfc { + CurrPath CurrUpT CurrLowT TraceInterfacePath + } { + CurrLow lineto + } ifelse } ifelse PrevLow lineto - PrevR type /booleantype eq not { -% \end{macrocode} -% previous interface was also curved -% \begin{macrocode} - PrevCenter PrevLow PrevUp - 4 copy 3 -1 roll eq 3 1 roll eq and { - 6 {pop} repeat + PrevPath type /booleantype eq not { + PrevPath PrevLowT PrevUpT TraceInterfacePath + } { + PrevR type /booleantype eq not { + PrevCenter PrevLow PrevUp + 4 copy 3 -1 roll eq 3 1 roll eq and { + 6 {pop} repeat + } { + TangentCrosspoint + PrevUp PrevR arct + } ifelse } { - TangentCrosspoint - PrevUp PrevR arct + PrevUp lineto } ifelse - } { - PrevUp lineto } ifelse } if Mode refl eq draw and @@ -23438,9 +23648,12 @@ tx@OptexpDict begin /HandleInterface { (HandleInterface) DebugBegin /Yin ED /Xin ED /Y0 ED /X0 ED /n2 ED /mode ED + currentdict /isectT undef currentdict /isectPath undef 2 copy 2 copy LoadIfc % IfcNum name IfcNum name path dup type /arraytype eq { % is an path interface - 3 1 roll pop pop PathInterface % IfcNum name X0' Y0' Xout Yout status + dup /isectPath exch def + 3 1 roll pop pop PathInterface % IfcNum name t X0' Y0' Xout Yout status + dup missed eq not { 6 -1 roll /isectT exch def } if } { 6 -2 roll isCurvedIfc { CurvedInterface }{ PlainInterface } ifelse @@ -24013,8 +24226,9 @@ tx@OptexpDict begin % \end{macro} % % \begin{macro}{@ABVect} +% Vector from (Xb,Yb) to (Xa,Ya) % \begin{pssyntax} -% \PSvar{Xa Ya Xb Yb} \PSop{@ABVect} \PSvar{dX dY} +% \PSvar{Xa Ya Xb Yb} \PSop{@ABVect} \PSvar{(Ya - Yb) (Xa - Xb)} % \end{pssyntax} % \begin{macrocode} /@ABVect { @@ -24253,9 +24467,10 @@ tx@OptexpDict begin aload pop Xin Yin Xin Yin 8 -2 roll exch % I.x I.y Xin Yin Xin Yin t [pathseg] + exch dup 9 1 roll exch % t I.x I.y Xin Yin Xin Yin t [pathseg] dup length 2 eq { % a line exch pop - aload pop aload pop 3 -1 roll aload pop VecSub % I.x I.y Xin Yin Xin Yin dXp dYp + aload pop aload pop 3 -1 roll aload pop VecSub % t I.x I.y Xin Yin Xin Yin dXp dYp } { exch dup cvi sub DeriveCurve } ifelse @@ -24272,6 +24487,7 @@ tx@OptexpDict begin PN 1 gt and { pop missed } if + % t X0' Y0' Xout Yout status } ifelse DebugEnd } bind def @@ -24859,13 +25075,12 @@ tx@OptexpDict begin tx@IntersectDict begin /IntersectLinePath { 3 dict begin - PreparePath + PreparePath dup length /n exch def 2 copy ElongateLine exch 3 -1 roll pop /isect [] def /t -1 def - /n -1 def { - /n n 1 add def + /n n 1 sub def 2 copy IntersectBeziers dup 5 1 roll LoadIntersectionPoints dup length 0 gt { diff --git a/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.ins b/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.ins index e144691e2b8..b16711e99e1 100644 --- a/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.ins +++ b/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.ins @@ -53,7 +53,7 @@ This is a generated file. Project: pst-optexp -Version: 5.0 (2014/10/30) +Version: 5.1 (2014/11/19) Copyright (C) 2007-2014 by Christoph Bersch diff --git a/Master/texmf-dist/tex/latex/pst-optexp/pst-optexp.sty b/Master/texmf-dist/tex/latex/pst-optexp/pst-optexp.sty index 5e8a6ad2b8e..c8ff7b8946f 100644 --- a/Master/texmf-dist/tex/latex/pst-optexp/pst-optexp.sty +++ b/Master/texmf-dist/tex/latex/pst-optexp/pst-optexp.sty @@ -9,7 +9,7 @@ %% This is a generated file. %% %% Project: pst-optexp -%% Version: 5.0 (2014/10/30) +%% Version: 5.1 (2014/11/19) %% %% Copyright (C) 2007-2014 by Christoph Bersch %% @@ -31,7 +31,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{pst-optexp} - [2014/10/30 v5.0 Optical experimental setups with PSTricks] + [2014/11/19 v5.1 Optical experimental setups with PSTricks] \RequirePackage{ifthen} \RequirePackage{pstricks} \RequirePackage{pst-xkey} @@ -961,6 +961,19 @@ parmirrorwidth=1, parmirrorheight=1 }% +\define@key[psset]{optexp}{oapmirroraperture}{% + \pst@expandafter\POE@psset@@oapmirroraperture{#1} {} {} {}\@nil +}% +\def\POE@psset@@oapmirroraperture#1 #2 #3\@nil{% + \ifx\\#2\\% + \def\POE@key@oapmirroraperture@outer{#1 0.5 mul} + \def\POE@key@oapmirroraperture@inner{#1 0.5 mul} + \else + \pst@checknum{#1}\POE@key@oapmirroraperture@inner + \pst@checknum{#2}\POE@key@oapmirroraperture@outer + \fi +}% +\psset[optexp]{oapmirroraperture=1} \define@key[psset]{optexp}{optgridcount}{% \pst@checknum{#1}\POE@key@gratingcount \PackageWarning{pst-optexp}{% @@ -3825,6 +3838,7 @@ \newOptexpTripole[ref@angle=45]{pentaprism} \newOptexpTripole[ref@angle=45]{rightangleprism} \newOptexpTripole[ref@angle=45]{optprism} +\newOptexpTripole{oapmirror} \def\optdipole{\pst@object{optdipole}} \def\optdipole@i(#1)(#2){% \@ifnextchar\bgroup% @@ -5103,6 +5117,42 @@ \POE@key@aomcomp \fi \ignorespaces}% +\def\oapmirror@nodes{% + \POE@calcAngle + \POE@Verb{% + gsave + STV CP T + /N@\oenodeRefA{} @GetCenter + /N@\oenodeCenter{} @GetCenter + @ABVect NormalizeVec 2 copy + 90 matrix rotate dtransform + /N@\oenodeRefB{} @GetCenter + /N@\oenodeCenter{} @GetCenter @ABVect + \tx@UserCoor 2 copy 6 2 roll + grestore + DotProd tx@Dict begin /POEzonalradius ED end + DotProd + % y = ax^2, a = 1/(2x_0^2) (-h + sqrt(h^2 + x_0^2)), x_0 = @zonalradius. + tx@Dict begin + dup /POEoapheight ED neg dup dup mul POEzonalradius dup mul add sqrt add 0.5 POEzonalradius dup mul div mul + dup /POEoappar ED + /POEangle 180 OEangle sub 0.5 mul POEzonalradius 0 gt { 90 add } if DegToRad def + end + }% + \def\POE@tempX{((POEoappar*(t^2))-(0.25/POEoappar)+POEoapheight)}% + \def\POE@tempY{(-t+POEzonalradius)}% + \pssavepath[linestyle=none, arrows=-,ArrowInside=-]{\oenode@Path{A}}{% + \psparametricplot[algebraic]% + {POEzonalradius dup 0 gt {\POE@key@oapmirroraperture@outer}{\POE@key@oapmirroraperture@inner} ifelse add}% + {POEzonalradius dup 0 gt {\POE@key@oapmirroraperture@inner}{\POE@key@oapmirroraperture@outer} ifelse sub}% + {(cos(POEangle)*\POE@tempX+sin(POEangle)*\POE@tempY)|(cos(POEangle)*\POE@tempY-sin(POEangle)*\POE@tempX)}}% + \newOptexpComp{% + {0 0} tx@IntersectDict /\PIT@name{\oenode@Path{A}} get 0 0 refl {PathIfc} + 1 }% +\ignorespaces}% +\def\oapmirror@comp{% + \pstracecurve{\oenode@Path{A}}% +\ignorespaces}% \def\optfiber@ref{% \POE@setref{% /@@x \POE@key@fiberloopsep\space\POE@key@fiberloops\space -- cgit v1.2.3