summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-07-15 22:45:53 +0000
committerKarl Berry <karl@freefriends.org>2013-07-15 22:45:53 +0000
commitbaf92cd2b6a50c9aaf590f0c88a71532f72667dd (patch)
tree51d1be7cc1e4f4ea9156870196e53338a3d51fbe
parentb8995c2e1cd8aa0925d55dbb0570f1cbe0b9f457 (diff)
pst-optexp (15jul13)
git-svn-id: svn://tug.org/texlive/trunk@31203 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/pst-optexp/Changes6
-rw-r--r--Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-DE.pdfbin2357654 -> 2396475 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-quickref.pdfbin49001 -> 48922 bytes
-rw-r--r--Master/texmf-dist/doc/latex/pst-optexp/pst-optexp.pdfbin2315575 -> 2353939 bytes
-rw-r--r--Master/texmf-dist/dvips/pst-optexp/pst-optexp.pro24
-rw-r--r--Master/texmf-dist/source/latex/pst-optexp/pst-optexp.dtx252
-rw-r--r--Master/texmf-dist/source/latex/pst-optexp/pst-optexp.ins2
-rw-r--r--Master/texmf-dist/tex/latex/pst-optexp/pst-optexp.sty60
8 files changed, 276 insertions, 68 deletions
diff --git a/Master/texmf-dist/doc/latex/pst-optexp/Changes b/Master/texmf-dist/doc/latex/pst-optexp/Changes
index c57c94e1bae..ea7c5a01749 100644
--- a/Master/texmf-dist/doc/latex/pst-optexp/Changes
+++ b/Master/texmf-dist/doc/latex/pst-optexp/Changes
@@ -1,3 +1,9 @@
+4.4 2013-07-14
+ * Added component \transmissiongrating.
+ * Modified innerlabel to explicitly set labelalign=c
+ * Fixed trailing spaces in savebeampoints (and savebeam).
+ * Allow Postscript code in angle.
+
4.3a 2013-07-02
* Fixed tripole alignment bugs introduced in version 4.3.
* Again fixed the alignment of reflective \optprism.
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 83442db56f1..43008a5a91f 100644
--- a/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-DE.pdf
+++ b/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-DE.pdf
Binary files 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 f503ad1ea15..929c9427137 100644
--- a/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-quickref.pdf
+++ b/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp-quickref.pdf
Binary files 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 a87d61cf285..4bb5d06e03d 100644
--- a/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp.pdf
+++ b/Master/texmf-dist/doc/latex/pst-optexp/pst-optexp.pdf
Binary files differ
diff --git a/Master/texmf-dist/dvips/pst-optexp/pst-optexp.pro b/Master/texmf-dist/dvips/pst-optexp/pst-optexp.pro
index afdc628edb2..99a06e55cfc 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: 4.3a (2013/07/02)
+%% Version: 4.4 (2013/07/14)
%%
%% Copyright (C) 2007-2013 by Christoph Bersch <usenet@bersch.net>
%%
@@ -134,7 +134,9 @@ tx@OptexpDict begin
cx cy NormalizeVec 2 copy
XG YG VecAdd /Y@A ED /X@A ED
XG YG 4 2 roll VecSub /Y@B ED /X@B ED
+ true
ax by mul ay bx mul sub 0 le {
+ pop false
Y@A X@A
/X@A X@B def
/Y@A Y@B def
@@ -266,7 +268,7 @@ tx@OptexpDict begin
exec scl ToVec 3 1 roll NodeName @NewNode
} bind def
/relative 0 def /absolute 1 def /center 2 def
-/refl 0 def /trans 1 def /absorb 2 def /undefined -1 def
+/refl 0 def /trans 1 def /absorb 2 def /refltrans 3 def /undefined -1 def
/desc 0 def /asc 1 def /amb 2 def
/ok 0 def /tir 1 def /missed 2 def
/bgRefIndex 0 def
@@ -1355,13 +1357,19 @@ tx@OptexpDict begin
@InterLines missed eq {
0 0 missed
} {
- Xin Yin Xin Yin dXp dYp NormalVec
- mode trans eq {
- n1 n2 RefractVec
- 2 copy 0 eq exch 0 eq and { tir } { ok } ifelse
+ Xin Yin Xin Yin dXp dYp
+ mode refltrans eq {
+ neg exch NormalVec ReflectVec ok
} {
- ReflectVec ok
- } ifelse /n1 n2 def
+ NormalVec
+ mode trans eq {
+ n1 n2 RefractVec
+ 2 copy 0 eq exch 0 eq and { tir } { ok } ifelse
+ } {
+ ReflectVec ok
+ } ifelse
+ } ifelse
+ /n1 n2 def
5 -2 roll 2 copy 7 2 roll X0 Y0 @ABVect Xin Yin DotProd 0 lt
PN 1 gt and {
pop missed
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 88d273c276b..af79274db71 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>
- [2013/07/02 v4.3a Optical experimental setups with PSTricks]
+ [2013/07/14 v4.4 Optical experimental setups with PSTricks]
%</stylefile>
%
%<*driver>
@@ -115,7 +115,7 @@
polcontrol, optisolator, optswitch, fiberdelayline,
optfiberpolarizer, fibercollimator, optcoupler, wdmcoupler,
wdmsplitter, optcirculator, fiberbox, eleccoupler, elecsynthesizer,
- elecmixer, optarrowcomp, optbarcomp, drawbeam, drawwidebeam,
+ elecmixer, optarrowcomp, optbarcomp, transmissiongrating, drawbeam, drawwidebeam,
drawfiber, drawwire, frontlayer, backlayer, newOptexpDipole,
newOptexpTripole, newOptexpFiberDipole, newOptexpComp,
newOptexpFiberComp, optplane},
@@ -2049,8 +2049,8 @@
%</ignore>
% \fi
% \choitem{innerlabel}{true}
-% \ifGERMAN Das ist ein Alias für \opt{label=0 .\ .\ relative}\fi
-% \ifENGLISH This is an alias for \opt{label=0 .\ .\ relative}\fi
+% \ifGERMAN Das ist ein Alias für \opt{label=0 .\ c relative}\fi
+% \ifENGLISH This is an alias for \opt{label=0 .\ c relative}\fi
% \end{optionlist}
%
%
@@ -2212,7 +2212,7 @@
% \fi
%
% \begin{optionlist}
-% \numitem[0]{angle}
+% \psnumitem[0]{angle}
% \ifGERMAN Dreht eine Komponente um den Winkel \prm{num} (in Grad). Die
% Ausgangsposition ist grau gestrichelt eingezeichnet.
% \fi
@@ -4003,7 +4003,89 @@
% \fi
% \vspace*{2cm}
% \end{stylelist}
+%
+%
+% \ifGERMAN\section{Transmissionsgitter}\fi
+% \ifENGLISH\section{Transmission grating}\fi
+%
+% \begin{ltxsyntax}
+% \tripoledesc{transmissiongrating}
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}
+\begin{pspicture}(3,2)
+ \transmissiongrating[beam](0,1)(1.5,1)(3,0.5){TG}
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+% \end{ltxsyntax}
+%
+% \ifGERMAN
+% Das Transmissiongitter unterstützt alle Optionen von
+% \Lcomp{optgrating}. Der Strahlengang wird so berechnet, dass der
+% Strahl an einer Ebene senkrecht zum dargestellten Gitter reflektiert
+% wird.
+% \fi
+% \ifENGLISH
+% The transmission grating supports all options of
+% \Lcomp{optgrating}. The beam path is calculated such, that the beam is
+% reflected at an interface which is perpendicular to the drawn grating.
+% \fi
+%
+% \begin{pspicture}(2.6,2.4)
+% \pnode(0,1.3){A}\pnode(2,1.3){B}\pnode(1,0.3){C}
+% \optgrating[reverse, gratingcount=9](A)(B)(C)
+% \optplane[angle=45](C)
+% \addtopsstyle{Beam}{ArrowInside=->, ArrowInsidePos=0.8, arrowinset=0, arrowscale=1.5}
+% \drawbeam[linecolor=black](A){1}
+% \addtopsstyle{Beam}{loadbeam, savebeam=false}
+% \drawbeam[linecolor=green]{1-2}
+% \drawbeam[linecolor=red, beamangle=15]{1-2}
+% \drawbeam[linecolor=blue, beamangle=-15]{1-2}
+% \rput[lB](0,2){\ifENGLISH reflection grating\fi\ifGERMAN Reflexionsgitter\fi}
+% \end{pspicture}
+% \hspace*{2cm}
+% \begin{pspicture}(5,2.4)
+% \pnode(0,1.3){A}\pnode(2,1.3){B}\pnode(4,1){C}
+% \transmissiongrating[reverse, gratingcount=9](A)(B)(C){TG}
+% \optplane[angle=-30](C)
+% \addtopsstyle{Beam}{ArrowInside=->, ArrowInsidePos=0.8, arrowinset=0, arrowscale=1.5}
+% \drawbeam[linecolor=black](A){1}
+% \addtopsstyle{Beam}{loadbeam, savebeam=false}
+% \drawbeam[linecolor=green]{1-2}
+% \drawbeam[linecolor=red, beamangle=5]{1-2}
+% \drawbeam[linecolor=blue, beamangle=-5]{1-2}
+% \rput[lB](0,2){\ifENGLISH transmission grating\fi\ifGERMAN Transmissionsgitter\fi}
+% \end{pspicture}
%
+% \ifENGLISH If this is not what you want, you may e.g. rotate the
+% component further with \Lkeyword{angle}, and then adjust also the
+% \Lkeyword{beamangle}.
+% \fi
+% \ifGERMAN Ist dieses Verhalten nicht gewünscht, so kann man z.B. die
+% Komponente mit \Lkeyword{angle} weiter drehen, und den Strahlwinkel
+% mit \Lkeyword{beamangle} entsprechend korrigieren.
+% \fi
+%
+% \iffalse
+%<*ignore>
+% \fi
+\begin{LTXexample}
+\begin{pspicture}(3,1.4)
+ \pnode(0,1){A}\pnode(1,1){B}\pnode(3,0.6){C}
+ \transmissiongrating[angle=-10, reverse](A)(B)(C){TG}
+ \addtopsstyle{Beam}{ArrowInside=->, ArrowInsidePos=0.8, arrowinset=0, arrowscale=1.5}
+ \drawbeam[linecolor=black](A){1}
+ \drawbeam[linecolor=green, loadbeam, beamangle=20]{1}(C)
+\end{pspicture}
+\end{LTXexample}
+% \iffalse
+%</ignore>
+% \fi
+%
% \ifGERMAN\section{Prisma}\fi
% \ifENGLISH\section{Prism}\fi
%
@@ -11209,6 +11291,45 @@
\end{LTXexample}
\endgroup
+\begin{LTXexample}[caption={caption}]
+\begin{pspicture}(2.2,2.2)
+\definecolor[ps]{bl}{rgb}{tx@addDict begin Red Green Blue end}%
+\pnode(0,0.5){In}\pnode(2,0.5){G1}
+\pnode([Xnodesep=-1.5, offset=1.3]G1){G2}\pnode(G1|G2){MG}
+\begin{optexp}
+ \optgrating[angle=40, gratingalign=c](In)(G1)(G2)
+ \optgrating[reverse, angle=40, gratingalign=c](G1)(G2)(MG)
+ \mirror[mirrorwidth=1, mirrortype=extended](G2)(MG)(G2)
+ \drawbeam[linecolor=red](In){1}
+ \multido{\i=0+1}{40}{%
+ \pstVerb{\i\space 650 400 sub 39 div mul 400 add
+ tx@addDict begin wavelengthToRGB end }%
+ \drawbeam[linecolor=bl, beamangle=\i\space 16 sub 0.2 mul]{1-2}%
+ \drawbeam[linecolor=bl, loadbeampoints]{2-3}
+ }%
+\end{optexp}
+\end{pspicture}
+\end{LTXexample}
+
+\begin{LTXexample}[pos=t, caption={caption}]
+\begin{pspicture}(5.6,3)
+\pnode(0,0.5){S1}\pnode(2,2.5){S2}\pnode(3,1.5){S3}\pnode(4,0.5){S4}\pnode(4.5,1){S5}
+\psset{prismangle=30, mirrortype=extended}
+\definecolor[ps]{bl}{rgb}{tx@addDict begin Red Green Blue end}%
+\begin{optexp}
+ \optprism(S1)(S2)(S3)\optprism(S3)(S4)(S5)
+ \mirror[compshift=-0.07](\oenodeIn{2})([offset=1,Xnodesep=1]\oenodeIn{2})(\oenodeIn{2})
+ \drawbeam[linecolor=orange, ArrowInside=->, ArrowInsidePos=0.2, arrowscale=1.5](S1){1}
+ \addtopsstyle{Beam}{linecolor=bl, linewidth=0.35\pslinewidth, beampathskip=1}
+ \multido{\r=0+0.5}{120}{%
+ \pstVerb{\r\space 620 590 sub 59 div mul 590 add
+ tx@addDict begin wavelengthToRGB end }%
+ \drawbeam[n=3.42 -0.002 \r\space mul add, beampos=\r\space 60 sub 0.0002 mul](S1){1-3}
+ }%
+\end{optexp}
+\end{pspicture}
+\end{LTXexample}
+
\begin{LTXexample}[pos=t, linerange={1-1}, caption={caption}]
\psset{unit=1.1, usefiberstyle=false}
@@ -11580,6 +11701,14 @@
% \POE@extnodes[style=ExtNodeStyle, optdipolesize=1]{optdipole}
% \makeatother
% \end{pspicture}
+% \begin{pspicture}(3,2)
+% \transmissiongrating(0,1.5)(1.5,1.5)(3,1)
+% \rput[t](1.5,0.9){\ttfamily\small
+% \begin{tabular}{@{}c@{}}\textbackslash transmissiongrating\end{tabular}}
+% \makeatletter
+% \POE@extnodes[style=ExtNodeStyle]{transmissiongrating}
+% \makeatother
+% \end{pspicture}
%
% \ifENGLISH\subsubsection*{Fiber components}\fi
% \ifGERMAN\subsubsection*{Faserkomponenten}\fi
@@ -11736,6 +11865,13 @@
% \rput[bl](0,-0.4){\ttfamily\textbackslash optdipole}
% \end{pspicture}%
% \hspace{\fill}%
+% \begin{pspicture}(0,-0.5)(3,1.7)
+% \pnode(0,0.7){A}\pnode(1.5,0.7){B}\pnode(3,0.4){C}
+% \transmissiongrating(A)(B)(C)
+% \drawbeam(A){}(C)
+% \psdot(\oenodeIn{})\uput[45](\oenodeIn{}){1, N}
+% \rput[bl](0,-0.4){\ttfamily\textbackslash transmissiongrating}
+% \end{pspicture}%
%
% \noindent\begin{pspicture}(3,2.5)
% \pnode(0,1.5){A}\pnode(2.5,1.5){B}\pnode(2.5,0.4){C}
@@ -11939,12 +12075,12 @@
%
% \begin{optionlist}
% \poeitem{\cs{rightangleprism}}
-% \ifGERMAN Die Ausrichtung des \Lcs{rightangleprism} und die
+% \ifGERMAN Die Ausrichtung des \Lcomp{rightangleprism} und die
% Positionierung der Beschriftung war falsch. Das kommt aber nur zum
% tragen, wenn Eingangs- und Ausgangsvektor sehr unterschiedliche Längen
% haben.
% \fi
-% \ifENGLISH The alignment of the \Lcs{rightangleprism} and the
+% \ifENGLISH The alignment of the \Lcomp{rightangleprism} and the
% positioning of the label was wrong. This became apparent only if the
% input and output vectors had very different lenghts.
% \fi
@@ -12385,6 +12521,12 @@
%
% \begin{changelog}
%\patchcmd{\release}{\setlength{\itemsep}{0pt}}{\setlength{\itemsep}{0pt}\setlength{\parsep}{0pt}}{}{}
+% \begin{release}{4.4}{2013-07-14}
+% \item Added component \cs{transmissiongrating}\see{comp:transmissiongrating}
+% \item Modified \opt{innerlabel} to explicitly set \opt{labelalign=c}
+% \item Fixed trailing spaces in \opt{savebeampoints} (and \opt{savebeam}).
+% \item Allow Postscript code in \opt{angle}.
+% \end{release}
% \begin{release}{4.3a}{2013-07-02}
% \item Fixed tripole alignment bugs introduced in version 4.3.
% \item Again fixed the alignment of reflective \cs{optprism}\see{prm:prismalign}
@@ -13098,7 +13240,7 @@
\define@choicekey*+[psset]{optexp}{innerlabel}%
[\val\nr]{true}[true]%
{\ifcase\nr\relax
- \psset[optexp]{labeloffset=0, labelref=relative}%
+ \psset[optexp]{labeloffset=0, labelref=relative, labelalign=c}%
\fi}
{\PackageError{pst-optexp}{Unknown value '\val' for innerlabel}}%
\define@key[psset]{optexp}{label}{%
@@ -14265,13 +14407,13 @@
\define@choicekey+[psset]{optexp}{savebeampoints}%
[\val\nr]{true,false}[true]{%
\ifcase\nr\relax
- \def\POE@key@savebeampoints{1}
+ \def\POE@key@savebeampoints{1}%
\or
- \def\POE@key@savebeampoints{0}
+ \def\POE@key@savebeampoints{0}%
\fi
}{%
\ifnum9<1#1
- \def\POE@key@savebeampoints{#1}
+ \def\POE@key@savebeampoints{#1}%
\else
\PackageError{pst-optexp}%
{savebeampoints must be a positive integer or 0}%
@@ -16790,7 +16932,7 @@
\POE@tempa \tx@UserCoor
\POE@tempc \tx@UserCoor
\POE@tempb \tx@UserCoor
- calcNodes
+ calcNodes /exch@ref@\oenode{}{} ED
X@A Y@A}){\oenode@RefA{}}%
\pnode(! \POE@dict{X@B Y@B}){\oenode@RefB{}}%
\pnode(#2){\oenode@Origin{}}%
@@ -16958,21 +17100,13 @@
\POE@key@rotate@xref\space
\POE@key@rotate@yref\space
DefineExtNode}){\oenodeRotref{}}%
- \ifdim\POE@key@angle pt=0pt
- #1%
- \POE@pnode@shiftedrot(0,\POE@key@labeloffset)%
- {\oenodeCenter{}}%
- {\oenodeLabel{}}%
- {\POE@key@labelangle}%
- \else
- \psrotate(\oenodeRotref{}){\POE@key@angle}{%
- #1%
- \POE@pnode@shiftedrot(0,\POE@key@labeloffset)%
- {\oenodeCenter{}}%
- {\oenodeLabel{}}%
- {\POE@key@labelangle}%
- }%
- \fi%
+ \psrotate(\oenodeRotref{}){!\POE@key@angle}{%
+ #1%
+ \POE@pnode@shiftedrot(0,\POE@key@labeloffset)%
+ {\oenodeCenter{}}%
+ {\oenodeLabel{}}%
+ {\POE@key@labelangle}%
+ }%
}%
}%
% \end{macrocode}
@@ -17082,6 +17216,7 @@
\newOptexpTripole{mirror}
\newOptexpTripole[ref@angle=45]{beamsplitter}
\newOptexpTripole{optgrating}
+\newOptexpTripole[ref@angle=90]{transmissiongrating}
\def\optgrid{%
\PackageWarning{pst-optexp}{%
\string\optgrid\space is deprecated,\MessageBreak
@@ -18070,6 +18205,41 @@
% \end{macrocode}
% \end{macro}
%
+% \subsubsection{transmissiongrating}
+%
+% \begin{macro}{\transmissiongrating@ref}
+% \begin{macrocode}
+\def\transmissiongrating@ref{%
+ \POE@calcAngle
+ \POE@setref{/@@x \POE@key@gratingwidth\space 0.5 mul def}%
+ \edef\POE@key@angle{%
+ \POE@dict{ exch@ref@\oenode{}{} { -90 }{ 90 } ifelse }
+ \POE@key@angle\space add
+ }%
+ \edef\POE@temp{\POE@key@extnode@xref}%
+ \edef\POE@key@extnode@xref{%
+ \POE@dict{%
+ \POE@key@extnode@yref\space
+ exch@ref@\oenode{}{} { -1 mul } if } }%
+ \edef\POE@key@extnode@yref{%
+ \POE@dict{%
+ \POE@temp\space
+ exch@ref@\oenode{}{} { -1 mul } if } }%
+}%
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\transmissiongrating@nodes}
+% \begin{macrocode}
+\def\transmissiongrating@nodes{%
+ \newOptexpComp{%
+ {0 0} {1 0} \POE@key@gratingwidth\space -0.5 mul dup neg
+ refltrans {PlainIfc} 1}%
+}%
+\let\transmissiongrating@comp\optgrating@comp
+% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{optbox}
%
% \begin{macro}{\optbox@ref}
@@ -19827,7 +19997,9 @@ tx@OptexpDict begin
% Test the chirality (the order) of the input points. Input angles $> 90$\textdegree
% don't make sense, in this case we exhange the calculated reference nodes.
% \begin{macrocode}
+ true
ax by mul ay bx mul sub 0 le {
+ pop false
Y@A X@A
/X@A X@B def
/Y@A Y@B def
@@ -20122,7 +20294,7 @@ tx@OptexpDict begin
% Define some constants.
% \begin{macrocode}
/relative 0 def /absolute 1 def /center 2 def
-/refl 0 def /trans 1 def /absorb 2 def /undefined -1 def
+/refl 0 def /trans 1 def /absorb 2 def /refltrans 3 def /undefined -1 def
/desc 0 def /asc 1 def /amb 2 def
/ok 0 def /tir 1 def /missed 2 def
/bgRefIndex 0 def
@@ -21856,7 +22028,7 @@ tx@OptexpDict begin
%
% \begin{macro}{RefractVec}
% Calculate the refracted vector, the normal plane vector must be
-% constructed with \PSvar{NormVec}, see
+% constructed with \PSvar{NormalVec}, see
% \url{http://en.wikipedia.org/wiki/Snell%27s_law#Vector_form} for the
% formulas.
% \begin{pssyntax}
@@ -21893,7 +22065,7 @@ tx@OptexpDict begin
%
% \begin{macro}{ReflectVec}
% Calculate the reflected vector, the normal plane vector must be
-% constructed with \PSvar{NormVec}.
+% constructed with \PSvar{NormalVec}.
% \begin{pssyntax}
% \PSvar{Xin Yin Xnorm Ynorm} \PSop{ReflectVec} \PSvar{Xout Yout}
% \end{pssyntax}
@@ -21972,17 +22144,23 @@ tx@OptexpDict begin
/PlainInterface {%
(PlainInterface) DebugBegin
/dYp ED /dXp ED /Yp ED /Xp ED
- Xp Yp Xp dXp add Yp dYp add X0 Y0 X0 Xin add Y0 Yin add
+ Xp Yp Xp dXp add Yp dYp add X0 Y0 X0 Xin add Y0 Yin add
@InterLines missed eq {
0 0 missed
} {
- Xin Yin Xin Yin dXp dYp NormalVec
- mode trans eq {
- n1 n2 RefractVec
- 2 copy 0 eq exch 0 eq and { tir } { ok } ifelse
+ Xin Yin Xin Yin dXp dYp
+ mode refltrans eq {
+ neg exch NormalVec ReflectVec ok
} {
- ReflectVec ok
- } ifelse /n1 n2 def
+ NormalVec
+ mode trans eq {
+ n1 n2 RefractVec
+ 2 copy 0 eq exch 0 eq and { tir } { ok } ifelse
+ } {
+ ReflectVec ok
+ } ifelse
+ } ifelse
+ /n1 n2 def
5 -2 roll 2 copy 7 2 roll X0 Y0 @ABVect Xin Yin DotProd 0 lt
PN 1 gt and {
pop missed
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 49c9cdc7fc1..97135a6e1e3 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: 4.3a (2013/07/02)
+Version: 4.4 (2013/07/14)
Copyright (C) 2007-2013 by Christoph Bersch <usenet@bersch.net>
diff --git a/Master/texmf-dist/tex/latex/pst-optexp/pst-optexp.sty b/Master/texmf-dist/tex/latex/pst-optexp/pst-optexp.sty
index da236686fbd..91a84e34d89 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: 4.3a (2013/07/02)
+%% Version: 4.4 (2013/07/14)
%%
%% Copyright (C) 2007-2013 by Christoph Bersch <usenet@bersch.net>
%%
@@ -31,7 +31,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{pst-optexp}
- [2013/07/02 v4.3a Optical experimental setups with PSTricks]
+ [2013/07/14 v4.4 Optical experimental setups with PSTricks]
\RequirePackage{ifthen}
\RequirePackage{pstricks}
\RequirePackage{pst-xkey}
@@ -390,7 +390,7 @@
\define@choicekey*+[psset]{optexp}{innerlabel}%
[\val\nr]{true}[true]%
{\ifcase\nr\relax
- \psset[optexp]{labeloffset=0, labelref=relative}%
+ \psset[optexp]{labeloffset=0, labelref=relative, labelalign=c}%
\fi}
{\PackageError{pst-optexp}{Unknown value '\val' for innerlabel}}%
\define@key[psset]{optexp}{label}{%
@@ -1390,13 +1390,13 @@
\define@choicekey+[psset]{optexp}{savebeampoints}%
[\val\nr]{true,false}[true]{%
\ifcase\nr\relax
- \def\POE@key@savebeampoints{1}
+ \def\POE@key@savebeampoints{1}%
\or
- \def\POE@key@savebeampoints{0}
+ \def\POE@key@savebeampoints{0}%
\fi
}{%
\ifnum9<1#1
- \def\POE@key@savebeampoints{#1}
+ \def\POE@key@savebeampoints{#1}%
\else
\PackageError{pst-optexp}%
{savebeampoints must be a positive integer or 0}%
@@ -3306,7 +3306,7 @@
\POE@tempa \tx@UserCoor
\POE@tempc \tx@UserCoor
\POE@tempb \tx@UserCoor
- calcNodes
+ calcNodes /exch@ref@\oenode{}{} ED
X@A Y@A}){\oenode@RefA{}}%
\pnode(! \POE@dict{X@B Y@B}){\oenode@RefB{}}%
\pnode(#2){\oenode@Origin{}}%
@@ -3408,21 +3408,13 @@
\POE@key@rotate@xref\space
\POE@key@rotate@yref\space
DefineExtNode}){\oenodeRotref{}}%
- \ifdim\POE@key@angle pt=0pt
- #1%
- \POE@pnode@shiftedrot(0,\POE@key@labeloffset)%
- {\oenodeCenter{}}%
- {\oenodeLabel{}}%
- {\POE@key@labelangle}%
- \else
- \psrotate(\oenodeRotref{}){\POE@key@angle}{%
- #1%
- \POE@pnode@shiftedrot(0,\POE@key@labeloffset)%
- {\oenodeCenter{}}%
- {\oenodeLabel{}}%
- {\POE@key@labelangle}%
- }%
- \fi%
+ \psrotate(\oenodeRotref{}){!\POE@key@angle}{%
+ #1%
+ \POE@pnode@shiftedrot(0,\POE@key@labeloffset)%
+ {\oenodeCenter{}}%
+ {\oenodeLabel{}}%
+ {\POE@key@labelangle}%
+ }%
}%
}%
\def\POE@putlabel#1{%
@@ -3492,6 +3484,7 @@
\newOptexpTripole{mirror}
\newOptexpTripole[ref@angle=45]{beamsplitter}
\newOptexpTripole{optgrating}
+\newOptexpTripole[ref@angle=90]{transmissiongrating}
\def\optgrid{%
\PackageWarning{pst-optexp}{%
\string\optgrid\space is deprecated,\MessageBreak
@@ -4237,6 +4230,29 @@
\POE@key@gratingheight\space 0.5 mul){0.6}{160}{200}
\fi
\ignorespaces}%
+\def\transmissiongrating@ref{%
+ \POE@calcAngle
+ \POE@setref{/@@x \POE@key@gratingwidth\space 0.5 mul def}%
+ \edef\POE@key@angle{%
+ \POE@dict{ exch@ref@\oenode{}{} { -90 }{ 90 } ifelse }
+ \POE@key@angle\space add
+ }%
+ \edef\POE@temp{\POE@key@extnode@xref}%
+ \edef\POE@key@extnode@xref{%
+ \POE@dict{%
+ \POE@key@extnode@yref\space
+ exch@ref@\oenode{}{} { -1 mul } if } }%
+ \edef\POE@key@extnode@yref{%
+ \POE@dict{%
+ \POE@temp\space
+ exch@ref@\oenode{}{} { -1 mul } if } }%
+}%
+\def\transmissiongrating@nodes{%
+ \newOptexpComp{%
+ {0 0} {1 0} \POE@key@gratingwidth\space -0.5 mul dup neg
+ refltrans {PlainIfc} 1}%
+}%
+\let\transmissiongrating@comp\optgrating@comp
\def\optbox@ref{%
\POE@setref{%
/@@x \POE@key@optboxwidth\space 0.5 mul def