summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-07-21 23:46:03 +0000
committerKarl Berry <karl@freefriends.org>2006-07-21 23:46:03 +0000
commit51e3a37989b9f2ace36eb360c42fee6dcff11458 (patch)
treec9205688e89e5e15f5d9c326c1fdbbc77cb1d76f /Master
parentfe0b11acdb1182a4e0a4068d1876666f270752e8 (diff)
pst-optic 0.95
git-svn-id: svn://tug.org/texlive/trunk@1890 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/generic/pst-optic/Changes18
-rw-r--r--Master/texmf-dist/doc/generic/pst-optic/README3
-rw-r--r--Master/texmf-dist/doc/generic/pst-optic/optic.bib2
-rw-r--r--Master/texmf-dist/doc/generic/pst-optic/pst-optic-doc.pdfbin312467 -> 282581 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-optic/pst-optic-doc.tex555
-rw-r--r--Master/texmf-dist/doc/generic/pst-optic/pst-optic-examples.pdfbin351255 -> 372127 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-optic/pst-optic-examples.tex308
-rw-r--r--Master/texmf-dist/tex/generic/pst-optic/pst-optic.tex1077
-rw-r--r--Master/texmf-dist/tex/latex/pst-optic/pst-optic.sty2
-rw-r--r--Master/texmf-dist/tpm/pst-optic.tpm6
10 files changed, 965 insertions, 1006 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-optic/Changes b/Master/texmf-dist/doc/generic/pst-optic/Changes
index 651d1e9e01a..f65e8fa6d76 100644
--- a/Master/texmf-dist/doc/generic/pst-optic/Changes
+++ b/Master/texmf-dist/doc/generic/pst-optic/Changes
@@ -1,7 +1,23 @@
---- pst-optic.tex
+0.95 2006-07-20 - fix spurious blanks
+ - use \def instead of \edef
+ for the keyval definitions
+ - some improvements to the code
+0.94 2005-10-28 using \psscalebox to prevent clashes with graphicx
+ needs pstricks.tex > 1.10
+0.93 2004-11-25 \ignorespaces for all macros
0.92 2004-11-08 spurious blank
0.91 2004-10-23 use pst-xkey instead of pst-key
---- pst-optic.sty
2004-11-09 new version to get a TeX output
- of the used version \ No newline at end of file
+ of the used version
+
+---- pst-optic-doc.tex
+ 2005-10-24 the parallel line image was wrong
+ 2005-05-18 small update to some examples
+
+---- pst-optic-examples.tex
+ 2005-05-18 small update to some examples
+
+ \ No newline at end of file
diff --git a/Master/texmf-dist/doc/generic/pst-optic/README b/Master/texmf-dist/doc/generic/pst-optic/README
index 7fba0811a5d..70b9df5af52 100644
--- a/Master/texmf-dist/doc/generic/pst-optic/README
+++ b/Master/texmf-dist/doc/generic/pst-optic/README
@@ -23,8 +23,7 @@ to get a PostScript file. But pay attention, that the pst-optic
files are saved in the above mentioned way, before you run
latex on the documentation file.
-It is nearly the same for the example file
-pst-optic-examples.tex
+It is nearly the same for the example file pst-optic-examples.tex
The intermediate DVI file works only with viewers which can
diff --git a/Master/texmf-dist/doc/generic/pst-optic/optic.bib b/Master/texmf-dist/doc/generic/pst-optic/optic.bib
index a684c82d02a..6f777d67d99 100644
--- a/Master/texmf-dist/doc/generic/pst-optic/optic.bib
+++ b/Master/texmf-dist/doc/generic/pst-optic/optic.bib
@@ -21,7 +21,7 @@
Title = {PSTricks Support for pdf},
Author = {Herbert Voss},
Organization = {},
- Address = {\url{http://www.educat.hu-berlin.de/~voss/lyx/pdf/pdftricks.phtml}},
+ Address = {\url{http://PSTricks.tug.org}},
Note = {},
year = 2002,
}
diff --git a/Master/texmf-dist/doc/generic/pst-optic/pst-optic-doc.pdf b/Master/texmf-dist/doc/generic/pst-optic/pst-optic-doc.pdf
index e762e4c88ab..04635753653 100644
--- a/Master/texmf-dist/doc/generic/pst-optic/pst-optic-doc.pdf
+++ b/Master/texmf-dist/doc/generic/pst-optic/pst-optic-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-optic/pst-optic-doc.tex b/Master/texmf-dist/doc/generic/pst-optic/pst-optic-doc.tex
index 67b82d1e258..e25b54a1c94 100644
--- a/Master/texmf-dist/doc/generic/pst-optic/pst-optic-doc.tex
+++ b/Master/texmf-dist/doc/generic/pst-optic/pst-optic-doc.tex
@@ -1,25 +1,27 @@
\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
-\usepackage[vtex]{geometry}
-\usepackage{graphicx}
-\usepackage{subfigure}
-\usepackage{pstcol}
-\usepackage{pst-optic}
+\usepackage{geometry}
+\usepackage{graphicx,lmodern}
+\usepackage{subfig}
+\usepackage{pstricks}
\usepackage{pst-text}
+\usepackage{pst-optic}
+\let\SaveFV\fileversion
\usepackage{url}
\usepackage{amsmath}
\usepackage{tabularx}
\usepackage{lscape}
\usepackage{fancyhdr}
+\usepackage[scaled=0.9]{luximono}
\pagestyle{fancy}
\lfoot{\small\ttfamily\jobname.tex}
\cfoot{}
-\rfoot{}
+\rfoot{\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\usepackage{listings}
-\lstset{language=TEX,basicstyle=\ttfamily\footnotesize,%
+\lstset{language=PSTricks,basicstyle=\ttfamily\footnotesize,%
extendedchars=true,numbers=left,numberstyle=\tiny}
\usepackage{multicol}
\let\myPart\part
@@ -29,30 +31,48 @@
\newcommand{\PS}{PostScript}
\newcommand\CMD[1]{\texttt{\textbackslash#1}}
\psset{subgriddiv=0,gridlabels=7pt,griddots=5}
-\usepackage[vtex]{hyperref}
+\usepackage[colorlinks,linktocpage]{hyperref}
+\usepackage{breakurl}
\begin{document}
\author{Manuel Luque\thanks{Mluque5130@aol.com} \and Herbert Voß\thanks{voss@perce.de}}
-\date{2003/02/15}
-\title{Lenses and Mirrors: PST-optic v0.9}
+\date{\today}
+\title{Lenses and Mirrors: PST-optic v\SaveFV}
\maketitle
+\begin{abstract}
+This version uses the extended keyval package \verb+xkeyval+, so be sure that you have installed
+this package together with the special one \verb+pst-xkey+ for PSTricks. The \verb+xkeyval+
+package bundle is available at \url{ftp://ftp.dante.de/pub/tex/macros/latex/contrib/xkeyval/}.
+It is also important that after \verb+pst-optic+ no package is loaded, which uses the old keyval interface.
+\vspace*{2cm}
+\end{abstract}%
+
+\clearpage
\tableofcontents
\section*{Introduction}
-\verb|pstricks| writes pure PostScript\cite{PostScript} code, so it is not possible to run \TeX{} files with pdf\LaTeX{} when there are pstricks macros in the document. If you still need a PDF output use the package \verb|pdftricks.sty|\cite{pdftricks} or the for Linux free available program \verb|vlatex| (\url{http://www.micropress-inc.com/linux/}) or build the PDF with \verb|ps2pdf| (\verb|dvi|$\rightarrow$\verb|ps|$\rightarrow$\verb|pdf|).
+\verb|pstricks| writes pure PostScript\cite{PostScript} code, so it is not possible to run
+\TeX{} files with pdf\LaTeX{} when there are pstricks macros in the document. If you still
+need a PDF output use the package \verb|pdftricks.sty|\cite{pdftricks} or the for Linux
+free available program \verb|vlatex| (\url{http://www.micropress-inc.com/linux/}) or
+build the PDF with \verb|ps2pdf| (\verb|dvi|$\rightarrow$\verb|ps|$\rightarrow$\verb|pdf|).
\par
-If you need package \verb|graphicx.sty| load it before any \verb|pstricks| package. You do not need to load \verb|pstricks.sty|, it will be done by \verb|pst-optic| by default.
+If you need package \verb|graphicx.sty| load it before any \verb|pstricks| package.
+You do not need to load \verb|pstricks.sty|, it will be done by \verb|pst-optic.sty| by default.
-\vspace{\fill}
-This PDF file was created with the \textbf{vlatex} program from the free available \textit{VTeX/Lnx v7.530 - the VTeX distribution for Linux (x86)}.
+%\vspace{\fill}
+%This PDF file was created with the \textbf{vlatex} program from the free available
+%\textit{VTeX/Lnx v7.530 - the VTeX distribution for Linux (x86)}.
\part{General Options}
-All options are by default documentwide valid but not supported by all macros. Table \ref{tab:generalOptions} shows the general ones. Others are shown in table \ref{tab:defaultLens} and \ref{tab:defaultSpiegel}.
+All options are by default documentwide valid but not supported by all macros.
+Table \ref{tab:generalOptions} shows the general ones. Others are shown in
+table \ref{tab:defaultLens} and \ref{tab:defaultSpiegel}.
\begin{table}[!htb]
\centering
@@ -83,7 +103,8 @@ All options are by default documentwide valid but not supported by all macros. T
\caption{General options and the defaults}\label{tab:generalOptions}
\end{table}
-\verb|pst-optic| puts the lens and mirror macros in an own \verb|pspicture| environment. The star version enables the clipping option of \verb|pstricks|:
+\verb|pst-optic| puts the lens and mirror macros in an own \verb|pspicture| environment.
+The star version enables the clipping option of \verb|pstricks|:
\begin{lstlisting}
\begin{pspicture}*(xLeft,yBottom)(xRight,yTop)
@@ -93,26 +114,32 @@ All options are by default documentwide valid but not supported by all macros. T
\end{pspicture}
\end{lstlisting}
-If you need other values for the \verb|pspicture| environment, then use the \verb|\rput| command to place the macro at any position.
+If you need other values for the \verb|pspicture| environment, then use the \verb|\rput|
+command to place the macro at any position.
\begin{lstlisting}
\begin{pspicture}(-5,-1.5)(7,4)
\rput(1.5,1.5){%
- \lens[lensType=DVG,lensGlass=true,%
- lensWidth=0.5,rayColor=red]}
+ \lens[lensType=DVG,lensGlass=true,lensWidth=0.5,rayColor=red,%
+ focus=-2,AB=2,spotAi=270,spotBi=90]}
\end{pspicture}
\end{lstlisting}
\par
\begin{center}
+\bgroup
\begin{pspicture}(-5,-1.5)(7,4)
\psgrid[subgriddiv=0,gridlabels=5pt,griddots=5]
- \rput(1.5,1.5){\scalebox{0.75}{\lens[lensType=DVG,%
- lensGlass=true,lensWidth=0.5,rayColor=red]}}
+ \rput(1.5,1.5){%
+ \lens[lensType=DVG,lensGlass=true,lensWidth=0.5,rayColor=red,%
+ focus=-2,AB=2,spotAi=270,spotBi=90]}
\end{pspicture}
+\egroup
\end{center}
-\par
+\vspace{1cm}
+\section{\CMD{resetOpticOptions}}
+This macro resets all \verb+pst-optic+ options to the default value.
\part{Lenses}
@@ -129,28 +156,29 @@ Figure \ref{fig:nodes} shows the coordinates of the predefined nodes (see table
\begin{lstlisting}
\begin{pspicture}*(-8,-3.25)(8,3.25)
- \rput(0,0){%
- \lens[drawing=false]
- \psline[linewidth=1pt](xLeft)(xRight)
- \qdisk(A){1.5pt}
- \qdisk(B){1.5pt}
- \qdisk(A'){1.5pt}\qdisk(B'){1.5pt}
- \qdisk(F){1.5pt}\qdisk(F'){1.5pt}
- \qdisk(O){1.5pt}\qdisk(I){1.5pt}
- \qdisk(I'){1.5pt}\qdisk(I1){1.5pt}
- \qdisk(I2){1.5pt}
- \uput[270](A){A}\uput[90](B){B}
- \uput[270](F){F}\uput[0](I){I}
- \uput[0](I'){$\mathrm{I'}$}\uput[270](F'){$\mathrm{F'}$}
- \uput[270](B'){$\mathrm{B'}$}\uput[90](A'){$\mathrm{A'}$}
- \uput[180](I1){I1}\uput[0](I2){I2}%
- }
+ \rput(0,0){%
+ \lens[drawing=false]
+ \psline[linewidth=1pt](xLeft)(xRight)
+ \qdisk(A){1.5pt}
+ \qdisk(B){1.5pt}
+ \qdisk(A'){1.5pt}\qdisk(B'){1.5pt}
+ \qdisk(F){1.5pt}\qdisk(F'){1.5pt}
+ \qdisk(O){1.5pt}\qdisk(I){1.5pt}
+ \qdisk(I'){1.5pt}\qdisk(I1){1.5pt}
+ \qdisk(I2){1.5pt}
+ \uput[270](A){A}\uput[90](B){B}
+ \uput[270](F){F}\uput[0](I){I}
+ \uput[0](I'){$\mathrm{I'}$}\uput[270](F'){$\mathrm{F'}$}
+ \uput[270](B'){$\mathrm{B'}$}\uput[90](A'){$\mathrm{A'}$}
+ \uput[180](I1){I1}\uput[0](I2){I2}%
+ }
\end{pspicture}
\end{lstlisting}
\begin{figure}[!htb]
\resizebox{\textwidth}{!}{%
+\bgroup
\begin{pspicture}*(-8,-3.25)(8,3.25)
\rput(0,0){%
\lens[drawing=false]
@@ -169,6 +197,7 @@ Figure \ref{fig:nodes} shows the coordinates of the predefined nodes (see table
}
\psgrid[subgriddiv=0,griddots=4,gridlabels=7pt]
\end{pspicture}%
+\egroup
}
\caption{Coodinates of the predefined Nodes}\label{fig:nodes}
\end{figure}
@@ -177,12 +206,14 @@ Figure \ref{fig:nodes} shows the coordinates of the predefined nodes (see table
\begin{figure}[htb]
\centering
- \scalebox{0.75}{\lens[lensType=CVG]}\vspace{-0.5cm}
+\bgroup
+ \psscalebox{0.75}{\lens[lensType=CVG]}\vspace{-0.5cm}
\caption{\texttt{\textbackslash lens[lensType=CVG]} (Collecting lens)}%
\label{fig:defaultCVG}
- \scalebox{0.75}{\lens[lensType=DVG]}\vspace{-0.5cm}
- \caption{\texttt{\textbackslash lens[lensType=DVG]} (Scatter lens)}%
+ \psscalebox{0.75}{\lens[lensType=DVG,focus=-2,spotAi=270,spotBi=90]}\vspace{-0.5cm}
+\egroup
+ \caption{\texttt{\textbackslash lens[lensType=DVG,focus=-2,spotAi=270,spotBi=90]} (Scatter lens)}%
\label{fig:defaultDVG}
\end{figure}
@@ -219,7 +250,7 @@ The origin of the coordinate system is by default vertically and horinzontally s
\begin{lstlisting}
\begin{pspicture}*(-7.5,-3)(7.5,3)
- \rput(0,0){\lens[...]}
+ \rput(0,0){\lens[...]}
\begin{pspicture}
\end{lstlisting}
@@ -245,8 +276,9 @@ The \verb|Transform|-macro renames all existing nodes in names with an additiona
\begin{figure}[htb]
-\subfigure[Definition of two unchained lenses]{%
+\subfloat[Definition of two unchained lenses]{%
\resizebox{0.49\textwidth}{!}{%
+\bgroup
\begin{pspicture}*(-7.5,-3)(7.5,3)
\rput(0,0){%
\lens[lensScale=0.6,XO=-4,%
@@ -259,9 +291,11 @@ The \verb|Transform|-macro renames all existing nodes in names with an additiona
lensGlass=true,lensWidth=0.5]%
}
\end{pspicture}
+\egroup
}}\hfill%
-\subfigure[Definition of two chained lenses with \texttt{\textbackslash lens[...] \textbackslash Transform \textbackslash lens[...]} and \texttt{lensTwo-Option}]{%
+\subfloat[Definition of two chained lenses with \texttt{\textbackslash lens[...] \textbackslash Transform \textbackslash lens[...]} and \texttt{lensTwo-Option}]{%
\resizebox{0.49\textwidth}{!}{%
+\bgroup
\begin{pspicture}*(-7.5,-3)(7.5,3)
\rput(0,0){%
\lens[lensScale=0.6,XO=-4,%
@@ -274,10 +308,12 @@ The \verb|Transform|-macro renames all existing nodes in names with an additiona
lensGlass=true,lensWidth=0.5]%
}
\end{pspicture}
+\egroup
}}
-\subfigure[Definition of two chained lenses and an additional modification of the node labels. \label{fig:lensTwoC}]{%
+\subfloat[Definition of two chained lenses and an additional modification of the node labels. \label{fig:lensTwoC}]{%
\resizebox{\textwidth}{!}{%
+\bgroup
\begin{pspicture}*(-7.5,-3)(7.5,3)
\rput(0,0){%
\lens[lensScale=0.6,XO=-4,%
@@ -297,28 +333,30 @@ The \verb|Transform|-macro renames all existing nodes in names with an additiona
}
\pspolygon[style=rayuresJaunes,linestyle=none](B)(I)(B')(I')(B)
\end{pspicture}
+\egroup
}}
-\caption{The meaning of the \texttt{\textbackslash Transform}-Macro with the default labels}\label{fig:lensTwo}
+\caption{The meaning of the \texttt{\textbackslash Transform}-Macro with the default
+labels}\label{fig:lensTwo}
\end{figure}
\begin{lstlisting}
\begin{pspicture}*(-7.5,-3)(7.5,3)
\rput(0,0){%
- \lens[lensScale=0.6,XO=-4,%
- nameF=F_1,nameA=A_1,nameB=B_1,%
- nameFi=F'_1,nameAi={ },nameBi={},nameO=O_1,
- focus=1,OA=-2,lensGlass=true, lensWidth=0.5]%
+ \lens[lensScale=0.6,XO=-4,%
+ nameF=F_1,nameA=A_1,nameB=B_1,%
+ nameFi=F'_1,nameAi={ },nameBi={},nameO=O_1,
+ focus=1,OA=-2,lensGlass=true, lensWidth=0.5]%
}
\pspolygon[style=rayuresJaunes,linestyle=none](B)(I)(B')(I')(B)
\Transform
\rput(0,0){%
- \lens[lensScale=1.2,XO=2,focus=2,%
- nameA=A'_1,spotA=90,nameB=B'_1,spotB=270,%
- nameO=O_2,nameAi=A'_2,spotAi=270,%
- nameBi=B'_2,spotBi=90,nameF=F_2,nameFi=F'_2,%
- lensTwo=true,%
- lensGlass=true,lensWidth=0.5]%
+ \lens[lensScale=1.2,XO=2,focus=2,%
+ nameA=A'_1,spotA=90,nameB=B'_1,spotB=270,%
+ nameO=O_2,nameAi=A'_2,spotAi=270,%
+ nameBi=B'_2,spotBi=90,nameF=F_2,nameFi=F'_2,%
+ lensTwo=true,%
+ lensGlass=true,lensWidth=0.5]%
}
\pspolygon[style=rayuresJaunes,linestyle=none](B)(I)(B')(I')(B)
\end{pspicture}
@@ -326,7 +364,10 @@ The \verb|Transform|-macro renames all existing nodes in names with an additiona
\section{\CMD{rayInterLens}}
-This macro is only useful for a two-lens-system. Figure \ref{fig:RayInter} shows such a system. The nodes \verb|B1, I11, F'1, B'1| are predefined by the \verb|lens|-macro. To draw the two rays from the left lense via the node \verb|B'1| to the second lens, we need the coordinates of these points. \verb|\rayInterLense| defines such nodes. The Syntax:
+This macro is only useful for a two-lens-system. Figure \ref{fig:RayInter} shows such a system.
+The nodes \verb|B1, I11, F'1, B'1| are predefined by the \verb|lens|-macro. To draw the two rays
+from the left lense via the node \verb|B'1| to the second lens, we need the coordinates of these
+points. \verb|\rayInterLense| defines such nodes. The Syntax:
{\small\begin{verbatim}
\rayInterLense(StartNode)(IntermediatNode)(LensDistance){LensNode}
\end{verbatim}}
@@ -344,6 +385,7 @@ The two parallel lines are drawn with the \verb|\Parallel|-Macro.
\begin{figure}[!htb]
\resizebox{\textwidth}{!}{%
+\bgroup
\begin{pspicture}*(-7.5,-4)(7.5,4)
\rput(0,0){%
\lens[focus=1.5,OA=-2,AB=0.6,XO=-5,lensGlass=true,%
@@ -377,6 +419,7 @@ The two parallel lines are drawn with the \verb|\Parallel|-Macro.
\psgrid[subgriddiv=0,griddots=5, gridlabels=7pt]
\psline[linestyle=dotted, linewidth=2pt,linecolor=black]{->}(0,-4)(0,+4)
\end{pspicture}%
+\egroup
}
\caption{Demonstration of \texttt{\textbackslash rayInterLens}\label{fig:RayInter}}
\end{figure}
@@ -385,18 +428,19 @@ The two parallel lines are drawn with the \verb|\Parallel|-Macro.
\section{\CMD{telescope}}
-Figure {\ref{fig:defaultTele} shows the configuration of a telescope and table \ref{tab:defaultSpiegel} the special options for the \verb|\telescop|-Macro.
+Figure~\ref{fig:defaultTele} shows the configuration of a telescope and table~\ref{tab:defaultSpiegel}
+the special options for the \verb|\telescop|-Macro.
\begin{figure}[!htb]
- \resizebox{\textwidth}{!}{\telescope}\vspace{-0.5cm}
- \caption{\texttt{\textbackslash telescope}-Macro}%
- \label{fig:defaultTele}
+ \abovecaptionskip=-0.5cm
+ \resizebox{\linewidth}{!}{\telescope}
+ \bigskip
+ \caption{\CMD{telescope}-Macro}\label{fig:defaultTele}
\end{figure}
-
\part{Mirrors}
\section{options}
@@ -429,7 +473,8 @@ Figure \ref{fig:Spiegel} shows the available mirrors and table \ref{tab:defaultS
\begin{figure}[!htb]
\centering
-\subfigure[]{%
+\subfloat[]{%
+\bgroup
\begin{pspicture}*(-1,-3)(3,3)
\psgrid[subgriddiv=0,griddots=5]
\rput(0,0){\mirrorCVG[mirrorColor=gray,drawing=false]}
@@ -440,8 +485,10 @@ Figure \ref{fig:Spiegel} shows the available mirrors and table \ref{tab:defaultS
\pcline[arrows=|-|](1,-2.75)(0.75,-2.75)\rput[l](1.1,-2.75){mirrorWidth}
\rput[l](1,-1){mirrorColor}\psline{<-}(0.2,-1)(0.8,-1)
\end{pspicture}%
+\egroup
}\hfill%
-\subfigure[]{%
+\subfloat[]{%
+\bgroup
\begin{pspicture}*(-4,-3)(1,3)
\psgrid[subgriddiv=0,griddots=5]
\rput(0,0){\mirrorDVG[mirrorColor=gray,drawing=false]}
@@ -452,8 +499,10 @@ Figure \ref{fig:Spiegel} shows the available mirrors and table \ref{tab:defaultS
\pcline[arrows=|-|](-1.25,-2.75)(-1,-2.75)\rput[r](-1.3,-2.75){mirrorWidth}
\rput[r](-2,-2){mirrorColor}\psline{->}(-2,-2)(-0.9,-2)
\end{pspicture}
+\egroup
}\hfill
-\subfigure[\label{fig:planMirror}]{%
+\subfloat[\label{fig:planMirror}]{%
+\bgroup
\begin{pspicture}(-2,-2)(2,2)
\psgrid[subgriddiv=0, gridlabels=5pt,griddots=4]
\pnode(-1.5,-1.5){M1}
@@ -469,6 +518,7 @@ Figure \ref{fig:Spiegel} shows the available mirrors and table \ref{tab:defaultS
\pscircle*(A'){2pt}
\psline[linestyle=dashed](A)(A')
\end{pspicture}
+\egroup
}
\caption{The different mirror macros:
a) \texttt{\textbackslash mirrorCVG}
@@ -477,33 +527,34 @@ c) \texttt{\textbackslash planMirrorRay}%
}\label{fig:Spiegel}
\end{figure}
-
\section{\CMD{mirrorCVG}}
Figure \ref{fig:mirrorCVG} shows the default for the \verb|mirrorCVG|-macro with the predefined nodes anf three default rays.
-
\begin{figure}[!htb]
\begin{minipage}{0.48\textwidth}
\resizebox{\textwidth}{!}{%
+\bgroup
\begin{pspicture}*(-1,-3)(6,3)
- \psgrid[subgriddiv=0,gridlabels=5pt,griddots=5]
- \rput(0,0){\mirrorCVG[rayColor=red]}
+ \psgrid[subgriddiv=0,gridlabels=5pt,griddots=5]
+ \rput(0,0){\mirrorCVG[rayColor=red]}
\end{pspicture}%
+\egroup
}
\caption{Parabolic Mirror \texttt{\textbackslash mirrorCVG}}\label{fig:mirrorCVG}
\end{minipage}\hfill
\begin{minipage}{0.48\textwidth}
\resizebox{0.9\textwidth}{!}{%
+\bgroup
\begin{pspicture}*(-0.5,-4)(8,4)
- \rput(0,0){\mirrorCVG[mirrorHeight=8,mirrorDepth=4,drawing=false]}
- \multido{\rY=-4.00+0.25}{33}{%
- \mirrorCVGRay[%
- linewidth=0.5pt,%
- mirrorHeight=8,%
- mirrorDepth=4](10,\rY)(1,\rY){Dummy}%
- }
-\end{pspicture}%
+ \rput(0,0){\mirrorCVG[mirrorHeight=8,mirrorDepth=4,drawing=false]}
+ \multido{\rY=-4.00+0.25}{33}{%
+ \mirrorCVGRay[linewidth=0.5pt,%
+ mirrorHeight=8,%
+ mirrorDepth=4](10,\rY)(1,\rY){Dummy}%
+ }
+\end{pspicture}
+\egroup
}
\caption{Example}\label{fig:CVGAnwendung}
\end{minipage}
@@ -615,16 +666,16 @@ The two nodes define the mirror axis and the graphics object is in most cases a
\begin{lstlisting}
\newcommand{\dtk}{%
- \pstextpath(0,0){%
- \psplot[linestyle=none]{0}{8}{x sqrt sqrt 2 mul}}%
- {\Large Die \TeX{}nische Komödie von DANTE}%
+ \pstextpath(0,0){%
+ \psplot[linestyle=none]{0}{8}{x sqrt sqrt 2 mul}}%
+ {\Large Die \TeX{}nische Komödie von DANTE}%
}
\begin{pspicture}(-4.5,-2)(2.5,5)
- \pnode(-4,-2){M1} \uput[-90](M1){M1}
- \pnode(4,4){M2}\uput[90](M2){M2}
- \psline[linewidth=5\pslinewidth,linecolor=lightgray](M1)(M2)
- \rput(-3.5,-1.75){\dtk}% Original schreiben
- \symPlan(M1)(M2){\rput(-3.5,-1.75){\dtk}}% Spiegelbild schreiben
+ \pnode(-4,-2){M1} \uput[-90](M1){M1}
+ \pnode(4,4){M2}\uput[90](M2){M2}
+ \psline[linewidth=5\pslinewidth,linecolor=lightgray](M1)(M2)
+ \rput(-3.5,-1.75){\dtk}% Original schreiben
+ \symPlan(M1)(M2){\rput(-3.5,-1.75){\dtk}}% Spiegelbild schreiben
\end{pspicture}
\end{lstlisting}
@@ -660,7 +711,7 @@ This macro is useful for the demonstration of high and low beam light. The synta
The predefined options especially for the \verb|pspicture|-coordinates are
\begin{lstlisting}
-\setkeys{psset}{xLeft=-5,xRight=5,yBottom=-5,yTop=5,drawing=false}% the default
+\psset[pst-optic]{xLeft=-5,xRight=5,yBottom=-5,yTop=5,drawing=false}% the default
\end{lstlisting}
You can place this macro with the \verb|\rput|-command at any place in your own \verb|pspicture|-environment.
@@ -689,11 +740,10 @@ You can place this macro with the \verb|\rput|-command at any place in your own
\begin{lstlisting}
\begin{pspicture}(-1,-5.5)(5,5.5)
- \rput(0,0){%
- \beamLight[mirrorDepth=4.75,%
- mirrorWidth=0.1,%
- mirrorHeight=10,%
- linecolor=lightgray]}
+ \rput(0,0){%
+ \beamLight[mirrorDepth=4.75,%
+ mirrorWidth=0.1,mirrorHeight=10,%
+ linecolor=lightgray]}
\end{pspicture}%
\end{lstlisting}
\caption{\CMD{beamLight} with Options}
@@ -756,7 +806,10 @@ A total reflection instead of a refraction is possible, when the ray starts in a
\end{pspicture}
-The macro needs the values for the four nodes, the two refractionnumbers and the name for the end node. As you can see in the figure the end node of the ray is the intermediate point between the linear ray and the linear medium. The end node of the refracted ray has the same name with an additional single quotation mark. In the figure the macro was called as
+The macro needs the values for the four nodes, the two refractionnumbers and the name for
+the end node. As you can see in the figure the end node of the ray is the intermediate
+point between the linear ray and the linear medium. The end node of the refracted ray has
+the same name with an additional single quotation mark. In the figure the macro was called as
\medskip
\verb|\refractionRay(A)(B)(C)(D){1}{4}{E}|
@@ -886,7 +939,6 @@ The refractionnumbers have the internal names \verb|refractA| and \verb|refractB
\section{\CMD{mirrorCVG}}
-
The syntax is
\bigskip
@@ -894,13 +946,11 @@ The syntax is
\bigskip
-Without the option \verb|mirrorType=SPH| you'll get a parabolic mirror, which is the default.
+\resetOpticOptions
\mirrorCVG[mirrorType=SPH]
-
-
-
+Without the option \verb|mirrorType=SPH| you'll get a parabolic mirror, which is the default.
\section{\CMD{mirrorDVG}}
@@ -912,11 +962,11 @@ The syntax is
-Without the option \verb|mirrorType=SPH| you'll get a parabolic mirror (option PARA).
-\par
\mirrorDVG[mirrorType=SPH]
+Without the option \verb|mirrorType=SPH| you'll get a parabolic mirror (option PARA).
+
\section{\CMD{ABinterSPHLens}}
The syntax is
@@ -948,7 +998,8 @@ The syntax is
\psgrid
\end{pspicture}
-The macro needs two nodes for the rays, the coordinates/nodes of the center/middle of the sperical lens and a name of the intermediate node.In the figure the macro was called as
+The macro needs two nodes for the rays, the coordinates/nodes of the center/middle of the
+sperical lens and a name of the intermediate node.In the figure the macro was called as
\bigskip
@@ -1073,29 +1124,27 @@ This macro calculates the coordinates of the given ray $\overline{\mathrm{AB}}$
\begin{lstlisting}
\begin{pspicture*}(-1,-3)(6,3)
- \rput(0,0){%
- \mirrorCVG[%
- mirrorType=SPH,%
- mirrorHeight=5,%
- mirrorWidth=0.2,%
- yBottom=-3,yTop=3,%
- drawing=false,%
- mirrorDepth=3]%
- \qdisk(Center){2pt}\qdisk(Focus){2pt}
- \uput[-90](Center){Center}\uput[-90](Focus){F}
- \psline(O)(xRight)
- }
- \ABinterSPHLens(5,1)(3,1)(Center){C}
- \reflectionRay[mirrorType=CVG-SPH](5,1)(C){D}
- \qdisk(5,1){2pt}\uput[-90](5,1){A}
- \qdisk(3,1){2pt}\uput[-90](3,1){B}
- \qdisk(C){2pt}\uput[180](C){C}
- \qdisk(D){2pt}\uput[45](D){D}
- \psset{linewidth=1.5pt,linecolor=red,arrows=->}
- \psline(5,1)(3,1)
- \psline(3,1)(C)
- \psline(C)(D)
- \psgrid
+ \rput(0,0){%
+ \mirrorCVG[%
+ mirrorType=SPH,%
+ mirrorHeight=5, mirrorWidth=0.2,%
+ yBottom=-3,yTop=3,drawing=false,%
+ mirrorDepth=3]%
+ \qdisk(Center){2pt}\qdisk(Focus){2pt}
+ \uput[-90](Center){Center}\uput[-90](Focus){F}
+ \psline(O)(xRight)
+ }
+ \ABinterSPHLens(5,1)(3,1)(Center){C}
+ \reflectionRay[mirrorType=CVG-SPH](5,1)(C){D}
+ \qdisk(5,1){2pt}\uput[-90](5,1){A}
+ \qdisk(3,1){2pt}\uput[-90](3,1){B}
+ \qdisk(C){2pt}\uput[180](C){C}
+ \qdisk(D){2pt}\uput[45](D){D}
+ \psset{linewidth=1.5pt,linecolor=red,arrows=->}
+ \psline(5,1)(3,1)
+ \psline(3,1)(C)
+ \psline(C)(D)
+ \psgrid
\end{pspicture*}
\end{lstlisting}
@@ -1133,31 +1182,29 @@ This macro calculates the coordinates of the given ray $\overline{\mathrm{AB}}$
\begin{lstlisting}
\begin{pspicture}*(-10,-4)(3,4)
- \psgrid[subgriddiv=0,griddots=5,gridlabels=7pt]
- \rput(0,0){\lensSPH[%
- lensType=CVG,%
- lensHeight=12,%
- lensWidth=10,%
- yBottom=-4,yTop=4,xLeft=-5,xRight=5,%
- drawing=false]}
- \psset{linecolor=red,linewidth=1.5pt,dotstyle=|}
- \pnode(-9,0){P}\psdots(P)\uput[-90](P){P}
- \psline(P)(xRight)
- \lensSPHRay(P)(-5,2){1}{9}{Q}%
- \psline(P)(Q)(Q')
- \psdots(Q)\uput[90](Q){B}
- \ABinterCD(Q)(Q')(0,0)(5,0){P'}
- \psdots(Q')\uput[-90](P'){P'}
- \psline[linewidth=0.5pt,linecolor=black](Center')(Q)
- \psline[linewidth=0.5pt,linecolor=black](Q)(Q|0,0)
- \psdots(Center')\uput[-90](Center'){C}
+\psgrid[subgriddiv=0,griddots=5,gridlabels=7pt]
+\rput(0,0){\lensSPH[%
+ lensType=CVG,%
+ lensHeight=12,lensWidth=10,%
+ yBottom=-4,yTop=4,xLeft=-5,xRight=5,drawing=false]}
+\psset{linecolor=red,linewidth=1.5pt,dotstyle=|}
+\pnode(-9,0){P}\psdots(P)\uput[-90](P){P}
+\psline(P)(xRight)
+\lensSPHRay(P)(-5,2){1}{9}{Q}%
+\psline(P)(Q)(Q')
+\psdots(Q)\uput[90](Q){B}
+\ABinterCD(Q)(Q')(0,0)(5,0){P'}
+\psdots(Q')\uput[-90](P'){P'}
+\psline[linewidth=0.5pt,linecolor=black](Center')(Q)
+\psline[linewidth=0.5pt,linecolor=black](Q)(Q|0,0)
+\psdots(Center')\uput[-90](Center'){C}
\end{pspicture}
\end{lstlisting}
\subsection[Height of an Image]{Construction for determining the height of an image formed by refraction at a sperical surface}
-\begin{pspicture}*(-13,-3)(3,5)
+\begin{pspicture*}[showgrid=true](-13,-3)(3,5)
\psgrid[subgriddiv=0,griddots=5,gridlabels=7pt]
\rput(0,0){\lensSPH[%
lensType=CVG,%
@@ -1180,34 +1227,31 @@ This macro calculates the coordinates of the given ray $\overline{\mathrm{AB}}$
\uput[90](P'){P'}
\uput[-90](Q'){Q'}
\psdots(Center')\uput[90](Center'){C}
-\end{pspicture}
+\end{pspicture*}
\bigskip
\begin{lstlisting}
-\begin{pspicture}*(-13,-3)(3,5)
- \psgrid[subgriddiv=0,griddots=5,gridlabels=7pt]
- \rput(0,0){\lensSPH[%
- lensType=CVG,%
- lensHeight=12,%
- lensWidth=10,%
- yBottom=-4,yTop=4,xLeft=-5,xRight=5,%
- drawing=false]}
- \psset{linecolor=red,linewidth=1.5pt,dotstyle=|}
- \pnode(-12,0){P}\psdots(P)\uput[-90](P){P}
- \pnode(-12,4){Q}\psdots(Q)\uput[90](Q){Q}
- \psline[linecolor=blue,linewidth=3pt,arrows=->](P)(Q)
- \psline(P)(xRight)
- \lensSPHRay(Q)(Center'){1}{9}{S1}%
- \lensSPHRay(Q)(-5,0){1}{9}{S2}%
- \psline(Q)(S1')
- \psline(Q)(S2)(S2')
- \ABinterCD(Q)(S1')(S2)(S2'){Q'}
- \pnode(Q'|0,0){P'}
- \psline[linecolor=blue,linewidth=3pt,arrows=->](P')(Q')
- \uput[90](P'){P'}
- \uput[-90](Q'){Q'}
- \psdots(Center')\uput[90](Center'){C}
-\end{pspicture}
+\begin{pspicture*}[showgrid=true](-13,-3)(3,5)
+\rput(0,0){\lensSPH[%
+ lensType=CVG,%
+ lensHeight=12,lensWidth=10,%
+ yBottom=-4,yTop=4,xLeft=-5,xRight=5,drawing=false]}
+\psset{linecolor=red,linewidth=1.5pt,dotstyle=|}
+\pnode(-12,0){P}\psdots(P)\uput[-90](P){P}
+\pnode(-12,4){Q}\psdots(Q)\uput[90](Q){Q}
+\psline[linecolor=blue,linewidth=3pt,arrows=->](P)(Q)
+\psline(P)(xRight)
+\lensSPHRay(Q)(Center'){1}{9}{S1}%
+\lensSPHRay(Q)(-5,0){1}{9}{S2}%
+\psline(Q)(S1')
+\psline(Q)(S2)(S2')
+\ABinterCD(Q)(S1')(S2)(S2'){Q'}
+\pnode(Q'|0,0){P'}
+\psline[linecolor=blue,linewidth=3pt,arrows=->](P')(Q')
+\uput[90](P'){P'}
+\uput[-90](Q'){Q'}
+\psdots(Center')\uput[90](Center'){C}
+\end{pspicture*}
\end{lstlisting}
@@ -1236,7 +1280,7 @@ Use the \verb|\rput|-macro to put the eye elsewhere:
\begin{lstlisting}
\begin{pspicture}(-1,-0.75)(1,0.75)
- \rput(1,0){\eye}
+ \rput(1,0){\eye}
\end{pspicture}
\end{lstlisting}
@@ -1359,57 +1403,57 @@ The only special option for \verb|Parallel| is \verb|length=<value>|.
The nodes \verb|nodeA| and \verb|nodeB| are known nodes of a given line and \verb|Start node| is the given node of a parallel line. \verb|End node| is the name of the calculated line end. The use of \verb|Parallel| is shown for an example (figure \ref{fig:Parallel}).
\begin{lstlisting}
-\begin{pspicture}*(-5,-3.5)(5,3.5)
- \psgrid[subgriddiv=0,griddots=5]
- \pnode(2,-2){FF}\qdisk(FF){1.5pt}
- \pnode(-5,5){A}
- \pnode(0,0){O}
- \multido{\nCountA=-2.4+0.4}{9}{%
- \Parallel[linecolor=red,length=9](O)(A)(0,\nCountA){P1}
- \psline[linecolor=red](0,\nCountA)(FF)
- \psOutLine[linecolor=red,length=9](0,\nCountA)(FF){P2}
- }
- \psline[linecolor=blue](A)(FF)
- \psOutLine[linecolor=blue,length=5](A)(FF){END1}
- \rput(0,0){%
- \lens[yBottom=-3.5,yTop=3.5,lensGlass=true,%
- lensHeight=6.5,%
- drawing=false,spotFi=315,lensWidth=0.5]%
- \psline[linewidth=1pt](xLeft)(xRight)
- \psline[length=2,linewidth=2pt,arrows=->](F')(FF)
- }
-\end{pspicture}
+\begin{pspicture*}[showgrid=true](-5,-3.5)(5,3.5)
+\pnode(2,-2){FF}\qdisk(FF){1.5pt}
+\pnode(-5,5){A}
+\pnode(0,0){O}
+\multido{\nCountA=-2.4+0.4}{9}{%
+ \Parallel[linecolor=red,length=9](O)(A)(0,\nCountA){P1}
+ \psline[linecolor=red](0,\nCountA)(FF)
+ \psOutLine[linecolor=red,length=9](0,\nCountA)(FF){P2}
+}
+\psline[linecolor=blue](A)(FF)
+\psOutLine[linecolor=blue,length=5](A)(FF){END1}
+\rput(0,0){%
+ \lens[yBottom=-3.5,yTop=3.5,lensGlass=true,%
+ lensHeight=6.5,drawing=false,spotFi=315,lensWidth=0.5]%
+ \psline[linewidth=1pt](xLeft)(xRight)
+ \psline[length=2,linewidth=2pt,arrows=->](F')(FF)
+}
+\end{pspicture*}
\end{lstlisting}
\begin{figure}[htb]
\centering
-\begin{pspicture}*(-5,-3.5)(5,3.5)
- \psgrid[subgriddiv=0,griddots=5]
- \pnode(2,-2){FF}\qdisk(FF){1.5pt}
- \pnode(-5,5){A}
- \pnode(0,0){O}
- \multido{\nCountA=-2.4+0.4}{9}{%
- \Parallel[linecolor=red,length=9](O)(A)(0,\nCountA){P1}
- \psline[linecolor=red](0,\nCountA)(FF)
- \psOutLine[linecolor=red,length=9](0,\nCountA)(FF){P2}
- }
- \psline[linecolor=blue](A)(FF)
- \psOutLine[linecolor=blue,length=5](A)(FF){END1}
- \rput(0,0){%
- \lens[yBottom=-3.5,yTop=3.5,lensGlass=true,lensHeight=6.25,%
- drawing=false,spotFi=315,lensWidth=0.5]%
- \psline[linewidth=1pt](xLeft)(xRight)
- \psline[length=2,linewidth=2pt,arrows=->](F')(FF)
- }
-\end{pspicture}
+\begin{pspicture*}[showgrid=true](-5,-3.5)(5,3.5)
+\pnode(2,-2){FF}\qdisk(FF){1.5pt}
+\pnode(-5,5){A}
+\pnode(0,0){O}
+\multido{\nCountA=-2.4+0.4}{9}{%
+ \Parallel[linecolor=red,length=9](O)(A)(0,\nCountA){P1}
+ \psline[linecolor=red](0,\nCountA)(FF)
+ \psOutLine[linecolor=red,length=9](0,\nCountA)(FF){P2}
+}
+\psline[linecolor=blue](A)(FF)
+\psOutLine[linecolor=blue,length=5](A)(FF){END1}
+\rput(0,0){%
+ \lens[yBottom=-3.5,yTop=3.5,lensGlass=true,%
+ lensHeight=6.5,drawing=false,spotFi=315,lensWidth=0.5]%
+ \psline[linewidth=1pt](xLeft)(xRight)
+ \psline[length=2,linewidth=2pt,arrows=->](F')(FF)
+}
+\end{pspicture*}
\caption{The \texttt{\textbackslash Parallel}-Macro}\label{fig:Parallel}
\end{figure}
\section{\texttt{\textbackslash ABinterCD}}
-This macro is used by the \verb|\telescop| macro. It determines the intersection point of two lines, in this case a ray and the mirror axis.
-Figure \ref{fig:ABinterCD} shows a part of figure \ref{fig:defaultTele}. Given are the points A, B (focus), C/D (mirror axis). We need the point E to draw the other rays for the ocular, which can be done with the \verb|\ABinterCD| macro. The syntax is:
+This macro is used by the \verb|\telescop| macro. It determines the intersection
+point of two lines, in this case a ray and the mirror axis.
+Figure \ref{fig:ABinterCD} shows a part of figure \ref{fig:defaultTele}. Given are
+the points A, B (focus), C/D (mirror axis). We need the point E to draw the other
+rays for the ocular, which can be done with the \verb|\ABinterCD| macro. The syntax is:
\par
\bigskip
@@ -1485,10 +1529,10 @@ The coordinates of the node \verb|A| are changed to the new ones. Negative value
\begin{lstlisting}
\begin{pspicture}(4,4)
- \pnode(3,1){A}
- \qdisk(A){2pt}\uput[20](A){A}
- \rotateNode(A){45}
- \qdisk(A){2pt}\uput[20](A){A}
+\pnode(3,1){A}
+\qdisk(A){2pt}\uput[20](A){A}
+\rotateNode(A){45}
+\qdisk(A){2pt}\uput[20](A){A}
\end{pspicture}
\end{lstlisting}
@@ -1530,18 +1574,18 @@ The coordinates of the nodes \verb|A,B,C| are changed to the new ones. Negative
\columnbreak
\begin{lstlisting}
\begin{pspicture}(-1,0)(4,4)
- \pnode(1,1){A}
- \pnode(3,1){B}
- \pnode(2,3){C}
- \qdisk(A){2pt}\uput[180](A){A}
- \qdisk(B){2pt}\uput[0](B){B}
- \qdisk(C){2pt}\uput[90](C){C}
- \psline(A)(B)(C)(A)
- \rotateTriangle(A)(B)(C){45}
- \qdisk(A){2pt}\uput[180](A){A}
- \qdisk(B){2pt}\uput[0](B){B}
- \qdisk(C){2pt}\uput[90](C){C}
- \psline[linecolor=red](A)(B)(C)(A)
+\pnode(1,1){A}
+\pnode(3,1){B}
+\pnode(2,3){C}
+\qdisk(A){2pt}\uput[180](A){A}
+\qdisk(B){2pt}\uput[0](B){B}
+\qdisk(C){2pt}\uput[90](C){C}
+\psline(A)(B)(C)(A)
+\rotateTriangle(A)(B)(C){45}
+\qdisk(A){2pt}\uput[180](A){A}
+\qdisk(B){2pt}\uput[0](B){B}
+\qdisk(C){2pt}\uput[90](C){C}
+\psline[linecolor=red](A)(B)(C)(A)
\end{pspicture}
\end{lstlisting}
@@ -1589,21 +1633,21 @@ The coordinates of the nodes \verb|A,B,C,D| are changed to the new ones. Negativ
\columnbreak
\begin{lstlisting}
\begin{pspicture}(-2,0)(4,5)
- \pnode(1,1){A}
- \pnode(3,1){B}
- \pnode(3,3){C}
- \pnode(1,3){D}
- \qdisk(A){2pt}\uput[180](A){A}
- \qdisk(B){2pt}\uput[0](B){B}
- \qdisk(C){2pt}\uput[90](C){C}
- \qdisk(D){2pt}\uput[180](D){D}
- \psline(A)(B)(C)(D)(A)
- \rotateFrame(A)(B)(C)(D){45}
- \qdisk(A){2pt}\uput[180](A){A}
- \qdisk(B){2pt}\uput[0](B){B}
- \qdisk(C){2pt}\uput[90](C){C}
- \qdisk(D){2pt}\uput[180](D){D}
- \psline[linecolor=red](A)(B)(C)(D)(A)
+\pnode(1,1){A}
+\pnode(3,1){B}
+\pnode(3,3){C}
+\pnode(1,3){D}
+\qdisk(A){2pt}\uput[180](A){A}
+\qdisk(B){2pt}\uput[0](B){B}
+\qdisk(C){2pt}\uput[90](C){C}
+\qdisk(D){2pt}\uput[180](D){D}
+\psline(A)(B)(C)(D)(A)
+\rotateFrame(A)(B)(C)(D){45}
+\qdisk(A){2pt}\uput[180](A){A}
+\qdisk(B){2pt}\uput[0](B){B}
+\qdisk(C){2pt}\uput[90](C){C}
+\qdisk(D){2pt}\uput[180](D){D}
+\psline[linecolor=red](A)(B)(C)(D)(A)
\end{pspicture}
\end{lstlisting}
@@ -1631,13 +1675,11 @@ Draws a line from \verb|Start| to \verb|End| with \verb|ArrowNumber| arrows insi
\columnbreak
\begin{lstlisting}
\begin{pspicture}(4,4)
- \arrowLine[linecolor=red](0,0)(4,3){3}
- \arrowLine[linecolor=green,%
- arrowsize=6pt,%
- arrows=-|](0,0)(3,1){2}
- \arrowLine[linecolor=blue,%
- arrowOffset=0.75,%
- arrowsize=6pt](4,0)(0,3){3}
+ \arrowLine[linecolor=red](0,0)(4,3){3}
+ \arrowLine[linecolor=green,%
+ arrowsize=6pt,arrows=-|](0,0)(3,1){2}
+ \arrowLine[linecolor=blue,%
+ arrowOffset=0.75,arrowsize=6pt](4,0)(0,3){3}
\end{pspicture}
\end{lstlisting}
@@ -1667,24 +1709,19 @@ A special option is \verb|arrowOffset|, which makes it possible to draw lines wi
\columnbreak
\begin{lstlisting}
\begin{pspicture}(4,2)
- \arrowLine[arrowsize=6pt,%
- linecolor=red](0,0.5)(4,0.5){3}
- \arrowLine[arrowsize=6pt,%
- linecolor=red,%
- arrows=<-](0,1)(4,1){3}
- \arrowLine[arrowsize=6pt,%
- linecolor=red](0,1.5)(4,1.5){3}
- \arrowLine[arrowsize=6pt,%
- linecolor=blue,%
- arrows=<-,%
- arrowOffset=0.2](0,1.5)(4,1.5){3}
+\arrowLine[arrowsize=6pt,linecolor=red](0,0.5)(4,0.5){3}
+\arrowLine[arrowsize=6pt,linecolor=red, arrows=<-](0,1)(4,1){3}
+\arrowLine[arrowsize=6pt,linecolor=red](0,1.5)(4,1.5){3}
+\arrowLine[arrowsize=6pt,linecolor=blue,%
+ arrows=<-,arrowOffset=0.2](0,1.5)(4,1.5){3}
\end{pspicture}
\end{lstlisting}
\end{multicols}
-
+\section{Credits}
+Aranud Schmittbuhl |
diff --git a/Master/texmf-dist/doc/generic/pst-optic/pst-optic-examples.pdf b/Master/texmf-dist/doc/generic/pst-optic/pst-optic-examples.pdf
index c90211279e2..5c61b3c5116 100644
--- a/Master/texmf-dist/doc/generic/pst-optic/pst-optic-examples.pdf
+++ b/Master/texmf-dist/doc/generic/pst-optic/pst-optic-examples.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-optic/pst-optic-examples.tex b/Master/texmf-dist/doc/generic/pst-optic/pst-optic-examples.tex
index 3e3b4cf539b..50cafec9a3c 100644
--- a/Master/texmf-dist/doc/generic/pst-optic/pst-optic-examples.tex
+++ b/Master/texmf-dist/doc/generic/pst-optic/pst-optic-examples.tex
@@ -1,10 +1,10 @@
\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
-\usepackage[vtex]{geometry}
+\usepackage{geometry}
\usepackage{graphicx}
\usepackage{subfigure}
-\usepackage{pstcol}
+\usepackage{pstricks}
\usepackage{pst-optic}
\usepackage{pst-text}
\usepackage{url}
@@ -29,7 +29,7 @@
\newcommand{\PS}{PostScript}
\newcommand\CMD[1]{\texttt{\textbackslash#1}}
\psset{subgriddiv=0,gridlabels=7pt,griddots=5}
-\usepackage[vtex]{hyperref}
+\usepackage{hyperref}
\begin{document}
\author{Manuel Luque\thanks{Mluque5130@aol.com} \and Herbert Voß\thanks{voss@perce.de}}
@@ -114,78 +114,82 @@ This PDF file was created with the \textbf{vlatex} program from the free availab
\resizebox{\textwidth}{!}{%
\begin{pspicture}(-8,-5)(8,3)
- \rput(0,0){%
- \lens[%
- lensGlass=true,lensWidth=0.4,%
- focus=4,AB=0.5,OA=-2.8,XO=2,drawing=false]%
- \psline[linewidth=0.5pt](xLeft)(xRight)
- }
- \pnode(!XO 2.5){L1}% extrémité supérieure de la lentille
- \pnode(!XO -2.5){L2}% extrémité inférieure de la lentille
- \psOutLine[length=5.5,linestyle=none](B')(L1){END1}
- \psBeforeLine[length=6,linestyle=none](L2)(B'){START}
- \pspolygon[style=rayuresJaunes,linestyle=none](B)(L1)(END1)(START)(L2)
- \psline[linewidth=1.5\pslinewidth,arrowinset=0]{->}(A)(B)
- \uput[270](A){A}
- \uput[90](B){B}
- \psline[linewidth=1.5\pslinewidth,%
- arrowinset=0,linestyle=dashed]{->}(A')(B')
- \uput[270](A'){$\mathrm{A'}$}
- \uput[90](B'){$\mathrm{B'}$}
- \psset{linecolor=red,arrowsize=0.2}
- \pcline[nodesepB=-4](B')(O)
- \psline(B)(I)(F')
- \psOutLine(I)(F'){END2}
- \Arrows(I)(F')
- \Arrows(B)(I)
- \psOutLine[length=1,linestyle=dashed](I')(B'){END3}
- \psline[linestyle=dashed](B)(F)
- \psline(B)(I')
- \Arrows[arrows=->>](B)(I')
- \psline[linestyle=dashed](B')(I')
- \psline[linestyle=dashed](B')(I)
- \psOutLine[length=2,arrows=->>](B')(I'){END4}
- \psOutLine[length=4](B')(I'){END5}
- \rput(8,0){\psset{linecolor=black}\eye}
-\end{pspicture}%
+\rput(0,0){%
+ \lens[%
+ lensGlass=true,lensWidth=0.4,%
+ focus=4,AB=0.5,OA=-2.8,XO=2,drawing=false]%
+ \psline[linewidth=0.5pt](xLeft)(xRight)}
+\pnode(!XO 2.5){L1}% extrmitsuprieuredelalentille
+\pnode(!XO -2.5){L2}% extrmitinfrieuredelalentille
+\psOutLine[length=5.5,linestyle=none](B')(L1){END1}
+\psBeforeLine[length=6,linestyle=none](L2)(B'){START}
+\pspolygon[style=rayuresJaunes,linestyle=none](B)(L1)(END1)(START)(L2)
+\psline[linewidth=1.5\pslinewidth,arrowinset=0]{->}(A)(B)
+\uput[270](A){A}
+\uput[90](B){B}
+\psline[linewidth=1.5\pslinewidth,arrowinset=0,%
+ linestyle=dashed]{->}(A')(B')
+\uput[270](A'){$\mathrm{A'}$}
+\uput[90](B'){$\mathrm{B'}$}
+\psset{linecolor=red,arrowsize=0.2}
+\pcline[nodesepB=-4](B)(O)% Mittelpunktstrahl
+\psline[linecolor=red,linestyle=dashed](B)(B')% ruckwaertige Verlaengerung
+\Arrows(B)(O)% Mittelpunktstrahl
+\psOutLine[length=2,arrows=->](B)(O){END6}% Mittelpunktstrahl
+\psline(B)(I)(F')
+\psOutLine(I)(F'){END2}
+\Arrows(I)(F')
+\Arrows(B)(I)
+\psOutLine[length=1,linestyle=dashed](I')(B'){END3}
+\psline[linestyle=dashed](B)(F)
+\psline(B)(I')
+\Arrows[arrows=->>](B)(I')
+\psline[linestyle=dashed](B')(I')
+\psline[linestyle=dashed](B')(I)
+\psOutLine[length=2,arrows=->>](B')(I'){END4}
+\psOutLine[length=4](B')(I'){END5}
+\rput(8,0){\psset{linecolor=black}\eye}
+\end{pspicture}
}
\begin{lstlisting}
\begin{pspicture}(-8,-5)(8,3)
- \rput(0,0){%
- \lens[%
- lensGlass=true,lensWidth=0.4,%
- focus=4,AB=0.5,OA=-2.8,XO=2,drawing=false]%
- \psline[linewidth=0.5pt](xLeft)(xRight)
- }
- \pnode(!XO 2.5){L1}% extrémité supérieure de la lentille
- \pnode(!XO -2.5){L2}% extrémité inférieure de la lentille
- \psOutLine[length=5.5,linestyle=none](B')(L1){END1}
- \psBeforeLine[length=6,linestyle=none](L2)(B'){START}
- \pspolygon[style=rayuresJaunes,linestyle=none](B)(L1)(END1)(START)(L2)
- \psline[linewidth=1.5\pslinewidth,arrowinset=0]{->}(A)(B)
- \uput[270](A){A}
- \uput[90](B){B}
- \psline[linewidth=1.5\pslinewidth,%
- arrowinset=0,linestyle=dashed]{->}(A')(B')
- \uput[270](A'){$\mathrm{A'}$}
- \uput[90](B'){$\mathrm{B'}$}
- \psset{linecolor=red,arrowsize=0.2}
- \pcline[nodesepB=-4](B')(O)
- \psline(B)(I)(F')
- \psOutLine(I)(F'){END2}
- \Arrows(I)(F')
- \Arrows(B)(I)
- \psOutLine[length=1,linestyle=dashed](I')(B'){END3}
- \psline[linestyle=dashed](B)(F)
- \psline(B)(I')
- \Arrows[arrows=->>](B)(I')
- \psline[linestyle=dashed](B')(I')
- \psline[linestyle=dashed](B')(I)
- \psOutLine[length=2,arrows=->>](B')(I'){END4}
- \psOutLine[length=4](B')(I'){END5}
- \rput(8,0){\psset{linecolor=black}\eye}
-\end{pspicture}%
+\rput(0,0){%
+ \lens[%
+ lensGlass=true,lensWidth=0.4,%
+ focus=4,AB=0.5,OA=-2.8,XO=2,drawing=false]%
+ \psline[linewidth=0.5pt](xLeft)(xRight)}
+\pnode(!XO 2.5){L1}% extrmitsuprieuredelalentille
+\pnode(!XO -2.5){L2}% extrmitinfrieuredelalentille
+\psOutLine[length=5.5,linestyle=none](B')(L1){END1}
+\psBeforeLine[length=6,linestyle=none](L2)(B'){START}
+\pspolygon[style=rayuresJaunes,linestyle=none](B)(L1)(END1)(START)(L2)
+\psline[linewidth=1.5\pslinewidth,arrowinset=0]{->}(A)(B)
+\uput[270](A){A}
+\uput[90](B){B}
+\psline[linewidth=1.5\pslinewidth,arrowinset=0,%
+ linestyle=dashed]{->}(A')(B')
+\uput[270](A'){$\mathrm{A'}$}
+\uput[90](B'){$\mathrm{B'}$}
+\psset{linecolor=red,arrowsize=0.2}
+\pcline[nodesepB=-4](B)(O)% Mittelpunktstrahl
+\psline[linecolor=red,linestyle=dashed](B)(B')% ruckwaertige Verlaengerung
+\Arrows(B)(O)% Mittelpunktstrahl
+\psOutLine[length=2,arrows=->](B)(O){END6}% Mittelpunktstrahl
+\psline(B)(I)(F')
+\psOutLine(I)(F'){END2}
+\Arrows(I)(F')
+\Arrows(B)(I)
+\psOutLine[length=1,linestyle=dashed](I')(B'){END3}
+\psline[linestyle=dashed](B)(F)
+\psline(B)(I')
+\Arrows[arrows=->>](B)(I')
+\psline[linestyle=dashed](B')(I')
+\psline[linestyle=dashed](B')(I)
+\psOutLine[length=2,arrows=->>](B')(I'){END4}
+\psOutLine[length=4](B')(I'){END5}
+\rput(8,0){\psset{linecolor=black}\eye}
+\end{pspicture}
\end{lstlisting}
@@ -329,34 +333,35 @@ This is a simple system with two lenses, where the \verb|\lens| macro is used on
\resizebox{\textwidth}{!}{
\begin{pspicture}*(-7.5,-3)(7.5,3)
- \rput(0,0){%
- \lens[%
- lensGlass=true,lensWidth=0.5,lensType=DVG,%
- XO=0,AB=2,OA=-4,focus=-6,spotAi=270,spotBi=90]%
- \psline[linewidth=1pt](xLeft)(xRight)
- }
- \psOutLine[length=7](B')(I){END}
+ \rput(0,0){%
+ \lens[lensGlass=true,lensWidth=0.5,lensType=DVG,%
+ XO=0,AB=2,OA=-4,focus=-6,spotAi=270,spotBi=90]%
+ \psline[linewidth=1pt](xLeft)(xRight)
+ }
+ \psline[linecolor=red,linestyle=dashed](I')(F)% Verlaengerung des Brennstrahls
+ \psOutLine[length=7](B')(I){END}
%pour prolonger au-delà de B' permet de définir END
- \psBeforeLine[length=7](I')(B'){START}% permet de définir START
- \pspolygon[style=rayuresJaunes,linestyle=none](B)(I)(END)(START)(I')
- \psline(B)(I)(END)
- \psline(B)(I')(START)
+ \psBeforeLine[length=7](I')(B'){START}% permet de définir START
+ \pspolygon[style=rayuresJaunes,linestyle=none](B)(I)(END)(START)(I')
+ \psline(B)(I)(END)
+ \psline(B)(I')(START)
\end{pspicture}%
}
\begin{lstlisting}
\begin{pspicture}*(-7.5,-3)(7.5,3)
-\rput(0,0){%
- \lens[lensGlass=true,lensType=DVG,lensWidth=0.5,%
- XO=0,AB=2,OA=-4,focus=-6,spotAi=270,spotBi=90]%
-}
-\psOutLine[length=7](B')(I){END}
-% pour prolonger au-delà de B' permet de définir END
-\psBeforeLine[length=7](I')(B'){START}
-% permet de définir START
-\pspolygon[style=rayuresJaunes,linestyle=none](B)(I)(END)(START)(I')
-\psline(B)(I)(END)
-\psline(B)(I')(START)
+ \rput(0,0){%
+ \lens[lensGlass=true,lensWidth=0.5,lensType=DVG,%
+ XO=0,AB=2,OA=-4,focus=-6,spotAi=270,spotBi=90]%
+ \psline[linewidth=1pt](xLeft)(xRight)
+ }
+ \psline[linecolor=red,linestyle=dashed](I')(F)% Verlaengerung des Brennstrahls
+ \psOutLine[length=7](B')(I){END}
+%pour prolonger au-delà de B' permet de définir END
+ \psBeforeLine[length=7](I')(B'){START}% permet de définir START
+ \pspolygon[style=rayuresJaunes,linestyle=none](B)(I)(END)(START)(I')
+ \psline(B)(I)(END)
+ \psline(B)(I')(START)
\end{pspicture}
\end{lstlisting}
@@ -364,74 +369,61 @@ This is a simple system with two lenses, where the \verb|\lens| macro is used on
\section{Virtual Image}
\resizebox{\textwidth}{!}{%
-\begin{pspicture}*(-7.5,-6.5)(7.5,7.5)
- \rput(0,0){%
- \lens[lensType=DVG,lensWidth=0.75,lensHeight=8,focus=-2,%
- OA=1.5,AB=1,XO=-1,lensGlass=true,%
- rayColor=red,yBottom=-5,yTop=5,drawing=false]%
- \psline[linewidth=1pt](xLeft)(xRight)
- }
- \pnode(!XO 2.5){L1}%extrémité de la lentille sup
- \pnode(!XO -2.5){L2}%extrémité de la lentille inf
- {%
- \psset{linecolor=red,linestyle=dashed}
- \psline(L1)(B)
- \psline(L2)(B)%
- }{%
- \psset{length=4,linestyle=none}
- \psOutLine(B)(L1){A1}
- \psOutLine(B)(L2){A4}
- \psOutLine(L1)(B'){A2}
- \psOutLine(L2)(B'){A3}
- \pspolygon[style=rayuresJaunes](A1)(L1)(A2)(A3)(L2)(A4)
- }
- \psline[linestyle=dashed]{->}(A)(B)
- \psline{->}(A')(B')
- \uput[90](B){B}
- \uput[90](B'){$\mathrm{B'}$}
- \uput[270](A){A}
- \uput[270](A'){$\mathrm{A'}$}
- {%
- \psset{linecolor=red}
- \psline(A1)(L1)(A2)
- \psline(A4)(L2)(A3)}
-\end{pspicture}
+\begin{pspicture*}(-7.5,-6.5)(7.5,7.5)
+\rput(0,0){%
+ \lens[lensType=DVG,lensWidth=0.75,
+ lensHeight=7,focus=-2,OA=-6,AB=4,XO=-1,lensGlass=true,%
+ rayColor=red,yBottom=-5,yTop=5,drawing=false]%
+ \psline[linewidth=1pt](xLeft)(xRight)}
+\pnode(!XO 2.9){L1}% extrmitdelalentillesup
+\pnode(!XO -2.5){L2}% extrmitdelalentilleinf
+{%
+ \psset{length=4,linestyle=none}
+ \psOutLine(B')(L1){A1}
+ \psOutLine(B')(L2){A2}
+ \pspolygon[style=rayuresJaunes,linestyle=none](B)(L1)(A1)(A2)(L2)
+ \psset{linecolor=red,linestyle=solid}
+ \psline(B)(L1)(A1)
+ \psline(B)(L2)(A2)%
+ \psline[linestyle=dashed](B')(L1)
+ \psline[linestyle=dashed](B')(L2)%
+}
+\psline[linestyle=dashed]{->}(A)(B)
+\psline{->}(A')(B')
+\uput[90](B){B}
+\uput[90](B'){$\mathrm{B'}$}
+\uput[270](A){A}
+\uput[270](A'){$\mathrm{A'}$}
+\end{pspicture*}
}
\begin{lstlisting}
-\begin{pspicture}*(-7.5,-6.5)(7.5,7.5)
- \rput(0,0){%
- \lens[lensType=DVG,lensWidth=0.75,lensHeight=8,%
- focus=-2,OA=1.5,AB=1,XO=-1,lensGlass=true,%
- rayColor=red,yBottom=-5,yTop=5,drawing=false]%
- \psline[linewidth=1pt](xLeft)(xRight)
- }
- \pnode(!XO 2.5){L1}%extrémité de la lentille sup
- \pnode(!XO -2.5){L2}%extrémité de la lentille inf
- {%
- \psset{linecolor=red,linestyle=dashed}
- \psline(L1)(B)
- \psline(L2)(B)%
- }{%
- \psset{length=4,linestyle=none}
- \psOutLine(B)(L1){A1}
- \psOutLine(B)(L2){A4}
- \psOutLine(L1)(B'){A2}
- \psOutLine(L2)(B'){A3}
- \pspolygon[style=rayuresJaunes]%
- (A1)(L1)(A2)(A3)(L2)(A4)
- }
- \psline[linestyle=dashed]{->}(A)(B)
- \psline{->}(A')(B')
- \uput[90](B){B}
- \uput[90](B'){$\mathrm{B'}$}
- \uput[270](A){A}
- \uput[270](A'){$\mathrm{A'}$}
- {%
- \psset{linecolor=red}
- \psline(A1)(L1)(A2)
- \psline(A4)(L2)(A3)}
-\end{pspicture}
+\begin{pspicture*}(-7.5,-6.5)(7.5,7.5)
+\rput(0,0){%
+ \lens[lensType=DVG,lensWidth=0.75,
+ lensHeight=7,focus=-2,OA=-6,AB=4,XO=-1,lensGlass=true,%
+ rayColor=red,yBottom=-5,yTop=5,drawing=false]%
+ \psline[linewidth=1pt](xLeft)(xRight)}
+\pnode(!XO 2.9){L1}% extrmitdelalentillesup
+\pnode(!XO -2.5){L2}% extrmitdelalentilleinf
+{%
+ \psset{length=4,linestyle=none}
+ \psOutLine(B')(L1){A1}
+ \psOutLine(B')(L2){A2}
+ \pspolygon[style=rayuresJaunes,linestyle=none](B)(L1)(A1)(A2)(L2)
+ \psset{linecolor=red,linestyle=solid}
+ \psline(B)(L1)(A1)
+ \psline(B)(L2)(A2)%
+ \psline[linestyle=dashed](B')(L1)
+ \psline[linestyle=dashed](B')(L2)%
+}
+\psline[linestyle=dashed]{->}(A)(B)
+\psline{->}(A')(B')
+\uput[90](B){B}
+\uput[90](B'){$\mathrm{B'}$}
+\uput[270](A){A}
+\uput[270](A'){$\mathrm{A'}$}
+\end{pspicture*}
\end{lstlisting}
\section{A Microscope}
diff --git a/Master/texmf-dist/tex/generic/pst-optic/pst-optic.tex b/Master/texmf-dist/tex/generic/pst-optic/pst-optic.tex
index 88c7cfb7aec..90920f2e1be 100644
--- a/Master/texmf-dist/tex/generic/pst-optic/pst-optic.tex
+++ b/Master/texmf-dist/tex/generic/pst-optic/pst-optic.tex
@@ -8,7 +8,7 @@
%% Manuel Luque <Mluque5130@aol.com> (France)
%% Herbert Voss <voss@perce.de> (Germany)
%%
-%% February 16, 2003
+%% 2006-07-20
%%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN archives
@@ -20,14 +20,15 @@
\csname PSTopticLoaded\endcsname
\let\PSTopticLoaded\endinput
% Requires PSTricks, pst-node, pstcol, pst-plot, pst-3d, multido packages
+\ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi
\ifx\PSTnodesLoaded\endinput\else\input pst-node.tex\fi
\ifx\PSTplotLoaded\endinput\else\input pst-plot.tex\fi % parametric-plot
\ifx\PSTthreeDLoaded\endinput\else\input pst-3d.tex\fi % symplan
\ifx\PSTMultidoLoaded\endinput\else\input multido.tex\fi
\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey \fi
%
-\def\fileversion{0.92}
-\def\filedate{2004/11/09}
+\def\fileversion{0.95}
+\def\filedate{2006/07/20}
\message{`PST-Optic' v\fileversion, \filedate\space (Manuel Luque and Herbert Voss)}
%
% DPC interface to the `keyval' package (until keyval based version of PSTricks)
@@ -90,191 +91,133 @@
\define@key[psset]{pst-optic}{rightRay}[false]{\@nameuse{Pst@rightRay#1}%
}
%
-\psset{lensGlass=false}
-\psset{drawing=true}
+\psset[pst-optic]{lensGlass=false,drawing=true}
%
% ------- the global definitions for the pspicture frame ------
%
-\define@key[psset]{pst-optic}{xLeft}{\edef\psk@optic@xLeft{#1}}
-\define@key[psset]{pst-optic}{xRight}{\edef\psk@optic@xRight{#1}}
-\define@key[psset]{pst-optic}{yBottom}{\edef\psk@optic@yBottom{#1}}
-\define@key[psset]{pst-optic}{yTop}{\edef\psk@optic@yTop{#1}}
-\psset{xLeft=-7.5,xRight=7.5,yBottom=-3.0,yTop=3.0}
+\define@key[psset]{pst-optic}{xLeft}{\def\psk@optic@xLeft{#1}}
+\define@key[psset]{pst-optic}{xRight}{\def\psk@optic@xRight{#1}}
+\define@key[psset]{pst-optic}{yBottom}{\def\psk@optic@yBottom{#1}}
+\define@key[psset]{pst-optic}{yTop}{\def\psk@optic@yTop{#1}}
+\psset[pst-optic]{xLeft=-7.5,xRight=7.5,yBottom=-3.0,yTop=3.0}
%
% ---------------- the lenses -----------------
%
\define@key[psset]{pst-optic}{lensType}{% CVG|DVG
- \edef\psk@optic@lensType{#1}%
+ \def\psk@optic@lensType{#1}%
}
\define@key[psset]{pst-optic}{lensColor}{%
- \edef\psk@optic@lensColor{#1}%
+ \def\psk@optic@lensColor{#1}%
}
\define@key[psset]{pst-optic}{lensWidth}{% the thichness of the lens
- \edef\psk@optic@lensWidth{#1}%
+ \def\psk@optic@lensWidth{#1}%
}
\define@key[psset]{pst-optic}{lensDepth}{%
- \edef\psk@optic@lensDepth{#1}%
+ \def\psk@optic@lensDepth{#1}%
}
\define@key[psset]{pst-optic}{lensHeight}{% the TOTAL height of the lens
- \edef\psk@optic@lensHeight{#1}%
+ \def\psk@optic@lensHeight{#1}%
}
\define@key[psset]{pst-optic}{lensScale}{% more or less obsolete
- \edef\psk@optic@lensScale{#1}%
+ \def\psk@optic@lensScale{#1}%
}
\define@key[psset]{pst-optic}{lensArrowSize}{% for the AB,... Arrows
- \edef\psk@optic@lensArrowSize{#1}%
+ \def\psk@optic@lensArrowSize{#1}%
}
\define@key[psset]{pst-optic}{lensArrowInset}{%
- \edef\psk@optic@lensArrowInset{#1}%
+ \def\psk@optic@lensArrowInset{#1}%
}
-\psset{lensType=CVG}
-\def\Type{CVG}
-\psset{lensColor=lightgray}
-\psset{lensWidth=0.5}
-\psset{lensDepth=1}
-\psset{lensHeight=5}
-\psset{lensScale=1}
-\psset{lensArrowSize=0.2}
-\psset{lensArrowInset=0.5}
+\def\lensType{CVG}
+\psset[pst-optic]{lensType=CVG,lensColor=lightgray,lensWidth=0.5,lensDepth=1,
+ lensHeight=5,lensScale=1,lensArrowSize=0.2,lensArrowInset=0.5}
%
% ---------------- the mirrors -----------------
%
\define@key[psset]{pst-optic}{mirrorType}{% PLAN|PARAbolic|SPHerical
- \edef\psk@optic@mirrorType{#1}%
+ \def\psk@optic@mirrorType{#1}%
}
\define@key[psset]{pst-optic}{mirrorDepth}{%
- \edef\psk@optic@mirrorDepth{#1}%
+ \def\psk@optic@mirrorDepth{#1}%
}
\define@key[psset]{pst-optic}{mirrorHeight}{% it's the TOTAL height
- \edef\psk@optic@mirrorHeight{#1}%
+ \def\psk@optic@mirrorHeight{#1}%
}
\define@key[psset]{pst-optic}{mirrorWidth}{%
- \edef\psk@optic@mirrorWidth{#1}%
+ \def\psk@optic@mirrorWidth{#1}%
}
\define@key[psset]{pst-optic}{mirrorColor}{%
- \edef\psk@optic@mirrorColor{#1}%
+ \def\psk@optic@mirrorColor{#1}%
}
\define@key[psset]{pst-optic}{mirrorFocus}{%
- \edef\psk@optic@mirrorFocus{#1}%
+ \def\psk@optic@mirrorFocus{#1}%
}
\define@key[psset]{pst-optic}{posMirrorTwo}{% a sencond mirror? (telescope)
- \edef\psk@optic@posMirrorTwo{#1}%
+ \def\psk@optic@posMirrorTwo{#1}%
}
\define@key[psset]{pst-optic}{mirrorTwoAngle}{% the angle for the 2. plan mirror (telescope)
- \edef\psk@optic@mirrorTwoAngle{#1}%
+ \def\psk@optic@mirrorTwoAngle{#1}%
}
-\psset{mirrorType=CVG}% possible CVG|DVG
\def\mirrorType{CVG}
-\psset{mirrorDepth=1}
-\psset{mirrorHeight=5}
-\psset{mirrorWidth=0.25}
-\psset{mirrorFocus=8}% only for LensTwo option
-\psset{mirrorTwoAngle=45}
-\psset{posMirrorTwo=6}
-\psset{mirrorColor=lightgray}
+\psset[pst-optic]{mirrorType=CVG,mirrorDepth=1,mirrorHeight=5,mirrorWidth=0.25,
+ mirrorFocus=8,mirrorTwoAngle=45,posMirrorTwo=6,mirrorColor=lightgray}
%
% -------------- the refrectionnumbers -------------
%
-\define@key[psset]{pst-optic}{refractA}{%
- \edef\psk@optic@refractA{#1}%
-}
-\define@key[psset]{pst-optic}{refractB}{%
- \edef\psk@optic@refractB{#1}%
-}
-\psset{refractA=1}
-\psset{refractB=1.41}
+\define@key[psset]{pst-optic}{refractA}{\def\psk@optic@refractA{#1}}
+\define@key[psset]{pst-optic}{refractB}{\def\psk@optic@refractB{#1}}
+\psset[pst-optic]{refractA=1,refractB=1.41}
%
% -------------- the length and node definitions -------------
%
\define@key[psset]{pst-optic}{XO}{% the X-offset
- \edef\psk@optic@XO{#1}%
+ \def\psk@optic@XO{#1}%
}
\define@key[psset]{pst-optic}{YO}{% the y-offset
- \edef\psk@optic@YO{#1}%
+ \def\psk@optic@YO{#1}%
}
\define@key[psset]{pst-optic}{posStart}{% where the arrows start
- \edef\psk@optic@posStart{#1}%
+ \def\psk@optic@posStart{#1}%
}
\define@key[psset]{pst-optic}{length}{% the length of the before|outlines
- \edef\psk@optic@length{#1}%
+ \def\psk@optic@length{#1}%
}
\define@key[psset]{pst-optic}{focus}{% for lenses/mirrors with a fixed focus
- \edef\psk@optic@focus{#1}%
+ \def\psk@optic@focus{#1}%
}
\define@key[psset]{pst-optic}{AB}{% the length of the object arrow
- \edef\psk@optic@AB{#1}%
+ \def\psk@optic@AB{#1}%
}
\define@key[psset]{pst-optic}{OA}{% the xcoordinate of the object arrow
- \edef\psk@optic@OA{#1}%
+ \def\psk@optic@OA{#1}%
}
\define@key[psset]{pst-optic}{arrowOffset}{% offset for \arrowLine
- \edef\psk@optic@arrowOffset{#1}%
+ \def\psk@optic@arrowOffset{#1}%
}
%
-\psset{XO=0,YO=0}
-\psset{OA=-3}
-\psset{posStart=0,length=2}
-\psset{focus=2}
-\psset{AB=1}
-\psset{arrowOffset=0}
+\psset[pst-optic]{XO=0,YO=0,OA=-3,posStart=0,length=2,focus=2,AB=1,arrowOffset=0}
%
\define@key[psset]{pst-optic}{nameA}{% start of the object arrow
- \edef\psk@optic@nameA{#1}%
+ \def\psk@optic@nameA{#1}%
}
\define@key[psset]{pst-optic}{spotA}{% where to draw the label
- \edef\psk@optic@spotA{#1}%
-}
-\define@key[psset]{pst-optic}{nameB}{%
- \edef\psk@optic@nameB{#1}%
-}
-\define@key[psset]{pst-optic}{spotB}{%
- \edef\psk@optic@spotB{#1}%
-}
-\define@key[psset]{pst-optic}{nameF}{%
- \edef\psk@optic@nameF{#1}%
-}
-\define@key[psset]{pst-optic}{spotF}{%
- \edef\psk@optic@spotF{#1}%
-}
-\define@key[psset]{pst-optic}{nameO}{%
- \edef\psk@optic@nameO{#1}%
-}
-\define@key[psset]{pst-optic}{spotO}{%
- \edef\psk@optic@spotO{#1}%
-}
-\define@key[psset]{pst-optic}{nameAi}{%
- \edef\psk@optic@nameAi{#1}%
-}
-\define@key[psset]{pst-optic}{spotAi}{%
- \edef\psk@optic@spotAi{#1}%
-}
-\define@key[psset]{pst-optic}{nameBi}{%
- \edef\psk@optic@nameBi{#1}%
-}
-\define@key[psset]{pst-optic}{spotBi}{%
- \edef\psk@optic@spotBi{#1}%
-}
-\define@key[psset]{pst-optic}{nameFi}{%
- \edef\psk@optic@nameFi{#1}%
-}
-\define@key[psset]{pst-optic}{spotFi}{%
- \edef\psk@optic@spotFi{#1}%
+ \def\psk@optic@spotA{#1}%
}
-%
-\psset{nameA=A}
-\psset{spotA=270}
-\psset{nameB=B}
-\psset{spotB=90}
-\psset{nameF=F}
-\psset{spotF=270}
-\psset{nameO=O}
-\psset{spotO=225}
-\psset{nameAi=A'}
-\psset{spotAi=90}
-\psset{nameBi=B'}
-\psset{spotBi=270}
-\psset{nameFi=F'}
-\psset{spotFi=270}
+\define@key[psset]{pst-optic}{nameB}{\def\psk@optic@nameB{#1}}
+\define@key[psset]{pst-optic}{spotB}{\def\psk@optic@spotB{#1}}
+\define@key[psset]{pst-optic}{nameF}{\def\psk@optic@nameF{#1}}
+\define@key[psset]{pst-optic}{spotF}{\def\psk@optic@spotF{#1}}
+\define@key[psset]{pst-optic}{nameO}{\def\psk@optic@nameO{#1}}
+\define@key[psset]{pst-optic}{spotO}{\def\psk@optic@spotO{#1}}
+\define@key[psset]{pst-optic}{nameAi}{\def\psk@optic@nameAi{#1}}
+\define@key[psset]{pst-optic}{spotAi}{\def\psk@optic@spotAi{#1}}
+\define@key[psset]{pst-optic}{nameBi}{\def\psk@optic@nameBi{#1}}
+\define@key[psset]{pst-optic}{spotBi}{\def\psk@optic@spotBi{#1}}
+\define@key[psset]{pst-optic}{nameFi}{\def\psk@optic@nameFi{#1}}
+\define@key[psset]{pst-optic}{spotFi}{\def\psk@optic@spotFi{#1}}
+%
+\psset[pst-optic]{nameA=A,spotA=270,nameB=B,spotB=90,nameF=F,spotF=270,
+ nameO=O,spotO=225,nameAi=A',spotAi=90,nameBi=B',spotBi=270,
+ nameFi=F',spotFi=270}
%
% -------------------- colors/fillstyles -------------------
%
@@ -283,10 +226,8 @@
\newpsstyle{rayuresJaunes}{%
fillstyle=hlines,hatchsep=2\pslinewidth,hatchcolor=JauneVert%
}
-\define@key[psset]{pst-optic}{rayColor}{%
- \edef\psk@optic@rayColor{#1}%
-}
-\psset{rayColor=red}
+\define@key[psset]{pst-optic}{rayColor}{\def\psk@optic@rayColor{#1}}
+\psset[pst-optic]{rayColor=red}
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -297,14 +238,14 @@
\def\Arrows{\@ifnextchar[{\pst@Arrows}{\pst@Arrows[]}}
\def\pst@Arrows[#1](#2)(#3){{%
\psset{#1}%
- \pst@getcoor{#2}\pst@tempa
- \pst@getcoor{#3}\pst@tempb
+ \pst@getcoor{#2}\pst@tempA
+ \pst@getcoor{#3}\pst@tempB
\pnode(!%
/StartArrow \psk@optic@posStart\space def
/LengthArrow \psk@optic@length\space def
- \pst@tempa /YA exch \pst@number\psyunit div def
+ \pst@tempA /YA exch \pst@number\psyunit div def
/XA exch \pst@number\psxunit div def
- \pst@tempb /YB exch \pst@number\psyunit div def
+ \pst@tempB /YB exch \pst@number\psyunit div def
/XB exch \pst@number\psxunit div def
/denominateur XB XA sub def
/numerateur YB YA sub def
@@ -313,24 +254,24 @@
/YD StartArrow angleDirectionAB sin mul YA add def
/XF XD LengthArrow angleDirectionAB cos mul add def
/YF YD LengthArrow angleDirectionAB sin mul add def
- XD YD ){ArrowStart}
- \pnode(! XF YF){ArrowEnd}
- \psset{arrows=->}
+ XD YD ){ArrowStart}%
+ \pnode(! XF YF){ArrowEnd}%
+ \psset{arrows=->}%
\psline[#1](ArrowStart)(ArrowEnd)%
-}}
+}\ignorespaces}
%
% draw a line (===) outside: #2-----#3=======#4
%
\def\psOutLine{\@ifnextchar[{\pst@ToDrawOut}{\pst@ToDrawOut[]}}
\def\pst@ToDrawOut[#1](#2)(#3)#4{{%
\psset{#1}%
- \pst@getcoor{#2}\pst@tempa
- \pst@getcoor{#3}\pst@tempb
+ \pst@getcoor{#2}\pst@tempA
+ \pst@getcoor{#3}\pst@tempB
\pnode(!%
/LengthArrow \psk@optic@length\space def
- \pst@tempa /YA exch \pst@number\psyunit div def
+ \pst@tempA /YA exch \pst@number\psyunit div def
/XA exch \pst@number\psxunit div def
- \pst@tempb /YB exch \pst@number\psyunit div def
+ \pst@tempB /YB exch \pst@number\psyunit div def
/XB exch \pst@number\psxunit div def
/denominateur XB XA sub def
/numerateur YB YA sub def
@@ -346,13 +287,13 @@
\def\psBeforeLine{\@ifnextchar[{\pst@BeforeLine}{\pst@BeforeLine[]}}
\def\pst@BeforeLine[#1](#2)(#3)#4{{%
\psset{#1}%
- \pst@getcoor{#2}\pst@tempa
- \pst@getcoor{#3}\pst@tempb
+ \pst@getcoor{#2}\pst@tempA
+ \pst@getcoor{#3}\pst@tempB
\pnode(!%
/LengthArrow \psk@optic@length\space def
- \pst@tempa /YA exch \pst@number\psyunit div def
+ \pst@tempA /YA exch \pst@number\psyunit div def
/XA exch \pst@number\psxunit div def
- \pst@tempb /YB exch \pst@number\psyunit div def
+ \pst@tempB /YB exch \pst@number\psyunit div def
/XB exch \pst@number\psxunit div def
/denominateur XB XA sub def
/numerateur YB YA sub def
@@ -361,21 +302,21 @@
/Ystart YA LengthArrow angleDirectionAB sin mul sub def
Xstart Ystart){#4}
\psline[#1](#4)(#2)%
-}}
+}\ignorespaces}
%
% intersection de deux droites
% 2 juillet 2001/ rewritten 2003-01-27 Herbert
%
\def\ABinterCD(#1)(#2)(#3)(#4)#5{%
- \pst@getcoor{#1}\pst@tempa
- \pst@getcoor{#2}\pst@tempb
+ \pst@getcoor{#1}\pst@tempA
+ \pst@getcoor{#2}\pst@tempB
\pst@getcoor{#3}\pst@tempc
\pst@getcoor{#4}\pst@tempd
\pnode(!%
- /YA \pst@tempa exch pop \pst@number\psyunit div def
- /XA \pst@tempa pop \pst@number\psxunit div def
- /YB \pst@tempb exch pop \pst@number\psyunit div def
- /XB \pst@tempb pop \pst@number\psxunit div def
+ /YA \pst@tempA exch pop \pst@number\psyunit div def
+ /XA \pst@tempA pop \pst@number\psxunit div def
+ /YB \pst@tempB exch pop \pst@number\psyunit div def
+ /XB \pst@tempB pop \pst@number\psxunit div def
/YC \pst@tempc exch pop \pst@number\psyunit div def
/XC \pst@tempc pop \pst@number\psxunit div def
/YD \pst@tempd exch pop \pst@number\psyunit div def
@@ -406,14 +347,14 @@
\def\Parallel{\@ifnextchar[{\pst@Parallel}{\pst@Parallel[]}}
\def\pst@Parallel[#1](#2)(#3)(#4)#5{{%
\psset{#1}%
- \pst@getcoor{#2}\pst@tempa
- \pst@getcoor{#3}\pst@tempb
+ \pst@getcoor{#2}\pst@tempA
+ \pst@getcoor{#3}\pst@tempB
\pst@getcoor{#4}\pst@tempc
\pnode(!%
/LengthArrow \psk@optic@length\space def
- \pst@tempa /YA exch \pst@number\psyunit div def
+ \pst@tempA /YA exch \pst@number\psyunit div def
/XA exch \pst@number\psxunit div def
- \pst@tempb /YB exch \pst@number\psyunit div def
+ \pst@tempB /YB exch \pst@number\psyunit div def
/XB exch \pst@number\psxunit div def
\pst@tempc /YC exch \pst@number\psyunit div def
/XC exch \pst@number\psxunit div def
@@ -433,13 +374,13 @@
\psset{arrowsize=4pt,arrows=->}% the defaults
\psset{#1}%
\def\pst@optic@n{#4}
- \pst@getcoor{#2}\pst@tempa
- \pst@getcoor{#3}\pst@tempb
+ \pst@getcoor{#2}\pst@tempA
+ \pst@getcoor{#3}\pst@tempB
\pnode(!%
- /YA \pst@tempa exch pop \pst@number\psyunit div def
- /XA \pst@tempa pop \pst@number\psxunit div def
- /YB \pst@tempb exch pop \pst@number\psyunit div def
- /XB \pst@tempb pop \pst@number\psxunit div def
+ /YA \pst@tempA exch pop \pst@number\psyunit div def
+ /XA \pst@tempA pop \pst@number\psxunit div def
+ /YB \pst@tempB exch pop \pst@number\psyunit div def
+ /XB \pst@tempB pop \pst@number\psxunit div def
/dY YB YA sub \pst@optic@n\space 1 add div def
/dX XB XA sub \pst@optic@n\space 1 add div def
/Alpha dY dX atan def
@@ -454,17 +395,17 @@
\pnode(tempArrowB){tempArrowC}
}
\psline[arrows=-](tempArrowB)(#3)
-}}
+}\ignorespaces}
%
% #1------#3------#2
\def\nodeBetween(#1)(#2)#3{% Herbert 2003/01/05
- \pst@getcoor{#1}\pst@tempa
- \pst@getcoor{#2}\pst@tempb
+ \pst@getcoor{#1}\pst@tempA
+ \pst@getcoor{#2}\pst@tempB
\pnode(!%
- /XA \pst@tempa pop \pst@number\psxunit div def
- /YA \pst@tempa exch pop \pst@number\psyunit div def
- /XB \pst@tempb pop \pst@number\psxunit div def
- /YB \pst@tempb exch pop \pst@number\psyunit div def
+ /XA \pst@tempA pop \pst@number\psxunit div def
+ /YA \pst@tempA exch pop \pst@number\psyunit div def
+ /XB \pst@tempB pop \pst@number\psxunit div def
+ /YB \pst@tempB exch pop \pst@number\psyunit div def
XB XA add 2 div YB YA add 2 div){#3}
}
%
@@ -474,11 +415,11 @@
% Herbert Voss <voss@perce.de> 2003-01-26
\def\rotateNode{\pst@rotateNode}
\def\pst@rotateNode(#1)#2{{%
- \pst@getcoor{#1}\pst@tempa
+ \pst@getcoor{#1}\pst@tempA
\def\pst@optic@angle{#2} % the rotating angle
\pnode(!%
- /YA \pst@tempa exch pop \pst@number\psyunit div def
- /XA \pst@tempa pop \pst@number\psxunit div def
+ /YA \pst@tempA exch pop \pst@number\psyunit div def
+ /XA \pst@tempA pop \pst@number\psxunit div def
YA 0 eq XA 0 eq and {0 0}{
/r XA dup mul YA dup mul add sqrt def
/AlphaOld YA XA atan def
@@ -486,14 +427,14 @@
r AlphaNew cos mul r AlphaNew sin mul
} ifelse ){temp}
\pnode(temp){#1}
-}}
+}\ignorespaces}
%
\def\rotateTriangle{\pst@rotateTriangle}
\def\pst@rotateTriangle(#1)(#2)(#3)#4{{%
\rotateNode(#1){#4}
\rotateNode(#2){#4}
\rotateNode(#3){#4}
-}}
+}\ignorespaces}
%
\def\rotateFrame{\pst@rotateFrame}
\def\pst@rotateFrame(#1)(#2)(#3)(#4)#5{{%
@@ -501,7 +442,7 @@
\rotateNode(#2){#5}
\rotateNode(#3){#5}
\rotateNode(#4){#5}
-}}
+}\ignorespaces}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% L E N S E S %
@@ -526,7 +467,7 @@
/Width \psk@optic@lensWidth\space def
/Width2 Width 2.0 div def
}
- \ifx\psk@optic@lensType\Type% CVG ?
+ \ifx\psk@optic@lensType\lensType% CVG ?
\pnode(!%
/radius Width2 dup mul Height dup mul add Width2 div 2 div def
/XM Width2 radius sub def
@@ -556,7 +497,7 @@
linecolor=\psk@optic@lensColor%
}
\rput(! XO YO){%
- \ifx\psk@optic@lensType\Type% CVG
+ \ifx\psk@optic@lensType\lensType% CVG
\pscustom{%
\parametricplot{\psk@optic@lensHeight}{-\psk@optic@lensHeight}{%
/arg t radius 2.0 mul div def
@@ -605,7 +546,7 @@
\uput[-90](Center){Center}
\psset{linecolor=\psk@optic@rayColor}
\psline[linewidth=1.5\pslinewidth,arrowinset=0]{->}(A)(B)
- \ifx\psk@optic@lensType\Type
+ \ifx\psk@optic@lensType\lensType
% the parallel ray
\lensSPHRay[lensType=CVG]%
(B)(I){\psk@optic@refractA}{\psk@optic@refractB}{PSPH}
@@ -668,8 +609,8 @@
\uput[\psk@optic@spotBi](B'){$\mathrm{\psk@optic@nameBi}$}
\uput[\psk@optic@spotO](O){$\mathrm{\psk@optic@nameO}$}
\fi% ifdrawing
-\end{pspicture*}
-}}
+\end{pspicture*}%
+}\ignorespaces}
%
% Herbert Voss 2003/02/02
% [#1] : lensType=CVG/DVG
@@ -680,7 +621,7 @@
\def\lensSPHRay{\@ifnextchar[{\pst@lensSPHRay}{\pst@lensSPHRay[]}}
\def\pst@lensSPHRay[#1](#2)(#3)#4#5#6{{%
\psset{#1}
- \ifx\psk@optic@lensType\Type% CVG
+ \ifx\psk@optic@lensType\lensType% CVG
\ifPst@rightRay
\ABinterSPHLens(#2)(#3)(Center){#6}
\else
@@ -691,7 +632,7 @@
\fi
% \psline(! Y mT sub X 1 sub neg)(! Y mT add X 1 add neg)
\refractionRay(#2)(#6)(! Y mT sub X 1 sub neg)(! Y mT add X 1 add neg){#4}{#5}{tempSPHRay}
- \ifx\psk@optic@lensType\Type% CVG
+ \ifx\psk@optic@lensType\lensType% CVG
\ifPst@rightRay
\ABinterSPHLens(#6)(tempSPHRay')(Center'){#6'}
\else
@@ -704,7 +645,7 @@
\refractionRay(#6)(#6')(! Y mT sub X 1 sub neg)%
(! Y mT add X 1 add neg){#5}{#4}{tempSPHRay}
\pnode(tempSPHRay'){#6''}
-}}
+}\ignorespaces}
%
% Intersection Point of ray and sperical lense
% 2003-02-03 Herbert
@@ -713,16 +654,16 @@
% #4: the intersection point
%
\def\ABinterSPHLens(#1)(#2)(#3)#4{%
- \pst@getcoor{#1}\pst@tempa
- \pst@getcoor{#2}\pst@tempb
+ \pst@getcoor{#1}\pst@tempA
+ \pst@getcoor{#2}\pst@tempB
\pst@getcoor{#3}\pst@tempm
% calculate the intersection point. we change the coordinates
- \ifx\psk@optic@lensType\Type% CVG
+ \ifx\psk@optic@lensType\lensType% CVG
\pnode(!%
- /YA \pst@tempa pop \pst@number\psxunit div def
- /XA \pst@tempa exch pop \pst@number\psyunit div neg def
- /YB \pst@tempb pop \pst@number\psxunit div def
- /XB \pst@tempb exch pop \pst@number\psyunit div neg def
+ /YA \pst@tempA pop \pst@number\psxunit div def
+ /XA \pst@tempA exch pop \pst@number\psyunit div neg def
+ /YB \pst@tempB pop \pst@number\psxunit div def
+ /XB \pst@tempB exch pop \pst@number\psyunit div neg def
/YM \pst@tempm pop \pst@number\psxunit div def
/XM \pst@tempm exch pop \pst@number\psyunit div neg def
% /radius YM abs Width2 add def
@@ -752,10 +693,10 @@
} ifelse){#4}
\else% DVG
\pnode(!%
- /YA \pst@tempa pop \pst@number\psxunit div def
- /XA \pst@tempa exch pop \pst@number\psyunit div neg def
- /YB \pst@tempb pop \pst@number\psxunit div def
- /XB \pst@tempb exch pop \pst@number\psyunit div neg def
+ /YA \pst@tempA pop \pst@number\psxunit div def
+ /XA \pst@tempA exch pop \pst@number\psyunit div neg def
+ /YB \pst@tempB pop \pst@number\psxunit div def
+ /XB \pst@tempB exch pop \pst@number\psyunit div neg def
/YM \pst@tempm pop \pst@number\psxunit div def
/XM \pst@tempm exch pop \pst@number\psyunit div neg def
% /radius YM abs Width2 add def
@@ -795,13 +736,12 @@
\def\pst@lens[#1]{{%
\psset{xLeft=-7.5,xRight=7.5,yBottom=-3,yTop=3}%
\psset{#1}%
- \pst@killglue
-%
+ \pst@killglue%
% trace les rayons
% calcule la position de l'image
\begin{pspicture*}(\psk@optic@xLeft,\psk@optic@yBottom)(\psk@optic@xRight,\psk@optic@yTop)
- \pnode(! \psk@optic@xLeft\space 0){xLeft}
- \pnode(! \psk@optic@xRight\space 0){xRight}
+ \pnode(! \psk@optic@xLeft\space 0){xLeft}%
+ \pnode(! \psk@optic@xRight\space 0){xRight}%
\ifPst@lensTwo
\pnode(!%
/OF' \psk@optic@focus\space def
@@ -816,8 +756,8 @@
/OA' OA OF' mul OA OF' add div def
/Gamma OA' OA div def
/A'B' Gamma AB mul def
- OA' XO add YO){A'}
- \pnode(! OA XO add YO){A}
+ OA' XO add YO){A'}%
+ \pnode(! OA XO add YO){A}%
\pnode(! OA XO add AB YO add){B}
\pnode(! OF' XO add YO){F'}
\pnode(! OF' neg XO add YO){F}
@@ -827,7 +767,7 @@
\pnode(! XO A'B' YO add){I'}
\pnode(! \psk@optic@xRight\space A'B' YO add){I1}
\pnode(! \psk@optic@xRight\space neg A'B' YO add){I2}
- \else
+ \else%
\pnode(!%
/OF' \psk@optic@focus\space def
/AB \psk@optic@AB\space def
@@ -840,39 +780,35 @@
/Gamma OA' OA div def
/A'B' Gamma AB mul def
OA' XO add YO){A'}
- \pnode(! OA XO add YO){A}
- \pnode(! OA XO add AB YO add){B}
- \pnode(! OF' XO add YO){F'}
- \pnode(! OF' neg XO add YO){F}
- \pnode(! OA' XO add A'B' YO add){B'}
- \pnode(! XO YO){O}
- \pnode(! XO AB YO add){I}
- \pnode(! XO A'B' YO add){I'}
- \pnode(! \psk@optic@xRight\space A'B' YO add){I1}
- \pnode(! \psk@optic@xRight\space neg A'B' YO add){I2}
- \fi
- \begingroup
- \ifPst@lensGlass
- \rput(! XO YO){\ifx\psk@optic@lensType\Type\lensCVG\else\lensDVG\fi}%
- \else
- \ifx\psk@optic@lensType\Type
- \psset{arrows=<->}
- \else
- \psset{arrows=>-<}
- \fi
+ \pnode(! OA XO add YO){A}%
+ \pnode(! OA XO add AB YO add){B}%
+ \pnode(! OF' XO add YO){F'}%
+ \pnode(! OF' neg XO add YO){F}%
+ \pnode(! OA' XO add A'B' YO add){B'}%
+ \pnode(! XO YO){O}%
+ \pnode(! XO AB YO add){I}%
+ \pnode(! XO A'B' YO add){I'}%
+ \pnode(! \psk@optic@xRight\space A'B' YO add){I1}%
+ \pnode(! \psk@optic@xRight\space neg A'B' YO add){I2}%
+ \fi%
+ \begingroup%
+ \ifPst@lensGlass%
+ \rput(! XO YO){\ifx\psk@optic@lensType\lensType\lensCVG\else\lensDVG\fi}%
+ \else%
+ \ifx\psk@optic@lensType\lensType\psset{arrows=<->}\else\psset{arrows=>-<}\fi%
\psline[linecolor=\psk@optic@lensColor,
linewidth=\psk@optic@lensWidth,arrowsize=\psk@optic@lensArrowSize,
arrowinset=\psk@optic@lensArrowInset]%
(! XO -0.5 \psk@optic@lensHeight\space mul
\psk@optic@lensScale\space mul YO add)%
(! XO 0.5 \psk@optic@lensHeight\space mul
- \psk@optic@lensScale\space mul YO add)
- \fi
+ \psk@optic@lensScale\space mul YO add)%
+ \fi%
\endgroup%
\ifPst@drawing
% axe optique
\psline(! \psk@optic@xLeft\space YO)(! \psk@optic@xRight\space YO)
- \ifx\psk@optic@lensType\Type
+ \ifx\psk@optic@lensType\lensType%
% Position des foyers
\psdots[dotstyle=|](F')
\uput[\psk@optic@spotFi](F'){$\mathrm{\psk@optic@nameFi}$}
@@ -921,14 +857,14 @@
\psline[linestyle=dashed](B')(I')
%\uput[45](I'){I'}
%\uput[45](I){I}
- \uput[\psk@optic@spotA](A){$\mathrm{\psk@optic@nameA}$}
- \uput[\psk@optic@spotB](B){$\mathrm{\psk@optic@nameB}$}
- \uput[\psk@optic@spotAi](A'){$\mathrm{\psk@optic@nameAi}$}
- \uput[\psk@optic@spotBi](B'){$\mathrm{\psk@optic@nameBi}$}
- \uput[\psk@optic@spotO](O){$\mathrm{\psk@optic@nameO}$}
- \fi
-\fi
-\end{pspicture*}
+ \uput[\psk@optic@spotA](A){$\mathrm{\psk@optic@nameA}$}%
+ \uput[\psk@optic@spotB](B){$\mathrm{\psk@optic@nameB}$}%
+ \uput[\psk@optic@spotAi](A'){$\mathrm{\psk@optic@nameAi}$}%
+ \uput[\psk@optic@spotBi](B'){$\mathrm{\psk@optic@nameBi}$}%
+ \uput[\psk@optic@spotO](O){$\mathrm{\psk@optic@nameO}$}%
+ \fi%
+\fi%
+\end{pspicture*}%
}\ignorespaces}
%
% 25 december 2002 Herbert <voss@perce.de>
@@ -987,7 +923,7 @@
%Le dessin de la lentille
%
\def\lensCVG{%
- \scalebox{\psk@optic@lensScale}{%
+ \psscalebox{\psk@optic@lensScale}{%
\pscustom[linewidth=0.75\pslinewidth]{%
\pslensCVG{\psk@optic@lensWidth}{\psk@optic@lensHeight}
\fill[fillstyle=solid,fillcolor=BleuVerre]
@@ -996,7 +932,7 @@
}
%
\def\lensDVG{%
- \scalebox{\psk@optic@lensScale}{%
+ \psscalebox{\psk@optic@lensScale}{%
\pscustom[linewidth=0.75\pslinewidth]{%
\pslensDVG{\psk@optic@lensWidth}{\psk@optic@lensHeight}
\fill[fillstyle=solid,fillcolor=BleuVerre]%
@@ -1025,13 +961,13 @@
%
%intersection d'un rayon avec une lentille
\def\rayInterLens(#1)(#2)#3#4{{%
- \pst@getcoor{#1}\pst@tempa
- \pst@getcoor{#2}\pst@tempb
+ \pst@getcoor{#1}\pst@tempA
+ \pst@getcoor{#2}\pst@tempB
\pnode(!%
/LengthArrow \psk@optic@length\space def
- \pst@tempa /YE1 exch \pst@number\psyunit div def
+ \pst@tempA /YE1 exch \pst@number\psyunit div def
/XE1 exch \pst@number\psxunit div def
- \pst@tempb /YB1 exch \pst@number\psyunit div def
+ \pst@tempB /YB1 exch \pst@number\psyunit div def
/XB1 exch \pst@number\psxunit div def
/XO2 #3 def
/YO2 YB1 YE1 sub
@@ -1061,25 +997,25 @@
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-\def\mirrorCVGRay{\@ifnextchar[{% Herbert 2003/01/05
- \pst@mirrorCVGRay}{\pst@mirrorCVGRay[]}}
+\def\mirrorCVGRay{\@ifnextchar[{\pst@mirrorCVGRay}{\pst@mirrorCVGRay[]}}% Herbert 2003/01/05
\def\pst@mirrorCVGRay[#1](#2)(#3)#4{{%
- \psset{#1}%
-%
- \ifx\psk@optic@mirrorType\mirrorType% PARA
- \pst@getcoor{#2}\pst@tempa
- \pst@getcoor{#3}\pst@tempb
- \pnode(!%
- \psk@optic@mirrorHeight\space dup mul 16 div
- \psk@optic@mirrorDepth\space div XO add YO){Focus}
+ \psset{#1}%
+ \ifx\psk@optic@mirrorType\mirrorType % CVG
+\typeout{====>\mirrorType}
+\typeout{====>\psk@optic@mirrorType}
+ \pst@getcoor{#2}\pst@tempA
+ \pst@getcoor{#3}\pst@tempB
+ \pnode(!%
+ \psk@optic@mirrorHeight\space dup mul 16 div
+ \psk@optic@mirrorDepth\space div XO add YO){Focus}
\pnode(!%
/Xmax \psk@optic@mirrorHeight\space 2 div def
/Ymax \psk@optic@mirrorDepth\space def
/A 2 \psk@optic@mirrorHeight\space div dup mul Ymax mul def
- /XA \pst@tempa exch pop \pst@number\psyunit div neg def
- /YA \pst@tempa pop \pst@number\psxunit div def
- /XB \pst@tempb exch pop \pst@number\psyunit div neg def
- /YB \pst@tempb pop \pst@number\psxunit div def
+ /XA \pst@tempA exch pop \pst@number\psyunit div neg def
+ /YA \pst@tempA pop \pst@number\psxunit div def
+ /XB \pst@tempB exch pop \pst@number\psyunit div neg def
+ /YB \pst@tempB pop \pst@number\psxunit div def
XB XA sub abs 0.01 lt {A XA dup mul mul XA neg}{
/m YB YA sub XB XA sub div def
/m2a m A div 2 div def
@@ -1092,10 +1028,10 @@
/XSn Xn XA add neg def
YA 0 eq {0 0}{XB XA lt {YSn XSn}{YSp XSp} ifelse} ifelse} ifelse) {#4}
\pst@getcoor{#2}\pst@tempc% the starting point
- \pst@getcoor{#4}\pst@tempa% the point on the mirror
+ \pst@getcoor{#4}\pst@tempA% the point on the mirror
\pnode(!%
- /XA \pst@tempa exch pop \pst@number\psyunit div neg def
- /YA \pst@tempa pop \pst@number\psxunit div def
+ /XA \pst@tempA exch pop \pst@number\psyunit div neg def
+ /YA \pst@tempA pop \pst@number\psxunit div def
/XC \pst@tempc exch pop \pst@number\psyunit div neg def
/YC \pst@tempc pop \pst@number\psxunit div def
% Mittelpunktsstrahl?
@@ -1143,20 +1079,18 @@
} ifelse
} ifelse
} ifelse){#4'}
-%{\psset{linecolor=cyan}
-%\qdisk(#4'){3pt}}
- \pst@getcoor{#2}\pst@tempa
- \pst@getcoor{#4'}\pst@tempb
+ \pst@getcoor{#2}\pst@tempA
+ \pst@getcoor{#4'}\pst@tempB
\pst@getcoor{#4}\pst@tempc
\pnode(!%
- /XB \pst@tempb exch pop \pst@number\psyunit div neg def
- /YB \pst@tempb pop \pst@number\psxunit div def
+ /XB \pst@tempB exch pop \pst@number\psyunit div neg def
+ /YB \pst@tempB pop \pst@number\psxunit div def
NoMoreReflection
{YB XB neg}{%
/XC \pst@tempc exch pop \pst@number\psyunit div neg def
/YC \pst@tempc pop \pst@number\psxunit div def
- /XAtemp \pst@tempa exch pop \pst@number\psyunit div neg def
- /YAtemp \pst@tempa pop \pst@number\psxunit div def
+ /XAtemp \pst@tempA exch pop \pst@number\psyunit div neg def
+ /YAtemp \pst@tempA pop \pst@number\psxunit div def
/m1 2 A mul XB mul def
/Alpha2 m1 abs 0.01 lt {90}{1 neg m1 atan} ifelse def
/Beta XB XC sub abs 0.01 gt
@@ -1172,30 +1106,31 @@
} ifelse ){#4''}
\else
%--------------- A Spherical Mirror -----------------
+\typeout{====>\mirrorType}
+\typeout{====>\psk@optic@mirrorType}
\ABinterSPHLens(#2)(#3)(Center){tempRef0}
- \pst@getcoor{tempRef0}\pst@tempa
- \pst@getcoor{tempRef0'}\pst@tempb
+ \pst@getcoor{tempRef0}\pst@tempA
+ \pst@getcoor{tempRef0'}\pst@tempB
\pnode(!%
- \pst@tempa /Y1 exch \pst@number\psyunit div def
+ \pst@tempA /Y1 exch \pst@number\psyunit div def
/X1 exch \pst@number\psxunit div def
- \pst@tempb /Y2 exch \pst@number\psyunit div def
+ \pst@tempB /Y2 exch \pst@number\psyunit div def
/X2 exch \pst@number\psxunit div def
X1 X2 lt {X1 Y1}{X2 Y2}ifelse ){#4}
\reflectionRay[#1](#2)(#4){tempRef1}
% we try if we have another intermediate point
\ABinterSPHLens(#4)(tempRef1)(Center){tempRef2}
- \pst@getcoor{#4}\pst@tempa
- \pst@getcoor{tempRef2}\pst@tempb
+ \pst@getcoor{#4}\pst@tempA
+ \pst@getcoor{tempRef2}\pst@tempB
\pst@getcoor{tempRef2'}\pst@tempc
\pnode(!%
- \pst@tempa /YP exch \pst@number\psyunit div def
+ \pst@tempA /YP exch \pst@number\psyunit div def
/XP exch \pst@number\psxunit div def
- \pst@tempb /Y1 exch \pst@number\psyunit div def
+ \pst@tempB /Y1 exch \pst@number\psyunit div def
/X1 exch \pst@number\psxunit div def
\pst@tempc /Y2 exch \pst@number\psyunit div def
/X2 exch \pst@number\psxunit div def
- XP X1 sub abs 0.01 gt {X1 Y1}{X2 Y2}ifelse
- ){#4'}
+ XP X1 sub abs 0.01 gt {X1 Y1}{X2 Y2} ifelse ){#4'}
\reflectionRay[#1](tempRef1)(#4'){#4''}
\psset{mirrorType=CVG}% restore
\fi
@@ -1204,111 +1139,91 @@
\psline[#1](#4)(#4')
\psline[#1](#4')(#4'')
\fi
-}}
+}\ignorespaces}
%
%
-\def\mirrorCVG{\@ifnextchar[{% Herbert Voss 2003/01/05
- \pst@mirrorCVG}{\pst@mirrorCVG[]}}
+\def\mirrorCVG{\@ifnextchar[{\pst@mirrorCVG}{\pst@mirrorCVG[]}}% Herbert Voss 2003/01/05
\def\pst@mirrorCVG[#1]{{%
- \psset{%
- mirrorType=CVG,%
- AB=1.25,OA=4.5,%
- XO=0,YO=0,xLeft=-5,xRight=5,yBottom=-3,yTop=3,%
- mirrorHeight=5,mirrorDepth=1,mirrorWidth=0.2}
- \psset{#1}
- \begin{pspicture}(\psk@optic@xLeft,\psk@optic@yBottom)(\psk@optic@xRight,\psk@optic@yTop)
- \pnode(! \psk@optic@xLeft\space 0){xLeft}
- \pnode(! \psk@optic@xRight\space 0){xRight}
- \pstVerb{%
- /Height \psk@optic@mirrorHeight\space 2.0 div def
- /Depth \psk@optic@mirrorDepth\space def
- /Width \psk@optic@mirrorWidth\space def
- }
- \pnode(!%
- /AB \psk@optic@AB\space def
- /OA \psk@optic@OA\space def
- /XO \psk@optic@XO\space def
- /YO \psk@optic@YO\space def
- OA XO add YO){A}
- \pnode(! OA XO add AB YO add){B}
- \pnode(! XO YO){O}
- \ifx\psk@optic@mirrorType\mirrorType
- \pnode(!%
- \psk@optic@mirrorHeight\space dup mul 16 div
- \psk@optic@mirrorDepth\space div XO add YO){Focus}
- \else
- \pnode(!%
- /radius \psk@optic@mirrorHeight\space dup mul 4 div
- \psk@optic@mirrorDepth\space dup mul add
- 2 div \psk@optic@mirrorDepth\space div def
- radius XO add YO){Center}
- \pnode(! radius 2 div XO add YO){Focus}
- \fi
- \pscustom[fillstyle=solid,%
- fillcolor=\psk@optic@mirrorColor,%
- linecolor=\psk@optic@mirrorColor]{%
- % (d,h/2)->(d-w,h/2)
- \psline(!%
- \psk@optic@mirrorDepth\space \psk@optic@mirrorHeight\space 2 div)(!%
- \psk@optic@mirrorDepth\space \psk@optic@mirrorWidth\space sub
- \psk@optic@mirrorHeight\space 2 div)
- % (-w/2,h/2)->(-w/2,-h/2)
- \ifx\psk@optic@mirrorType\mirrorType
- \parametricplot{\psk@optic@mirrorHeight}{-\psk@optic@mirrorHeight}{%
- 2 \psk@optic@mirrorHeight\space div dup mul \psk@optic@mirrorDepth\space mul
- t 2 exp 4 div mul \psk@optic@mirrorWidth\space sub t 2 div
- }
- \else
- \parametricplot{\psk@optic@mirrorHeight}{-\psk@optic@mirrorHeight}{%
- /radD radius \psk@optic@mirrorWidth\space add def
- radius \psk@optic@mirrorWidth\space sub radD dup mul t 2 div dup mul sub sqrt sub
- t 2 div
- }
+ \psset{AB=1.25,OA=4.5,XO=0,YO=0,xLeft=-5,xRight=5,yBottom=-3,yTop=3,%
+ mirrorHeight=5,mirrorDepth=1,mirrorWidth=0.2}%
+ \psset{#1}
+ \def\mirrorType{CVG}%
+ \begin{pspicture}(\psk@optic@xLeft,\psk@optic@yBottom)(\psk@optic@xRight,\psk@optic@yTop)
+ \pnode(\psk@optic@xLeft, 0){xLeft}
+ \pnode(\psk@optic@xRight, 0){xRight}
+ \pstVerb{%
+ /Height \psk@optic@mirrorHeight\space 2.0 div def
+ /Depth \psk@optic@mirrorDepth\space def
+ /Width \psk@optic@mirrorWidth\space def
+ /AB \psk@optic@AB\space def
+ /OA \psk@optic@OA\space def
+ /XO \psk@optic@XO\space def
+ /YO \psk@optic@YO\space def
+ /radius Height dup mul Depth dup mul add 2 div Depth div def
+ }
+ \pnode(! OA XO add YO){A}
+ \pnode(! OA XO add AB YO add){B}
+ \pnode(! XO YO){O}
+ \ifx\psk@optic@mirrorType\mirrorType % CVG
+ \pnode(!
+ \psk@optic@mirrorHeight\space dup mul 16 div
+ \psk@optic@mirrorDepth\space div XO add YO){Focus}
+ \else % SPH
+ \pnode(! radius XO add YO){Center}
+ \pnode(! radius 2 div XO add YO){Focus}
\fi
+ \pscustom[fillstyle=solid,fillcolor=\psk@optic@mirrorColor,%
+ linecolor=\psk@optic@mirrorColor]{%
+ % (d,h/2)->(d-w,h/2)
+ \psline(!%
+ \psk@optic@mirrorDepth\space \psk@optic@mirrorHeight\space 2 div)(!%
+ \psk@optic@mirrorDepth\space \psk@optic@mirrorWidth\space sub
+ \psk@optic@mirrorHeight\space 2 div)
+ % (-w/2,h/2)->(-w/2,-h/2)
+ \ifx\psk@optic@mirrorType\mirrorType % CVG or SPH
+ \parametricplot{\psk@optic@mirrorHeight}{-\psk@optic@mirrorHeight}{%
+ 2 \psk@optic@mirrorHeight\space div dup mul \psk@optic@mirrorDepth\space mul
+ t 2 exp 4 div mul \psk@optic@mirrorWidth\space sub t 2 div }
+ \else
+ \parametricplot{\psk@optic@mirrorHeight}{-\psk@optic@mirrorHeight}{%
+ /radD radius \psk@optic@mirrorWidth\space add def
+ radius \psk@optic@mirrorWidth\space sub radD dup mul t 2 div dup mul sub sqrt sub t 2 div }
+ \fi
% (d-w,-h/2)(d,-h/2)
- \psline(!%
- \psk@optic@mirrorDepth\space \psk@optic@mirrorWidth\space sub
- \psk@optic@mirrorHeight\space 2 div neg)(!%
- \psk@optic@mirrorDepth\space \psk@optic@mirrorHeight\space 2 div neg)
+ \psline(!%
+ \psk@optic@mirrorDepth\space \psk@optic@mirrorWidth\space sub
+ \psk@optic@mirrorHeight\space 2 div neg)(!%
+ \psk@optic@mirrorDepth\space \psk@optic@mirrorHeight\space 2 div neg)
% (w/2,-h/2)->(w/2,h/2)
- \ifx\psk@optic@mirrorType\mirrorType
- \parametricplot{-\psk@optic@mirrorHeight}{\psk@optic@mirrorHeight}{%
+ \ifx\psk@optic@mirrorType\mirrorType % CVG or SPH
+ \parametricplot{-\psk@optic@mirrorHeight}{\psk@optic@mirrorHeight}{%
2 \psk@optic@mirrorHeight\space div dup mul \psk@optic@mirrorDepth\space mul
- t 2 exp 4 div mul t 2 div
- }
- \else
- \parametricplot{-\psk@optic@mirrorHeight}{\psk@optic@mirrorHeight}{%
- radius dup dup mul t 2 div dup mul sub sqrt sub
- t 2 div
- }
- \fi
- \fill
+ t 2 exp 4 div mul t 2 div }
+ \else
+ \parametricplot{-\psk@optic@mirrorHeight}{\psk@optic@mirrorHeight}{%
+ radius dup dup mul t 2 div dup mul sub sqrt sub t 2 div }
+ \fi
+ \fill
}
\ifPst@drawing
\psline[linewidth=0.5pt,linecolor=black](O)(xRight)
- \ifx\psk@optic@mirrorType\mirrorType
- \else
- \qdisk(Center){1.5pt}\uput{0.2}[-90](Center){Center}
- \fi
+ \ifx\psk@optic@mirrorType\mirrorType\qdisk(Center){1.5pt}\uput{0.2}[-90](Center){Center}\fi
\qdisk(Focus){2pt}\uput[0](Focus){F}
\psline[linewidth=3\pslinewidth]{->}(A)(B)
- \psset{%
- linewidth=\pslinewidth,%
- linecolor=\psk@optic@rayColor,%
- arrows=>}
+ \psset{linewidth=\pslinewidth,linecolor=\psk@optic@rayColor,arrows=>}
\uput[0](A){A}
\uput[0](B){B}
\pnode(! 1 \psk@optic@AB\space){Dummy}
- \mirrorCVGRay[mirrorType=\psk@optic@mirrorType,drawing=false](B)(Dummy){PR}
- \psOutLine[length=\psk@optic@OA](PR)(PR'){PR''}
- \nodeBetween(B)(PR){Dummy}
- \psline(B)(Dummy)
- \psline(Dummy)(PR)
- \nodeBetween(PR)(PR''){Dummy}
- \psline(PR)(Dummy)
- \psline(Dummy)(PR'')
-%
- \mirrorCVGRay[mirrorType=\psk@optic@mirrorType,drawing=false](B)(! 0 0){MR}
+ \mirrorCVGRay[drawing=false](B)(Dummy){PR}
+ \psOutLine[length=\psk@optic@OA](PR)(PR'){PR''}
+ \nodeBetween(B)(PR){Dummy}
+ \psline(B)(Dummy)
+ \psline(Dummy)(PR)
+ \nodeBetween(PR)(PR''){Dummy}
+ \psline(PR)(Dummy)
+ \psline(Dummy)(PR'')
+%
+ \mirrorCVGRay[drawing=false](B)(0, 0){MR}
\psOutLine[length=\psk@optic@OA](MR)(MR'){MR''}
\nodeBetween(B)(MR){Dummy}
\psline(B)(Dummy)
@@ -1317,7 +1232,7 @@
\psline(MR)(Dummy)
\psline(Dummy)(MR')
%
- \mirrorCVGRay[mirrorType=\psk@optic@mirrorType,drawing=false](B)(Focus){FR}
+ \mirrorCVGRay[drawing=false](B)(Focus){FR}
\psOutLine[length=\psk@optic@OA](FR)(FR'){FR''}
\nodeBetween(B)(FR){Dummy}
\psline(B)(Dummy)
@@ -1332,145 +1247,126 @@
\uput[45](A'){A'}
\uput[-45](B'){B'}
\fi
- \end{pspicture}
-}}
+ \end{pspicture}%
+}\ignorespaces}
%
%
\def\mirrorDVG{\@ifnextchar[{% Herbert Voss 2003/01/05
\pst@mirrorDVG}{\pst@mirrorDVG[]}}
\def\pst@mirrorDVG[#1]{{%
- \psset{% the defaults
- AB=1.25,OA=4,XO=0,YO=0,%
- xLeft=-5,xRight=5,yBottom=-3,yTop=3,%
- mirrorHeight=5,mirrorDepth=1,mirrorWidth=0.2}
- \psset{#1}%
- \pstVerb{%
- /Height \psk@optic@mirrorHeight\space 2 div def
- /Depth \psk@optic@mirrorDepth\space def
- /Width \psk@optic@mirrorWidth\space def
- }
- \begin{pspicture}(\psk@optic@xLeft,\psk@optic@yBottom)(\psk@optic@xRight,\psk@optic@yTop)
- \pnode(! \psk@optic@xLeft\space 0){xLeft}
- \pnode(! \psk@optic@xRight\space 0){xRight}
- \pnode(!%
- /AB \psk@optic@AB\space def
- /OA \psk@optic@OA\space def
- /XO \psk@optic@XO\space def
- /YO \psk@optic@YO\space def
- OA XO add YO){A}
- \pnode(! OA XO add AB YO add){B}
- \pnode(! XO YO){O}
+ \psset{% the defaults
+ AB=1.25,OA=4,XO=0,YO=0,xLeft=-5,xRight=5,yBottom=-3,yTop=3,%
+ mirrorHeight=5,mirrorDepth=1,mirrorWidth=0.2,mirrorType=DVG}%
+ \def\mirrorType{DVG}%
+ \psset{#1}%
+ \pstVerb{
+ /Height \psk@optic@mirrorHeight\space 2 div def
+ /Depth \psk@optic@mirrorDepth\space def
+ /Width \psk@optic@mirrorWidth\space def
+ /radius Height dup mul Depth dup mul add 2 div Depth div def
+ /AB \psk@optic@AB\space def
+ /OA \psk@optic@OA\space def
+ /XO \psk@optic@XO\space def
+ /YO \psk@optic@YO\space def
+ }
+ \begin{pspicture}(\psk@optic@xLeft,\psk@optic@yBottom)(\psk@optic@xRight,\psk@optic@yTop)
+ \pnode(! \psk@optic@xLeft\space 0){xLeft}
+ \pnode(! \psk@optic@xRight\space 0){xRight}
+ \pnode(! OA XO add YO){A}
+ \pnode(! OA XO add AB YO add){B}
+ \pnode(! XO YO){O}
+ \ifx\psk@optic@mirrorType\mirrorType % DVG
+ \pnode(! Height dup mul 4 div Depth div XO add YO){Focus}
+ \else % SPH
+ \pnode(! radius neg XO add YO){Center}
+ \pnode(! radius 2 div XO add YO){Focus}
+ \fi
+ \pscustom[fillstyle=solid,%
+ fillcolor=\psk@optic@mirrorColor,%
+ linecolor=\psk@optic@mirrorColor]{%
+ % (d,h/2)->(d-w,h/2)
+ \psline(! Depth neg Height)(! Depth Width add neg Height)
+ % (-w/2,h/2)->(-w/2,-h/2)
\ifx\psk@optic@mirrorType\mirrorType
- \pnode(! Height dup mul 4 div Depth div XO add YO){Focus}
+ \parametricplot{\psk@optic@mirrorHeight}{-\psk@optic@mirrorHeight}{%
+ Depth Height dup mul div t 2 exp 4 div mul neg t 2 div }
\else
- \pnode(!%
- /radius Height dup mul Depth dup mul add 2 div Depth div def
- radius neg XO add YO){Center}
- \pnode(! radius 2 div XO add YO){Focus}
+ \parametricplot{\psk@optic@mirrorHeight}{-\psk@optic@mirrorHeight}{%
+ radius dup mul t 2 div dup mul sub sqrt radius sub t 2 div }
\fi
- \pscustom[fillstyle=solid,%
- fillcolor=\psk@optic@mirrorColor,%
- linecolor=\psk@optic@mirrorColor]{%
- % (d,h/2)->(d-w,h/2)
- \psline(! Depth neg Height)(! Depth Width add neg Height)
- % (-w/2,h/2)->(-w/2,-h/2)
- \ifx\psk@optic@mirrorType\mirrorType
- \parametricplot{\psk@optic@mirrorHeight}{-\psk@optic@mirrorHeight}{%
- Depth Height dup mul div t 2 exp 4 div mul neg
- t 2 div
- }
- \else
- \parametricplot{\psk@optic@mirrorHeight}{-\psk@optic@mirrorHeight}{%
- radius dup mul t 2 div dup mul sub sqrt radius sub
- t 2 div
- }
- \fi
- % (d-w,-h/2)(d,-h/2)
- \psline(! Depth Width add neg Height neg)(! Depth neg Height neg)%
- % (w/2,-h/2)->(w/2,h/2)
- \ifx\psk@optic@mirrorType\mirrorType
- \parametricplot{-\psk@optic@mirrorHeight}{\psk@optic@mirrorHeight}{%
- Depth Height dup mul div t 2 exp 4 div mul neg Width sub
- t 2 div
- }
- \else
- \parametricplot{-\psk@optic@mirrorHeight}{\psk@optic@mirrorHeight}{%
- radius Width sub dup mul t 2 div dup mul sub sqrt radius sub
- t 2 div
- }
- \fi
- \fill
- }
- \ifPst@drawing
- \psline[linecolor=black,linewidth=0.5pt](xLeft)(xRight)
- \qdisk(Center){2pt}\uput[-90](Center){C}
- \qdisk(Focus){2pt}\uput{0.25}[-90](Focus){F}
- \psline[linewidth=3\pslinewidth,arrowinset=0]{->}(A)(B)
- \psset{%
- linewidth=1.5\pslinewidth,%
- linecolor=\psk@optic@rayColor,%
- arrows=->%
- }
- \uput{0.15}[0](A){A}
- \uput{0.15}[0](B){B}
-%
- \mirrorDVGRay[%
- mirrorType=\psk@optic@mirrorType,%
- drawing=false](B)(! 0 \psk@optic@AB){PR}
- \qdisk(PR){1.5pt}\uput{0.2}[180](PR){PR}
- \qdisk(PR'){1.5pt}\uput{0.2}[0](PR'){PR'}
- \nodeBetween(B)(PR){PDummy}
- \psline(B)(PDummy)
- \psline(PDummy)(PR)
- \psline[arrows=-, linestyle=dotted](Focus)(PR)
- \psOutLine[arrows=-,linestyle=dotted](P)(Focus){PBegin}
- \psline(PR)(PR')
-%
- \mirrorDVGRay[%
- mirrorType=\psk@optic@mirrorType,%
- drawing=false](B)(! 0 0){MR}
- \qdisk(MR){1.5pt}\uput{0.2}[180](MR){MR}
- \qdisk(MR'){1.5pt}\uput{0.2}[0](MR'){MR'}
- \nodeBetween(B)(! 0 0){MDummy}
- \psline(B)(MDummy)
- \psline(MDummy)(! 0 0)
- \psline(MR)(MR')
-%
- \mirrorDVGRay[%
- mirrorType=\psk@optic@mirrorType,%
- drawing=false](B)(Focus){FR}
- \qdisk(FR){1.5pt}\uput{0.2}[180](FR){FR}
- \qdisk(FR'){1.5pt}\uput{0.2}[0](FR'){FR'}
- \nodeBetween(B)(FR){Dummy}
- \psline(B)(Dummy)
- \psline(Dummy)(FR)
- \psline(FR)(FR')
- \psline[arrows=-,linestyle=dotted](Focus)(FR)
- \psOutLine[arrows=-, linestyle=dotted](FR)(Focus){PBegin}
- \fi
- \end{pspicture}
-}}
+ % (d-w,-h/2)(d,-h/2)
+ \psline(! Depth Width add neg Height neg)(! Depth neg Height neg)%
+ % (w/2,-h/2)->(w/2,h/2)
+ \ifx\psk@optic@mirrorType\mirrorType
+ \parametricplot{-\psk@optic@mirrorHeight}{\psk@optic@mirrorHeight}{%
+ Depth Height dup mul div t 2 exp 4 div mul neg Width sub t 2 div }
+ \else
+ \parametricplot{-\psk@optic@mirrorHeight}{\psk@optic@mirrorHeight}{%
+ radius Width sub dup mul t 2 div dup mul sub sqrt radius sub t 2 div }
+ \fi
+ \fill%
+ }
+ \ifPst@drawing
+ \psline[linecolor=black,linewidth=0.5pt](xLeft)(xRight)
+ \qdisk(Center){2pt}\uput[-90](Center){C}
+ \qdisk(Focus){2pt}\uput{0.25}[-90](Focus){F}
+ \psline[linewidth=3\pslinewidth,arrowinset=0]{->}(A)(B)
+ \psset{linewidth=1.5\pslinewidth,linecolor=\psk@optic@rayColor,arrows=->}
+ \uput{0.15}[0](A){A}
+ \uput{0.15}[0](B){B}
+%
+ \mirrorDVGRay[drawing=false](B)(0,\psk@optic@AB){PR}
+% mirrorType=\psk@optic@mirrorType,drawing=false](B)(0,\psk@optic@AB){PR}
+ \qdisk(PR){1.5pt}\uput{0.2}[180](PR){PR}
+ \qdisk(PR'){1.5pt}\uput{0.2}[0](PR'){PR'}
+ \nodeBetween(B)(PR){PDummy}
+ \psline(B)(PDummy)
+ \psline(PDummy)(PR)
+ \psline[arrows=-, linestyle=dotted](Focus)(PR)
+ \psOutLine[arrows=-,linestyle=dotted](P)(Focus){PBegin}
+ \psline(PR)(PR')
+%
+ \mirrorDVGRay[drawing=false](B)(! 0 0){MR}
+% mirrorType=\psk@optic@mirrorType,%
+ \qdisk(MR){1.5pt}\uput{0.2}[180](MR){MR}
+ \qdisk(MR'){1.5pt}\uput{0.2}[0](MR'){MR'}
+ \nodeBetween(B)(! 0 0){MDummy}
+ \psline(B)(MDummy)
+ \psline(MDummy)(! 0 0)
+ \psline(MR)(MR')
+%
+ \mirrorDVGRay[drawing=false](B)(Focus){FR}
+% mirrorType=\psk@optic@mirrorType,%
+ \qdisk(FR){1.5pt}\uput{0.2}[180](FR){FR}
+ \qdisk(FR'){1.5pt}\uput{0.2}[0](FR'){FR'}
+ \nodeBetween(B)(FR){Dummy}
+ \psline(B)(Dummy)
+ \psline(Dummy)(FR)
+ \psline(FR)(FR')
+ \psline[arrows=-,linestyle=dotted](Focus)(FR)
+ \psOutLine[arrows=-, linestyle=dotted](FR)(Focus){PBegin}
+ \fi
+ \end{pspicture}%
+}\ignorespaces}
%
-\def\mirrorDVGRay{\@ifnextchar[{% Herbert Voss 2003/01/05
- \pst@mirrorDVGRay}{\pst@mirrorDVGRay[]}}
+\def\mirrorDVGRay{\@ifnextchar[{\pst@mirrorDVGRay}{\pst@mirrorDVGRay[]}}% Herbert Voss 2003/01/05
\def\pst@mirrorDVGRay[#1](#2)(#3)#4{{%
- \psset{#1}%
+ \psset{#1}%
+ \pnode(!%
+ \psk@optic@mirrorHeight\space dup mul 16 div
+ \psk@optic@mirrorDepth\space div neg 0){Focus}
+ \ifx\psk@optic@mirrorType\mirrorType % DVG or Spherical
+ \pst@getcoor{#2}\pst@tempA
+ \pst@getcoor{#3}\pst@tempB
\pnode(!%
- \psk@optic@mirrorHeight\space dup mul 16 div
- \psk@optic@mirrorDepth\space div neg 0){Focus}
- \ifx\psk@optic@mirrorType\mirrorType
- \pst@getcoor{#2}\pst@tempa
- \pst@getcoor{#3}\pst@tempb
- \pnode(!%
- /A 2 \psk@optic@mirrorHeight\space div dup mul \psk@optic@mirrorDepth\space mul neg def
- /XA \pst@tempa exch pop \pst@number\psyunit div neg def
- /YA \pst@tempa pop \pst@number\psxunit div def
- /XB \pst@tempb exch pop \pst@number\psyunit div neg def
- /YB \pst@tempb pop \pst@number\psxunit div def
- XB abs 0.001 lt YB abs 0.001 lt and
- { 0 0 }{
+ /A 2 \psk@optic@mirrorHeight\space div dup mul \psk@optic@mirrorDepth\space mul neg def
+ /XA \pst@tempA exch pop \pst@number\psyunit div neg def
+ /YA \pst@tempA pop \pst@number\psxunit div def
+ /XB \pst@tempB exch pop \pst@number\psyunit div neg def
+ /YB \pst@tempB pop \pst@number\psxunit div def
+ XB abs 0.001 lt YB abs 0.001 lt and { 0 0 }{
XB XA sub abs 0.01 lt
- {A XA dup mul mul XA neg}{
+ {A XA dup mul mul XA neg}{
/Xmax \psk@optic@mirrorHeight\space 2 div def
/m YB YA sub XB XA sub div def
/m2a m A div 2 div def
@@ -1486,14 +1382,14 @@
} ifelse
} ifelse){#4}
% #4 is the point on the mirror
- \pst@getcoor{#2}\pst@tempc% the starting point
- \pst@getcoor{#4}\pst@tempa% the point on the mirror
+ \pst@getcoor{#2}\pst@tempC% the starting point
+ \pst@getcoor{#4}\pst@tempA% the point on the mirror
\pst@getcoor{Focus}\pst@tempf% the point on the mirror
\pnode(!
- /XA \pst@tempa exch pop \pst@number\psyunit div neg def
- /YA \pst@tempa pop \pst@number\psxunit div def
- /XC \pst@tempc exch pop \pst@number\psyunit div neg def
- /YC \pst@tempc pop \pst@number\psxunit div def
+ /XA \pst@tempA exch pop \pst@number\psyunit div neg def
+ /YA \pst@tempA pop \pst@number\psxunit div def
+ /XC \pst@tempC exch pop \pst@number\psyunit div neg def
+ /YC \pst@tempC pop \pst@number\psxunit div def
XA abs 0.001 lt YA abs 0.001 lt and
{YC XC}{
/YF \pst@tempf pop \pst@number\psxunit div def
@@ -1513,12 +1409,12 @@
\else
%--------------- A Spherical Mirror -----------------
\ABinterSPHLens(#2)(#3)(Center){tempRef0}
- \pst@getcoor{tempRef0}\pst@tempa
- \pst@getcoor{tempRef0'}\pst@tempb
+ \pst@getcoor{tempRef0}\pst@tempA
+ \pst@getcoor{tempRef0'}\pst@tempB
\pnode(!%
- \pst@tempa /Y1 exch \pst@number\psyunit div def
+ \pst@tempA /Y1 exch \pst@number\psyunit div def
/X1 exch \pst@number\psxunit div def
- \pst@tempb /Y2 exch \pst@number\psyunit div def
+ \pst@tempB /Y2 exch \pst@number\psyunit div def
/X2 exch \pst@number\psxunit div def
X1 X2 gt {X1 Y1}{X2 Y2}ifelse ){#4}
\reflectionRay[mirrorType=SPH](#2)(#4){tempRef1}
@@ -1527,8 +1423,9 @@
\ifPst@drawing
\psline[#1](#2)(#4)(#4')
\fi
-}}
+}\ignorespaces}
%
+
% HEadlight Herbert <voss@perce.de> 2003/01/23
%
\def\beamLight{\@ifnextchar[{\pst@beamLight}{\pst@beamLight[]}}
@@ -1554,8 +1451,8 @@
\psline(3.0,0)(3.0,-0.3)(2.5,-0.3)(2.2,0.15)(2,-0.15)%
(1.8,0.15)(1.6,-0.15)(1.4,0.15)(1.2,-0.15)(1,0.15)%
\psline[linecolor=black,linewidth=0.5pt,linestyle=dashed](-1.75,0)(10,0)
-\end{pspicture*}
-}}
+\end{pspicture*}%
+}\ignorespaces}
%
%
%Telescope
@@ -1572,7 +1469,8 @@
\def\telescope{\@ifnextchar[{\pst@telescope}{\pst@telescope[]}}
\def\pst@telescope[#1]{{%
\psset{xLeft=-0.5,xRight=11,yBottom=-6,yTop=2}% the default
- \psset{#1}%
+ \def\@tempa{#1}%
+ \ifx\@tempa\@empty\else\psset{#1}\fi%
\pstVerb{%
/mirrorFocus \psk@optic@mirrorFocus\space def
/Coeff mirrorFocus 4 mul def
@@ -1581,68 +1479,68 @@
}%
%
\begin{pspicture}*(\psk@optic@xLeft,\psk@optic@yBottom)(\psk@optic@xRight,\psk@optic@yTop)
- \rput(0,0){%
- \mirrorCVG[%
- mirrorHeight=4,%
- mirrorWidth=0.25,%
- mirrorDepth=0.25,%
- drawing=false]%
- }
- \pnode(! \psk@optic@xLeft\space 0){xLeft}
- \pnode(! \psk@optic@xRight\space 0){xRight}
- \psline[linewidth=0.5\pslinewidth](11,0)
- \pnode(! 1.5 dup mul Coeff div 1.5){P1}
- \pnode(! 1.5 dup mul Coeff div 1.5 neg){P2}
- \pnode(! mirrorFocus 0){mirrorFocusNode}
- \pnode(! posMirrorTwo 1 mirrorTwoAngle cos mul sub
- 1 mirrorTwoAngle sin mul){UpMirror2}
- \pnode(! posMirrorTwo 1 mirrorTwoAngle cos mul add
- 1 mirrorTwoAngle sin mul neg){DownMirror2}
- \ABinterCD(P1)(mirrorFocusNode)(UpMirror2)(DownMirror2){Inter1}
- \ABinterCD(P2)(mirrorFocusNode)(UpMirror2)(DownMirror2){Inter2}
- \pnode(!%
- \psk@optic@posMirrorTwo\space posMirrorTwo mirrorFocus sub){ocularFocusNode}
- {%
- \psset{linecolor=red}
- \Arrows[arrows=->,arrowsize=0.2](11,1.5)(P1)
- \Arrows[arrows=->,arrowsize=0.2](P1)(Inter1)
-%
- \Arrows[arrows=->>,arrowsize=0.2](11,-1.5)(P2)
- \Arrows[arrows=->>,arrowsize=0.2](P2)(Inter2)
- \psline[linestyle=dashed](Inter2)(mirrorFocusNode)
- \pnode(! 5 \psk@optic@posMirrorTwo\space 2 sub neg){ocularLeft}
- \pnode(! 7 \psk@optic@posMirrorTwo\space 2 sub neg){ocularRight}
- \ABinterCD(Inter1)(ocularFocusNode)(ocularLeft)(ocularRight){FO1}
- \ABinterCD(Inter2)(ocularFocusNode)(ocularLeft)(ocularRight){FO2}
- \Arrows[arrows=->>,arrowsize=0.2,length=1](Inter2)(FO2)
- \psline(11,-1.5)(P2)(Inter2)(FO2)
- \Arrows[arrows=->,arrowsize=0.2](Inter1)(ocularFocusNode)
- \psline[linestyle=dashed](Inter1)(mirrorFocusNode)
- \psline(11,1.5)(P1)(Inter1)(FO1)
- }
- \rput{-\psk@optic@mirrorTwoAngle}(\psk@optic@posMirrorTwo,0){\mirrorTwo}
- \uput[90](mirrorFocusNode){$\mathrm{F_1}$}
- \uput[180](ocularFocusNode){$\mathrm{F_2}$}
- \rput{90}(!%
- \psk@optic@posMirrorTwo\space
- \psk@optic@posMirrorTwo\space 2 sub neg){%
- \scalebox{0.5 0.4}{\lens[lensWidth=0.4,lensGlass=true,drawing=false]}}
- \pnode(0,2){Aux1}
- \pnode(0,-2){Aux2}
- \Parallel[length=1](Aux1)(Aux2)(FO1){Eye1}
- \Parallel[length=1](Aux1)(Aux2)(FO2){Eye2}
- {%
- \psset{linecolor=red,arrowsize=0.2,length=0.7}
- \psline[linecolor=red](FO1)(Eye1)
- \psline[linecolor=red](FO2)(Eye2)
- \Arrows[arrows=->](FO1)(Eye1)
- \Arrows[arrows=->>](FO2)(Eye2)%
- }
- \rput{-90}(!%
- \psk@optic@posMirrorTwo\space
- \psk@optic@posMirrorTwo\space neg){\scalebox{0.6}{\eye}}
- \end{pspicture}
-}}
+ \rput(0,0){%
+ \mirrorCVG[%
+ mirrorHeight=4,%
+ mirrorWidth=0.25,%
+ mirrorDepth=0.25,%
+ drawing=false]%
+ }
+ \pnode(! \psk@optic@xLeft\space 0){xLeft}
+ \pnode(! \psk@optic@xRight\space 0){xRight}
+ \psline[linewidth=0.5\pslinewidth](11,0)
+ \pnode(! 1.5 dup mul Coeff div 1.5){P1}
+ \pnode(! 1.5 dup mul Coeff div 1.5 neg){P2}
+ \pnode(! mirrorFocus 0){mirrorFocusNode}
+ \pnode(! posMirrorTwo 1 mirrorTwoAngle cos mul sub
+ 1 mirrorTwoAngle sin mul){UpMirror2}
+ \pnode(! posMirrorTwo 1 mirrorTwoAngle cos mul add
+ 1 mirrorTwoAngle sin mul neg){DownMirror2}
+ \ABinterCD(P1)(mirrorFocusNode)(UpMirror2)(DownMirror2){Inter1}
+ \ABinterCD(P2)(mirrorFocusNode)(UpMirror2)(DownMirror2){Inter2}
+ \pnode(!%
+ \psk@optic@posMirrorTwo\space posMirrorTwo mirrorFocus sub){ocularFocusNode}
+ {%
+ \psset{linecolor=red}
+ \Arrows[arrows=->,arrowsize=0.2](11,1.5)(P1)
+ \Arrows[arrows=->,arrowsize=0.2](P1)(Inter1)
+%
+ \Arrows[arrows=->>,arrowsize=0.2](11,-1.5)(P2)
+ \Arrows[arrows=->>,arrowsize=0.2](P2)(Inter2)
+ \psline[linestyle=dashed](Inter2)(mirrorFocusNode)
+ \pnode(! 5 \psk@optic@posMirrorTwo\space 2 sub neg){ocularLeft}
+ \pnode(! 7 \psk@optic@posMirrorTwo\space 2 sub neg){ocularRight}
+ \ABinterCD(Inter1)(ocularFocusNode)(ocularLeft)(ocularRight){FO1}
+ \ABinterCD(Inter2)(ocularFocusNode)(ocularLeft)(ocularRight){FO2}
+ \Arrows[arrows=->>,arrowsize=0.2,length=1](Inter2)(FO2)
+ \psline(11,-1.5)(P2)(Inter2)(FO2)
+ \Arrows[arrows=->,arrowsize=0.2](Inter1)(ocularFocusNode)
+ \psline[linestyle=dashed](Inter1)(mirrorFocusNode)
+ \psline(11,1.5)(P1)(Inter1)(FO1)
+ }
+ \rput{-\psk@optic@mirrorTwoAngle}(\psk@optic@posMirrorTwo,0){\mirrorTwo}
+ \uput[90](mirrorFocusNode){$\mathrm{F_1}$}
+ \uput[180](ocularFocusNode){$\mathrm{F_2}$}
+ \rput{90}(!%
+ \psk@optic@posMirrorTwo\space
+ \psk@optic@posMirrorTwo\space 2 sub neg){%
+ \psscalebox{0.5 0.4}{\lens[lensWidth=0.4,lensGlass=true,drawing=false]}}
+ \pnode(0,2){Aux1}
+ \pnode(0,-2){Aux2}
+ \Parallel[length=1](Aux1)(Aux2)(FO1){Eye1}
+ \Parallel[length=1](Aux1)(Aux2)(FO2){Eye2}
+ {%
+ \psset{linecolor=red,arrowsize=0.2,length=0.7}
+ \psline[linecolor=red](FO1)(Eye1)
+ \psline[linecolor=red](FO2)(Eye2)
+ \Arrows[arrows=->](FO1)(Eye1)
+ \Arrows[arrows=->>](FO2)(Eye2)%
+ }
+ \rput{-90}(!%
+ \psk@optic@posMirrorTwo\space
+ \psk@optic@posMirrorTwo\space neg){\psscalebox{0.6}{\eye}}
+\end{pspicture}%
+}\ignorespaces}
%
%Images et réflexions sur un miroir plan
%(#1) coordonnées du point objet (XA,YA)
@@ -1651,13 +1549,13 @@
%{#4} nom de l'image A'
%
\def\planMirrorRay(#1)(#2)(#3)#4{{%
-\pst@getcoor{#1}\pst@tempa
-\pst@getcoor{#2}\pst@tempb
+\pst@getcoor{#1}\pst@tempA
+\pst@getcoor{#2}\pst@tempB
\pst@getcoor{#3}\pst@tempc
\pnode(!%
- \pst@tempa /YA exch \pst@number\psyunit div def
+ \pst@tempA /YA exch \pst@number\psyunit div def
/XA exch \pst@number\psxunit div def
- \pst@tempb /Y1 exch \pst@number\psyunit div def
+ \pst@tempB /Y1 exch \pst@number\psyunit div def
/X1 exch \pst@number\psxunit div def
\pst@tempc /Y2 exch \pst@number\psyunit div def
/X2 exch \pst@number\psxunit div def
@@ -1685,20 +1583,20 @@
xA' yA' moveto
xH yH rlineto
xA' yA'){#4}
-}}
+}\ignorespaces}
%
% 2002/12/27
%
\def\symPlan(#1)(#2){\pst@killglue\pst@makebox{\symPlan@(#1)(#2)}}%
\def\symPlan@(#1)(#2){{%
- \pst@getcoor{#1}\pst@tempa%
- \pst@getcoor{#2}\pst@tempb%
+ \pst@getcoor{#1}\pst@tempA%
+ \pst@getcoor{#2}\pst@tempB%
\leavevmode
\hbox{%
\pnode(!%
- \pst@tempa /Y1 exch def
+ \pst@tempA /Y1 exch def
/X1 exch def
- \pst@tempb /Y2 exch def
+ \pst@tempB /Y2 exch def
/X2 exch def
/DX X2 X1 sub def
/DY Y2 Y1 sub def
@@ -1723,7 +1621,7 @@
} \tx@TMChange}%
\box\pst@hbox
\pst@Verb{\tx@TMRestore}}%
-}}
+}\ignorespaces}
%
% refractionRay[options](A)(B)(C)(D){rNoA}{rNoB}{E}
% (A)(B) the ray nodes
@@ -1737,8 +1635,8 @@
\def\refractionRay{\@ifnextchar[{\pst@refractionRay}{\pst@refractionRay[]}}
\def\pst@refractionRay[#1](#2)(#3)(#4)(#5)#6#7#8{{%
\psset{#1}
- \pst@getcoor{#2}\pst@tempa
- \pst@getcoor{#3}\pst@tempb
+ \pst@getcoor{#2}\pst@tempA
+ \pst@getcoor{#3}\pst@tempB
\pst@getcoor{#4}\pst@tempc
\pst@getcoor{#5}\pst@tempd
\ABinterCD(#2)(#3)(#4)(#5){#8}
@@ -1749,10 +1647,10 @@
\def\pst@optic@cIn{#6} % refraction number 1
\def\pst@optic@cOut{#7} % refraction number 2
\pnode(!%
- /YA \pst@tempa exch pop \pst@number\psyunit div def
- /XA \pst@tempa pop \pst@number\psxunit div def
- /YB \pst@tempb exch pop \pst@number\psyunit div def
- /XB \pst@tempb pop \pst@number\psxunit div def
+ /YA \pst@tempA exch pop \pst@number\psyunit div def
+ /XA \pst@tempA pop \pst@number\psxunit div def
+ /YB \pst@tempB exch pop \pst@number\psyunit div def
+ /XB \pst@tempB pop \pst@number\psxunit div def
/YC \pst@tempc exch pop \pst@number\psyunit div def
/XC \pst@tempc pop \pst@number\psxunit div def
/YD \pst@tempd exch pop \pst@number\psyunit div def
@@ -1787,7 +1685,7 @@
XP BetaStrich cos sub
YP BetaStrich sin add ){#8'}
%\qdisk(#8){5pt}
-}}
+}\ignorespaces}
%
% Herbert Voss <voss@perce.de> 2003-02-10
%
@@ -1800,14 +1698,14 @@
\def\reflectionRay{\@ifnextchar[{\pst@reflectionRay}{\pst@reflectionRay[]}}
\def\pst@reflectionRay[#1](#2)(#3)#4{{%
\psset{#1}
- \pst@getcoor{#2}\pst@tempa% the starting point
+ \pst@getcoor{#2}\pst@tempA% the starting point
\pst@getcoor{#3}\pst@tempp% the point on the mirror
\pst@getcoor{Center}\pst@tempc% the center/focus of the mirror
\ifx\psk@optic@mirrorType\mirrorType% Parabolic
\else% Spherical
\pnode(!%
- /XA \pst@tempa exch pop \pst@number\psyunit div neg def
- /YA \pst@tempa pop \pst@number\psxunit div def
+ /XA \pst@tempA exch pop \pst@number\psyunit div neg def
+ /YA \pst@tempA pop \pst@number\psxunit div def
/XC \pst@tempc exch pop \pst@number\psyunit div neg def
/YC \pst@tempc pop \pst@number\psxunit div def
/XP \pst@tempp exch pop \pst@number\psyunit div neg def
@@ -1828,7 +1726,24 @@
% Determine the intermediate point
YP BetaStrich sin add XP BetaStrich cos add neg){#4}
\fi
-}}
+}\ignorespaces}
+%
+\def\resetOpticOptions{% hv 2006-07-20
+ \psset[pst-optic]{%
+ lensGlass=false,drawing=true,
+ xLeft=-7.5,xRight=7.5,yBottom=-3.0,yTop=3.0,
+ lensType=CVG,lensColor=lightgray,lensWidth=0.5,lensDepth=1,
+ lensHeight=5,lensScale=1,lensArrowSize=0.2,lensArrowInset=0.5,
+ mirrorType=CVG,mirrorDepth=1,mirrorHeight=5,mirrorWidth=0.25,
+ mirrorFocus=8,mirrorTwoAngle=45,posMirrorTwo=6,mirrorColor=lightgray,
+ refractA=1,refractB=1.41,
+ XO=0,YO=0,OA=-3,posStart=0,length=2,focus=2,AB=1,arrowOffset=0,
+ nameO=O,spotO=225,nameAi=A',spotAi=90,nameBi=B',spotBi=270,
+ nameFi=F',spotFi=270,
+ rayColor=red}%
+% \gdef\mirrorType{CVG}%
+% \gdef\lensType{CVG}%
+}
%
\catcode`\@=\PstAtCode\relax
%
diff --git a/Master/texmf-dist/tex/latex/pst-optic/pst-optic.sty b/Master/texmf-dist/tex/latex/pst-optic/pst-optic.sty
index 98d594eb532..5cab95a1028 100644
--- a/Master/texmf-dist/tex/latex/pst-optic/pst-optic.sty
+++ b/Master/texmf-dist/tex/latex/pst-optic/pst-optic.sty
@@ -3,5 +3,5 @@
pst-optic.tex (hv)]
\input{pst-optic.tex}
\ProvidesFile{pst-optic.tex}
- [\filedate\space v\fileversion\space `PST-optic' (hv)]
+ [\filedate\space v\fileversion\space `PST-optic' (ML,hv)]
\endinput
diff --git a/Master/texmf-dist/tpm/pst-optic.tpm b/Master/texmf-dist/tpm/pst-optic.tpm
index 1f8c3d94903..036072d4407 100644
--- a/Master/texmf-dist/tpm/pst-optic.tpm
+++ b/Master/texmf-dist/tpm/pst-optic.tpm
@@ -3,7 +3,7 @@
<rdf:Description about="http://texlive.dante.de/texlive/Package/pst-optic.zip">
<TPM:Name>pst-optic</TPM:Name>
<TPM:Type>Package</TPM:Type>
- <TPM:Date>2006/01/09 00:44:09</TPM:Date>
+ <TPM:Date>2006/07/21 13:38:09</TPM:Date>
<TPM:Version>0.9</TPM:Version>
<TPM:Creator>rahtz</TPM:Creator>
<TPM:Title>Optic drawings: lenses and mirrors.</TPM:Title>
@@ -11,12 +11,12 @@
<TPM:Author>Herbert Voss</TPM:Author>
<TPM:Size>826670</TPM:Size>
<TPM:Build/>
- <TPM:RunFiles size="61675">
+ <TPM:RunFiles size="62439">
texmf-dist/tex/generic/pst-optic/pst-optic.tex
texmf-dist/tex/latex/pst-optic/pst-optic.sty
texmf-dist/tpm/pst-optic.tpm
</TPM:RunFiles>
- <TPM:DocFiles size="764995">
+ <TPM:DocFiles size="757833">
texmf-dist/doc/generic/pst-optic/Changes
texmf-dist/doc/generic/pst-optic/README
texmf-dist/doc/generic/pst-optic/optic.bib