summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/pst-optexp
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-11-21 00:47:07 +0000
committerKarl Berry <karl@freefriends.org>2014-11-21 00:47:07 +0000
commit482524ad9e0c198448d651d2334f36e4da04e37d (patch)
treeed9b61b772286c68791b8bc19f3611d1e2ab245a /Master/texmf-dist/source/latex/pst-optexp
parent990c8b9570b5bb74dc588b5343fd33bbbffac59e (diff)
pst-optexp (20nov14)
git-svn-id: svn://tug.org/texlive/trunk@35630 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/pst-optexp')
-rw-r--r--Master/texmf-dist/source/latex/pst-optexp/pst-optexp.dtx261
-rw-r--r--Master/texmf-dist/source/latex/pst-optexp/pst-optexp.ins2
2 files changed, 239 insertions, 24 deletions
diff --git a/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.dtx b/Master/texmf-dist/source/latex/pst-optexp/pst-optexp.dtx
index 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 @@
%<stylefile>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<stylefile>\ProvidesPackage{pst-optexp}
%<*stylefile>
- [2014/10/30 v5.0 Optical experimental setups with PSTricks]
+ [2014/11/19 v5.1 Optical experimental setups with PSTricks]
%</stylefile>
%
%<*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 @@
%</ignore>
% \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
+%</ignore>
+% \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
+%</ignore>
+% \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 <usenet@bersch.net>