diff options
author | Karl Berry <karl@freefriends.org> | 2007-09-07 16:07:17 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-09-07 16:07:17 +0000 |
commit | 62907d4567f97a766b735ecd6e74d3cdc6ac26dd (patch) | |
tree | c6378f54d8c2d0ea1fcff315e747bb3acf4e737a /Master | |
parent | a66f8b2dae859fa7ec9dcb66a6aa71da77853283 (diff) |
pst-optexp 1.1 (6sep07)
git-svn-id: svn://tug.org/texlive/trunk@4902 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-optexp/Changes | 28 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-optexp/README | 5 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-optexp/doc/pst-optexp-doc.pdf | bin | 259301 -> 235707 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-optexp/doc/pst-optexp-doc.tex | 495 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-optexp/pst-optexp.tex | 576 |
5 files changed, 656 insertions, 448 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-optexp/Changes b/Master/texmf-dist/doc/generic/pst-optexp/Changes new file mode 100644 index 00000000000..00eb1612a0b --- /dev/null +++ b/Master/texmf-dist/doc/generic/pst-optexp/Changes @@ -0,0 +1,28 @@ +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. + + * parameter labelrelative is now obsolete, and replaced by + labelref=relative. It will be removed in future versions. + + * 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 reasons. + The old notation is obsolete and will be removed in future versions. + + * fixed bug: filling of all components with 'fillstyle' is now possible. + + * fixed bug: 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 742e2d4d270..66b14b7368a 100644 --- a/Master/texmf-dist/doc/generic/pst-optexp/README +++ b/Master/texmf-dist/doc/generic/pst-optexp/README @@ -4,11 +4,12 @@ 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.0, the first official release. +This is version 1.1 +For a changelog see file Changes 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/7/18 +Christoph Bersch 2007/09/06 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 Binary files differindex bf4dcb67978..059a347891c 100644 --- 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 diff --git a/Master/texmf-dist/doc/generic/pst-optexp/doc/pst-optexp-doc.tex b/Master/texmf-dist/doc/generic/pst-optexp/doc/pst-optexp-doc.tex index 76e8b330781..9b72403b80d 100644 --- a/Master/texmf-dist/doc/generic/pst-optexp/doc/pst-optexp-doc.tex +++ b/Master/texmf-dist/doc/generic/pst-optexp/doc/pst-optexp-doc.tex @@ -7,7 +7,6 @@ \usepackage{scrpage2} \usepackage{url} % -\usepackage{pstricks} \usepackage{pst-optexp} \let\verPstOptExp\fileversion \let\datePstOptExp\filedate @@ -17,6 +16,7 @@ \usepackage{nicefrac} \usepackage{graphicx} \usepackage[colorlinks,linktocpage]{hyperref} +\usepackage{xspace} % % New commands % @@ -24,12 +24,11 @@ \newcommand{\OptExpPackage}{\textsf{`pst-optexp'}} \newcommand{\parameter}[1]{\texttt{#1}} \let\param\textrm -\def\@UrlFont{\small\ttfamily} +\newcommand{\defaultparam}{\emph{default:}\xspace} % % Settings \setkomafont{sectioning}{\normalfont\normalcolor\bfseries} -\setcounter{tocdepth}{2} % \makeatletter \renewenvironment{description} @@ -39,7 +38,6 @@ {\endlist} \makeatother % -% Kopfzeile mit scrpage2 definieren \clearscrheadfoot \setheadsepline{0.4pt} \ihead{\OptExpPackage}\ohead{A PSTricks package to draw optical experimental setups} @@ -65,11 +63,12 @@ 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. +orientation of the elements. Macros for using user-defined components +are also provided. \section{Components} -In the following sections \ref{sec:mirror}--\ref{sec:custom} the +In the sections \ref{sec:lens}--\ref{sec:custom} the available components with their parameters are described. Up to now there are two types of components: those which require two reference points and do not alter the direction of the passing light beam (for @@ -77,18 +76,26 @@ example lenses and retardation plates) and those which work in reflection and require three reference points (mirrors, grids, beamsplitters etc.). -In section \ref{sec:general} general parameters are described that are not proprietary -to a specific unit but can be used for several different components. Finally, in -section \ref{sec:labels} the options for the positioning of labels are -explained. +In section \ref{sec:general} general parameters are described that are +not proprietary to a specific unit but can be used for several different +components. Finally, in section \ref{sec:labels} the options for the +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 +components and can be redefined using \cs{newpsstyle}. \subsection{Lens}\label{sec:lens} \begin{description} -\item[\param{lensheight} (dimension):] (\emph{default:~\texttt{1}}) -\item[\param{lenswidth} (dimension):] (\emph{default:~\texttt{0.3}}) -\item[\param{lenstype} (plainconvex, plainconcave, convexplain, concaveplain, biconvex, biconcave):] (\emph{default:~\texttt{biconvex}}) -\item[\param{lensradius} (dimension):] (\emph{default:~\texttt{\cs{empty}}}) +\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}) \end{description} For the convex lenses only two parameters are used. If the @@ -96,86 +103,89 @@ 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 needed. +are required. \medskip \begin{LTXexample}[width=3.5cm] -\begin{pspicture}(3,3)\psgrid - \pnode(0,2){A} - \pnode(3,1){B} +\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} + \lens[lenstype=plainconvex](A)(B){lens} \end{pspicture} \end{LTXexample} \bigskip \begin{LTXexample}[width=3.5cm] -\begin{pspicture}(3,3)\psgrid - \pnode(0,2){A} - \pnode(3,1){B} +\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} + \lens[lenstype=convexplain](A)(B){lens} \end{pspicture} \end{LTXexample} \bigskip \begin{LTXexample}[width=3.5cm] -\begin{pspicture}(3,3)\psgrid - \pnode(0,2){A} - \pnode(3,1){B} +\begin{pspicture}(3,2)\psgrid + \pnode(0,1.8){A} + \pnode(3,0.7){B} \psline[linecolor=green](A)(B) - \lens(A)(B){Lens} + \lens(A)(B){lens} \end{pspicture} \end{LTXexample} \bigskip \begin{LTXexample}[width=3.5cm] -\begin{pspicture}(3,3)\psgrid - \pnode(0,2){A} - \pnode(3,1){B} +\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} + \lens[lenstype=plainconcave](A)(B){lens} \end{pspicture} \end{LTXexample} \bigskip \begin{LTXexample}[width=3.5cm] -\begin{pspicture}(3,3)\psgrid - \pnode(0,2){A} - \pnode(3,1){B} +\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} + \lens[lenstype=concaveplain](A)(B){lens} \end{pspicture} \end{LTXexample} \bigskip \begin{LTXexample}[width=3.5cm] -\begin{pspicture}(3,3)\psgrid - \pnode(0,2){A} - \pnode(3,1){B} +\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](A)(B){Lens} + \lens[lenstype=biconcave, + fillstyle=solid, + fillcolor=lensColor](A)(B){lens} \end{pspicture} \end{LTXexample} \medskip -\subsection{General plate} +\subsection{Optical plate} \begin{description} -\item[\param{plateheight} (dimension):] (\emph{default:~\texttt{1}}) -\item[\param{platelinewidth} (dimension):] (\emph{default:~\texttt{2\cs{pslinewidth}}}) +\item[\param{plateheight} (dimension):] (\defaultparam 1) +\item[\param{platelinewidth} (dimension):] (\defaultparam 2\cs{pslinewidth}) \end{description} \medskip \begin{LTXexample}[width=3.5cm] -\begin{pspicture}(3,3)\psgrid - \pnode(0,1.5){A} - \pnode(3,1.5){B} +\begin{pspicture}(3,2)\psgrid + \pnode(0,1.2){A} + \pnode(3,1.2){B} \psline[linecolor=green](A)(B) \optplate(A)(B){filter} \end{pspicture} @@ -186,16 +196,16 @@ are needed. \subsection{Retardation plate} \begin{description} -\item[\param{plateheight} (dimension):] (\emph{default:~\texttt{1}}) -\item[\param{platewidth} (dimension):] (\emph{default:~\texttt{0.1}}) +\item[\param{plateheight} (dimension):] (\defaultparam 1) +\item[\param{platewidth} (dimension):] (\defaultparam 0.1) \end{description} \medskip \begin{LTXexample}[width=3.5cm] -\begin{pspicture}(3,3)\psgrid - \pnode(0,1.5){A} - \pnode(3,1.5){B} +\begin{pspicture}(3,2)\psgrid + \pnode(0,1.2){A} + \pnode(3,1.2){B} \psline[linecolor=green](A)(B) \optretplate(A)(B){$\nicefrac{\lambda}{2}$} \end{pspicture} @@ -206,17 +216,17 @@ are needed. \subsection{Pinhole} \begin{description} -\item[\param{phlinewidth} (dimension):] (\emph{default~\texttt{2\cs{pslinewidth}}}) -\item[\param{owidth} (dimension):] (\emph{default:~\texttt{1}}) -\item[\param{iwidth} (dimension):] (\emph{default:~\texttt{0.1}}) +\item[\param{outerheight} (dimension):] (\defaultparam 1) +\item[\param{innerheight} (dimension):] (\defaultparam 0.1) +\item[\param{phlinewidth} (dimension):] (\defaultparam 2\cs{pslinewidth}) \end{description} \medskip \begin{LTXexample}[width=3.5cm] -\begin{pspicture}(3,3)\psgrid - \pnode(0,1.5){A} - \pnode(3,1.5){B} +\begin{pspicture}(3,2)\psgrid + \pnode(0,1.2){A} + \pnode(3,1.2){B} \psline[linecolor=green](A)(B) \pinhole(A)(B){PH} \end{pspicture} @@ -227,28 +237,29 @@ are needed. \subsection{Crystal} \begin{description} -\item[\param{crystalwidth} (dimension):] (\emph{default:~\texttt{2}}) -\item[\param{crystalheight} (dimension):] (\emph{default:~\texttt{0.8}}) -\item[\param{caxislength} (dimension):] (\emph{default:~\texttt{0.6}}) -\item[\param{caxisinv} (boolean):] (\emph{default:~\texttt{false}}) -\item[\param{voltage} (boolean):] (\emph{default:~\texttt{false}}) -\item[\param{lamp} (boolean):] (\emph{default:~\texttt{false}}) -\item[\param{lampscale} (real):] (\emph{default:~\texttt{0.3}}) +\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) \end{description} \medskip \begin{LTXexample}[width=3.5cm] -\begin{pspicture}(3,3)\psgrid - \pnode(0,1.5){A} - \pnode(3,1.5){B} - \crystal[crystalwidth=1.5,% - crystalheight=0.6,% - fillstyle=solid,% - fillcolor=yellow!90!black,% - labelangle=-45,% - voltage,% - lamp](A)(B){SBN} +\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) \end{pspicture} \end{LTXexample} @@ -258,41 +269,41 @@ are needed. \subsection{Box} \begin{description} -\item[\param{optboxheight} (dimension):] (default:~\texttt{0.5}) -\item[\param{optboxwidth} (dimension):] (default:~\texttt{1}) -\item[\param{endbox} (boolean):] (default: \texttt{false}) +\item[\param{optboxheight} (dimension):] (\defaultparam 0.5) +\item[\param{optboxwidth} (dimension):] (\defaultparam 1) +\item[\param{endbox} (boolean):] (\defaultparam \texttt{false}) \end{description} \medskip \begin{LTXexample}[width=3.5cm] -\begin{pspicture}(3,3)\psgrid +\begin{pspicture}(3,2)\psgrid \pnode(0,0){A} \pnode(3,2){B} \psline[linecolor=green](A)(B) - \optbox[labeloffset=-1](A)(B){Box} + \optbox(A)(B){box} \end{pspicture} \end{LTXexample} \bigskip \begin{LTXexample}[width=3.5cm] -\begin{pspicture}(3,3)\psgrid +\begin{pspicture}(3,2)\psgrid \pnode(0,0){A} - \pnode(2,2){B} + \pnode(1.7,1){B} \psline[linecolor=green](A)(B) - \optbox[endbox,labeloffset=1,labelangle=180](A)(B){Box} + \optbox[endbox](A)(B){box} \end{pspicture} \end{LTXexample} \bigskip \begin{LTXexample}[width=3.5cm] -\begin{pspicture}(3,3)\psgrid +\begin{pspicture}(3,2)\psgrid \pnode(0,0){A} - \pnode(2,2){B} + \pnode(1.7,1){B} \psline[linecolor=green](A)(B) - \optbox[endbox,labelrelative](A)(B){Box} + \optbox[endbox,labelref=relative,labeloffset=0](A)(B){box} \end{pspicture} \end{LTXexample} @@ -301,66 +312,58 @@ are needed. \subsection{Detector} \begin{description} -\item[\param{detsize} (dimension):] (default: \texttt{0.5}) +\item[\param{detsize} (dimension):] (\defaultparam 0.5) \end{description} \medskip \begin{LTXexample}[width=3.5cm] -\begin{pspicture}(3,3)\psgrid +\begin{pspicture}(3,2)\psgrid \pnode(0,0){A} - \pnode(2,1){B} + \pnode(1.7,1){B} \psline[linecolor=green](A)(B) - \detector[labeloffset=-1](A)(B){detector} + \detector(A)(B){detector} \end{pspicture} \end{LTXexample} \medskip -\subsection{Polarisation} +\subsection{Polarization} \begin{description} -\item[\param{pol} (parallel,perp,misc,lcirc,rcirc):] (\emph{default:~\texttt{parallel}}) -\item[\param{polwidth} (dimension):] (\emph{default:~\texttt{0.6}}) +\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}) \end{description} \medskip -\begin{LTXexample}[width=3.5cm] -\begin{pspicture}(3,3.2)\psgrid - \pnode(0,0.4){A1}\pnode(3,0.4){B1} - \pnode(0,1){A2}\pnode(3,1){B2} - \pnode(0,1.6){A3}\pnode(3,1.6){B3} - \pnode(0,2.2){A4}\pnode(3,2.2){B4} - \pnode(0,2.8){A5}\pnode(3,2.8){B5} - \psline[linecolor=green](A1)(B1) - \psline[linecolor=green](A2)(B2) - \psline[linecolor=green](A3)(B3) - \psline[linecolor=green](A4)(B4) - \psline[linecolor=green](A5)(B5) - \polarisation[pol=misc,position=0.2](A5)(B5) - \polarisation[pol=perp,position=0.35](A4)(B4) - \polarisation[pol=parallel,position=0.5](A3)(B3) - \polarisation[pol=rcirc,position=0.65](A2)(B2) - \polarisation[pol=lcirc,position=0.8](A1)(B1) +\begin{LTXexample}[width=3.4cm] +\begin{pspicture}(3,5)\psgrid + \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} + \multido{\i=1+1}{5}{\psline(A\i)(B\i)} + \psset{linecolor=black} + \polarization[poltype=misc,position=0.2](A5)(B5) + \polarization[poltype=perp,position=0.35](A4)(B4) + \polarization[poltype=parallel,position=0.5](A3)(B3) + \polarization[poltype=rcirc,position=0.65](A2)(B2) + \polarization[poltype=lcirc,position=0.8](A1)(B1) \end{pspicture} \end{LTXexample} \medskip -% -% -% MIRROR -% -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \subsection{Mirror}\label{sec:mirror} \begin{description} -\item[\param{mirrorwidth} (dimension):] (\emph{default:~\texttt{1}}) -\item[\param{mirrorlinewidth} (dimension):] (\emph{default:~\texttt{0.7\cs{pslinewidth}}}) -\item[\param{mirrortype} (normal,piezo,extended):] (\emph{default:~\texttt{normal}}) -\item[\param{mirrordepth} (dimension):] (\emph{default:~\texttt{0.08}}) -\item[\param{variable} (boolean):] (\emph{default:~\texttt{false}}) +\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}) \end{description} The style of the extended mirror is defined as a @@ -373,10 +376,10 @@ changed by adapting the psstyle \parameter{PiezoMirror}. \begin{LTXexample}[width=3.5cm] \begin{pspicture}(3,3)\psgrid \pnode(0,0){A} - \pnode(2,2){G} + \pnode(1.8,2.2){G} \pnode(0,3){B} \psline[linecolor=green](A)(G)(B) - \mirror(A)(G)(B){Mirror} + \mirror(A)(G)(B){mirror} \end{pspicture} \end{LTXexample} @@ -385,10 +388,10 @@ changed by adapting the psstyle \parameter{PiezoMirror}. \begin{LTXexample}[width=3.5cm] \begin{pspicture}(3,3)\psgrid \pnode(0,0){A} - \pnode(2,2){G} + \pnode(1.8,2.2){G} \pnode(0,3){B} \psline[linecolor=green](A)(G)(B) - \mirror[variable](A)(G)(B){Mirror} + \mirror[variable](A)(G)(B){M$_\mathrm{var}$} \end{pspicture} \end{LTXexample} @@ -397,10 +400,10 @@ changed by adapting the psstyle \parameter{PiezoMirror}. \begin{LTXexample}[width=3.5cm] \begin{pspicture}(3,3)\psgrid \pnode(0,0){A} - \pnode(2,2){G} + \pnode(1.8,2.2){G} \pnode(0,3){B} \psline[linecolor=green](A)(G)(B) - \mirror[mirrortype=piezo](A)(G)(B){Piezo} + \mirror[mirrortype=piezo,labelangle=-90](A)(G)(B){piezo} \end{pspicture} \end{LTXexample} @@ -409,11 +412,10 @@ changed by adapting the psstyle \parameter{PiezoMirror}. \begin{LTXexample}[width=3.5cm] \begin{pspicture}(3,3)\psgrid \pnode(0,0){A} - \pnode(2,2){G} + \pnode(1.8,2.2){G} \pnode(0,3){B} \psline[linecolor=green](A)(G)(B) - \mirror[mirrortype=extended, - mirrordepth=0.1](A)(G)(B){Extended mirror} + \mirror[mirrortype=extended](A)(G)(B){M$_\mathrm{ext}$} \end{pspicture} \end{LTXexample} @@ -422,7 +424,7 @@ changed by adapting the psstyle \parameter{PiezoMirror}. \subsection{Beamsplitter} \begin{description} -\item[\param{bswidth} (dimension):] (\emph{default:~\texttt{1}}) +\item[\param{bssize} (dimension):] (\defaultparam 0.8) \end{description} \medskip @@ -443,20 +445,20 @@ changed by adapting the psstyle \parameter{PiezoMirror}. \subsection{Optical grid} \begin{description} -\item[\param{optgridcount} (integer):] (\emph{default:~\texttt{10}}) -\item[\param{optgridwidth} (dimension):] (\emph{default:~\texttt{1}}) -\item[\param{optgridheight} (dimension):] (\emph{default:~\texttt{0.1}}) -\item[\param{optgriddepth} (dimension):] (\emph{default:~\texttt{0.05}}) -\item[\param{optgridlinewidth} (dimension):] (\emph{default:~\texttt{0.7\cs{pslinewidth}}}) -\item[\param{reverse} (boolean):] (\emph{default:\texttt{false}}) +\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}) \end{description} \medskip \begin{LTXexample}[width=3.5cm] \begin{pspicture}(3,3)\psgrid - \pnode(0,2.5){A} - \pnode(1.5,2){G} + \pnode(0,3){A} + \pnode(1.8,2.2){G} \pnode(0,0){B} \psline[linecolor=green](A)(G)(B) \optgrid(A)(G)(B){grid} @@ -468,8 +470,8 @@ changed by adapting the psstyle \parameter{PiezoMirror}. \begin{LTXexample}[width=3.5cm] \begin{pspicture}(3,3)\psgrid - \pnode(0,2.5){A} - \pnode(1.5,2){G} + \pnode(0,3){A} + \pnode(1.8,2.2){G} \pnode(0,0){B} \psline[linecolor=green](A)(G)(B) \optgrid[reverse](A)(G)(B){grid} @@ -480,8 +482,8 @@ changed by adapting the psstyle \parameter{PiezoMirror}. \begin{LTXexample}[width=3.5cm] \begin{pspicture}(3,3)\psgrid - \pnode(0,2.5){A} - \pnode(1.5,2){G} + \pnode(0,3){A} + \pnode(1.8,2.2){G} \pnode(0,0){B} \psline[linecolor=green](A)(G)(B) \optgrid[optgridcount=6,% @@ -492,18 +494,17 @@ changed by adapting the psstyle \parameter{PiezoMirror}. \medskip - \subsection{Custom components}\label{sec:custom} \begin{LTXexample}[width=3.5cm] \begin{pspicture}(3,3)\psgrid \pnode(0,2){A} \pnode(3,1){B} - \optdipole(A)(B){% + \optdipole[labeloffset=1](A)(B){% \rput(0,0){% \includegraphics[scale=0.25]{parque-nacional} } - }{Label} + }{label} \psline[linecolor=red](A)(B) \end{pspicture} \end{LTXexample} @@ -515,7 +516,7 @@ changed by adapting the psstyle \parameter{PiezoMirror}. \pnode(0,0){A} \pnode(1.5,2){G} \pnode(3,1.5){B} - \opttripole(B)(G)(A){\rput[b](0,0){Text}}{Label} + \opttripole(B)(G)(A){\rput[b](0,0){text}}{label} \psline[linecolor=red](A)(G)(B) \end{pspicture} \end{LTXexample} @@ -525,11 +526,11 @@ changed by adapting the psstyle \parameter{PiezoMirror}. \subsection{General options}\label{sec:general} \begin{description} -\item[\param{angle} (real):] (\emph{default:~\texttt{0}}) -\item[\param{optional} (boolean):] (\emph{default:~\texttt{false}}) -\item[\param{position} (real):] (\emph{default:~\texttt{\cs{empty}}}) -\item[\param{abspos} (dimension):] (\emph{default:~\texttt{\cs{empty}}}) -\item[\param{showoptdots} (boolean):] (\emph{default:~\texttt{false}}) +\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}) \end{description} The parameter \parameter{angle} is available for the macros \cs{optbox} @@ -541,27 +542,26 @@ but is used only for the \lq dipole\rq-macros to position the component between the two given points. In addition, there is a parameter \parameter{abspos} that allows absolute positioning between the two line points. \parameter{showoptdots} shows in black the two points calculated for the -positioning of the component, and in red the reference point for the +positioning of the component, and in red the reference points for the label. \medskip \begin{LTXexample}[width=3.5cm] - \begin{pspicture}(3,3)\psgrid - \pnode(0,1){A} - \pnode(3,1){B} + \begin{pspicture}(3,2)\psgrid + \pnode(0,1.2){A} + \pnode(3,1.2){B} \psline[linecolor=green](A)(B) - \optbox[labeloffset=-1,% - angle=10](A)(B){Box} + \optbox[angle=10](A)(B){box} \end{pspicture} \end{LTXexample} \bigskip \begin{LTXexample}[width=3.5cm] - \begin{pspicture}(3,3)\psgrid - \pnode(0,1.5){A} - \pnode(3,1.5){B} + \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} @@ -570,9 +570,9 @@ label. \bigskip \begin{LTXexample}[width=3.5cm] - \begin{pspicture}(3,3)\psgrid - \pnode(0,1.5){A} - \pnode(3,1.5){B} + \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} @@ -581,9 +581,9 @@ label. \bigskip \begin{LTXexample}[width=3.5cm] - \begin{pspicture}(3,3)\psgrid - \pnode(0,1.5){A} - \pnode(3,1.5){B} + \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} @@ -597,7 +597,7 @@ label. \pnode(1.5,2){G} \pnode(0,3){B} \psline[linecolor=green](A)(G)(B) - \mirror[labelangle=0,showoptdots](A)(G)(B){Mirror} + \mirror[showoptdots](A)(G)(B){mirror} \end{pspicture} \end{LTXexample} @@ -606,69 +606,99 @@ label. \subsection{Labels}\label{sec:labels} \begin{description} -\item[\param{labeloffset} (dimension):] (\emph{default:~\texttt{1}}) -\item[\param{labelangle} (real):] (\emph{default:~\texttt{-90}}) -\item[\param{labelstyle} (macro):] (\emph{default:~\texttt{\cs{small}}}) -\item[\param{labelalign} (\cs{rput} pos string):] (\emph{default:~\texttt{c}}) -\item[\param{labelrelative} (boolean):] (\emph{default:~\texttt{false}}) +\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}) \end{description} -\parameter{labeloffset} specifies the offset from the center of the component, \parameter{labelangle} is the -absolute angle which is independent of the component orientation, -\parameter{labelstyle} is the textstyle that is used to typeset the +\parameter{labeloffset} specifies the offset from the center of the component, +\parameter{labelstyle} defines the textstyle that is used to typeset the label and \parameter{labelalign} corresponds to the refpoint of -\cs{rput}. With \parameter{labelrelative} the label is oriented like the -component is. +\cs{rput}. The parameter \parameter{labelref} sets the reference +coordinate system for the \parameter{labelangle} and the orientation of +the label text. The detailed behaviour is best illustrated looking at +the following three examples. + +\medskip + +\begin{LTXexample}[width=5cm] +\begin{pspicture}(-2,-2)(2.5,2) + \multido{\i=0+72}{5}{% + \optbox[endbox, + labelref=relative, + labeloffset=0, + optboxwidth=1](0,0)(1;\i){\i} + } +\end{pspicture} +\end{LTXexample} + +\bigskip + +\begin{LTXexample}[width=5cm] +\begin{pspicture}(-2,-2)(2.5,2) + \multido{\i=0+72}{5}{% + \optbox[endbox, + labelref=relgrav, + optboxwidth=1](0,0)(1;\i){\i} + } + \end{pspicture} +\end{LTXexample} + +\bigskip + +\begin{LTXexample}[width=5cm] +\begin{pspicture}(-2,-2)(2.5,2) + \multido{\i=0+72}{5}{% + \optbox[endbox, + labelref=global, + optboxwidth=1](0,0)(1;\i){\i} + } + \end{pspicture} +\end{LTXexample} \newpage \section{Examples} -\begin{LTXexample}[pos=t,vsep=10mm] -\begin{pspicture}(12,2.4)\psgrid -\pnode(1,1.2){CCD}\pnode(12,1.2){Start} +\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) -\psset{plateheight=1.5, - lensheight=1.5, - lensradius=2} -\polarisation[pol=perp, - position=0.1](Start)(CCD) +\polarization[poltype=perp,position=0.1](Start)(CCD) \optretplate[position=0.15](Start)(CCD){$\nicefrac{\lambda}{2}$} \lens[lensheight=0.5, lensradius=0.5, position=0.25](Start)(CCD){$L_1$} \lens[position=0.5](Start)(CCD){$L_2$} -\optplate[position=0.57, - labelangle=90, - platelinewidth=3\pslinewidth](Start)(CCD){SLM} -\optplate[position=0.63, - labelangle=270](Start)(CCD){PF} +\optplate[position=0.57, platelinewidth=3\pslinewidth](Start)(CCD){SLM} +\optplate[position=0.63](Start)(CCD){PF} +\polarization[position=0.66](Start)(CCD) \lens[position=0.7](Start)(CCD){$L_3$} -\optbox[endbox](Start)(CCD){CCD} +\optbox[endbox,labeloffset=0](Start)(CCD){CCD} \end{pspicture} \end{LTXexample} -\begin{LTXexample}[pos=t,vsep=10mm] -\begin{pspicture}(6,3.5) - \psgrid[subgriddiv=1,griddots=10,gridlabels=7pt] - \psset{labelstyle=\scriptsize} - \pnode(1.5,1){LaserOut} - \pnode(3,1){Grid} - \pnode(6,3){Out} - \pnode(4,3){Mvar} +\vspace{\fill} + +\begin{LTXexample}[pos=t,vsep=8mm] +\begin{pspicture}(-4,-1)(3,3) + \psset{labeloffset=0.5} + \pnode(-2,0){LaserOut} + \pnode(0,0){Grid} + \pnode(4;45){Out} + \pnode(2.5;67.5){Mvar} \psline[linewidth=2\pslinewidth, linecolor=red!90!black](LaserOut)(Grid)(Out)\psline(Grid)(Mvar) - \optbox[endbox,optboxwidth=1.5](Grid)(LaserOut){diodelaser} - \optretplate[position=0.3, - labeloffset=0.7](LaserOut)(Grid){$\nicefrac{\lambda}{4}$} - \optgrid[labeloffset=0.5](LaserOut)(Grid)(Out){grid} - \mirror[variable, - labelangle=20, - labeloffset=1](Grid)(Mvar)(Grid){variable mirror} + \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} \end{LTXexample} -\psset{unit=1cm} -\begin{LTXexample}[pos=t,vsep=10mm] -\begin{pspicture}(9,6)\psgrid +\begin{LTXexample}[pos=t,vsep=3mm] +\begin{pspicture}(0,-0.4)(9,6) \pnode(1.5,5){Laser}\pnode(4,5){PBS}\pnode(6.5,5){PBS2} \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} @@ -676,51 +706,46 @@ component is. \psline[linecolor=green!90!black,linewidth=2\pslinewidth]% (Laser)(PBS2)(piezo)(BSBwd)(M4f1)(M4f2)(M4f3)(BS4f)(CCD) \psline[linecolor=green!90!black,linewidth=2\pslinewidth](PBS)(BSFwd)(BS4f) - \psset{mirrorwidth=0.6, plateheight=0.7, owidth=0.7, labeloffset=0.6, labelstyle=\scriptsize, lensheight=0.8, lenswidth=0.2, bswidth=0.5} - \optbox[endbox,optboxwidth=1.5, optboxheight=0.7]% + \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}} \lens[lensheight=0.5, position=0.2](Laser)(PBS){MO} - \pinhole[position=0.3, labelangle=90](Laser)(PBS){PH} + \pinhole[position=0.3,labelangle=180](Laser)(PBS){PH} \lens[position=0.5](Laser)(PBS){L} \optretplate[position=0.8](Laser)(PBS){$\nicefrac{\lambda}{2}$} - \beamsplitter[labelangle=90](Laser)(PBS)(BSFwd){PBS} - \optretplate[labelangle=180](PBS)(BSFwd){$\nicefrac{\lambda}{2}$} - \lens[position=0.8,labelangle=180](PBS)(BSFwd){L} + \beamsplitter(Laser)(PBS)(BSFwd){PBS} + \optretplate[position=0.4](PBS)(BSFwd){$\nicefrac{\lambda}{2}$} + \polarization(PBS)(BSFwd)\polarization(PBS2)(BSBwd) + \lens[position=0.8](PBS)(BSFwd){L} \optretplate(PBS)(PBS2){$\nicefrac{\lambda}{2}$} - \beamsplitter[labelangle=0](PBS)(PBS2)(piezo){PBS} - \optretplate[labelangle=180, abspos=0.5](PBS2)(piezo){$\nicefrac{\lambda}{4}$} - \mirror[mirrortype=piezo, labelangle=0](PBS2)(piezo)(PBS2){PZ} - \lens[position=0.8,labelangle=0](PBS2)(BSBwd){L} + \beamsplitter(PBS)(PBS2)(piezo){PBS} + \optretplate[abspos=0.5](PBS2)(piezo){$\nicefrac{\lambda}{4}$} + \mirror[mirrortype=piezo,labelangle=90](PBS2)(piezo)(PBS2){PZ} + \lens[position=0.8,labelangle=180](PBS2)(BSBwd){L} \beamsplitter(PBS)(BSFwd)(BSBwd){BS} - \beamsplitter(PBS2)(BSBwd)(BSFwd){BS} + \beamsplitter[labelangle=-90](PBS2)(BSBwd)(BSFwd){BS} \crystal[crystalwidth=1, crystalheight=0.5, voltage, lamp, fillstyle=solid, fillcolor=yellow!90!black, labeloffset=0.8](BSFwd)(BSBwd){SBN:Ce} - \mirror[labelangle=0](BSBwd)(M4f1)(M4f2){M} - \mirror[labelangle=0](M4f1)(M4f2)(M4f3){M} - \lens(M4f2)(M4f3){L} - \mirror[labelangle=180](M4f2)(M4f3)(BS4f){M} - \beamsplitter[labelangle=90](M4f3)(BS4f)(CCD){BS} - \optbox[endbox](BS4f)(CCD){CCD} - \lens[abspos=0.7](BSFwd)(BS4f){L} - \lens[abspos=0.7](BSBwd)(M4f1){L} + \mirror(BSBwd)(M4f1)(M4f2){M}\mirror(M4f1)(M4f2)(M4f3){M} + \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) \end{pspicture} \end{LTXexample} -\section{Known bugs} - -For some reason, filling of the concave lenses by -specifiying \parameter{fillstyle} does not work properly. For sure there -are other bugs, but they are not known, yet. If you find some, do not -hesitate to contact me. - -\section{ Todo} +\section{Todo} \begin{itemize} \item Add components for fiber optics. \end{itemize} 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. +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. + +\section{Acknowledgements} +I thank all the people of the PSTricks mailinglist for the continuous help, especially Herbert Voß. \end{document} 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 7d63383b3dc..3c110bf6a61 100644 --- a/Master/texmf-dist/tex/generic/pst-optexp/pst-optexp.tex +++ b/Master/texmf-dist/tex/generic/pst-optexp/pst-optexp.tex @@ -14,12 +14,14 @@ %% DESCRIPTION: %% `pst-optexp' is a PSTricks package to draw optical experimental setups %% +%% HISTORY -> see file Changes +%% \csname PSToptexpLoaded\endcsname \let\PSToptexpLoaded\endinput % % -\def\fileversion{1.0} -\def\filedate{2007/07/18} +\def\fileversion{1.1} +\def\filedate{2007/09/06} \message{`pst-optexp' v\fileversion, \filedate\space (CB)} % % DPC interface to the `keyval' package (until keyval based version of PSTricks) @@ -69,26 +71,34 @@ \newif\ifPst@optexp@component@optional \newif\ifPst@optexp@debug@showoptdots \newif\ifPst@optexp@endbox -\newif\ifPst@optexp@labelrelative % % Strings -\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@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} -% -\newpsstyle{OptionalStyle}{linestyle=dotted} +\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} +% +% +% psstyles +% +\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,% @@ -101,11 +111,10 @@ % Parameterdefinitions % % General -\define@key[psset]{optexp}{optional}[true]{\@nameuse{Pst@optexp@component@optional#1}} +\define@boolkey[psset]{optexp}[Pst@optexp@component@]{optional}[true]{} \define@key[psset]{optexp}{position}{\edef\psk@optexp@position{#1}} \define@key[psset]{optexp}{abspos}{\edef\psk@optexp@abspos{#1}} \define@key[psset]{optexp}{angle}{\edef\psk@optexp@angle{#1}} -\define@key[psset]{optexp}{reverse}[true]{\@nameuse{Pst@optexp@reverse#1}} % % Lens \define@key[psset]{optexp}{lensheight}{\edef\psk@optexp@lens@height{#1}} @@ -132,20 +141,32 @@ }} % % Pinhole -\define@key[psset]{optexp}{iwidth}{\edef\psk@optexp@pinhole@iwidth{#1}} -\define@key[psset]{optexp}{owidth}{\edef\psk@optexp@pinhole@owidth{#1}} +\define@key[psset]{optexp}{innerheight}{\edef\psk@optexp@pinhole@iheight{#1}} +\define@key[psset]{optexp}{iwidth}{% + \edef\psk@optexp@pinhole@iheight{#1}% + \PackageWarning{pst-optexp}{iwidth is obsolete, use innerheight instead} +} +\define@key[psset]{optexp}{outerheight}{\edef\psk@optexp@pinhole@oheight{#1}} +\define@key[psset]{optexp}{owidth}{% + \edef\psk@optexp@pinhole@oheight{#1}% + \PackageWarning{pst-optexp}{owidth is obsolete, use outerheight instead} +} \define@key[psset]{optexp}{phlinewidth}{\edef\psk@optexp@pinhole@linewidth{#1}} % % Beamsplitter -\define@key[psset]{optexp}{bswidth}{\edef\psk@optexp@bswidth{#1}} +\define@key[psset]{optexp}{bssize}{\edef\psk@optexp@bssize{#1}} +\define@key[psset]{optexp}{bswidth}{% + \edef\psk@optexp@bssize{#1}% + \PackageWarning{pst-optexp}{bswidth is obsolete, use bssize instead}% +} % % Crystal \define@key[psset]{optexp}{crystalwidth}{\edef\psk@optexp@crystal@width{#1}} \define@key[psset]{optexp}{crystalheight}{\edef\psk@optexp@crystal@height{#1}} \define@key[psset]{optexp}{caxislength}{\edef\psk@optexp@crystal@caxislength{#1}} -\define@key[psset]{optexp}{voltage}[true]{\@nameuse{Pst@optexp@crystal@voltage#1}} -\define@key[psset]{optexp}{caxisinv}[true]{\@nameuse{Pst@optexp@crystal@caxisinv#1}} -\define@key[psset]{optexp}{lamp}[true]{\@nameuse{Pst@optexp@crystal@lamp#1}} +\define@boolkey[psset]{optexp}[Pst@optexp@crystal@]{voltage}[true]{} +\define@boolkey[psset]{optexp}[Pst@optexp@crystal@]{caxisinv}[true]{} +\define@boolkey[psset]{optexp}[Pst@optexp@crystal@]{lamp}[true]{} \define@key[psset]{optexp}{lampscale}{\def\psk@optexp@lamp@scale{#1}} % % Mirror @@ -153,7 +174,7 @@ \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}{variable}[true]{\@nameuse{Pst@optexp@variable#1}} +\define@boolkey[psset]{optexp}[Pst@optexp@]{variable}[true]{} % % Grid \define@key[psset]{optexp}{optgridcount}{\edef\psk@optexp@optgrid@count{#1}} @@ -161,11 +182,12 @@ \define@key[psset]{optexp}{optgridheight}{\edef\psk@optexp@optgrid@height{#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]{} % % Box \define@key[psset]{optexp}{optboxwidth}{\edef\psk@optexp@optbox@width{#1}} \define@key[psset]{optexp}{optboxheight}{\edef\psk@optexp@optbox@height{#1}} -\define@key[psset]{optexp}{endbox}[true]{\@nameuse{Pst@optexp@endbox#1}} +\define@boolkey[psset]{optexp}[Pst@optexp@]{endbox}[true]{} % % Plate \define@key[psset]{optexp}{platelinewidth}{\edef\psk@optexp@plate@linewidth{#1}} @@ -177,21 +199,38 @@ % Detector \define@key[psset]{optexp}{detsize}{\edef\psk@optexp@detector@size{#1}} % -% Polarisation -\define@key[psset]{optexp}{polwidth}{\edef\psk@optexp@polarisation@width{#1}} -\define@key[psset]{optexp}{pollinewidth}{\edef\psk@optexp@polarisation@linewidth{#1}} -\define@key[psset]{optexp}{pol}{\edef\psk@optexp@pol{#1}} +% Polarization +\define@key[psset]{optexp}{polwidth}{% + \edef\psk@optexp@polarization@size{#1}% + \PackageWarning{pst-optexp}{polwidth is obsolete, use polsize instead}% +} +\define@key[psset]{optexp}{polsize}{\edef\psk@optexp@polarization@size{#1}} +\define@key[psset]{optexp}{pollinewidth}{\edef\psk@optexp@polarization@linewidth{#1}} +\define@key[psset]{optexp}{poltype}{\edef\psk@optexp@pol@type{#1}} +\define@key[psset]{optexp}{pol}{% + \edef\psk@optexp@poltype{#1}% + \PackageWarning{pst-optexp}{pol is obsolete, use poltype instead}% +} % % Label \define@key[psset]{optexp}{labelangle}{\edef\psk@optexp@label@angle{#1}} \define@key[psset]{optexp}{labeloffset}{\edef\psk@optexp@label@offset{#1}} \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}{labelrelative}[true]{\@nameuse{Pst@optexp@labelrelative#1}} +\define@key[psset]{optexp}{labelref}{\edef\psk@optexp@label@ref{#1}} +% labelrelative is obsolete +\define@choicekey*[psset]{optexp}{labelrelative}[\val\nr]{true,false}[true]{% + \ifcase\nr\relax + \psset{labelref=relative} + \or + \psset{labelref=global} + \fi + \PackageWarning{pst-optexp}{labelrelative is obsolete, please use labelref=relative instead} +} + % % Debug -\define@key[psset]{optexp}{showoptdots}[true]{\@nameuse{Pst@optexp@debug@showoptdots#1}} -% +\define@boolkey[psset]{optexp}[Pst@optexp@debug@]{showoptdots}[true]{} % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -205,7 +244,11 @@ \def\crystal{\@ifnextchar[{\pst@crystal}{\pst@crystal[]}} \def\optgrid{\@ifnextchar[{\pst@optgrid}{\pst@optgrid[]}} \def\mirror{\@ifnextchar[{\pst@mirror}{\pst@mirror[]}} -\def\polarisation{\@ifnextchar[{\pst@polarisation}{\pst@polarisation[]}} +\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[]}} @@ -226,14 +269,14 @@ ,lenstype=biconvex ,mirrorwidth=1 ,mirrordepth=0.08 - ,pol=\pst@string@pol@polparallel + ,poltype=\pst@string@pol@polparallel ,optgridcount=10 ,optgridwidth=1 ,optgridheight=0.1 ,optgriddepth=0.05 - ,bswidth=1 - ,owidth=1 - ,iwidth=0.1 + ,bssize=0.8 + ,outerheight=1 + ,innerheight=0.1 ,crystalwidth=2 ,crystalheight=0.8 ,caxislength=0.6 @@ -241,8 +284,8 @@ ,optboxheight=0.5 ,position=\@empty ,abspos=\@empty - ,labeloffset=1 - ,labelangle=-90 + ,labeloffset=0.8 + ,labelangle=0 ,labelstyle=\small ,mirrortype=\pst@string@mirror@type@plain, ,labelalign=c @@ -251,12 +294,13 @@ ,plateheight=1 ,platelinewidth=2\pslinewidth ,platewidth=0.1 - ,polwidth=0.6 + ,polsize=0.6 ,pollinewidth=0.7\pslinewidth ,optgridlinewidth=0.7\pslinewidth ,phlinewidth=2\pslinewidth ,lampscale=0.3 ,detsize=0.5 + ,labelref=relgrav }% % % @@ -336,6 +380,7 @@ /Y@B YAtmp def}if X@A Y@A){tempNode@A}% \pnode(! X@B Y@B){tempNode@B}% + \gdef\pst@optexp@label@refangle{180} }\ignorespaces}% % % @@ -352,6 +397,54 @@ }\ignorespaces}% % % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% Some other usefuls macros +% +% 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{% + \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 + /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}% + % reset reference label to 0 + \gdef\pst@optexp@label@refangle{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}% +}% +% +% 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}}% +}% +% +% Put the component #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)% + {tempNode@Label}% + {tempNode@LabelShifted}% + {\psk@optexp@label@angle}% +}% +% +% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % @@ -387,6 +480,7 @@ % \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}% % @@ -401,7 +495,6 @@ % \def\pst@optbox[#1](#2)(#3)#4{{% \pst@regNodes{#2}{#3}% - \psset{labeloffset=0}% \pst@draw@component{#1}{#4}\pst@draw@optbox% }\ignorespaces}% % @@ -429,9 +522,9 @@ % % % -\def\pst@polarisation[#1](#2)(#3){{% +\def\pst@polarization[#1](#2)(#3){{% \pst@regNodes{#2}{#3}% - \pst@draw@component{#1}{}\pst@draw@polarisation% + \pst@draw@component{#1}{}\pst@draw@polarization% }\ignorespaces}% % % @@ -457,44 +550,92 @@ % This macro is called by every unit % \def\pst@draw@component#1#2#3{{% - \psset{labelsep=1}% +% \psset{labelsep=1}% \psset{#1}% -% + % \ifPst@optexp@endbox% + \ifx\psk@optexp@label@offset\@empty + \psset{labeloffset=0} + \fi \psset{position=1}% \fi% -% -% linestyle to use, if component should be marked as optional + % + % linestyle to use, if component should be marked as optional \ifPst@optexp@component@optional \psset{style=OptionalStyle} \fi \ncline[linestyle=none,fillstyle=none,npos=]{tempNode@A}{tempNode@B}% -% -% if parameter 'position' is given, use it for 'npos' + % + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % + % Positioning of the component + % + % if parameter 'position' is given, use it for 'npos' \ifx\psk@optexp@position\@empty -% -% then check if absolute positioning is wanted + % + % then check if absolute positioning is wanted \ifx\psk@optexp@abspos\@empty - \ncput[nrot=:U,npos=]{#3} + \ncput[nrot=:U,npos=]{\put@Comp{#3}} \else - \nlput[nrot=:U](tempNode@A)(tempNode@B){\psk@optexp@abspos}{#3} + \nlput[nrot=:U](tempNode@A)(tempNode@B){\psk@optexp@abspos}{\put@Comp{#3}} \fi \else - \ncput[nrot=:U,npos=\psk@optexp@position]{#3} + \ncput[nrot=:U,npos=\psk@optexp@position]{\put@Comp{#3}} \fi - \ifPst@optexp@labelrelative - \ncline[linestyle=none]{tempNode@A}{tempNode@Label} - \ncput[nrot=:U,npos=1]{\rput[\psk@optexp@label@align](0,0){\psk@optexp@label@style #2}}% - \else + % + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % + % 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}}% - \fi -% -% Show dots for debugging + {\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 \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 @@ -514,23 +655,27 @@ \psarc[linewidth=0.8\pslinewidth,arrowinset=0,arrowscale=0.8]{<->} (! m@width 2 div 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) -% -% piezo + \psline[linewidth=\psk@optexp@mirror@linewidth](! m@width -2 div + 0)(! m@width 2 div 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)% - \fi - \ifx\psk@optexp@mirror@type\pst@string@mirror@type@extended% + \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)% - \fi -% -% labelnode + \fi\fi + % + % labelnode \pnode(0,0){tempNode@Label} }\ignorespaces}% % @@ -566,7 +711,7 @@ }% \fi% % - % draw the lens + % define some parameters only for convex lenses % \pstVerb{% /lens@d lens@r lens@a sub def @@ -591,7 +736,7 @@ }% \fi% % - % + % define some parameters only for concave lenses % \pstVerb{% /lens@d lens@r dup mul lens@h dup mul sub sqrt def @@ -602,50 +747,52 @@ % % \def\temp@LeftPlot{% - \parametricplot[plotstyle=curve,arrows=c-c]{-1}{1}{% + \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}% }% \def\temp@RightPlot{% - \parametricplot[plotstyle=curve,arrows=c-c]{-1}{1}{% + \parametricplot[liftpen=1]{-1}{1}{% lens@r lens@alpha t mul cos mul lens@yshift sub lens@r lens@alpha t mul sin mul}% }% % % \pscustom{% \ifcase\psk@optexp@lens@type - % plainconvex - \temp@RightPlot% - \closepath% - \or% - % convexplain - \temp@LeftPlot% - \closepath% - \or% - % biconvex - \temp@LeftPlot% - \temp@RightPlot% - \or% - % plainconcave - \temp@LeftPlot% - \psline{c-c}(! 0 lens@h neg)% - (! 0 lens@h)% - (! lens@r lens@d sub lens@a add lens@h)% + % plainconvex + \temp@RightPlot% + \closepath% + \or + % convexplain + \temp@LeftPlot% + \closepath% + \or + % biconvex + \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)% + \closepath \or% - % concaveplain - \temp@RightPlot% - \psline{c-c}(! 0 lens@h)% - (! 0 lens@h neg)% - (! lens@r lens@d sub lens@a add neg lens@h neg)% - \or% - % biconcave - \temp@RightPlot% - \psline{c-c}(! lens@r lens@d sub lens@a add lens@h)% - \temp@LeftPlot% - \psline{c-c}(! lens@r lens@d sub lens@a add neg lens@h neg)% - \fi% - } -% -% labelnode + % 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)% + \closepath + \or + % biconcave + \temp@RightPlot% + \temp@LeftPlot% + \closepath + \fi + }% + % + % labelnode \pnode(0,0){tempNode@Label} }\ignorespaces}% % @@ -655,13 +802,13 @@ % \def\pst@draw@pinhole{{% \psline[linewidth=\psk@optexp@pinhole@linewidth]% - (! 0 \psk@optexp@pinhole@owidth\space 2 div)% - (! 0 \psk@optexp@pinhole@iwidth\space 2 div)% + (! 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@owidth\space -2 div)% - (! 0 \psk@optexp@pinhole@iwidth\space -2 div)% -% -% labelnode + (! 0 \psk@optexp@pinhole@oheight\space -2 div)% + (! 0 \psk@optexp@pinhole@iheight\space -2 div)% + % + % labelnode \pnode(0,0){tempNode@Label} }\ignorespaces} % @@ -671,14 +818,14 @@ % \def\pst@draw@beamsplitter{{% \pstVerb{% - /bs@width \psk@optexp@bswidth\space 2.0 div def + /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} + % + % labelnode + \pnode(0,0){tempNode@Label} }\ignorespaces}% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -702,11 +849,13 @@ \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,% @@ -719,47 +868,47 @@ arrowinset=0]{->}% (! 0 c@height)(! 0 c@height neg c@caxisL sub)% \fi - }% -% -% labelnode - \pnode(0,0){tempNode@Label} + }% + % + % labelnode + \pnode(0,0){tempNode@Label} }\ignorespaces}% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% POLARISATION -% +% POLARIZATION % -\def\pst@draw@polarisation{{% +\def\pst@draw@polarization{{% % - \ifx\psk@optexp@pol\pst@string@pol@polparallel - \psline[linestyle=solid,linewidth=\psk@optexp@polarisation@linewidth,arrowscale=0.8]{<->}% - (! 0 \psk@optexp@polarisation@width\space 2 div neg)% - (! 0 \psk@optexp@polarisation@width\space 2 div)% + \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)% \fi - \ifx\psk@optexp@pol\pst@string@pol@polperp + \ifx\psk@optexp@pol@type\pst@string@pol@polperp \psdot[dotsize=0.05](0,0)% - \pscircle[fillstyle=none,linestyle=solid,linewidth=\psk@optexp@polarisation@linewidth](0,0){0.12}% + \pscircle[fillstyle=none,linestyle=solid,linewidth=\psk@optexp@polarization@linewidth](0,0){0.12}% \fi - \ifx\psk@optexp@pol\pst@string@pol@polmisc - \psline[linestyle=solid,linewidth=\psk@optexp@polarisation@linewidth,arrowscale=0.8]{<->}% - (! 0 \psk@optexp@polarisation@width\space 2 div neg)% - (! 0 \psk@optexp@polarisation@width\space 2 div)% + \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)% \psdot[dotsize=0.05](0,0)% \pscircle[fillstyle=none,linestyle=solid,linewidth=0.7\pslinewidth](0,0){0.12} \fi - \ifx\psk@optexp@pol\pst@string@pol@polrcirc - \psellipticarc[linewidth=\psk@optexp@polarisation@linewidth]{->}(0,0)(! - \psk@optexp@polarisation@width\space 4 div - \psk@optexp@polarisation@width\space 2 div)% + \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} \fi - \ifx\psk@optexp@pol\pst@string@pol@pollcirc - \psellipticarc[linewidth=\psk@optexp@polarisation@linewidth]{<-}(0,0)(! - \psk@optexp@polarisation@width\space 4 div - \psk@optexp@polarisation@width\space 2 div)% + \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} \fi + \pnode(0,0){tempNode@Label} }\ignorespaces}% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -767,58 +916,60 @@ % 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% - \pscustom[linewidth=\psk@optexp@optgrid@linewidth]{% - \psline(! 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{cc-cc}(! 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)% - } - }% - \else% - \pscustom[linewidth=\psk@optexp@optgrid@linewidth]{% - \psline(! 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{cc-cc}(! 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)% - } - }% - \fi% -% -% labelnode - \pnode(0,0){tempNode@Label} + \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% + \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 g@step mul add 0)% + (! g@width neg \i\space 1 add g@step mul add g@depth)% + } + \closepath + }% + \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}% % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% % OPTBOX % \def\pst@draw@optbox{{% - \ifPst@optexp@endbox - \pnode(!% - /box@width \psk@optexp@optbox@width\space def - /box@height \psk@optexp@optbox@height\space def - box@width 2 div 0){tempNode@Label}% - \psframe(! 0 box@height 2 div neg)% - (! box@width box@height 2 div)% - \else - \pnode(!% - /box@width \psk@optexp@optbox@width\space def - /box@height \psk@optexp@optbox@height\space def - 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)% - }% - \fi + \pstVerb{% + /box@width \psk@optexp@optbox@width\space def + /box@height \psk@optexp@optbox@height\space def + }% + \ifPst@optexp@endbox + \pnode(! box@width 2 div 0){tempNode@Label}% + \psframe(! 0 box@height 2 div neg)% + (! box@width box@height 2 div)% + \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)% + }% + \fi }\ignorespaces}% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -826,20 +977,21 @@ % OPTPLATE % \def\pst@draw@optplate{{% - \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} + \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}% +% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % DETECTOR % \def\pst@draw@detector{{% - \pnode(! \psk@optexp@detector@size\space 3 div 0){tempNode@Label}% - \pswedge(0,0){\psk@optexp@detector@size}{-90}{90} + \pnode(! \psk@optexp@detector@size\space 3 div 0){tempNode@Label}% + \pswedge(0,0){\psk@optexp@detector@size}{-90}{90} }\ignorespaces}% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -848,23 +1000,25 @@ % \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 + /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} + % + % 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)% @@ -877,7 +1031,7 @@ \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} +}\ignorespaces}% % % \endinput |