summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/pst-optexp
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2014-03-03 01:31:32 +0000
committerNorbert Preining <preining@logic.at>2014-03-03 01:31:32 +0000
commit3ed297e7d00115c2a2be5d8a32058869f33f0567 (patch)
treee4ebb4dbd0db3e7e4b273e60ed0f9625b1f6d93a /Master/texmf-dist/tex/latex/pst-optexp
parent28e659bbcfcb708eb292955e59ef98d3d3c72a9f (diff)
pst-optexp (3Mar)
git-svn-id: svn://tug.org/texlive/trunk@33077 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/pst-optexp')
-rw-r--r--Master/texmf-dist/tex/latex/pst-optexp/pst-optexp.sty248
1 files changed, 246 insertions, 2 deletions
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 905c664bf88..c4936e3a675 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.7 (2014/01/12)
+%% Version: 4.8 (2014/02/28)
%%
%% Copyright (C) 2007-2014 by Christoph Bersch <usenet@bersch.net>
%%
@@ -31,7 +31,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{pst-optexp}
- [2014/01/12 v4.7 Optical experimental setups with PSTricks]
+ [2014/02/28 v4.8 Optical experimental setups with PSTricks]
\RequirePackage{ifthen}
\RequirePackage{pstricks}
\RequirePackage{pst-xkey}
@@ -77,6 +77,7 @@
\newif\ifPOE@component@optional
\newif\ifPOE@debug@showoptdots
\newif\ifPOE@debug@showifcnodes
+\newif\ifPOE@debug@showinterfaces
\newif\ifPOE@endbox
\newif\ifPOE@startbox
\newif\ifPOE@thicklens
@@ -185,6 +186,7 @@
}
\newpsstyle{OptionalStyle}{linestyle=dashed,dash=1.5pt 1pt}%
\newpsstyle{IfcNodeStyle}{dotstyle=x, dotscale=1.5, linecolor=blue}%
+\newpsstyle{IfcStyle}{linestyle=dashed, dash=1pt 1pt, linecolor=red!70!black}%
\newpsstyle{Beam}{linecolor=green!90!black, linejoin=1}%
\define@key[psset]{optexp}{newBeam}{%
\newpsstyle{Beam}{#1}%
@@ -321,6 +323,7 @@
\define@boolkey[psset]{optexp}[POE@]{usewirestyle}[true]{}
\define@boolkey[psset]{optexp}[POE@debug@]{showoptdots}[true]{}
\define@boolkey[psset]{optexp}[POE@debug@]{showifcnodes}[true]{}
+\define@boolkey[psset]{optexp}[POE@debug@]{showinterfaces}[true]{}
\define@boolkey[psset]{optexp}[POE@]{endbox}[true]{}
\define@boolkey[psset]{optexp}[POE@]{startbox}[true]{}
\define@choicekey*+[psset]{optexp}{position}[\val\nr]{start,end}{%
@@ -1064,6 +1067,57 @@
optdipolecomp=,
opttripolecomp=%
}%
+\define@key[psset]{optexp}{aomwidth}{%
+ \pst@checknum{#1}\POE@key@aomwidth
+}%
+\define@key[psset]{optexp}{aomheight}{%
+ \pst@checknum{#1}\POE@key@aomheight
+}%
+\define@key[psset]{optexp}{aomsize}{%
+ \pst@expandafter\POE@psset@@aomsize{#1} {} {} {}\@nil
+}%
+\define@key[psset]{optexp}{aomgratingcount}{%
+ \edef\POE@key@aomgratingcount{#1}%
+}%
+\define@choicekey+[psset]{optexp}{aomalign}%
+ [\val\nr]{sym,symmetric,straight}%
+ {%
+ \ifcase\nr\relax
+ \let\POE@key@aomalign\POE@str@symmetric
+ \else
+ \def\POE@key@aomalign{#1}%
+ \fi
+ }%
+ {\PackageError{pst-optexp}{Unknown value '\val' for aomalign}}%
+\define@choicekey+[psset]{optexp}{aomreflalign}%
+ [\val\nr]{perp,parallel}%
+ {\def\POE@key@aomreflalign{#1}}%
+ {\PackageError{pst-optexp}{Unknown value '\val' for aomreflalign}}%
+\def\POE@psset@@aomsize#1 #2 #3\@nil{%
+ \ifx\\#2\\%
+ \PackageWarning{pst-optexp}{%
+ Parameter 'aomsize' requires two numbers.}%
+ \fi
+ \psset[optexp]{aomwidth=#1, aomheight=#2}%
+}%
+\define@key[psset]{optexp}{aomcomp}{%
+ \def\POE@key@aomcomp{#1}%
+}%
+\define@key[psset]{optexp}{diffractionorders}{%
+ \def\POE@key@diffractionorders{#1}%
+}%
+\define@key[psset]{optexp}{beamdiffractionorder}{%
+ \def\POE@key@beamdiffractionorder{#1}%
+}%
+\psset[optexp]{%
+ aomsize=1.5 1,
+ aomcomp=default,
+ aomalign=sym,
+ aomreflalign=parallel,
+ aomgratingcount=9,
+ diffractionorders=2,
+ beamdiffractionorder=
+}%
\define@key[psset]{optexp}{fiberloops}{%
\pst@checknum{#1}\POE@key@fiberloops
}
@@ -1428,6 +1482,17 @@
\define@key[psset]{optexp}{beamwidth}{%
\edef\POE@key@beamwidth{#1}%
}%
+\define@choicekey+[psset]{optexp}{beammode}%
+ [\val\nr]{trans,refl,reflective,transmittive,auto}%
+ {\ifcase\nr\relax
+ \let\POE@key@beammode\POE@str@transmittive
+ \or
+ \let\POE@key@beammode\POE@str@reflective
+ \else
+ \def\POE@key@beammode{#1}%
+ \fi}%
+ {\PackageError{pst-optexp}{Unknown value '\val' for beammode}}
+
\define@boolkey[psset]{optexp}[POE@]{startinside}[true]{}%
\define@boolkey[psset]{optexp}[POE@]{stopinside}[true]{}%
\define@key[psset]{optexp}{startinsidecount}{%
@@ -1585,6 +1650,7 @@
,beamalign=relative
,beamwidth=0
,beamdiv=0
+ ,beammode=auto
,n=1.5
,beampathskip=0
,beampathcount=-1
@@ -2204,6 +2270,18 @@
\POE@key@beampathcount\space dup -1 gt { beampathskip add } if /beampathcount ED
/useNA \ifPOE@useNA true \else false \fi def
/aligntovector \ifx\POE@key@beamnodealign\POE@str@vector true \else false \fi def
+ /beamdiffractionorder
+ \ifx\POE@key@beamdiffractionorder\@empty null
+ \else\POE@key@beamdiffractionorder\space
+ \fi def
+ /beammode
+ \ifx\POE@key@beammode\POE@str@reflective
+ refl
+ \else\ifx\POE@key@beammode\POE@str@transmittive
+ trans
+ \else
+ auto
+ \fi\fi def
}%
\let\tx@Line\POE@tx@Line
}%
@@ -3140,6 +3218,34 @@
tripole object '#2' already defined}%
}%
\ignorespaces}%
+\def\optaom{\pst@object{optaom}}%
+\def\optaom@i(#1)(#2)(#3){%
+ \@ifnextchar\bgroup
+ {\optaom@ii(#1)(#2)(#3)}%
+ {\optaom@ii(#1)(#2)(#3){}}%
+}%
+\def\optaom@ii(#1)(#2)(#3)#4{%
+ \addafter@par{ref@angle=180}%
+ \begin@OptexpTripole
+ \ifPOE@backlayer
+ \ifx\POE@key@abspos\@empty
+ \ifx\POE@key@position\@empty
+ \psLNode(#1)(#2){0.5}{\oenode{Tmp}{}}
+ \else
+ \psLNode(#1)(#2){\POE@key@position}{\oenode{Tmp}{}}
+ \fi
+ \else
+ \psLDNode(#1)(#2){\POE@key@abspos}{\oenode{Tmp}{}}
+ \fi
+ \POE@calcNodes{#1}{\oenode{Tmp}{}}{#3}%
+ \POE@regNodes{#1}{#3}
+ \fi
+ \POE@drawcomponent{optaom}{#4}
+ \ifPOE@backlayer
+ \POE@InternalConn
+ \fi
+ \end@OptexpTripole
+\ignorespaces}%
\def\optcoupler{\pst@object{optcoupler}}%
\def\optcoupler@i(#1)(#2){%
\@ifnextchar(%)
@@ -3478,6 +3584,22 @@
grestore
}%
\ignorespaces}%
+\def\POE@saveDiffractionNodes{%
+ \POE@Verb{%
+ gsave
+ STV CP T
+ /N@\oenodeRefA{} @GetCenter
+ /N@\oenode@Origin{} @GetCenter @ABVect exch atan /myangle ED
+ /N@\oenode@Origin{} @GetCenter
+ /N@\oenodeRefB{} @GetCenter @ABDist /mydist ED
+ grestore
+ }%
+ \pnode(! \POE@dict{mydist myangle 180 sub} PtoC \tx@UserCoor){\oenode{DO0}{}}%
+ \multido{\i=1+1}{\POE@key@diffractionorders}{%
+ \pnode(! \POE@dict{mydist myangle 180 sub 180 OEangle sub \i\space mul } add PtoC \tx@UserCoor){\oenode{DO\i}{}}%
+ \pnode(! \POE@dict{mydist myangle 180 sub 180 OEangle sub \i\space mul } sub PtoC \tx@UserCoor){\oenode{DO-\i}{}}%
+ }%
+\ignorespaces}%
\def\POE@regNodes#1#2{%
\pnode(#1){\oenodeRefA{}}
\pnode(#2){\oenodeRefB{}}
@@ -3869,6 +3991,11 @@
dotscale=1.5](\oenodeTrefB{})
\fi
\fi
+ \ifPOE@debug@showinterfaces
+ \ifPOE@frontlayer
+ \POE@drawinterfaces[style=IfcStyle]
+ \fi
+ \fi
\ifPOE@debug@showifcnodes
\ifPOE@frontlayer
\POE@ifcnodes[style=IfcNodeStyle]
@@ -3900,6 +4027,33 @@
}%
\end@SpecialObj
}%
+\def\POE@drawinterfaces{\pst@object{POE@drawinterfaces}}
+\def\POE@drawinterfaces@i{%
+ \begin@OpenObj%
+ \addto@pscode{%
+ \psk@dotsize
+ \@nameuse{psds@\psk@dotstyle}
+ \pst@optexpdict
+ /\oenode{}{} load begin
+ 1 1 N {
+ IfcName load begin
+ X Y
+ CompMtrx transform CM itransform 2 copy
+ currentdict /RX known { 0 0 }{ DX DY } ifelse
+ CompMtrx dtransform CM idtransform 2 copy
+ NAlow 0 eq NAup 0 eq and {
+ -0.5 VecScale 4 2 roll 0.5 VecScale
+ } {
+ \tx@UserCoor NAlow VecScale 4 2 roll \tx@UserCoor NAup VecScale
+ } ifelse
+ end
+ 8 -2 roll VecAdd moveto VecAdd lineto
+ } for
+ end end }%
+ \pst@stroke
+ \use@pscode
+ \end@OpenObj
+}%
\def\POE@extnodes{\pst@object{POE@extnodes}}
\def\POE@extnodes@i#1{%
\begin@SpecialObj
@@ -4743,6 +4897,96 @@
(!\POE@dict{0 \@sz 0.5 mul @OEtrafo})
\fi
\ignorespaces}%
+\def\optaom@ref{%
+ \POE@setref{/@@x \POE@key@aomwidth\space 0.5 mul def }%
+ \POE@setref{/@@y \POE@key@aomheight\space 0.5 mul def }%
+ \POE@calcAngle
+ \ifx\POE@key@aomalign\POE@str@symmetric\else
+ \edef\POE@key@angle{\POE@key@angle\space 180 \POE@dict{OEangle} sub 0.5 mul sub }%
+ \fi
+ \edef\POE@key@angle{\POE@key@angle\space 180 add }%
+}%
+\def\optaom@nodes{%
+ \ifodd
+ \ifx\POE@key@aomalign\POE@str@symmetric
+ \ifx\POE@key@aomreflalign\POE@str@parallel 1\else 0\fi
+ \else 0\fi
+ \newOptexpCompAmb{%
+ {@@x neg 0} {0 1} @@y neg @@y
+ trans {PlainIfc}
+ {0 0}
+ \ifx\POE@key@aomalign\POE@str@symmetric
+ {1 0}
+ \else
+ {1 0 180 OEangle sub 0.5 mul matrix rotate dtransform}
+ \fi
+ 0 0 trans {PlainIfc}
+ {@@x @@y} {0 1} @@y -2 mul 0
+ trans {PlainIfc}
+ {@@x @@y neg} {0 1} 0 @@y 2 mul
+ trans {PlainIfc}
+ 2 1
+ }%
+ \else
+ \newOptexpCompAmb{%
+ {@@x neg 0} {0 1} @@y neg @@y trans {PlainIfc}
+ {0 0}
+ \ifx\POE@key@aomalign\POE@str@symmetric
+ {0 1}
+ \else
+ {0 1 180 OEangle sub 0.5 mul matrix rotate dtransform}
+ \fi
+ 0 0 refltrans {PlainIfc}
+ {@@x @@y} {0 1} @@y -2 mul 0
+ trans {PlainIfc}
+ {@@x @@y neg} {0 1} 0 @@y 2 mul
+ trans {PlainIfc}
+ 2 1
+ }%
+ \fi
+ \POE@Verb{%
+ gsave
+ tx@Dict begin
+ STV {CP T} stopped pop
+ end
+ (C) (\oenode{}{}) GetPlaneVec 2 copy
+ /N@\oenodeRefA{} @GetCenter
+ /N@\oenodeCenter{} @GetCenter
+ @ABVect 90 matrix rotate dtransform
+ NormalVec ReflectVec ToVec dup
+ \oenode{}{} begin
+ {0 0} exch 0 0 refltrans name (C-1) {PlainIfc} {sc} NewCompIfc
+ (C) (C1) IfcAlias
+ 2 1 \POE@key@diffractionorders\space {% vec i
+ 2 copy neg dup 5 string cvs (C) exch strcat % vec i vec -i (C-i)
+ 3 -1 roll exec 4 -1 roll % vec i (C-i) X Y -i
+ 1 add 180 OEangle sub 0.5 mul mul
+ matrix rotate dtransform ToVec % vec i (C-i) {X' Y'}
+ {0 0} exch 0 0 refltrans name 7 -1 roll {PlainIfc} {sc} NewCompIfc
+ 2 copy 3 -1 roll 5 string cvs (C) exch strcat % vec i vec i (C-i)
+ 3 -1 roll exec 4 -1 roll % vec i (Ci) X Y i
+ 1 add 180 OEangle sub 0.5 mul mul
+ matrix rotate dtransform ToVec % vec i (Ci) {X' Y'}
+ {0 0} exch 0 0 refltrans name 7 -1 roll {PlainIfc} {sc} NewCompIfc
+ } for pop
+ /grating true def
+ end
+ grestore
+ }%
+ \POE@saveDiffractionNodes
+\ignorespaces}%
+\def\optaom@comp{%
+ \POE@comp@rectangle
+ \ifx\POE@key@aomcomp\POE@str@default
+ \multido{\i=0+1}{\POE@key@aomgratingcount}{%
+ \psrline(!\POE@dict{@@x -0.7 mul \POE@key@aomgratingcount\space 2 div dup 1.5 add
+ @@y exch div exch 0.5 sub \i\space sub mul})%
+ (!\POE@dict{@@x 1.4 mul 0})%
+ }%
+ \else
+ \POE@key@aomcomp
+ \fi
+\ignorespaces}%
\def\optfiber@ref{%
\POE@setref{%
/@@x \POE@key@fiberloopsep\space\POE@key@fiberloops\space