summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-06-18 18:34:46 +0000
committerKarl Berry <karl@freefriends.org>2008-06-18 18:34:46 +0000
commita63b3cf004ff93cac025d38a450b9e383a16e044 (patch)
tree222aa79ff0c547ca82761198059a83695c1c256b /Master
parent47c3018e28d4f17ef2156f9866d0d012e8c0567e (diff)
pst-optexp update (17jun08)
git-svn-id: svn://tug.org/texlive/trunk@8843 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/generic/pst-optexp/Changes57
-rw-r--r--Master/texmf-dist/doc/generic/pst-optexp/README21
-rw-r--r--Master/texmf-dist/doc/generic/pst-optexp/doc/parque-nacional.eps286
-rw-r--r--Master/texmf-dist/doc/generic/pst-optexp/doc/pst-optexp-doc.pdfbin235707 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-optexp/pst-optexp-doc.pdfbin0 -> 256902 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-optexp/pst-optexp-doc.tex (renamed from Master/texmf-dist/doc/generic/pst-optexp/doc/pst-optexp-doc.tex)494
-rw-r--r--Master/texmf-dist/dvips/pst-optexp/pst-optexp.pro109
-rw-r--r--Master/texmf-dist/tex/generic/pst-optexp/pst-optexp.tex1278
8 files changed, 1166 insertions, 1079 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-optexp/Changes b/Master/texmf-dist/doc/generic/pst-optexp/Changes
index 00eb1612a0b..6b1ccc2752f 100644
--- a/Master/texmf-dist/doc/generic/pst-optexp/Changes
+++ b/Master/texmf-dist/doc/generic/pst-optexp/Changes
@@ -1,28 +1,45 @@
-1.1 2007-09-06
-
- * Considerably enhanced labeling of the components.
- Added new parameter 'labelref' which specifies the
- reference coordinate system for the label positioning
- and the rotation of the label. Default is labelref=relgrav,
- the label point is rotated together with the component, but
- the label text itself is not rotated.
+1.2 2008-06-17 * Great emprovement of the TeX and Postscript code.
- * parameter labelrelative is now obsolete, and replaced by
- labelref=relative. It will be removed in future versions.
+ * New macros \newOptexpDipole, \newOptexpDipoleNolabel and
+ \newOptexpTripole which allow very convenient definition
+ of new components.
- * parameter polwidth, bswidth, iwidth and owidth are now obsolete,
- and replaced by polsize, bssize, innerheight and outerheight for
- consistency reasons. They will be removed in future versions.
+ * Enhancement of the lens design. Now much more types of lenses
+ with two different curvatures and thick lenses are possible.
+ The new parameters lensradiusleft, lensradiusright and lens
+ are introduced.
+ Unfortunately complete backward compatibility for the case
+ where the lens is defined using only lenswidth and lensheight
+ was not possible. Using the old behaviour is possible only
+ by setting lenstype explicitly which in turn does not allow you
+ to use the new features.
- * macro \polarisation was changed to \polarization for consistency reasons.
- The old notation is obsolete and will be removed in future versions.
+ * Added curved mirrors (new parameter mirrorradius).
- * fixed bug: filling of all components with 'fillstyle' is now possible.
+ * Added binary gratings (new parameter optgridtype).
- * fixed bug: added some liftpen=1 in the code to fix the look of
- the lenses and the optgrid.
+1.1 2007-09-06 * Considerably enhanced labeling of the components.
+ Added new parameter 'labelref' which specifies the
+ reference coordinate system for the label positioning
+ and the rotation of the label. Default is labelref=relgrav,
+ the label point is rotated together with the component, but
+ the label text itself is not rotated.
-1.0 2007-07-18
+ * parameter labelrelative is now obsolete, and replaced by
+ labelref=relative. It will be removed in future versions.
- first CTAN version
+ * parameter polwidth, bswidth, iwidth and owidth are now obsolete,
+ and replaced by polsize, bssize, innerheight and outerheight for
+ consistency reasons. They will be removed in future versions.
+
+ * macro \polarisation was changed to \polarization for consistency.
+ The old notation is obsolete and will be removed in future versions.
+
+ * fixed bug: filling of all components with 'fillstyle'
+ is now possible.
+
+ * added some liftpen=1 in the code to fix the look of
+ the lenses and the optgrid.
+
+1.0 2007-07-18 first CTAN version
diff --git a/Master/texmf-dist/doc/generic/pst-optexp/README b/Master/texmf-dist/doc/generic/pst-optexp/README
index 66b14b7368a..43672507567 100644
--- a/Master/texmf-dist/doc/generic/pst-optexp/README
+++ b/Master/texmf-dist/doc/generic/pst-optexp/README
@@ -4,12 +4,29 @@ setups. Mechanisms for proper alignment of different components are
provided internally. This way the user does not have to care for proper
orientation of the elements.
-This is version 1.1
+This is version 1.2
For a changelog see file Changes
+Save the files
+
+pst-optexp.sty
+pst-optexp.tex
+pst-optexp.pro
+
+in any place, where latex or any other TeX program will find it.
+The pro file should go into $TEXMF$/dvips/pstricks/.
+
+pst-optexp uses the extended version of the keyval package. So
+be sure that you
+- have installed xkeyval with the special pst-xkey
+ (CTAN: tex-archive/macros/latex/contrib/xkeyval/)
+- do not load another package after pst-optexp, which loads
+ the old keyval.sty or pst-key.tex
+
+
This material is subject to the LaTeX Project Public License.
See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
for the details of that license.
--
-Christoph Bersch 2007/09/06
+Christoph Bersch 2008/06/17
diff --git a/Master/texmf-dist/doc/generic/pst-optexp/doc/parque-nacional.eps b/Master/texmf-dist/doc/generic/pst-optexp/doc/parque-nacional.eps
deleted file mode 100644
index 9576fcfe18a..00000000000
--- a/Master/texmf-dist/doc/generic/pst-optexp/doc/parque-nacional.eps
+++ /dev/null
@@ -1,286 +0,0 @@
-%!PS-Adobe-3.0 EPSF-3.0
-%%Creator: jpeg2ps V1.9 by Thomas Merz
-%%Title: parque-nacional.jpg
-%%CreationDate: Thu Jun 16 20:16:59 2005
-%%BoundingBox: 20 20 173 176
-%%DocumentData: Clean7Bit
-%%LanguageLevel: 2
-%%EndComments
-%%BeginProlog
-%%EndProlog
-%%Page: 1 1
-/languagelevel where {pop languagelevel 2 lt}{true} ifelse {
- (JPEG file 'parque-nacional.jpg' needs PostScript Level 2!\n) dup print flush
- /Helvetica findfont 20 scalefont setfont 100 100 moveto show showpage stop
-} if
-save
-/RawData currentfile /ASCII85Decode filter def
-/Data RawData << >> /DCTDecode filter def
-20 20 translate
-152.64 155.52 scale
-/DeviceRGB setcolorspace
-{ << /ImageType 1
- /Width 212
- /Height 216
- /ImageMatrix [ 212 0 0 -216 0 216 ]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F
diff --git a/Master/texmf-dist/doc/generic/pst-optexp/doc/pst-optexp-doc.pdf b/Master/texmf-dist/doc/generic/pst-optexp/doc/pst-optexp-doc.pdf
deleted file mode 100644
index 059a347891c..00000000000
--- a/Master/texmf-dist/doc/generic/pst-optexp/doc/pst-optexp-doc.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-optexp/pst-optexp-doc.pdf b/Master/texmf-dist/doc/generic/pst-optexp/pst-optexp-doc.pdf
new file mode 100644
index 00000000000..c1e4e745bb4
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/pst-optexp/pst-optexp-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-optexp/doc/pst-optexp-doc.tex b/Master/texmf-dist/doc/generic/pst-optexp/pst-optexp-doc.tex
index 9b72403b80d..2ae93949627 100644
--- a/Master/texmf-dist/doc/generic/pst-optexp/doc/pst-optexp-doc.tex
+++ b/Master/texmf-dist/doc/generic/pst-optexp/pst-optexp-doc.tex
@@ -16,7 +16,6 @@
\usepackage{nicefrac}
\usepackage{graphicx}
\usepackage[colorlinks,linktocpage]{hyperref}
-\usepackage{xspace}
%
% New commands
%
@@ -24,7 +23,10 @@
\newcommand{\OptExpPackage}{\textsf{`pst-optexp'}}
\newcommand{\parameter}[1]{\texttt{#1}}
\let\param\textrm
-\newcommand{\defaultparam}{\emph{default:}\xspace}
+\newcommand{\paramvalue}[1]{\texttt{#1}}
+\newcommand{\defaultparam}[1]{\emph{default:} \paramvalue{#1}}
+\def\lbracket{[}
+\def\rbracket{]}
%
% Settings
@@ -41,6 +43,7 @@
\clearscrheadfoot
\setheadsepline{0.4pt}
\ihead{\OptExpPackage}\ohead{A PSTricks package to draw optical experimental setups}
+\ofoot{\pagemark}
\pagestyle{scrheadings}
\psset{subgriddiv=0,griddots=10,gridlabels=7pt}
@@ -63,8 +66,8 @@ The package \texttt{pst-optexp} is a collection of optical components
that facilitate easy sketching of optical experimental
setups. Mechanisms for proper alignment of different components are
provided internally. This way the user does not have to care for proper
-orientation of the elements. Macros for using user-defined components
-are also provided.
+orientation of the elements. Macros for convenient definition of new
+user-defined components are also provided.
\section{Components}
@@ -84,100 +87,81 @@ positioning of labels are explained.
The appearence of all components can be changed with the corresponding
standard PSTricks parameters such as \parameter{fillstyle}
or \parameter{linestyle}. For some components changing only parts of the
-layout may be desired (e.g. the extended part of mirrors). For those
-cases psstyles are provided that influence only the corresponing part of the
+layout is possible (e.g. the extended part of mirrors). For those cases
+psstyles are provided that influence only the corresponing part of the
components and can be redefined using \cs{newpsstyle}.
\subsection{Lens}\label{sec:lens}
\begin{description}
-\item[\param{lensheight} (dimension):] (\defaultparam 1)
-\item[\param{lenswidth} (dimension):] (\defaultparam 0.3)
-\item[\param{lensradius} (dimension):] (\defaultparam \texttt{\cs{empty}})
-\item[\param{lenstype} (plainconvex\,|\,plainconcave\,|\,convexplain\,|\,concaveplain\,|\,biconvex\,|\,biconcave):]~\\
- (\defaultparam \texttt{biconvex})
+\item[\param{lensheight}:] \paramvalue{<value>} (\defaultparam{1})
+\item[\param{lenswidth}:] \paramvalue{<value>} (\defaultparam{0.3})
+\item[\param{lensradius}:] \paramvalue{<value> [<value>]} (\defaultparam{\cs{empty}})
+\item[\param{lensradiusleft}:] \paramvalue{<value>} (\defaultparam{1})
+\item[\param{lensradiusright}:] \paramvalue{<value>} (\defaultparam{1})
+\item[\param{lens}:] \paramvalue{<value> [<value> [<value> [<value>]]]} (\defaultparam{\cs{empty}})
+\item[\param{thicklens}:] \paramvalue{<boolean>}(\defaultparam{false})
\end{description}
-For the convex lenses only two parameters are used. If the
-parameter \parameter{lensradius} is set, its value will be used together
-with \parameter{lensheight} to draw the
-lens. Otherwise \parameter{lenswidth} and
-\parameter{lensheight} are used. For concave lenses all three parameters
-are required.
-
-\medskip
-
-\begin{LTXexample}[width=3.5cm]
-\begin{pspicture}(3,2)\psgrid
- \pnode(0,1.8){A}
- \pnode(3,0.7){B}
- \psline[linecolor=green](A)(B)
- \lens[lenstype=plainconvex](A)(B){lens}
-\end{pspicture}
-\end{LTXexample}
-
-\bigskip
-
-\begin{LTXexample}[width=3.5cm]
-\begin{pspicture}(3,2)\psgrid
- \pnode(0,1.8){A}
- \pnode(3,0.7){B}
- \psline[linecolor=green](A)(B)
- \lens[lenstype=convexplain](A)(B){lens}
-\end{pspicture}
-\end{LTXexample}
-
-\bigskip
-
-\begin{LTXexample}[width=3.5cm]
-\begin{pspicture}(3,2)\psgrid
- \pnode(0,1.8){A}
- \pnode(3,0.7){B}
- \psline[linecolor=green](A)(B)
- \lens(A)(B){lens}
-\end{pspicture}
-\end{LTXexample}
+\medskip
-\bigskip
-\begin{LTXexample}[width=3.5cm]
-\begin{pspicture}(3,2)\psgrid
- \pnode(0,1.8){A}
- \pnode(3,0.7){B}
- \psline[linecolor=green](A)(B)
- \lens[lenstype=plainconcave](A)(B){lens}
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(5,6)\psgrid
+ % concave lenses
+ \pnode(0,5){A}\pnode(5,5){B}
+ \psline[style=OptBeam](A)(B)
+ \lens[position=0.2](A)(B){L}
+ \lens[lensradius=-1,position=0.5](A)(B){L}
+ \lens[lens=-1.5 1,position=0.7](A)(B){L}
+ % convex lenses
+ \pnode(0,3){A}\pnode(5,3){B}
+ \psline[style=OptBeam](A)(B)
+ \lens[position=0.2,lens=1 -1](A)(B){L}
+ \lens[lens=0 -1](A)(B){L}
+ \lens[lens=1 0,position=0.7](A)(B){L}
+ % thick lenses
+ \pnode(0,1){A}\pnode(5,1){B}
+ \psline[style=OptBeam](A)(B)
+ \lens[position=0.3,lens=-1.5 1 1 0.5,thicklens](A)(B){thicklens}
+ \lens[lens=0 -1, position=0.7, fillstyle=solid, fillcolor=blue!30!white](A)(B){lens}
\end{pspicture}
\end{LTXexample}
-\bigskip
-\begin{LTXexample}[width=3.5cm]
-\begin{pspicture}(3,2)\psgrid
- \pnode(0,1.8){A}
- \pnode(3,0.7){B}
- \psline[linecolor=green](A)(B)
- \lens[lenstype=concaveplain](A)(B){lens}
-\end{pspicture}
-\end{LTXexample}
+\medskip
-\bigskip
-\begin{LTXexample}[width=3.5cm]
-\begin{pspicture}(3,2)\psgrid
- \definecolor{lensColor}{rgb}{0.7, 0.9, 1}
- \pnode(0,1.8){A}
- \pnode(3,0.7){B}
- \psline[linecolor=green](A)(B)
- \lens[lenstype=biconcave,
- fillstyle=solid,
- fillcolor=lensColor](A)(B){lens}
-\end{pspicture}
-\end{LTXexample}
+The shape of a lens is defined by its two surface radii. A negative
+radius gives a concave, a positive radius a convex and a radius of
+\texttt{0} a plain surface. The parameters \parameter{lensradiusleft}
+and \parameter{lensradiusright} allow to define independent values for both
+surfaces. \parameter{lensradius} sets both curvatures to the same
+value. Usually only \parameter{lensheight} and the two radii are used to
+construct the lens. The thickness (or width) is determined
+automatically. Manually controlling the thickness of the lens can be
+achived by setting \parameter{thicklens}
+to \parameter{true}. Then \parameter{lenswidth} is used as width of the lens at
+its waist. Finally, the parameter \parameter{lens} allows the definition of
+all relevant lens parameters at once. It consists of one up to four
+space-separated numbers. The first one gives the left radius. If no
+further value is set, the right radius will be set to the same value and
+all other parameters are left unchanged. Using two numbers defines two
+different radii. The third optional value defines
+the \parameter{lensheight} and the fourth one the \parameter{lenswidth}
+
+\textbf{Compatibility:} The whole implementation of the lens was
+changed in version 1.2. It allows a much more flexible definition of different lens
+types. However, I could not get full compatibility with the older way to
+define lens using only \parameter{lensheight} and \parameter{lenswidth}. To use
+this old behaviour, you have to set the \parameter{lenstype} explicitly, but
+then you have no access to the new features! All users are encouraged to
+adapt their code to use the new parameters, as the old code will be
+removed in future versions.
\medskip
-
\subsection{Optical plate}
\begin{description}
-\item[\param{plateheight} (dimension):] (\defaultparam 1)
-\item[\param{platelinewidth} (dimension):] (\defaultparam 2\cs{pslinewidth})
+\item[\param{plateheight}:] \paramvalue{<value>} (\defaultparam{1})
+\item[\param{platelinewidth}:] \paramvalue{<value>} (\defaultparam{2\cs{pslinewidth}})
\end{description}
\medskip
@@ -186,7 +170,7 @@ are required.
\begin{pspicture}(3,2)\psgrid
\pnode(0,1.2){A}
\pnode(3,1.2){B}
- \psline[linecolor=green](A)(B)
+ \psline[style=OptBeam](A)(B)
\optplate(A)(B){filter}
\end{pspicture}
\end{LTXexample}
@@ -196,8 +180,8 @@ are required.
\subsection{Retardation plate}
\begin{description}
-\item[\param{plateheight} (dimension):] (\defaultparam 1)
-\item[\param{platewidth} (dimension):] (\defaultparam 0.1)
+\item[\param{plateheight}:] \paramvalue{<value>} (\defaultparam{1})
+\item[\param{platewidth}:] \paramvalue{<value>} (\defaultparam{0.1})
\end{description}
\medskip
@@ -206,7 +190,7 @@ are required.
\begin{pspicture}(3,2)\psgrid
\pnode(0,1.2){A}
\pnode(3,1.2){B}
- \psline[linecolor=green](A)(B)
+ \psline[style=OptBeam](A)(B)
\optretplate(A)(B){$\nicefrac{\lambda}{2}$}
\end{pspicture}
\end{LTXexample}
@@ -216,9 +200,9 @@ are required.
\subsection{Pinhole}
\begin{description}
-\item[\param{outerheight} (dimension):] (\defaultparam 1)
-\item[\param{innerheight} (dimension):] (\defaultparam 0.1)
-\item[\param{phlinewidth} (dimension):] (\defaultparam 2\cs{pslinewidth})
+\item[\param{outerheight}:] \paramvalue{<value>} (\defaultparam{1})
+\item[\param{innerheight}:] \paramvalue{<value>} (\defaultparam{0.1})
+\item[\param{phlinewidth}:] \paramvalue{<value>} (\defaultparam{2\cs{pslinewidth}})
\end{description}
\medskip
@@ -227,23 +211,23 @@ are required.
\begin{pspicture}(3,2)\psgrid
\pnode(0,1.2){A}
\pnode(3,1.2){B}
- \psline[linecolor=green](A)(B)
+ \psline[style=OptBeam](A)(B)
\pinhole(A)(B){PH}
\end{pspicture}
\end{LTXexample}
\medskip
-\subsection{Crystal}
+\subsection{Crystal}\label{sec:crystal}
\begin{description}
-\item[\param{crystalwidth} (dimension):] (\defaultparam 2)
-\item[\param{crystalheight} (dimension):] (\defaultparam 0.8)
-\item[\param{caxislength} (dimension):] (\defaultparam 0.6)
-\item[\param{caxisinv} (boolean):] (\defaultparam \texttt{false})
-\item[\param{voltage} (boolean):] (\defaultparam \texttt{false})
-\item[\param{lamp} (boolean):] (\defaultparam \texttt{false})
-\item[\param{lampscale} (real):] (\defaultparam 0.3)
+\item[\param{crystalwidth}:] \paramvalue{<value>} (\defaultparam{2})
+\item[\param{crystalheight}:] \paramvalue{<value>} (\defaultparam{0.8})
+\item[\param{caxislength}:] \paramvalue{<value>} (\defaultparam{0.6})
+\item[\param{caxisinv}:] \paramvalue{<boolean>} (\defaultparam{false})
+\item[\param{voltage}:] \paramvalue{<boolean>} (\defaultparam{false})
+\item[\param{lamp}:] \paramvalue{<boolean>} (\defaultparam{false})
+\item[\param{lampscale}:] \paramvalue{<value>} (\defaultparam{0.3})
\end{description}
\medskip
@@ -252,15 +236,8 @@ are required.
\begin{pspicture}(3,2)\psgrid
\pnode(0,1.2){A}
\pnode(3,1.2){B}
- \crystal[crystalwidth=1.5,
- crystalheight=0.6,
- fillstyle=solid,
- fillcolor=yellow!90!black,
- labelangle=-45,
- labeloffset=1.2,
- voltage,
- lamp](A)(B){SBN:Ce}
- \psline[linecolor=green](A)(B)
+ \crystal[crystalwidth=1.5, crystalheight=0.6, fillstyle=solid, fillcolor=yellow!90!black, labelangle=-45, labeloffset=1.2, voltage, lamp](A)(B){SBN:Ce}
+ \psline[style=OptBeam](A)(B)
\end{pspicture}
\end{LTXexample}
@@ -269,9 +246,9 @@ are required.
\subsection{Box}
\begin{description}
-\item[\param{optboxheight} (dimension):] (\defaultparam 0.5)
-\item[\param{optboxwidth} (dimension):] (\defaultparam 1)
-\item[\param{endbox} (boolean):] (\defaultparam \texttt{false})
+\item[\param{optboxheight}:] \paramvalue{<value>} (\defaultparam{0.5})
+\item[\param{optboxwidth}:] \paramvalue{<value>} (\defaultparam{1})
+\item[\param{endbox}:] \paramvalue{<boolean>} (\defaultparam{false})
\end{description}
\medskip
@@ -280,7 +257,7 @@ are required.
\begin{pspicture}(3,2)\psgrid
\pnode(0,0){A}
\pnode(3,2){B}
- \psline[linecolor=green](A)(B)
+ \psline[style=OptBeam](A)(B)
\optbox(A)(B){box}
\end{pspicture}
\end{LTXexample}
@@ -291,7 +268,7 @@ are required.
\begin{pspicture}(3,2)\psgrid
\pnode(0,0){A}
\pnode(1.7,1){B}
- \psline[linecolor=green](A)(B)
+ \psline[style=OptBeam](A)(B)
\optbox[endbox](A)(B){box}
\end{pspicture}
\end{LTXexample}
@@ -302,7 +279,7 @@ are required.
\begin{pspicture}(3,2)\psgrid
\pnode(0,0){A}
\pnode(1.7,1){B}
- \psline[linecolor=green](A)(B)
+ \psline[style=OptBeam](A)(B)
\optbox[endbox,labelref=relative,labeloffset=0](A)(B){box}
\end{pspicture}
\end{LTXexample}
@@ -312,7 +289,7 @@ are required.
\subsection{Detector}
\begin{description}
-\item[\param{detsize} (dimension):] (\defaultparam 0.5)
+\item[\param{detsize}:] \paramvalue{<value>} (\defaultparam{0.5})
\end{description}
\medskip
@@ -321,7 +298,7 @@ are required.
\begin{pspicture}(3,2)\psgrid
\pnode(0,0){A}
\pnode(1.7,1){B}
- \psline[linecolor=green](A)(B)
+ \psline[style=OptBeam](A)(B)
\detector(A)(B){detector}
\end{pspicture}
\end{LTXexample}
@@ -331,9 +308,9 @@ are required.
\subsection{Polarization}
\begin{description}
-\item[\param{poltype} (parallel | perp | misc | lcirc | rcirc):] (\defaultparam \texttt{parallel})
-\item[\param{polsize} (dimension):] (\defaultparam 0.6)
-\item[\param{pollinewidth} (dimension):] (\defaultparam 0.7\cs{pslinewidth})
+\item[\param{poltype}:] \paramvalue{parallel|perp|misc|lcirc|rcirc} (\defaultparam{parallel})
+\item[\param{polsize}:] \paramvalue{<value>} (\defaultparam{0.6})
+\item[\param{pollinewidth}:] \paramvalue{<value>} (\defaultparam{0.7\cs{pslinewidth}})
\end{description}
\medskip
@@ -343,7 +320,7 @@ are required.
\pnode(0,0.5){A1}\pnode(3,0.5){B1}\pnode(0,1.5){A2}
\pnode(3,1.5){B2}\pnode(0,2.5){A3}\pnode(3,2.5){B3}
\pnode(0,3.5){A4}\pnode(3,3.5){B4}\pnode(0,4.5){A5}
- \pnode(3,4.5){B5}\psset{linecolor=green}
+ \pnode(3,4.5){B5}\psset{style=OptBeam}
\multido{\i=1+1}{5}{\psline(A\i)(B\i)}
\psset{linecolor=black}
\polarization[poltype=misc,position=0.2](A5)(B5)
@@ -359,14 +336,18 @@ are required.
\subsection{Mirror}\label{sec:mirror}
\begin{description}
-\item[\param{mirrorwidth} (dimension):] (\defaultparam 1)
-\item[\param{mirrorlinewidth} (dimension):] (\defaultparam 2\cs{pslinewidth})
-\item[\param{mirrortype} (normal | piezo | extended):] (\defaultparam \texttt{normal})
-\item[\param{mirrordepth} (dimension):] (\defaultparam 0.08)
-\item[\param{variable} (boolean):] (\defaultparam \texttt{false})
+\item[\param{mirrorwidth}:] \paramvalue{<value>} (\defaultparam{1})
+\item[\param{mirrorradius}:] \paramvalue{<value>} (\defaultparam{0})
+\item[\param{mirrorlinewidth}:] \paramvalue{<value>} (\defaultparam{2\cs{pslinewidth}})
+\item[\param{mirrortype}:] \paramvalue{normal|piezo|extended} (\defaultparam{normal})
+\item[\param{mirrordepth}:] \paramvalue{<value>} (\defaultparam{0.08})
+\item[\param{variable}:] \paramvalue{<value>} (\defaultparam{false})
\end{description}
-The style of the extended mirror is defined as a
+The parameter \texttt{mirrorradius} defines the curvature of the mirror. A
+value of \texttt{0} is for a plain mirror, a negative radius is for a
+concave mirror and a positive radius gives you a convex mirror. The
+style of the extended mirror is defined as a
psstyle \parameter{ExtendedMirror} and can be changed using
\cs{newpsstyle}. The appearence of the piezo mirror likewise can be
changed by adapting the psstyle \parameter{PiezoMirror}.
@@ -378,7 +359,7 @@ changed by adapting the psstyle \parameter{PiezoMirror}.
\pnode(0,0){A}
\pnode(1.8,2.2){G}
\pnode(0,3){B}
- \psline[linecolor=green](A)(G)(B)
+ \psline[style=OptBeam](A)(G)(B)
\mirror(A)(G)(B){mirror}
\end{pspicture}
\end{LTXexample}
@@ -390,7 +371,7 @@ changed by adapting the psstyle \parameter{PiezoMirror}.
\pnode(0,0){A}
\pnode(1.8,2.2){G}
\pnode(0,3){B}
- \psline[linecolor=green](A)(G)(B)
+ \psline[style=OptBeam](A)(G)(B)
\mirror[variable](A)(G)(B){M$_\mathrm{var}$}
\end{pspicture}
\end{LTXexample}
@@ -402,7 +383,7 @@ changed by adapting the psstyle \parameter{PiezoMirror}.
\pnode(0,0){A}
\pnode(1.8,2.2){G}
\pnode(0,3){B}
- \psline[linecolor=green](A)(G)(B)
+ \psline[style=OptBeam](A)(G)(B)
\mirror[mirrortype=piezo,labelangle=-90](A)(G)(B){piezo}
\end{pspicture}
\end{LTXexample}
@@ -414,17 +395,28 @@ changed by adapting the psstyle \parameter{PiezoMirror}.
\pnode(0,0){A}
\pnode(1.8,2.2){G}
\pnode(0,3){B}
- \psline[linecolor=green](A)(G)(B)
+ \psline[style=OptBeam](A)(G)(B)
\mirror[mirrortype=extended](A)(G)(B){M$_\mathrm{ext}$}
\end{pspicture}
\end{LTXexample}
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,3)\psgrid
+ \pnode(0,0){A}\pnode(0.7,2){G1}
+ \pnode(1.5,1){G2}\pnode(2,3){B}
+ \psset{labeloffset=0.5}
+ \psline[style=OptBeam](A)(G1)(G2)(B)
+ \mirror[mirrortype=extended, mirrorradius=1](A)(G1)(G2){M$_v$}
+ \mirror[mirrorradius=-1](G1)(G2)(B){M$_x$}
+\end{pspicture}
+\end{LTXexample}
+
\medskip
\subsection{Beamsplitter}
\begin{description}
-\item[\param{bssize} (dimension):] (\defaultparam 0.8)
+\item[\param{bssize}:] \paramvalue{<value>} (\defaultparam{0.8})
\end{description}
\medskip
@@ -434,7 +426,7 @@ changed by adapting the psstyle \parameter{PiezoMirror}.
\pnode(0,2){A}
\pnode(2,2){G}
\pnode(3,0){B}
- \psline[linecolor=green](A)(G)(B)
+ \psline[style=OptBeam](A)(G)(B)
\beamsplitter(A)(G)(B){BS}
\end{pspicture}
\end{LTXexample}
@@ -445,12 +437,13 @@ changed by adapting the psstyle \parameter{PiezoMirror}.
\subsection{Optical grid}
\begin{description}
-\item[\param{optgridcount} (integer):] (\defaultparam 10)
-\item[\param{optgridwidth} (dimension):] (\defaultparam 1)
-\item[\param{optgridheight} (dimension):] (\defaultparam 0.1)
-\item[\param{optgriddepth} (dimension):] (\defaultparam 0.05)
-\item[\param{optgridlinewidth} (dimension):] (\defaultparam 0.7\cs{pslinewidth})
-\item[\param{reverse} (boolean):] (\defaultparam \texttt{false})
+\item[\param{optgridcount}:] \paramvalue{<integer>} (\defaultparam{10})
+\item[\param{optgridwidth}:] \paramvalue{<value>} (\defaultparam{1})
+\item[\param{optgridheight}:] \paramvalue{<value>} (\defaultparam{0.1})
+\item[\param{optgriddepth}:] \paramvalue{<value>} (\defaultparam{0.05})
+\item[\param{optgridtype}:] \paramvalue{blazed|binary} (\defaultparam{blazed})
+\item[\param{optgridlinewidth}:] \paramvalue{<value>} (\defaultparam{0.7\cs{pslinewidth}})
+\item[\param{reverse}:] \paramvalue{<boolean>} (\defaultparam{false})
\end{description}
\medskip
@@ -460,7 +453,7 @@ changed by adapting the psstyle \parameter{PiezoMirror}.
\pnode(0,3){A}
\pnode(1.8,2.2){G}
\pnode(0,0){B}
- \psline[linecolor=green](A)(G)(B)
+ \psline[style=OptBeam](A)(G)(B)
\optgrid(A)(G)(B){grid}
\end{pspicture}
\end{LTXexample}
@@ -473,7 +466,7 @@ changed by adapting the psstyle \parameter{PiezoMirror}.
\pnode(0,3){A}
\pnode(1.8,2.2){G}
\pnode(0,0){B}
- \psline[linecolor=green](A)(G)(B)
+ \psline[style=OptBeam](A)(G)(B)
\optgrid[reverse](A)(G)(B){grid}
\end{pspicture}
\end{LTXexample}
@@ -485,16 +478,32 @@ changed by adapting the psstyle \parameter{PiezoMirror}.
\pnode(0,3){A}
\pnode(1.8,2.2){G}
\pnode(0,0){B}
- \psline[linecolor=green](A)(G)(B)
+ \psline[style=OptBeam](A)(G)(B)
\optgrid[optgridcount=6,%
optgriddepth=0.2,%
optgridheight=0.3](A)(G)(B){grid}
\end{pspicture}
\end{LTXexample}
+\bigskip
+
+\begin{LTXexample}[width=3.5cm]
+\begin{pspicture}(3,3)\psgrid
+ \pnode(0,3){A}
+ \pnode(1.8,2.2){G}
+ \pnode(0,0){B}
+ \psline[style=OptBeam](A)(G)(B)
+ \optgrid[optgridtype=binary](A)(G)(B){grid}
+\end{pspicture}
+\end{LTXexample}
+
\medskip
\subsection{Custom components}\label{sec:custom}
+The macros \cs{optdipole} and \cs{opttripole} allow using everything as
+optical component. If you want to use a certain component several times,
+you should define it as a new component. For details see
+sec.~\ref{sec:newobj}.
\begin{LTXexample}[width=3.5cm]
\begin{pspicture}(3,3)\psgrid
@@ -526,11 +535,11 @@ changed by adapting the psstyle \parameter{PiezoMirror}.
\subsection{General options}\label{sec:general}
\begin{description}
-\item[\param{angle} (real):] (\defaultparam 0)
-\item[\param{optional} (boolean):] (\defaultparam \texttt{false})
-\item[\param{position} (real):] (\defaultparam \texttt{\cs{empty}})
-\item[\param{abspos} (dimension):] (\defaultparam \texttt{\cs{empty}})
-\item[\param{showoptdots} (boolean):] (\defaultparam \texttt{false})
+\item[\param{angle}:] \paramvalue{<value>} (\defaultparam{0})
+\item[\param{optional}:] \paramvalue{<boolean>} (\defaultparam{false})
+\item[\param{position}:] \paramvalue{<value>} (\defaultparam{\cs{empty}})
+\item[\param{abspos}:] \paramvalue{<value>} (\defaultparam{\cs{empty}})
+\item[\param{showoptdots}:] \paramvalue{<boolean>} (\defaultparam{false})
\end{description}
The parameter \parameter{angle} is available for the macros \cs{optbox}
@@ -548,57 +557,57 @@ label.
\medskip
\begin{LTXexample}[width=3.5cm]
- \begin{pspicture}(3,2)\psgrid
- \pnode(0,1.2){A}
- \pnode(3,1.2){B}
- \psline[linecolor=green](A)(B)
- \optbox[angle=10](A)(B){box}
- \end{pspicture}
+\begin{pspicture}(3,2)\psgrid
+ \pnode(0,1.2){A}
+ \pnode(3,1.2){B}
+ \psline[style=OptBeam](A)(B)
+ \optbox[angle=10](A)(B){box}
+\end{pspicture}
\end{LTXexample}
\bigskip
\begin{LTXexample}[width=3.5cm]
- \begin{pspicture}(3,2)\psgrid
- \pnode(0,1.2){A}
- \pnode(3,1.2){B}
- \psline[linecolor=green](A)(B)
- \lens[optional](A)(B){L}
- \end{pspicture}
+\begin{pspicture}(3,2)\psgrid
+ \pnode(0,1.2){A}
+ \pnode(3,1.2){B}
+ \psline[style=OptBeam](A)(B)
+ \lens[optional](A)(B){L}
+\end{pspicture}
\end{LTXexample}
\bigskip
\begin{LTXexample}[width=3.5cm]
- \begin{pspicture}(3,2)\psgrid
- \pnode(0,1.2){A}
- \pnode(3,1.2){B}
- \psline[linecolor=green](A)(B)
- \lens[position=0.8](A)(B){L}
- \end{pspicture}
+\begin{pspicture}(3,2)\psgrid
+ \pnode(0,1.2){A}
+ \pnode(3,1.2){B}
+ \psline[style=OptBeam](A)(B)
+ \lens[position=0.8](A)(B){L}
+\end{pspicture}
\end{LTXexample}
\bigskip
\begin{LTXexample}[width=3.5cm]
- \begin{pspicture}(3,2)\psgrid
- \pnode(0,1.2){A}
- \pnode(3,1.2){B}
- \psline[linecolor=green](A)(B)
- \lens[abspos=1](A)(B){L}
- \end{pspicture}
+\begin{pspicture}(3,2)\psgrid
+ \pnode(0,1.2){A}
+ \pnode(3,1.2){B}
+ \psline[style=OptBeam](A)(B)
+ \lens[abspos=1](A)(B){L}
+\end{pspicture}
\end{LTXexample}
\bigskip
\begin{LTXexample}[width=3.5cm]
- \begin{pspicture}(3,3)\psgrid
- \pnode(0,0){A}
- \pnode(1.5,2){G}
- \pnode(0,3){B}
- \psline[linecolor=green](A)(G)(B)
- \mirror[showoptdots](A)(G)(B){mirror}
- \end{pspicture}
+\begin{pspicture}(3,3)\psgrid
+ \pnode(0,0){A}
+ \pnode(1.5,2){G}
+ \pnode(0,3){B}
+ \psline[style=OptBeam](A)(G)(B)
+ \mirror[showoptdots](A)(G)(B){mirror}
+\end{pspicture}
\end{LTXexample}
\medskip
@@ -606,11 +615,11 @@ label.
\subsection{Labels}\label{sec:labels}
\begin{description}
-\item[\param{labeloffset} (dimension):] (\defaultparam 1)
-\item[\param{labelangle} (real):] (\defaultparam 0)
-\item[\param{labelstyle} (macro):] (\defaultparam \texttt{\cs{small}})
-\item[\param{labelalign} (\cs{rput} ref string):] (\defaultparam \texttt{c})
-\item[\param{labelref} (relative | relgrav | global):] (\defaultparam \texttt{relgrav})
+\item[\param{labeloffset}:] \paramvalue{<value>} (\defaultparam{1})
+\item[\param{labelangle}:] \paramvalue{<value>} (\defaultparam{0})
+\item[\param{labelstyle}:] \paramvalue{<macro>} (\defaultparam{\cs{small}})
+\item[\param{labelalign}:] \paramvalue{<\cs{rput} ref string>} (\defaultparam{c})
+\item[\param{labelref}:] \paramvalue{relative|relgrav|global} (\defaultparam{relgrav})
\end{description}
\parameter{labeloffset} specifies the offset from the center of the component,
@@ -643,7 +652,7 @@ the following three examples.
labelref=relgrav,
optboxwidth=1](0,0)(1;\i){\i}
}
- \end{pspicture}
+\end{pspicture}
\end{LTXexample}
\bigskip
@@ -655,16 +664,107 @@ the following three examples.
labelref=global,
optboxwidth=1](0,0)(1;\i){\i}
}
- \end{pspicture}
+\end{pspicture}
\end{LTXexample}
+\section{Defining new components}
+
+\subsection{Customized versions of existing macros}
+
+The easiest way to define your own components is to use the
+\cs{newpsobject} macro. With this you can define a new component using
+predefined objects with a set of options. These options serve only as
+default values and can be overridden. The following examples defines a
+new object \cs{sbn} for the special crystal used in
+Sec.~\ref{sec:crystal}.
+
+\medskip
+
+\begin{LTXexample}[width=3.5cm]
+\newpsobject{sbn}{crystal}{crystalwidth=1.5, crystalheight=0.6, voltage, lamp, labelangle=45, labeloffset=1.2, fillstyle=solid, fillcolor=yellow!90!black}
+\begin{pspicture}(3,2)\psgrid
+ \sbn(0,1)(3,1){SBN:Ce}
+ \psline[style=OptBeam](0,1)(3,1)
+\end{pspicture}
+\end{LTXexample}
+
+\medskip
+
+If you need more than one type of lenses in your setup it is very cumbersome to specify all parameters every time.
+
+\medskip
+
+\begin{LTXexample}[width=5.5cm]
+\newpsobject{MOLensIn}{lens}{lens=0.5 0.5 0.5}
+\newpsobject{MOLensOut}{lens}{lens=1.5 1.5 1.5}
+\begin{pspicture}(5,2)\psgrid
+ \pnode(0,1){A}\pnode(5,1){B}
+ \MOLensIn[abspos=0.5](A)(B){}
+ \MOLensOut[abspos=1](A)(B){}
+ \MOLensOut[abspos=4](A)(B){}
+ \MOLensIn[abspos=4.5](A)(B){}
+ \psline[style=OptBeam](A)(B)
+\end{pspicture}
+\end{LTXexample}
+\medskip
+
+\subsection{Defining new objects}\label{sec:newobj}
+
+Since version 1.2 \texttt{pst-optexp} provides some high-level macros to
+allow very convenient definition of completely new components. The macro
+\cs{newOptexpDipole} generates all organizing code for the new
+component. All you have to do is to define a new macro
+\cs{mycomponent@iii} which contains all drawing code. Analogously
+\cs{newOptexpDipoleNolabel} defines a new object which takes no label
+(like \cs{polarization}) and \cs{newOptexpTripole} defines a new
+reflective component.
+
+The syntax of the macros is
+\begin{lstlisting}
+\newOptexpDipole[fixed options]{name}{default options}
+\newOptexpDipoleNolabel[fixed options]{name}{default options}
+\newOptexpTripole[fixed options]{name}{default options}
+\end{lstlisting}
+The \texttt{default options} are simply a list of PSTricks parameters which are taken as
+defaults for the new component. The optional argument allows setting of parameters which
+cannot be overridden later.
+
+This is illustrate a bit more in the next code snippet, which also shows
+how the coordinate system is handled withing the \cs{mycomponent@iii}
+macro.
+
+\medskip
+
+\begin{LTXexample}[width=4.5cm]
+\newOptexpTripole{mygrid}{subgriddiv=5, griddots=0, subgridwidth=\pslinewidth, gridwidth=2\pslinewidth}
+\makeatletter
+\def\mygrid@iii{% put here all drawing code
+ \psgrid(-1,0)(1,1)
+}%
+\makeatother
+\begin{pspicture}(4,4)\psgrid
+ \pnode(0,1){A}\pnode(2,2){G}\pnode(3,0){B}
+ \mygrid[gridcolor=red,labeloffset=1.5](A)(G)(B){myGrid}
+ \psline[style=OptBeam](A)(G)(B)
+\end{pspicture}
+\end{LTXexample}
+\medskip
+
+The default position of the label reference point is (0,0). If you want
+to change this, you have to define a new pnode named
+\texttt{tempNode@Label} in the \cs{mycomponent@iii} macro.
+
+If you create a new component, please send it to me then I can
+incorporate this in a new released version.
+
\newpage
+
\section{Examples}
\psset{unit=1.2cm}
\begin{LTXexample}[pos=t,vsep=8mm]
\begin{pspicture}(0,0.2)(12,1.8)
\pnode(0,1.2){Start}\pnode(11,1.2){CCD}
-\psline[linewidth=2\pslinewidth,linecolor=green!90!black](Start)(CCD)
+\psline[linewidth=2\pslinewidth,style=OptBeam](Start)(CCD)
\polarization[poltype=perp,position=0.1](Start)(CCD)
\optretplate[position=0.15](Start)(CCD){$\nicefrac{\lambda}{2}$}
\lens[lensheight=0.5,
@@ -690,8 +790,8 @@ the following three examples.
\pnode(2.5;67.5){Mvar}
\psline[linewidth=2\pslinewidth,
linecolor=red!90!black](LaserOut)(Grid)(Out)\psline(Grid)(Mvar)
- \optbox[endbox,optboxwidth=2,labeloffset=0](Grid)(LaserOut){diodelaser}
- \optretplate[position=0.3,labeloffset=0.8](LaserOut)(Grid){$\nicefrac{\lambda}{4}$}
+ \optbox[endbox, optboxwidth=2, labeloffset=0](Grid)(LaserOut){diodelaser}
+ \optretplate[position=0.3, labeloffset=0.8](LaserOut)(Grid){$\nicefrac{\lambda}{4}$}
\optgrid(LaserOut)(Grid)(Out){grid}
\mirror[variable](Grid)(Mvar)(Grid){M$_\mathrm{var}$}
\end{pspicture}
@@ -703,9 +803,9 @@ the following three examples.
\pnode(6.5,5.7){piezo}\pnode(4,2){BSFwd}\pnode(6.5,2){BSBwd}
\pnode(2,2){BS4f}\pnode(2,0.5){M4f3}\pnode(8,2){M4f1}
\pnode(8,0.5){M4f2}\pnode(1,2){CCD}
- \psline[linecolor=green!90!black,linewidth=2\pslinewidth]%
+ \psline[style=OptBeam,linewidth=2\pslinewidth]%
(Laser)(PBS2)(piezo)(BSBwd)(M4f1)(M4f2)(M4f3)(BS4f)(CCD)
- \psline[linecolor=green!90!black,linewidth=2\pslinewidth](PBS)(BSFwd)(BS4f)
+ \psline[style=OptBeam,linewidth=2\pslinewidth](PBS)(BSFwd)(BS4f)
\psset{mirrorwidth=0.6, plateheight=0.7, outerheight=0.7, labeloffset=0.7, labelstyle=\scriptsize, lensheight=0.8, lenswidth=0.2, bssize=0.5}
\optbox[endbox,optboxwidth=1.5, optboxheight=0.7,labeloffset=0]%
(PBS)(Laser){\parbox{1.5cm}{\centering Nd:YAG\\ 532\,nm}}
@@ -729,20 +829,24 @@ the following three examples.
\lens[labelangle=180](M4f2)(M4f3){L}\mirror(M4f2)(M4f3)(BS4f){M}
\beamsplitter(M4f3)(BS4f)(CCD){BS}\optbox[endbox,labeloffset=0](BS4f)(CCD){CCD}
\lens[abspos=0.7](BS4f)(BSFwd){L}\lens[abspos=0.7](BSBwd)(M4f1){L}
- \psline[linecolor=green!90!black, linewidth=2\pslinewidth](BSFwd)(BSBwd)
+ \psline[style=OptBeam, linewidth=2\pslinewidth](BSFwd)(BSBwd)
\end{pspicture}
\end{LTXexample}
\section{Todo}
-\begin{itemize}
-\item Add components for fiber optics.
-\end{itemize}
+The next thing I will add are components with multiple internal
+reflections, as right-angle, penta and dove prisms. The code is almost
+ready, I just need to think a bit more about the best way to provide
+access to the nodes that are newly defined within the components.
+
+Fiber optical components are also in preparation.
-Drawing of extended beams with focusing, and so on, is not planned to be
-integrated in the near future due to missing ideas for the
-realization. If somebody is interested in this feature and has some
-ideas for the implementation, please contact me.
+Drawing of extended beams with focusing and so on could be integrated to
+some extent in future versions. But as the topic is rather difficult if
+you want to do it properly (components should be placed above the beam,
+but the new nodes are available only when the component is drawn) it
+could take very long until this feature will be implemented.
\section{Acknowledgements}
diff --git a/Master/texmf-dist/dvips/pst-optexp/pst-optexp.pro b/Master/texmf-dist/dvips/pst-optexp/pst-optexp.pro
new file mode 100644
index 00000000000..dc59ceba9a3
--- /dev/null
+++ b/Master/texmf-dist/dvips/pst-optexp/pst-optexp.pro
@@ -0,0 +1,109 @@
+%
+% PostScript prologue for pst-optexp.tex.
+% version 0.1 2008-06-17 (cb)
+% For distribution, see pstricks.tex.
+%
+/tx@OptexpDict 20 dict def
+tx@OptexpDict begin
+%
+%
+% expects: XB YB XA YA XG YG
+/calcNodes {% def
+ /YG ED /XG ED
+ /ay YG 3 -1 roll sub def
+ /ax XG 3 -1 roll sub def
+ /by exch YG sub def
+ /bx exch XG sub def
+ /a ax ay Pyth def
+ /b bx by Pyth def
+ /cx ax a div bx b div add def
+ /cy ay a div by b div add def
+ /c@tmp cx cy Pyth def
+ /c ax bx add ay by add Pyth def
+ %
+ % if c=0, then set the coordinates of the vector manually
+ % depending on the dotproduct (and thus, if 'a' and 'b'
+ % are parallel or antiparallel
+ c 0 eq
+ {ax bx mul ay by mul add 0 gt
+ % if dotprod > 0 then a and b are parallel
+ {/cx ax def
+ /cy ay def}
+ % else a and b are antiparallel
+ {/cx ay def
+ /cy ax neg def} ifelse
+ /c@tmp a def
+ } if
+ /X@A XG cx c@tmp div add def
+ /Y@A YG cy c@tmp div add def
+ /X@B XG cx c@tmp div sub def
+ /Y@B YG cy c@tmp div sub def
+ %
+ % chirality:
+ % test the order of the input points as a input angle > 90°
+ % doesn't really make sens.
+ % So if 'chir' <= 0 exchange the calculated coordinates of
+ % A and B and otherwise leave it as is
+ ax by mul ay bx mul sub 0 le
+ {Y@A X@A
+ /X@A X@B def
+ /Y@A Y@B def
+ /X@B ED
+ /Y@B ED}if
+} bind def
+%
+% called with: height R1
+% leaves on stack: y |R1| alpha_bottom alpha_top R1
+/leftConvex {% def
+ /R1 ED /h ED
+ /a1 R1 dup dup mul h dup mul sub sqrt sub def
+ 0 R1 abs
+ R1 a1 sub neg dup
+ h exch atan exch
+ h neg exch atan
+ /ArcL /arc load def
+ R1
+} bind def
+%
+% called with: height R1
+% leaves on stack: y |R1| alpha_bottom alpha_top R1
+/leftConcave {% def
+ /R1 ED /h ED
+ /a1 R1 abs dup dup mul h dup mul sub sqrt sub def
+ 0 R1 abs
+ R1 neg a1 sub dup
+ h exch atan exch
+ h neg exch atan
+ /ArcL /arcn load def
+ /a1 0.5 a1 mul def
+ R1
+} bind def
+%
+% called with: height R2
+% leaves on stack: y |R2| alpha_bottom alpha_top R2
+/rightConvex {%def
+ /R2 ED /h ED
+ /a2 R2 abs dup dup mul h dup mul sub sqrt sub def
+ 0 R2 abs
+ R2 a2 sub dup
+ h neg exch atan exch
+ h exch atan
+ R2
+ /ArcR /arc load def
+} bind def
+%
+% called with: height R2
+% leaves on stack: y |R2| alpha_bottom alpha_top R2
+/rightConcave {%def
+ /R2 ED /h ED
+ /a2 R2 abs dup dup mul h dup mul sub sqrt sub def
+ 0 R2 abs
+ R2 a2 add dup
+ h neg exch atan exch
+ h exch atan
+ /ArcR /arcn load def
+ /a2 0.5 a2 mul def
+ R2
+} bind def
+%
+end % tx@OptexpDict
diff --git a/Master/texmf-dist/tex/generic/pst-optexp/pst-optexp.tex b/Master/texmf-dist/tex/generic/pst-optexp/pst-optexp.tex
index 3c110bf6a61..6d7b5fe5bcc 100644
--- a/Master/texmf-dist/tex/generic/pst-optexp/pst-optexp.tex
+++ b/Master/texmf-dist/tex/generic/pst-optexp/pst-optexp.tex
@@ -20,14 +20,14 @@
\let\PSToptexpLoaded\endinput
%
%
-\def\fileversion{1.1}
-\def\filedate{2007/09/06}
+\def\fileversion{1.2}
+\def\filedate{2008/06/17}
\message{`pst-optexp' v\fileversion, \filedate\space (CB)}
%
-% DPC interface to the `keyval' package (until keyval based version of PSTricks)
-%
\edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax
\pst@addfams{optexp}
+\pstheader{pst-optexp.pro}
+\def\pst@optexpdict{tx@OptexpDict begin }
\SpecialCoor
%
% In some versions of pstricks-add previous to 2.81 the macro
@@ -51,7 +51,7 @@
/angle dy dx Atan def
/linelength \pst@number\pst@dimp \pst@number\psunit div def
XA linelength angle cos mul add YA linelength angle sin mul add ){#4}%
-}
+}%
\def\nlput{\pst@object{nlput}}
\def\nlput@i(#1)(#2)#3#4{%
\begin@SpecialObj
@@ -61,6 +61,7 @@
\end@SpecialObj
}%
\fi
+%
% IF's
%
\newif\ifPst@optexp@variable
@@ -71,39 +72,40 @@
\newif\ifPst@optexp@component@optional
\newif\ifPst@optexp@debug@showoptdots
\newif\ifPst@optexp@endbox
+\newif\ifPst@optexp@thicklens
%
% Strings
-\edef\pst@string@pol@polperp{perp}
-\edef\pst@string@pol@polparallel{parallel}
-\edef\pst@string@pol@polmisc{misc}
-\edef\pst@string@pol@polrcirc{rcirc}
-\edef\pst@string@pol@pollcirc{lcirc}
-\edef\pst@string@mirror@type@piezo{piezo}
-\edef\pst@string@mirror@type@plain{plain}
-\edef\pst@string@mirror@type@extended{extended}
-%
-\edef\pst@string@lens@type@plainconvex{plainconvex}
-\edef\pst@string@lens@type@convexplain{convexplain}
-\edef\pst@string@lens@type@biconvex{biconvex}
-\edef\pst@string@lens@type@plainconcave{plainconcave}
-\edef\pst@string@lens@type@concaveplain{concaveplain}
-\edef\pst@string@lens@type@biconcave{biconcave}
-%
-\edef\pst@string@labelref@relative{relative}
-\edef\pst@string@labelref@relgrav{relgrav}
-\edef\pst@string@labelref@global{global}
-%
-\edef\pst@optexp@label@refangle{0}
-%
+\def\pst@string@pol@polperp{perp}
+\def\pst@string@pol@polparallel{parallel}
+\def\pst@string@pol@polmisc{misc}
+\def\pst@string@pol@polrcirc{rcirc}
+\def\pst@string@pol@pollcirc{lcirc}
+\def\pst@string@mirror@type@piezo{piezo}
+\def\pst@string@mirror@type@plain{plain}
+\def\pst@string@mirror@type@extended{extended}
+\def\pst@string@optgrid@type@blazed{blazed}
+\def\pst@string@optgrid@type@binary{binary}
+%
+\def\pst@string@lens@type@plainconvex{plainconvex}
+\def\pst@string@lens@type@convexplain{convexplain}
+\def\pst@string@lens@type@biconvex{biconvex}
+\def\pst@string@lens@type@plainconcave{plainconcave}
+\def\pst@string@lens@type@concaveplain{concaveplain}
+\def\pst@string@lens@type@biconcave{biconcave}
+%
+\def\pst@string@labelref@relative{relative}
+\def\pst@string@labelref@relgrav{relgrav}
+\def\pst@string@labelref@global{global}
%
% psstyles
%
-\newpsstyle{OptionalStyle}{linestyle=dashed,dash=1.5pt 1pt}
+\newpsstyle{OptionalStyle}{linestyle=dashed,dash=1.5pt 1pt}%
\newpsstyle{ExtendedMirror}{linestyle=none,%
hatchwidth=0.5\psk@optexp@mirror@linewidth,%0.6pt,%
hatchsep=1.4\psk@optexp@mirror@linewidth,%
- fillstyle=hlines}
-\newpsstyle{PiezoMirror}{fillstyle=solid,fillcolor=black!30}
+ fillstyle=hlines}%
+\newpsstyle{PiezoMirror}{fillstyle=solid,fillcolor=black!30}%
+\newpsstyle{OptBeam}{linecolor=green!90!black}%
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -119,8 +121,15 @@
% Lens
\define@key[psset]{optexp}{lensheight}{\edef\psk@optexp@lens@height{#1}}
\define@key[psset]{optexp}{lenswidth}{\edef\psk@optexp@lens@width{#1}}
-\define@key[psset]{optexp}{lensradius}{\edef\psk@optexp@lens@radius{#1}}
-% Lens Type
+\define@key[psset]{optexp}{lensradiusleft}{\edef\psk@optexp@lens@radiusLeft{#1}}
+\define@key[psset]{optexp}{lensradiusright}{\edef\psk@optexp@lens@radiusRight{#1}}
+\define@boolkey[psset]{optexp}[Pst@optexp@]{thicklens}[true]{}
+\define@key[psset]{optexp}{lensradius}{%
+ \psset{lensradiusleft=#1,%
+ lensradiusright=#1}%
+ \edef\psk@optexp@lens@radius{#1}%
+}%
+% Lens Type (only for backward compatibility)
% 0 -> plainconvex
% 1 -> convexplain
% 2 -> biconvex
@@ -139,6 +148,26 @@
\ifx\pst@string@lens@type@biconcave\pst@tempA 5%
\fi\fi\fi\fi\fi\fi%
}}
+\define@key[psset]{optexp}{lens}{%
+ \pst@expandafter\psset@@lens{#1} {} {} {} {} {}\@nil
+}%
+\def\psset@@lens#1 #2 #3 #4 #5\@nil{%
+ \edef\pst@temp{#4}%
+ \ifx\pst@temp\@empty\else
+ \psset{lenswidth=#4}%
+ \fi
+ \edef\pst@temp{#3}%
+ \ifx\pst@temp\@empty\else
+ \psset{lensheight=#3}
+ \fi
+ \edef\pst@temp{#2}%
+ \ifx\pst@temp\@empty
+ \psset{lensradiusright=#1}%
+ \else
+ \psset{lensradiusright=#2}%
+ \fi
+ \psset{lensradiusleft=#1}%
+}%
%
% Pinhole
\define@key[psset]{optexp}{innerheight}{\edef\psk@optexp@pinhole@iheight{#1}}
@@ -174,12 +203,14 @@
\define@key[psset]{optexp}{mirrorlinewidth}{\edef\psk@optexp@mirror@linewidth{#1}}
\define@key[psset]{optexp}{mirrortype}{\edef\psk@optexp@mirror@type{#1}}% piezo, extended, plain
\define@key[psset]{optexp}{mirrordepth}{\edef\psk@optexp@mirror@depth{#1}}
+\define@key[psset]{optexp}{mirrorradius}{\edef\psk@optexp@mirror@radius{#1}}
\define@boolkey[psset]{optexp}[Pst@optexp@]{variable}[true]{}
%
% Grid
\define@key[psset]{optexp}{optgridcount}{\edef\psk@optexp@optgrid@count{#1}}
\define@key[psset]{optexp}{optgridwidth}{\edef\psk@optexp@optgrid@width{#1}}
\define@key[psset]{optexp}{optgridheight}{\edef\psk@optexp@optgrid@height{#1}}
+\define@key[psset]{optexp}{optgridtype}{\edef\psk@optexp@optgrid@type{#1}}
\define@key[psset]{optexp}{optgriddepth}{\edef\psk@optexp@optgrid@depth{#1}}
\define@key[psset]{optexp}{optgridlinewidth}{\edef\psk@optexp@optgrid@linewidth{#1}}
\define@boolkey[psset]{optexp}[Pst@optexp@]{reverse}[true]{}
@@ -218,6 +249,8 @@
\define@key[psset]{optexp}{labelstyle}{\def\psk@optexp@label@style{#1}}
\define@key[psset]{optexp}{labelalign}{\def\psk@optexp@label@align{#1}}
\define@key[psset]{optexp}{labelref}{\edef\psk@optexp@label@ref{#1}}
+% for internal use only
+\define@key[psset]{optexp}{ref@angle}{\edef\psk@optexp@label@refangle{#1}}
% labelrelative is obsolete
\define@choicekey*[psset]{optexp}{labelrelative}[\val\nr]{true,false}[true]{%
\ifcase\nr\relax
@@ -227,7 +260,6 @@
\fi
\PackageWarning{pst-optexp}{labelrelative is obsolete, please use labelref=relative instead}
}
-
%
% Debug
\define@boolkey[psset]{optexp}[Pst@optexp@debug@]{showoptdots}[true]{}
@@ -235,89 +267,111 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% Makros
+% BASIC MACROS
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\def\lens{\@ifnextchar[{\pst@lens}{\pst@lens[]}}
-\def\pinhole{\@ifnextchar[{\pst@pinhole}{\pst@pinhole[]}}
-\def\beamsplitter{\@ifnextchar[{\pst@beamsplitter}{\pst@beamsplitter[]}}
-\def\crystal{\@ifnextchar[{\pst@crystal}{\pst@crystal[]}}
-\def\optgrid{\@ifnextchar[{\pst@optgrid}{\pst@optgrid[]}}
-\def\mirror{\@ifnextchar[{\pst@mirror}{\pst@mirror[]}}
-\def\polarisation{%
- \PackageWarning{pst-optexp}{macro polarisation is obsolete, please use polarization instead}%
- \@ifnextchar[{\pst@polarization}{\pst@polarization[]}%
-}
-\def\polarization{\@ifnextchar[{\pst@polarization}{\pst@polarization[]}}
-\def\optbox{\@ifnextchar[{\pst@optbox}{\pst@optbox[]}}
-\def\optplate{\@ifnextchar[{\pst@optplate}{\pst@optplate[]}}
-\def\optretplate{\@ifnextchar[{\pst@optretplate}{\pst@optretplate[]}}
-\def\detector{\@ifnextchar[{\pst@detector}{\pst@detector[]}}
-\def\optdipole{\@ifnextchar[{\pst@optdipole}{\pst@optdipole[]}}
-\def\opttripole{\@ifnextchar[{\pst@opttripole}{\pst@opttripole[]}}
-%
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Command analog to addbefore@par which is defined in pstricks.tex
+% addafter@par inserts new options at the _end_ of the current token register.
+% This can be useful to preset options that are not allowed to be changed by the
+% user.
%
-% default settings
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\psset{%
- angle=0
- ,lenswidth=0.2
- ,lensheight=1
- ,lenstype=biconvex
- ,mirrorwidth=1
- ,mirrordepth=0.08
- ,poltype=\pst@string@pol@polparallel
- ,optgridcount=10
- ,optgridwidth=1
- ,optgridheight=0.1
- ,optgriddepth=0.05
- ,bssize=0.8
- ,outerheight=1
- ,innerheight=0.1
- ,crystalwidth=2
- ,crystalheight=0.8
- ,caxislength=0.6
- ,optboxwidth=1
- ,optboxheight=0.5
- ,position=\@empty
- ,abspos=\@empty
- ,labeloffset=0.8
- ,labelangle=0
- ,labelstyle=\small
- ,mirrortype=\pst@string@mirror@type@plain,
- ,labelalign=c
- ,lensradius=\@empty
- ,mirrorlinewidth=2\pslinewidth
- ,plateheight=1
- ,platelinewidth=2\pslinewidth
- ,platewidth=0.1
- ,polsize=0.6
- ,pollinewidth=0.7\pslinewidth
- ,optgridlinewidth=0.7\pslinewidth
- ,phlinewidth=2\pslinewidth
- ,lampscale=0.3
- ,detsize=0.5
- ,labelref=relgrav
-}%
-%
-%
-%
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% Macro implementations
+\def\addafter@par#1{%
+ \ifx\pst@par\@empty
+ \def\pst@par{#1}%
+ \else
+ \toks@{#1}%
+ \pst@toks\expandafter{\pst@par}%
+ \edef\pst@par{\the\pst@toks,\the\toks@}%
+ \fi%
+}
%
+% New high-level macros
+% 1) Allow a compressed notation of all provided elements, as most of the organizing code
+% is mostly equal.
+%
+% 2) Provide a rather easy-to-use interface for the user to allow new user-defined elements
+%
+\def\newOptexpDipole{\@ifnextchar[{\new@optexpdipole}{\new@optexpdipole[]}}
+\def\newOptexpDipoleNolabel{\@ifnextchar[{\new@optexpdipolenolabel}{\new@optexpdipolenolabel[]}}
+\def\newOptexpTripole{\@ifnextchar[{\new@optexptripole}{\new@optexptripole[]}}
+%
+% Creates new macros ...@i and ...@ii which provide most code for the arrangement
+% of the objects. A tempNode@Label is predefined as well as two internal nodes if compname is
+% defined.
+% ...@iii must be defined manually and should contain all the stroking code
+\def\new@optexpdipole[#1]#2#3{%
+ \@ifundefined{#2@i}{%
+ \@namedef{#2}{\pst@object{#2}}%
+ \expandafter\def\csname #2@i\endcsname(##1)(##2)##3{%
+ \pst@killglue
+ \addbefore@par{#3}%
+ \addafter@par{#1}%
+ \begingroup
+ \use@par
+ \pst@regNodes{##1}{##2}
+ \pst@draw@component{##3}{\@nameuse{#2@ii}}
+ \endgroup
+ }%
+ \@namedef{#2@ii}{%
+ \pnode(0,0){tempNode@Label}%
+ \@nameuse{#2@iii}%
+ }%
+ }{%
+ \@pstrickserr{OptExp dipole object `#2' already defined}\@eha}%
+\ignorespaces}%
+%
+% Equivalent to new@optexdipole, only that objects without labels are created.
+\def\new@optexpdipolenolabel[#1]#2#3{%
+ \@ifundefined{#2@i}{%
+ \@namedef{#2}{\pst@object{#2}}%
+ \expandafter\def\csname #2@i\endcsname(##1)(##2){%
+ \pst@killglue
+ \addbefore@par{#3}%
+ \addafter@par{#1}%
+ \begingroup
+ \use@par
+ \pst@regNodes{##1}{##2}
+ \pst@draw@component{}{\@nameuse{#2@ii}}
+ \endgroup
+ }%
+ \@namedef{#2@ii}{%
+ \pnode(0,0){tempNode@Label}%
+ \@nameuse{#2@iii}%
+ }%
+ }{%
+ \@pstrickserr{OptExp dipole object `#2' already defined}\@eha}%
+\ignorespaces}%
+%
+% Equivalent to new@optexpdipole for tripole objects.
+\def\new@optexptripole[#1]#2#3{%
+ \@ifundefined{#2@i}{%
+ \@namedef{#2}{\pst@object{#2}}%
+ \expandafter\def\csname #2@i\endcsname(##1)(##2)(##3)##4{%
+ \pst@killglue
+ \addbefore@par{#3}%
+ \addafter@par{ref@angle=180,#1}%
+ \begingroup
+ \use@par
+ \pst@calcNodes{##1}{##2}{##3}
+ \pst@draw@component{##4}{\@nameuse{#2@ii}}
+ \endgroup
+ }%
+ \@namedef{#2@ii}{%
+ \pnode(0,0){tempNode@Label}%
+ \@nameuse{#2@iii}%
+ }%
+ }{%
+ \@pstrickserr{OptExp tripole object `#2' already defined}\@eha}%
+\ignorespaces}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Some of the components need three points to be positioned.
% These are:
%
-% 1. startpoint of the beam (in the PS-Code: (XA,YA))
-% 2. reflectionpoint on the surface (XG, YG)
-% 3. endpoint (XB,YB)
+% 1. starting point of the beam (in the PS-Code: (XA,YA))
+% 2. reflection point on the surface (XG, YG)
+% 3. end point (XB,YB)
%
% With these three points \pst@calcNodes calculates two new points 'tempNode@A'
% and 'tempNode@B', between which the component is placed by the macro
@@ -330,71 +384,24 @@
\pst@getcoor{#2}\pst@tempb%
\pst@getcoor{#3}\pst@tempc%
\pnode(!%
- \pst@tempa /YA exch \pst@number\psyunit div def
- /XA exch \pst@number\psxunit div def
- \pst@tempb /YG exch \pst@number\psyunit div def
- /XG exch \pst@number\psxunit div def
- \pst@tempc /YB exch \pst@number\psyunit div def
- /XB exch \pst@number\psxunit div def
- /ax XG XA sub def
- /ay YG YA sub def
- /bx XB XG sub def
- /by YB YG sub def
- /a ax 2 exp ay 2 exp add sqrt def
- /b bx 2 exp by 2 exp add sqrt def
- /cx ax a div bx b div add def
- /cy ay a div by b div add def
- /c cx 2 exp cy 2 exp add sqrt def
- %
- % if c=0, then set the coordinates of the vector manually
- % depending on the dotproduct (and thus, if 'a' and 'b'
- % are parallel or antiparallel
- c 0 eq
- {/dotprod ax bx mul ay by mul add def
- dotprod 0 gt
- % if dotprod > 0 then a and b are parallel
- {/cx ax def
- /cy ay def}
- % else a and b are antiparallel
- {/cx ay def
- /cy ax neg def} ifelse
- /c a def
- }if
- /X@A XG cx c div add def
- /Y@A YG cy c div add def
- /X@B XG cx c div sub def
- /Y@B YG cy c div sub def
- %
- % chirality:
- % test the order of the input points as a input angle > 90°
- % doesn't really make sens.
- % So if 'chir' <= 0 exchange the calculated coordinates of
- % A and B and otherwise leave it as is
- /chir ax by mul ay bx mul sub def
- chir 0 le
- {/XAtmp X@A def
- /YAtmp Y@A def
- /X@A X@B def
- /Y@A Y@B def
- /X@B XAtmp def
- /Y@B YAtmp def}if
- X@A Y@A){tempNode@A}%
- \pnode(! X@B Y@B){tempNode@B}%
- \gdef\pst@optexp@label@refangle{180}
+ \pst@optexpdict
+ \pst@tempa \pst@number\psyunit div exch \pst@number\psxunit div exch
+ \pst@tempc \pst@number\psyunit div exch \pst@number\psxunit div exch
+ \pst@tempb \pst@number\psyunit div exch \pst@number\psxunit div exch
+ calcNodes
+ X@A Y@A end){tempNode@A}%
+ \pnode(! \pst@optexpdict X@B Y@B end){tempNode@B}%
}\ignorespaces}%
%
%
-% If a macro requests only two points, they are equivalent to
+% If a macro needs only two points, they are equivalent to
% 'tempNode@A' and 'tempNode@B'. But for easier implementation of other
-% macros the given points are assigned to the temporary nodes. In
-% addition \pst@regNodes defines the x- and the y-coordinate of the two
-% inputpoints (XA,YA) (XB,YB) in PS-Code
-%
+% macros the given points are assigned to the temporary nodes.
%
-\def\pst@regNodes#1#2{{%
+\def\pst@regNodes#1#2{%
\pnode(#1){tempNode@A}
\pnode(#2){tempNode@B}
-}\ignorespaces}%
+\ignorespaces}%
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -404,154 +411,231 @@
% Define a new node #3 shifted by (#1) relative to existing node #2.
% Aditionally rotate the new node by #4 degree around existing node as origin.
%
-\def\pst@defShiftedRotNode(#1)#2#3#4{%
+\def\pst@defShiftedRotLabelNode(#1)#2#3#4{%
\pst@getcoor{#1}\pst@tempDiff%
\pnode(!%
\pst@tempDiff /YDiff ED /XDiff ED %
- tx@NodeDict begin
/N@#2 load GetCenter /YShifted ED /XShifted ED
- /rot@angle #4 \pst@optexp@label@refangle\space add def
+ /rot@angle #4 \psk@optexp@label@refangle\space add def
/XDiff@Rot rot@angle cos XDiff mul rot@angle sin YDiff mul add def
/YDiff@Rot rot@angle cos YDiff mul rot@angle sin XDiff mul sub def
XShifted XDiff@Rot add \pst@number\psxunit div
YShifted YDiff@Rot add \pst@number\psyunit div neg
- end){#3}%
+ ){#3}%
% reset reference label to 0
- \gdef\pst@optexp@label@refangle{0}%
+ \psset{ref@angle=0}
}%
%
-% Define a new node #3 that is only shifted by (#1) with respect to the existing
-% node #2
-\def\pst@defShiftedNode(#1)#2#3{%
- \pst@defShiftedRotNode(#1){#2}{#3}{0}%
+% Define a new node #3 that is shifted by (#1)
+% with respect to the existing node #2
+\def\pst@defShiftedLabelNode(#1)#2#3{%
+ \pst@defShiftedRotLabelNode(#1){#2}{#3}{0}%
}%
%
% Used to put the label for labelref=relative
%
\def\put@RelLabel#1{%
-\nput[labelsep=0]{\psk@optexp@label@angle}%
- {tempNode@LabelShifted}%
- {\rput[\psk@optexp@label@align](0,0){\psk@optexp@label@style #1}}%
+ \nput[labelsep=0]{\psk@optexp@label@angle}%
+ {tempNode@LabelShifted}%
+ {\rput[\psk@optexp@label@align](0,0){\psk@optexp@label@style #1}}%
}%
%
-% Put the component #1 and define a new node 'tempNode@LabelShifted'
+% Place the component in argument #1 and define a new node 'tempNode@LabelShifted'
% for positioning of the label
\def\put@Comp#1{%
#1%
- \pst@defShiftedRotNode(0,\psk@optexp@label@offset)%
+ \pst@defShiftedRotLabelNode(0,\psk@optexp@label@offset)%
{tempNode@Label}%
{tempNode@LabelShifted}%
{\psk@optexp@label@angle}%
}%
%
+% Positioning of the label depending on the reference coordinates.
+% Needs possibly a previously defined node tempNode@LabelShifted which
+% marks exactly the position of the label relative to the component.
+% This is defined by calling \put@Comp.
+%
+% Parameter 'labelref' which sets the reference coordinates can have
+% the values
+% global => labelangle rotates the label origin in global coordinate
+% system, text is not rotated
+% relgrav => labelangle rotates the label origin relativ to the local
+% coordinate system of the component, text is not rotated
+% relative => as relgrav but text is rotated together with object.
+%
+\def\put@Label#1{%
+ \ifx\psk@optexp@label@ref\pst@string@labelref@global
+ %
+ % global
+ \nput[labelsep=\psk@optexp@label@offset]%
+ {\psk@optexp@label@angle}%
+ {tempNode@Label}%
+ {\rput[\psk@optexp@label@align](0,0){\psk@optexp@label@style #1}}%
+ %
+ \else\ifx\psk@optexp@label@ref\pst@string@labelref@relgrav
+ %
+ % relgrav
+ \rput[\psk@optexp@label@align](tempNode@LabelShifted){\psk@optexp@label@style #1}%
+ %
+ \else\ifx\psk@optexp@label@ref\pst@string@labelref@relative
+ %
+ % relative
+ \begingroup
+ %
+ % Redefine InitNC only for positioning of the label with
+ % labelref=relative
+ %
+ \pst@def{InitNC}< % kindly contributed by Herbert Voss
+ /b ED /a ED % second and first node
+ /NodeSepTypeB ED /NodeSepTypeA ED
+ /NodeSepB ED /NodeSepA ED
+ /OffsetB ED /OffsetA ED
+ tx@NodeDict a known tx@NodeDict b known and dup {
+ /NodeA a load def /NodeB b load def
+ NodeA GetCenter NodeB GetCenter % xA yA xB yB
+ 4 copy pop exch pop le % xA xB
+ { /yB ED /xB ED /yA ED /xA ED }
+ { /yA ED /xA ED /yB ED /xB ED } ifelse
+ } if >%
+ %
+ \ncline[linestyle=none,fillstyle=none,npos=]{tempNode@A}{tempNode@B}%
+ %
+ %
+ \ifx\psk@optexp@position\@empty
+ \ifx\psk@optexp@abspos\@empty
+ \ncput[nrot=:U,npos=]{\put@RelLabel{#1}}
+ \else
+ \nlput[nrot=:U](tempNode@A)(tempNode@B){\psk@optexp@abspos}{\put@RelLabel{#1}}
+ \fi
+ \else
+ \ncput[nrot=:U,npos=\psk@optexp@position]{\put@RelLabel{#1}}
+ \fi
+ %
+ \endgroup
+ \fi\fi\fi
+}%
%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% COMPONENT WRAPPERS
-%
-\def\pst@lens[#1](#2)(#3)#4{{%
- \pst@regNodes{#2}{#3}%
- \pst@draw@component{#1}{#4}\pst@draw@lens%
-}\ignorespaces}%
-%
-%
-%
-\def\pst@pinhole[#1](#2)(#3)#4{{%
- \pst@regNodes{#2}{#3}%
- \pst@draw@component{#1}{#4}\pst@draw@pinhole%
-}\ignorespaces}%
-%
-%
-%
-\def\pst@mirror[#1](#2)(#3)(#4)#5{{%
- \pst@calcNodes{#2}{#3}{#4}%
- \pst@draw@component{#1}{#5}\pst@draw@mirror%
-}\ignorespaces}%
-%
-%
-%
-\def\pst@optgrid[#1](#2)(#3)(#4)#5{{%
- \pst@calcNodes{#2}{#3}{#4}%
- \pst@draw@component{#1}{#5}\pst@draw@optgrid%
-}\ignorespaces}%
-%
-%
-%
-\def\pst@beamsplitter[#1](#2)(#3)(#4)#5{{%
- \pst@calcNodes{#2}{#3}{#4}%
- \gdef\pst@optexp@label@refangle{-135}
- \pst@draw@component{#1}{#5}\pst@draw@beamsplitter%
-}\ignorespaces}%
-%
-%
-%
-\def\pst@crystal[#1](#2)(#3)#4{{%
- \pst@regNodes{#2}{#3}%
- \pst@draw@component{#1}{#4}\pst@draw@crystal%
-}\ignorespaces}%
-%
-%
-%
-\def\pst@optbox[#1](#2)(#3)#4{{%
- \pst@regNodes{#2}{#3}%
- \pst@draw@component{#1}{#4}\pst@draw@optbox%
-}\ignorespaces}%
-%
-%
-%
-\def\pst@optplate[#1](#2)(#3)#4{{%
- \pst@regNodes{#2}{#3}%
- \pst@draw@component{#1}{#4}\pst@draw@optplate%
-}\ignorespaces}%
-%
-%
-%
-\def\pst@optretplate[#1](#2)(#3)#4{{%
- \pst@regNodes{#2}{#3}%
- \pst@draw@component{#1}{#4}\pst@draw@optretplate%
-}\ignorespaces}%
-%
-%
-%
-\def\pst@detector[#1](#2)(#3)#4{{%
- \pst@regNodes{#2}{#3}%
- \psset{endbox}
- \pst@draw@component{#1}{#4}\pst@draw@detector%
-}\ignorespaces}%
-%
-%
+% FREE-RAY COMPONENTS
%
-\def\pst@polarization[#1](#2)(#3){{%
- \pst@regNodes{#2}{#3}%
- \pst@draw@component{#1}{}\pst@draw@polarization%
-}\ignorespaces}%
+% DIPOLES
%
+\newOptexpDipole{lens}{}%
+\newOptexpDipole{pinhole}{}%
+\newOptexpDipole{crystal}{}%
+\newOptexpDipoleNolabel{polarization}{}%
+\newOptexpDipole{optbox}{}%
+\newOptexpDipole{optplate}{}%
+\newOptexpDipole{optretplate}{}%
+\newOptexpDipole[endbox]{detector}{}%
+\newOptexpDipole{optdipole}{}%
%
+% TRIPOLES
%
-\def\pst@optdipole[#1](#2)(#3)#4#5{{%
- \pst@regNodes{#2}{#3}%
- \pst@draw@component{#1}{#5}{\pnode(0,0){tempNode@Label}#4}%
-}\ignorespaces}%
+\newOptexpTripole{mirror}{}%
+\newOptexpTripole[ref@angle=-135]{beamsplitter}{}%
+\newOptexpTripole{optgrid}{}%
%
+% SPECIAL OBJECTS
%
+\def\optdipole{\pst@object{optdipole}}
+\def\optdipole@i(#1)(#2)#3#4{%
+ \pst@killglue
+ \begingroup
+ \use@par
+ \pst@regNodes{#1}{#2}
+ \pst@draw@component{#4}{%
+ \pnode(0,0){tempNode@Label}%
+ #3
+ }%
+ \endgroup
+}%
+\def\opttripole{\pst@object{opttripole}}
+\def\opttripole@i(#1)(#2)(#3)#4#5{%
+ \pst@killglue
+ \begingroup
+ \use@par
+ \pst@calcNodes{#1}{#2}{#3}
+ \pst@draw@component{#5}{%
+ \pnode(0,0){tempNode@Label}%
+ #4
+ }%
+ \endgroup
+}%
%
-\def\pst@opttripole[#1](#2)(#3)(#4)#5#6{{%
- \pst@calcNodes{#2}{#3}{#4}%
- \pst@draw@component{#1}{#6}{\pnode(0,0){tempNode@Label}#5}%
-}\ignorespaces}%
%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
+% default settings
%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\psset{%
+% general
+ position=\@empty
+ ,abspos=\@empty
+ ,angle=0
+% lens
+ ,lenswidth=0.2
+ ,lensheight=1
+ ,lenstype=\@empty
+ ,lensradius=\@empty
+ ,lensradiusleft=1
+ ,lensradiusright=1
+% pinhole
+ ,phlinewidth=2\pslinewidth
+ ,outerheight=1
+ ,innerheight=0.1
+% beamsplitter
+ ,bssize=0.8
+% crystal
+ ,crystalwidth=2
+ ,crystalheight=0.8
+ ,caxislength=0.6
+ ,lampscale=0.3
+% mirror
+ ,mirrorwidth=1
+ ,mirrordepth=0.08
+ ,mirrorradius=0
+ ,mirrortype=\pst@string@mirror@type@plain
+ ,mirrorlinewidth=2\pslinewidth
+% optgrid
+ ,optgridcount=10
+ ,optgridwidth=1
+ ,optgridheight=0.1
+ ,optgriddepth=0.05
+ ,optgridtype=\pst@string@optgrid@type@blazed
+ ,optgridlinewidth=0.7\pslinewidth
+% optbox
+ ,optboxwidth=1
+ ,optboxheight=0.5
+% optplate
+ ,plateheight=1
+ ,platelinewidth=2\pslinewidth
+% optretplate
+ ,platewidth=0.1
+% detector
+ ,detsize=0.5
+% polarization
+ ,poltype=\pst@string@pol@polparallel
+ ,polsize=0.6
+ ,pollinewidth=0.7\pslinewidth
+% label
+ ,labeloffset=0.8
+ ,labelangle=0
+ ,labelstyle=\small
+ ,labelalign=c
+ ,labelref=relgrav
+ ,ref@angle=0
+}%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% DRAW COMPONENTS
%
% This macro is called by every unit
%
-\def\pst@draw@component#1#2#3{{%
-% \psset{labelsep=1}%
- \psset{#1}%
+\def\pst@draw@component#1#2{%
%
\ifPst@optexp@endbox%
\ifx\psk@optexp@label@offset\@empty
@@ -575,184 +659,251 @@
%
% then check if absolute positioning is wanted
\ifx\psk@optexp@abspos\@empty
- \ncput[nrot=:U,npos=]{\put@Comp{#3}}
+ \ncput[nrot=:U,npos=]{\put@Comp{#2}}
\else
- \nlput[nrot=:U](tempNode@A)(tempNode@B){\psk@optexp@abspos}{\put@Comp{#3}}
+ \nlput[nrot=:U](tempNode@A)(tempNode@B){\psk@optexp@abspos}{\put@Comp{#2}}
\fi
\else
- \ncput[nrot=:U,npos=\psk@optexp@position]{\put@Comp{#3}}
+ \ncput[nrot=:U,npos=\psk@optexp@position]{\put@Comp{#2}}
\fi
- %
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
- % Positioning of the label depending on the reference coordinates
- %
- \ifx\psk@optexp@label@ref\pst@string@labelref@global
- % global
- \nput[labelsep=\psk@optexp@label@offset]%
- {\psk@optexp@label@angle}%
- {tempNode@Label}%
- {\rput[\psk@optexp@label@align](0,0){\psk@optexp@label@style #2}}%
- \else\ifx\psk@optexp@label@ref\pst@string@labelref@relgrav
- \rput[\psk@optexp@label@align](tempNode@LabelShifted){\psk@optexp@label@style #2}
- \else\ifx\psk@optexp@label@ref\pst@string@labelref@relative
- \begingroup
- %
- % Redefine InitNC only for positioning of the label with
- % labelref=relative
- %
- \pst@def{InitNC}< % kindly contributed by Herbert Voss
- /b ED /a ED % second and first node
- /NodeSepTypeB ED /NodeSepTypeA ED
- /NodeSepB ED /NodeSepA ED
- /OffsetB ED /OffsetA ED
- tx@NodeDict a known tx@NodeDict b known and dup {
- /NodeA a load def /NodeB b load def
- NodeA GetCenter NodeB GetCenter % xA yA xB yB
- 4 copy pop exch pop le % xA xB
- { /yB ED /xB ED /yA ED /xA ED }
- { /yA ED /xA ED /yB ED /xB ED } ifelse
- } if >%
- %
- \ncline[linestyle=none,fillstyle=none,npos=]{tempNode@A}{tempNode@B}%
- %
- %
- \ifx\psk@optexp@position\@empty
- \ifx\psk@optexp@abspos\@empty
- \ncput[nrot=:U,npos=]{\put@RelLabel{#2}}
- \else
- \nlput[nrot=:U](tempNode@A)(tempNode@B){\psk@optexp@abspos}{\put@RelLabel{#2}}
- \fi
- \else
- \ncput[nrot=:U,npos=\psk@optexp@position]{\put@RelLabel{#2}}
- \fi
- %
- \endgroup
- \fi\fi\fi
- %
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- %
- % Show dots for debugging
+ %
+ % Now put the label
+ \put@Label{#1}%
+ %
+ % Show some special dots for debugging
\ifPst@optexp@debug@showoptdots
\psdot[linecolor=red](tempNode@Label)
\psdot[linecolor=red](tempNode@LabelShifted)
\psdot[linecolor=black](tempNode@A)
\psdot[linecolor=black](tempNode@B)
\fi
-}\ignorespaces}%
+\ignorespaces}%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% IMPLEMENTATIONS OF ALL ...@iii MACROS
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MIRROR
%
-\def\pst@draw@mirror{{%
- \pstVerb{%
- /m@width \psk@optexp@mirror@width\space def
- }
- \ifPst@optexp@variable
- \psarc[linewidth=0.8\pslinewidth,arrowinset=0,arrowscale=0.8]{<->}
- (! m@width 2 div 0.4 sub 0){0.6}{-20}{20}
- \psarc[linewidth=0.8\pslinewidth,arrowinset=0,arrowscale=0.8]{<->}
- (! m@width 2 div 0.4 sub neg 0){0.6}{160}{200}
+\def\mirror@iii{%
+ \edef\@mirror@ht{\psk@optexp@mirror@width\space\pst@number\psyunit mul 2 div }%
+ \edef\@mirror@dp{\psk@optexp@mirror@depth\space\pst@number\psxunit mul }%
+ \edef\@mirror@r{\psk@optexp@mirror@radius\space\pst@number\psxunit mul }%
+ \edef\@mirror@postcode{neg 5 -1 roll exch 5 2 roll 90 add exch 90 add exch ArcR }%
+ \edef\@mirror@extpostcode{neg \@mirror@dp add 5 -1 roll exch 5 2 roll 90 add exch 90 add }%
+ %
+ %
+ % concave mirrors
+ %
+ \ifdim\psk@optexp@mirror@radius pt<0pt
+ % always draw the input plane
+ \begin@OpenObj
+ \addto@pscode{\pst@optexpdict \@mirror@ht \@mirror@r rightConcave \@mirror@postcode end}%
+ \end@OpenObj
+ \ifx\psk@optexp@mirror@type\pst@string@mirror@type@extended
+ %
+ % extended concave mirror
+ \psset{style=ExtendedMirror}
+ \begin@ClosedObj
+ \addto@pscode{\pst@optexpdict \@mirror@ht \@mirror@r rightConcave \@mirror@postcode
+ \@mirror@ht \@mirror@r rightConcave \@mirror@extpostcode arc
+ closepath end}%
+ \end@ClosedObj
+ \fi
+ %
+ %
+ % convex mirrors
+ %
+ \else\ifdim\psk@optexp@mirror@radius pt>0pt
+ % always draw the input plane
+ \begin@OpenObj
+ \addto@pscode{\pst@optexpdict \@mirror@ht \@mirror@r rightConvex \@mirror@postcode end}%
+ \end@OpenObj
+ \ifx\psk@optexp@mirror@type\pst@string@mirror@type@extended
+ %
+ % extended convex mirror
+ \psset{style=ExtendedMirror}
+ \begin@ClosedObj
+ \addto@pscode{\pst@optexpdict \@mirror@ht \@mirror@r rightConvex \@mirror@postcode
+ \@mirror@ht \@mirror@r rightConvex \@mirror@extpostcode arcn
+ closepath end}%
+ \end@ClosedObj
+ \fi
+ \else
+ %
+ % plain mirror
+ %
+ \edef\@m@wd{\psk@optexp@mirror@width\space 2 div }
+ \ifPst@optexp@variable
+ \psarc[linewidth=0.8\pslinewidth,arrowinset=0,arrowscale=0.8]{<->}
+ (! \@m@wd 0.4 sub 0){0.6}{-20}{20}
+ \psarc[linewidth=0.8\pslinewidth,arrowinset=0,arrowscale=0.8]{<->}
+ (! \@m@wd 0.4 sub neg 0){0.6}{160}{200}
\fi
- \psline[linewidth=\psk@optexp@mirror@linewidth](! m@width -2 div
- 0)(! m@width 2 div 0)
+ \psline[linewidth=\psk@optexp@mirror@linewidth](! \@m@wd neg 0)(! \@m@wd 0)
%
% mirrortype
\ifx\psk@optexp@mirror@type\pst@string@mirror@type@piezo%
- %
- % piezo
- \psframe[style=PiezoMirror](! m@width 8 div 0)(! m@width -8 div m@width 5 div)
- \psbezier(! 0 m@width 5 div)%
- (! 0 m@width 3 div)%
- (! m@width 4 div m@width 4 div)%
- (! m@width 8 div m@width 2 div)%
+ %
+ % piezo
+ \psframe[style=PiezoMirror](! \@m@wd 4 div 0)(! \@m@wd -4 div \@m@wd 2.5 div)
+ \psbezier(! 0 \@m@wd 2.5 div)%
+ (! 0 \@m@wd 1.5 div)%
+ (! \@m@wd 2 div \@m@wd 2 div)%
+ (! \@m@wd 4 div \@m@wd)%
\else\ifx\psk@optexp@mirror@type\pst@string@mirror@type@extended%
- %
- % extended
- \psframe[style=ExtendedMirror]%
- (! m@width -2 div \psk@optexp@mirror@depth\space )%
- (! m@width 2 div 0)%
+ %
+ % extended
+ \psframe[style=ExtendedMirror]%
+ (! \@m@wd neg \psk@optexp@mirror@depth\space )%
+ (! \@m@wd 0)%
\fi\fi
- %
- % labelnode
- \pnode(0,0){tempNode@Label}
-}\ignorespaces}%
+ \fi\fi
+}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
+%
% LENS
%
-\def\pst@draw@lens{{%
+\def\lens@iii{%
+ %
+ % use old lens code to maintain backward compatibility
+ \ifx\psk@optexp@lens@type\@empty
+ % NEW CODE!
+ \begin@ClosedObj
+ \edef\@lens@wd{\psk@optexp@lens@width\space\pst@number\psxunit mul 2 div }%
+ \edef\@lens@ht{\psk@optexp@lens@height\space\pst@number\psyunit mul 2 div }%
+ \edef\@lens@rL{\psk@optexp@lens@radiusLeft\space\pst@number\psxunit mul }%
+ \edef\@lens@rR{\psk@optexp@lens@radiusRight\space\pst@number\psxunit mul }%
+ \edef\@lens@th{}%
+ \addto@pscode{\pst@optexpdict}%
+ %
+ % distinguish between all the different lens-combination possibilities
+ %
+ \ifdim\psk@optexp@lens@radiusLeft pt=0pt\else
+ \edef\@lens@th{\ifPst@optexp@thicklens \@lens@wd\else a1 \fi}%
+ \addto@pscode{%
+ \@lens@ht \@lens@rL
+ \ifdim\psk@optexp@lens@radiusLeft pt<0pt
+ leftConcave
+ \else
+ leftConvex
+ \fi
+ }%
+ \fi
+ \ifdim\psk@optexp@lens@radiusRight pt=0pt\else
+ \edef\@lens@th{\@lens@th\space\ifPst@optexp@thicklens \@lens@wd\else a2 \fi}%
+ \addto@pscode{%
+ \@lens@ht \@lens@rR
+ \ifdim\psk@optexp@lens@radiusRight pt<0pt
+ rightConcave
+ \else
+ rightConvex
+ \fi
+ }%
+ \fi
+ %
+ % check some special cases
+ %
+ % 1) Left is plain - right concave
+ % \- right convex
+ \ifdim\psk@optexp@lens@radiusLeft pt=0pt
+ \ifdim\psk@optexp@lens@radiusRight pt=0pt\else
+ \addto@pscode{\@lens@th 2 div sub neg 5 1 roll }%
+ \ifdim\psk@optexp@lens@radiusRight pt<0pt
+ \addto@pscode{%
+ \@lens@th 2 div neg \@lens@ht neg moveto ArcR
+ \@lens@th 2 div neg \@lens@ht lineto}%
+ \else
+ \addto@pscode{ArcR}%
+ \fi
+ \fi
+ \fi
+ %
+ %
+ % 2) Right is plain - left concave
+ % \- left convex
+ \ifdim\psk@optexp@lens@radiusRight pt=0pt
+ \ifdim\psk@optexp@lens@radiusLeft pt=0pt\else
+ \addto@pscode{\@lens@th 2 div sub 5 1 roll }%
+ \ifdim\psk@optexp@lens@radiusLeft pt<0pt
+ \addto@pscode{\@lens@th 2 div \@lens@ht moveto ArcL
+ \@lens@th 2 div \@lens@ht neg lineto }%
+ \else
+ \addto@pscode{ArcL }%
+ \fi
+ \fi
+ \fi
+ %
+ % 3) right and left are both curved
+ \ifdim\psk@optexp@lens@radiusRight pt=0pt\else
+ \ifdim\psk@optexp@lens@radiusLeft pt=0pt\else
+ \addto@pscode{%
+ \@lens@th\space add 2 div dup
+ 7 1 roll sub neg 5 1 roll
+ ArcR sub 5 1 roll ArcL }%
+ \fi
+ \fi
+ %
+ % now complete the object
+ \addto@pscode{closepath 1 setlinejoin end }%
+ \end@ClosedObj
+ %
+ % OLD CODE (compatibility)
+ \else
+ \pst@draw@lens
+ \fi
+\ignorespaces}%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
- \pstVerb{%
- /lens@h \psk@optexp@lens@height\space 2.0 div def
- }%
+% LENS (old) maintained for backward compatibility
+% used only if lensheight and lenswidth must be used to draw the lens
+% (i.e. when lensradius is not defined)
+%
+\def\pst@draw@lens{%
+%
+ \edef\@l@h{\psk@optexp@lens@height\space 2 div\space}%
+ \edef\@l@a{\psk@optexp@lens@width\space 2 div\space}%
%
\ifnum\psk@optexp@lens@type<3
- %
% CONVEX
- %
- % Use only parameters 'lenswidth' and 'lensheight' to draw the lens, if 'lensradius'
- % is not set
- %
- \ifx\psk@optexp@lens@radius\@empty
- \pstVerb{%
- /lens@a \psk@optexp@lens@width\space 2.0 div def
- /lens@r lens@a 2.0 div lens@h lens@h mul 2.0 lens@a mul div add def
- }%
- %
- % otherwise use 'lensradius' and 'lensheight'
- %
- \else
- \pstVerb{%
- /lens@r \psk@optexp@lens@radius\space def
- /lens@a lens@r lens@r 2 exp lens@h 2 exp sub sqrt sub def
- }%
- \fi%
- %
- % define some parameters only for convex lenses
- %
- \pstVerb{%
- /lens@d lens@r lens@a sub def
- /lens@alpha lens@h lens@d atan def
- /lens@yshift lens@d def
- }%
- \else
- %
- % CONCAVE
- %
- % All three parameters 'lensheight', 'lenswidth' and 'lensradius' are needed
- \pstVerb{%
- /lens@a \psk@optexp@lens@width\space 2.0 div def
- }%
- \ifx\psk@optexp@lens@radius\@empty
- \pstVerb{%
- /lens@r lens@h 1.5 mul def
- }%
+ \ifx\psk@optexp@lens@radius\@empty
+ \edef\@l@r{\@l@a 2 div \@l@h dup mul 2 \@l@a mul div add\space}%
+ \else
+ \edef\@l@r{\psk@optexp@lens@radius\space}%
+ \edef\@l@a{\@l@r dup dup mul \@l@h dup mul sub sqrt sub\space}%
+ \fi
+ %
+ % define some parameters only for convex lenses
+ \edef\@l@d{\@l@r \@l@a sub\space}%
+ \edef\@l@alpha{\@l@h \@l@d atan\space}%
+ \edef\@l@y{\@l@d\space}%
\else
- \pstVerb{%
- /lens@r \psk@optexp@lens@radius\space def
- }%
- \fi%
- %
- % define some parameters only for concave lenses
- %
- \pstVerb{%
- /lens@d lens@r dup mul lens@h dup mul sub sqrt def
- /lens@alpha lens@h lens@d atan def
- /lens@yshift lens@r lens@a add def
- }%
+ % CONCAVE
+ \ifx\psk@optexp@lens@radius\@empty
+ \edef\@l@r{\@l@h 1.5 mul\space}%
+ \else
+ \edef\@l@r{\psk@optexp@lens@radius\space}%
+ \fi%
+ %
+ % define some parameters only for concave lenses
+ \edef\@l@d{\@l@r dup mul \@l@h dup mul sub sqrt\space}%
+ \edef\@l@alpha{\@l@h \@l@d atan\space}%
+ \edef\@l@y{\@l@r \@l@a add\space}%
\fi%
%
%
\def\temp@LeftPlot{%
\parametricplot[liftpen=1]{-1}{1}{%
- lens@r lens@alpha t mul 180 add cos mul lens@yshift add lens@r lens@alpha t mul 180 add sin mul}%
+ \@l@r \@l@alpha t mul 180 add cos mul \@l@y add \@l@r \@l@alpha t mul 180 add sin mul}%
}%
\def\temp@RightPlot{%
\parametricplot[liftpen=1]{-1}{1}{%
- lens@r lens@alpha t mul cos mul lens@yshift sub lens@r lens@alpha t mul sin mul}%
+ \@l@r \@l@alpha t mul cos mul \@l@y sub \@l@r \@l@alpha t mul sin mul}%
}%
%
%
@@ -767,22 +918,22 @@
\closepath%
\or
% biconvex
- \temp@LeftPlot%
+ \temp@LeftPlot%
\temp@RightPlot%
\closepath
\or
% plainconcave
\temp@LeftPlot%
- \psline[liftpen=1](! 0 lens@h neg)%
- (! 0 lens@h)%
- (! lens@r lens@d sub lens@a add lens@h)%
+ \psline[liftpen=1](! 0 \@l@h neg)%
+ (! 0 \@l@h)%
+ (! \@l@r \@l@d sub \@l@a add \@l@h)%
\closepath
\or%
% concaveplain
\temp@RightPlot%
- \psline[liftpen=1](! 0 lens@h)%
- (! 0 lens@h neg)%
- (! lens@r lens@d sub lens@a add neg lens@h neg)%
+ \psline[liftpen=1](! 0 \@l@h)%
+ (! 0 \@l@h neg)%
+ (! \@l@r \@l@d sub \@l@a add neg \@l@h neg)%
\closepath
\or
% biconcave
@@ -791,99 +942,106 @@
\closepath
\fi
}%
- %
- % labelnode
- \pnode(0,0){tempNode@Label}
-}\ignorespaces}%
+\ignorespaces}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% PINHOLE
%
-\def\pst@draw@pinhole{{%
+\def\pinhole@iii{%
\psline[linewidth=\psk@optexp@pinhole@linewidth]%
(! 0 \psk@optexp@pinhole@oheight\space 2 div)%
(! 0 \psk@optexp@pinhole@iheight\space 2 div)%
\psline[linewidth=\psk@optexp@pinhole@linewidth]%
(! 0 \psk@optexp@pinhole@oheight\space -2 div)%
(! 0 \psk@optexp@pinhole@iheight\space -2 div)%
- %
- % labelnode
- \pnode(0,0){tempNode@Label}
-}\ignorespaces}
+\ignorespaces}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% BEAMSPLITTER
%
-\def\pst@draw@beamsplitter{{%
- \pstVerb{%
- /bs@width \psk@optexp@bssize\space 2.0 div def
- }%
- \psline{cc-cc}(! bs@width neg 2 sqrt mul 0)%
- (! bs@width 2 sqrt mul 0)
- \rput[c]{45}(0,0){\psframe(! bs@width neg bs@width neg)(! bs@width bs@width)}
- %
- % labelnode
- \pnode(0,0){tempNode@Label}
-}\ignorespaces}%
+\def\beamsplitter@iii{%
+ \edef\@bs@wd{\psk@optexp@bssize\space 2.0 div\space}%
+ \psline{cc-cc}(! \@bs@wd neg 2 sqrt mul 0)(! \@bs@wd 2 sqrt mul 0)
+ \rput[c]{45}(0,0){\psframe(! \@bs@wd neg \@bs@wd neg)(! \@bs@wd \@bs@wd)}
+\ignorespaces}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% CRYSTAL
%
-\def\pst@draw@crystal{{%
- \rput[c]{\psk@optexp@angle}(0,0){%
- \pstVerb{%
- /c@width \psk@optexp@crystal@width\space 2 div def
- /c@height \psk@optexp@crystal@height\space 2 div def
- /c@caxisL \psk@optexp@crystal@caxislength\space 2 div def}%
- \psframe(! c@width neg c@height neg)(! c@width c@height)
- \ifPst@optexp@crystal@voltage%
- \psline(! c@width 4 div 3 mul neg c@height)%
- (! c@width 4 div 3 mul neg c@height 0.2 add)
- \pscircle[fillstyle=solid,%
- fillcolor=white](! c@width 4 div 3 mul neg c@height 0.2 add){0.04}
- \psline(! c@width 4 div 3 mul neg c@height neg)%
- (! c@width 4 div 3 mul neg c@height neg 0.2 sub)%
- \psline(! c@width 4 div 3 mul neg 0.15 sub c@height neg 0.2 sub)%
- (! c@width 4 div 3 mul neg 0.15 add c@height neg 0.2 sub)%
- \fi
- %
- \ifPst@optexp@crystal@lamp
- \rput{180}(! c@width c@height 1.4 \psk@optexp@lamp@scale\space mul add){\lamp}%
- \fi
- \ifPst@optexp@crystal@caxisinv
- %
- % invert the c-axis
- \psline[linestyle=dashed,%
- dash=2pt 2pt,%
- linewidth=0.7\pslinewidth,%
- arrowinset=0]{->}%
- (! 0 c@height neg)(! 0 c@height c@caxisL add)%
- \else
- \psline[linestyle=dashed,%
- dash=2pt 2pt,%
- linewidth=0.7\pslinewidth,%
- arrowinset=0]{->}%
- (! 0 c@height)(! 0 c@height neg c@caxisL sub)%
- \fi
+\def\crystal@iii{%
+ \edef\@c@wd{\psk@optexp@crystal@width\space 2 div\space}%
+ \edef\@c@ht{\psk@optexp@crystal@height\space 2 div\space}%
+ \rput[c]{\psk@optexp@angle}(0,0){%
+ \psframe(! \@c@wd neg \@c@ht neg)(! \@c@wd \@c@ht)
+ \ifPst@optexp@crystal@voltage%
+ \psline(! \@c@wd 4 div 3 mul neg \@c@ht)%
+ (! \@c@wd 4 div 3 mul neg \@c@ht 0.2 add)
+ \pscircle[fillstyle=solid,%
+ fillcolor=white](! \@c@wd 4 div 3 mul neg \@c@ht 0.2 add){0.04}
+ \psline(! \@c@wd 4 div 3 mul neg \@c@ht neg)%
+ (! \@c@wd 4 div 3 mul neg \@c@ht neg 0.2 sub)%
+ \psline(! \@c@wd 4 div 3 mul neg 0.15 sub \@c@ht neg 0.2 sub)%
+ (! \@c@wd 4 div 3 mul neg 0.15 add \@c@ht neg 0.2 sub)%
+ \fi
+ %
+ \ifPst@optexp@crystal@lamp
+ \rput{180}(! \@c@wd \@c@ht 1.4 \psk@optexp@lamp@scale\space mul add){\lamp}%
+ \fi
+ % plot c-axis only, if caxislength > 0
+ \ifdim\psk@optexp@crystal@caxislength pt>0pt
+ \edef\@c@caxisL{\psk@optexp@crystal@caxislength\space 2 div\space}%
+ \ifPst@optexp@crystal@caxisinv
+ %
+ % invert the c-axis
+ \psline[linestyle=dashed,%
+ dash=2pt 2pt,%
+ linewidth=0.7\pslinewidth,%
+ arrowinset=0]{->}%
+ (! 0 \@c@ht neg)(! 0 \@c@ht \@c@caxisL add)%
+ \else
+ \psline[linestyle=dashed,%
+ dash=2pt 2pt,%
+ linewidth=0.7\pslinewidth,%
+ arrowinset=0]{->}%
+ (! 0 \@c@ht)(! 0 \@c@ht neg \@c@caxisL sub)%
+ \fi
+ \fi
}%
- %
- % labelnode
- \pnode(0,0){tempNode@Label}
-}\ignorespaces}%
+\ignorespaces}%
+%
+% LAMP FOR THE CRYSTAL
+%
+\def\lamp{%
+ \psset{linewidth=0.6\pslinewidth}
+ \edef\@l@s{\psk@optexp@lamp@scale\space}%
+ %
+ \pscurve[fillstyle=none](! -0.05 \@l@s mul 0)%
+ (! -0.1 \@l@s mul 0.15 \@l@s mul)%
+ (! -0.2 \@l@s mul 0.25 \@l@s mul)%
+ (! -0.25 \@l@s mul 0.5 \@l@s mul)%
+ (! 0 0.7 \@l@s mul)%
+ (! 0.25 \@l@s mul 0.5 \@l@s mul)%
+ (! 0.2 \@l@s mul 0.25 \@l@s mul)%
+ (! 0.1 \@l@s mul 0.15 \@l@s mul)%
+ (! 0.05 \@l@s mul 0)
+ \multido{\i=-210+40}{7}{%
+ \rput{\i}(! 0 0.45 \@l@s mul){\psline(! -0.35 \@l@s mul 0)(! -0.6 \@l@s mul 0)}
+ }
+\ignorespaces}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% POLARIZATION
%
-\def\pst@draw@polarization{{%
+\def\polarization@iii{%
%
+ \edef\@pol@size{\psk@optexp@polarization@size\space 2 div\space}%
\ifx\psk@optexp@pol@type\pst@string@pol@polparallel
\psline[linestyle=solid,linewidth=\psk@optexp@polarization@linewidth,arrowscale=0.8]{<->}%
- (! 0 \psk@optexp@polarization@size\space 2 div neg)%
- (! 0 \psk@optexp@polarization@size\space 2 div)%
+ (! 0 \@pol@size neg)(! 0 \@pol@size)%
\fi
\ifx\psk@optexp@pol@type\pst@string@pol@polperp
\psdot[dotsize=0.05](0,0)%
@@ -891,147 +1049,115 @@
\fi
\ifx\psk@optexp@pol@type\pst@string@pol@polmisc
\psline[linestyle=solid,linewidth=\psk@optexp@polarization@linewidth,arrowscale=0.8]{<->}%
- (! 0 \psk@optexp@polarization@size\space 2 div neg)%
- (! 0 \psk@optexp@polarization@size\space 2 div)%
+ (! 0 \@pol@size neg)(! 0 \@pol@size)%
\psdot[dotsize=0.05](0,0)%
- \pscircle[fillstyle=none,linestyle=solid,linewidth=0.7\pslinewidth](0,0){0.12}
+ \pscircle[fillstyle=none,linestyle=solid,linewidth=0.7\pslinewidth](0,0){0.12}%
\fi
\ifx\psk@optexp@pol@type\pst@string@pol@polrcirc
- \psellipticarc[linewidth=\psk@optexp@polarization@linewidth]{->}(0,0)(!
- \psk@optexp@polarization@size\space 4 div
- \psk@optexp@polarization@size\space 2 div)%
- {20}{-20}
+ \psellipticarc[linewidth=\psk@optexp@polarization@linewidth]{->}%
+ (0,0)(! \@pol@size 2 div \@pol@size){20}{-20}%
\fi
\ifx\psk@optexp@pol@type\pst@string@pol@pollcirc
- \psellipticarc[linewidth=\psk@optexp@polarization@linewidth]{<-}(0,0)(!
- \psk@optexp@polarization@size\space 4 div
- \psk@optexp@polarization@size\space 2 div)%
- {20}{-20}
+ \psellipticarc[linewidth=\psk@optexp@polarization@linewidth]{<-}%
+ (0,0)(! \@pol@size 2 div \@pol@size){20}{-20}
\fi
- \pnode(0,0){tempNode@Label}
-}\ignorespaces}%
+\ignorespaces}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% OPTICAL GRID
%
-\def\pst@draw@optgrid{{%
- \pstVerb{%
- /g@count \psk@optexp@optgrid@count\space def
- /g@width \psk@optexp@optgrid@width\space 2 div def
- /g@height \psk@optexp@optgrid@height\space def
- /g@depth \psk@optexp@optgrid@depth\space def
- /g@step g@width 2 mul g@count div def}%
- \ifPst@optexp@reverse%
+\def\optgrid@iii{%
+ \edef\@g@cnt{\psk@optexp@optgrid@count\space}%
+ \edef\@g@wd{\psk@optexp@optgrid@width\space 2 div\space}%
+ \edef\@g@ht{\psk@optexp@optgrid@height\space}%
+ \edef\@g@dp{\psk@optexp@optgrid@depth\space}%
+ \edef\@g@step{\psk@optexp@optgrid@width\space\@g@cnt div\space}%
+ \ifx\psk@optexp@optgrid@type\pst@string@optgrid@type@blazed
+ \ifPst@optexp@reverse%
+ \pscustom[linewidth=\psk@optexp@optgrid@linewidth]{%
+ \psline[liftpen=1](! \@g@wd \@g@dp)(! \@g@wd \@g@ht)%
+ (! \@g@wd neg \@g@ht)(! \@g@wd neg \@g@dp)
+ \multido{\i=0+1}{\psk@optexp@optgrid@count}{%
+ \psline[liftpen=1](! \@g@wd neg \i\space \@g@step mul add \@g@dp)%
+ (! \@g@wd neg \i\space \@g@step mul add 0)%
+ (! \@g@wd neg \i\space 1 add \@g@step mul add \@g@dp)%
+ }%
+ \closepath
+ }%
+ \else%
+ \pscustom[linewidth=\psk@optexp@optgrid@linewidth]{%
+ \psline[liftpen=1](! \@g@wd \@g@dp)(! \@g@wd \@g@ht)%
+ (! \@g@wd neg \@g@ht)(! \@g@wd neg \@g@dp)
+ \multido{\i=0+1}{\psk@optexp@optgrid@count}{%
+ \psline[liftpen=1](! \@g@wd neg \i\space \@g@step mul add \@g@dp)%
+ (! \@g@wd neg \i\space 1 add \@g@step mul add 0)%
+ (! \@g@wd neg \i\space 1 add \@g@step mul add \@g@dp)%
+ }%
+ \closepath
+ }%
+ \fi%
+ \else\ifx\psk@optexp@optgrid@type\pst@string@optgrid@type@binary
\pscustom[linewidth=\psk@optexp@optgrid@linewidth]{%
- \psline[liftpen=1](! g@width g@depth)(! g@width g@height)%
- (! g@width neg g@height)(! g@width neg g@depth)
+ \psline[liftpen=1](! \@g@wd \@g@dp)(! \@g@wd \@g@ht)%
+ (! \@g@wd neg \@g@ht)(! \@g@wd neg \@g@dp)
\multido{\i=0+1}{\psk@optexp@optgrid@count}{%
- \psline[liftpen=1](! g@width neg \i\space g@step mul add g@depth)%
- (! g@width neg \i\space g@step mul add 0)%
- (! g@width neg \i\space 1 add g@step mul add g@depth)%
- }
- \closepath
+ \psline[liftpen=1](! \@g@wd neg \i\space \@g@step mul add \@g@dp)%
+ (! \@g@wd neg \i\space \@g@step mul add 0)%
+ (! \@g@wd neg \i\space 0.5 add \@g@step mul add 0)%
+ (! \@g@wd neg \i\space 0.5 add \@g@step mul add \@g@dp)%
+ (! \@g@wd neg \i\space 1 add \@g@step mul add \@g@dp)%
+ }%
}%
- \else%
- \pscustom[linewidth=\psk@optexp@optgrid@linewidth]{%
- \psline[liftpen=1](! g@width g@depth)(! g@width g@height)%
- (! g@width neg g@height)(! g@width neg g@depth)
- \multido{\i=0+1}{\psk@optexp@optgrid@count}{%
- \psline[liftpen=1](! g@width neg \i\space g@step mul add g@depth)%
- (! g@width neg \i\space 1 add g@step mul add 0)%
- (! g@width neg \i\space 1 add g@step mul add g@depth)%
- }
- \closepath
- }%
- \fi%
- %
- % labelnode
- \pnode(0,0){tempNode@Label}
-}\ignorespaces}%
+ \fi\fi
+\ignorespaces}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% OPTBOX
%
-\def\pst@draw@optbox{{%
- \pstVerb{%
- /box@width \psk@optexp@optbox@width\space def
- /box@height \psk@optexp@optbox@height\space def
- }%
+\def\optbox@iii{%
+ \edef\@b@wd{\psk@optexp@optbox@width\space 2 div\space}%
+ \edef\@b@ht{\psk@optexp@optbox@height\space 2 div\space}%
\ifPst@optexp@endbox
- \pnode(! box@width 2 div 0){tempNode@Label}%
- \psframe(! 0 box@height 2 div neg)%
- (! box@width box@height 2 div)%
+ \pnode(! \@b@wd 0){tempNode@Label}%
+ \psframe(! 0 \@b@ht neg)(! \@b@wd 2 mul \@b@ht)%
\else
- \pnode(0,0){tempNode@Label}%
\rput{\psk@optexp@angle}(0,0){%
- \psframe(! box@width 2 div neg box@height 2 div neg)%
- (! box@width 2 div box@height 2 div)%
+ \psframe(! \@b@wd neg \@b@ht neg)(! \@b@wd \@b@ht)%
}%
\fi
-}\ignorespaces}%
+\ignorespaces}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% OPTPLATE
%
-\def\pst@draw@optplate{{%
+\def\optplate@iii{%
\psline[linewidth=\psk@optexp@plate@linewidth]%
(! 0 \psk@optexp@plate@height\space 2 div neg)%
(! 0 \psk@optexp@plate@height\space 2 div)
- %
- % labelnode
- \pnode(0,0){tempNode@Label}
-}\ignorespaces}%
+\ignorespaces}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% DETECTOR
%
-\def\pst@draw@detector{{%
+\def\detector@iii{%
\pnode(! \psk@optexp@detector@size\space 3 div 0){tempNode@Label}%
\pswedge(0,0){\psk@optexp@detector@size}{-90}{90}
-}\ignorespaces}%
+\ignorespaces}%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% OPTRETPLATE
%
-\def\pst@draw@optretplate{{%
- \pstVerb{%
- /orp@height \psk@optexp@plate@height\space 2.0 div def
- /orp@width \psk@optexp@plate@width\space 2.0 div def
- }%
- \psframe(! orp@width neg orp@height neg)(! orp@width orp@height)
- \psline{cc-cc}(! orp@width neg orp@height)%
- (! orp@width orp@height neg)
- %
- % labelnode
- \pnode(0,0){tempNode@Label}
-}\ignorespaces}%
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% LAMP FOR THE CRYSTAL
-%
-\def\lamp{{%
- \psset{linewidth=0.6\pslinewidth}
- \pstVerb{/l@s \psk@optexp@lamp@scale\space def}
- %
- \pscurve[fillstyle=none](! -0.05 l@s mul 0)%
- (! -0.1 l@s mul 0.15 l@s mul)%
- (! -0.2 l@s mul 0.25 l@s mul)%
- (! -0.25 l@s mul 0.5 l@s mul)%
- (! 0 0.7 l@s mul)%
- (! 0.25 l@s mul 0.5 l@s mul)%
- (! 0.2 l@s mul 0.25 l@s mul)%
- (! 0.1 l@s mul 0.15 l@s mul)%
- (! 0.05 l@s mul 0)
- \multido{\i=-210+40}{7}{%
- \rput{\i}(! 0 0.45 l@s mul){\psline(! -0.35 l@s mul 0)(! -0.6 l@s mul 0)}
- }
-}\ignorespaces}%
+\def\optretplate@iii{%
+ \edef\@p@ht{\psk@optexp@plate@height\space 2 div\space}%
+ \edef\@p@wd{\psk@optexp@plate@width\space 2 div\space}%
+ \psframe(! \@p@wd neg \@p@ht neg)(! \@p@wd \@p@ht)
+ \psline{cc-cc}(! \@p@wd neg \@p@ht)(! \@p@wd \@p@ht neg)
+\ignorespaces}%
%
%
\endinput