%%
%% This is file `pst-optic.tex',
%% 
%% IMPORTANT NOTICE:
%% 
%% Package `pst-optic.tex'
%%
%% Manuel Luque <Mluque5130@aol.com> (France)
%% Herbert Voss <voss@perce.de> (Germany)
%%
%% January 08, 2003
%%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN archives
%% in directory macros/latex/base/lppl.txt.
%%
%% DESCRIPTION:
%%   `pst-optic' is a PSTricks package to define lenses and mirrors
%%
\def\fileversion{0.71}
\def\filedate{2004/05/13}
\message{`PST-Optic' v\fileversion, \filedate\space (Manuel Luque and Herbert Voss)}
\csname PSTopticLoaded\endcsname
\let\PSTopticLoaded\endinput
% Require PSTricks, pst-node, pst-plot, pst-3d packages
%\ifx\PSTcolLoaded\endinput\else\input pstcol.sty\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
%
% DPC interface to the `keyval' package (until keyval based version of PSTricks)
%
\input pst-key.tex
%
\edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax
\SpecialCoor
%
\newcmykcolor{BleuVerre}{0.2 0 0 0}
\newrgbcolor{JauneVert}{0.7 1 0}
\newpsstyle{rayuresJaunes}{fillstyle=hlines,hatchsep=2\pslinewidth,hatchcolor=JauneVert}
%
\define@key{psset}{posStart}{\edef\psk@optic@posStart{#1}}
\define@key{psset}{length}{\edef\psk@optic@length{#1}}
\setkeys{psset}{posStart=0,length=2}
%
% fin 25 juin 2001
%Construire l'image d'un objet avec une %
%lentille convergente
%toutes les donnée sont en cm
%la distance focus image
\define@key{psset}{focus}{\edef\psk@optic@focus{#1}}
\setkeys{psset}{focus=2}
% La taille de l'objet en mesure algébrique
\define@key{psset}{AB}{\edef\psk@optic@AB{#1}}
\setkeys{psset}{AB=1}
%la position de l'objet en mesure algébrique
\define@key{psset}{OA}{\edef\psk@optic@OA{#1}}
\setkeys{psset}{OA=-3}
%
%La position du centre optique est %
%définie dans le paramètres
%par ses coordonnées XO,YO.
\define@key{psset}{XO}{\edef\psk@optic@XO{#1}}
\define@key{psset}{YO}{\edef\psk@optic@YO{#1}}
\setkeys{psset}{XO=0,YO=0}
%
% The default dimension of the pspicture frame
% Herbert Voss <voss@perce.de>  2003/01/05
\define@key{psset}{xLeft}{\edef\psk@optic@xLeft{#1}}
\define@key{psset}{xRight}{\edef\psk@optic@xRight{#1}}
\define@key{psset}{yBottom}{\edef\psk@optic@yBottom{#1}}
\define@key{psset}{yTop}{\edef\psk@optic@yTop{#1}}
\setkeys{psset}{xLeft=-7.5,xRight=7.5,yBottom=-3,yTop=3}
% entrée d'un système de deux lentilles
\newif\ifPst@lensTwo
\define@key{psset}{lensTwo}[false]{%
\@nameuse{Pst@lensTwo#1}}
%
%Choix de la lentille
\newif\ifPst@lensGlass
\define@key{psset}{lensGlass}[true]{%
\@nameuse{Pst@lensGlass#1}}
\setkeys{psset}{lensGlass=false}
%Tracé ou non ?
\newif\ifPst@drawing
\define@key{psset}{drawing}[true]{%
\@nameuse{Pst@drawing#1}}
\setkeys{psset}{drawing=true}
%
% fin sauvegarde (26 juin 2001).
%26 juin 2001
%choix du nom et de son emplacement
\define@key{psset}{nameA}{\edef\psk@optic@nameA{#1}}
\setkeys{psset}{nameA=A}
\define@key{psset}{spotA}{\edef\psk@optic@spotA{#1}}
\setkeys{psset}{spotA=270}
\define@key{psset}{nameB}{\edef\psk@optic@nameB{#1}}
\setkeys{psset}{nameB=B}
\define@key{psset}{spotB}{\edef\psk@optic@spotB{#1}}
\setkeys{psset}{spotB=90}
\define@key{psset}{nameF}{\edef\psk@optic@nameF{#1}}
\setkeys{psset}{nameF=F}
\define@key{psset}{spotF}{\edef\psk@optic@spotF{#1}}
\setkeys{psset}{spotF=270}
\define@key{psset}{nameO}{\edef\psk@optic@nameO{#1}}
\setkeys{psset}{nameO=O}
\define@key{psset}{spotO}{\edef\psk@optic@spotO{#1}}
\setkeys{psset}{spotO=225}
\define@key{psset}{nameAi}{\edef\psk@optic@nameAi{#1}}
\setkeys{psset}{nameAi=A'}
\define@key{psset}{spotAi}{\edef\psk@optic@spotAi{#1}}
\setkeys{psset}{spotAi=90}
\define@key{psset}{nameBi}{\edef\psk@optic@nameBi{#1}}
\setkeys{psset}{nameBi=B'}
\define@key{psset}{spotBi}{\edef\psk@optic@spotBi{#1}}
\setkeys{psset}{spotBi=270}
\define@key{psset}{nameFi}{\edef\psk@optic@nameFi{#1}}
\setkeys{psset}{nameFi=F'}
\define@key{psset}{spotFi}{\edef\psk@optic@spotFi{#1}}
\setkeys{psset}{spotFi=270}
%choisir la couleur des rayons
\define@key{psset}{rayColor}{\edef\psk@optic@rayColor{#1}}
\setkeys{psset}{rayColor=black}
%
% the mirror-definitions
\define@key{psset}{mirrorFocus}{\edef\psk@optic@mirrorFocus{#1}}
\setkeys{psset}{mirrorFocus=8}% only for LensTwo option
\define@key{psset}{mirrorTwoAngle}{\edef\psk@optic@mirrorTwoAngle{#1}}
\setkeys{psset}{mirrorTwoAngle=45}
\define@key{psset}{posMirrorTwo}{\edef\psk@optic@posMirrorTwo{#1}}
\setkeys{psset}{posMirrorTwo=6}
%
%28 juin 2001 : les options de dessin de la lentille
\define@key{psset}{lensColor}{\edef\psk@optic@lensColor{#1}}
\setkeys{psset}{lensColor=black}
%
\define@key{psset}{lensWidth}{\edef\psk@optic@lensWidth{#1}}
\setkeys{psset}{lensWidth=2\pslinewidth}
%
% added 20021225 Herbert 
% lensHeight is the total height of the lens
\define@key{psset}{lensHeight}{\edef\psk@optic@lensHeight{#1}}
\setkeys{psset}{lensHeight=5}
%
\define@key{psset}{lensArrowSize}{\edef\psk@optic@lensArrowSize{#1}}
\setkeys{psset}{lensArrowSize=0.2}
%
\define@key{psset}{lensArrowInset}{\edef\psk@optic@lensArrowInset{#1}}
\setkeys{psset}{lensArrowInset=0.5}
%
%29 juin choix du type de lentille CVG or DVG
\define@key{psset}{lensType}{\edef\psk@optic@lensType{#1}}
\setkeys{psset}{lensType=CVG}
\def\Type{CVG}
%
% new mirror definitions     Herbert Voss <perce.de> 2002/12/31
\define@key{psset}{mirrorDepth}{\edef\psk@optic@mirrorDepth{#1}}
\setkeys{psset}{mirrorDepth=1}
\define@key{psset}{mirrorHeight}{\edef\psk@optic@mirrorHeight{#1}}
\setkeys{psset}{mirrorHeight=5}
\define@key{psset}{mirrorWidth}{\edef\psk@optic@mirrorWidth{#1}}
\setkeys{psset}{mirrorWidth=0.25}
\define@key{psset}{mirrorColor}{\edef\psk@optic@mirrorColor{#1}}
\setkeys{psset}{mirrorColor=lightgray}
%
%
%Permet de dessiner une flèche
%dont la direction est donnée par deux points
%on peut choisir la distance au point de départ
%et la longueur de la flèche en cm.
%posStart=origine de la flèche
%length=longueur de la flèche.
\def\Arrows{\@ifnextchar[{\pst@Arrows}{\pst@Arrows[]}}
\def\pst@Arrows[#1](#2)(#3){{%
    \setkeys{psset}{#1}%
    \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
	/XA exch \pst@number\psxunit 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
	/angleDirectionAB numerateur denominateur Atan def
	/XD StartArrow angleDirectionAB cos mul XA add def
	/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=->}
    \psline[#1](ArrowStart)(ArrowEnd)%
}}
%
%En optique il peut être intéressant de prolonger
% un segment de droite AB au-delà de l'extrémité B
% d'une certaine longueur.
\def\psOutLine{\@ifnextchar[{\pst@ToDrawOut}{\pst@ToDrawOut[]}}
\def\pst@ToDrawOut[#1](#2)(#3)#4{{%
    \setkeys{psset}{#1}%
    \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
	/XA exch \pst@number\psxunit 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
	/angleDirectionAB numerateur denominateur Atan def
	/Xend XB LengthArrow angleDirectionAB cos mul add def
	/Yend YB LengthArrow angleDirectionAB sin mul add def
	Xend Yend){#4}
    \psline[#1](#3)(#4)
}}
%
% 25 juin 2001
% En optique il peut être intéressant de prolonger
% un segment de droite AB en-deça de l'extrémité A
% d'une certaine longueur.
%
\def\psBeforeLine{\@ifnextchar[{\pst@BeforeLine}{\pst@BeforeLine[]}}
\def\pst@BeforeLine[#1](#2)(#3)#4{{%
    \setkeys{psset}{#1}%
    \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
	/XA exch \pst@number\psxunit 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
	/angleDirectionAB numerateur denominateur Atan def
	/Xstart XA LengthArrow angleDirectionAB cos mul sub def
	/Ystart YA LengthArrow angleDirectionAB sin mul sub def
	Xstart Ystart){#4}
    \psline[#1](#4)(#2)%
}}
%
%fin 26 juin 2001
%Lentille convergente : CVG
%(#2) est l'abscisse du centre optique
\def\lens{\@ifnextchar[{\pst@lens}{\pst@lens[]}}
\def\pst@lens[#1]{{%
\psset{xLeft=-7.5,xRight=7.5,yBottom=-3,yTop=3}
\setkeys{psset}{#1}%
%
% trace les rayons
% calcule la position de l'image
\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}

\ifPst@lensTwo
    \pnode(!%
	/OF' \psk@optic@focus\space def
%/AB \psk@optic@AB\space def
	/AB A'1B'1 def
%/OA \psk@optic@OA\space def
	/XO \psk@optic@XO\space def
	/YO \psk@optic@YO\space def
	/OA XO neg XO1 add O1A1' add def
	/TesT OA OF' add def
	TesT 0 eq {/OA OF' neg 0.001 add def} if
	/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}
    \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}
\else
    \pnode(!%
	/OF' \psk@optic@focus\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
	/TesT OA OF' add def
	TesT 0 eq {/OA OF' neg 0.001 add def} if
	/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}
    \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
        \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
\endgroup
\ifPst@drawing
% axe optique
    \psline(! \psk@optic@xLeft\space YO)(! \psk@optic@xRight\space YO)
    \ifx\psk@optic@lensType\Type
% Position des foyers
	\psdots[dotstyle=|](F')
	\uput[\psk@optic@spotFi](F'){$\mathrm{\psk@optic@nameFi}$}
	\psdots[dotstyle=|](F)
	\uput[\psk@optic@spotF](F){$\mathrm{\psk@optic@nameF}$}
%dessin de l'objet
        \psline[linewidth=1.5\pslinewidth,arrowinset=0]{->}(A)(B)
% dessin de l'image
        \psline[linewidth=1.5\pslinewidth,arrowinset=0]{->}(A')(B')
%dessin des rayons
        \psset{linecolor=\psk@optic@rayColor}
        \pcline(B)(B')
        \Arrows[length=16,arrows=-](B)(O)
        \Arrows(B)(I)
        \psline(B)(I)
        \Arrows[length=10,posStart=0,arrows=-](I)(F')
        \Arrows[posStart=1,arrows=->](I)(F')
        \Arrows[arrows=->>](B)(I')
        \psline(B)(I')(B')
        \Arrows[length=10,arrows=-](I')(B')
        \Arrows[length=2,posStart=0.5,arrows=->>](I')(B')
        %\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}$}
    \else
        %dessin de l'objet
        \psline[linewidth=1.5\pslinewidth,arrowinset=0]{->}(A)(B)
% dessin de l'image
        \psline[linewidth=1.5\pslinewidth,arrowinset=0,linestyle=dashed]{->}(A')(B')
%dessin des rayons
        \psset{linecolor=\psk@optic@rayColor}
        \Arrows[length=16,arrows=-](B)(O)
        \Arrows(B)(I)
        \psline(B)(I)
        \psOutLine[arrows=->,length=1](B')(I){END1}
        \psOutLine[length=5](B')(I){END2}
        \psline[linestyle=dashed](F')(I)
        \Arrows[arrows=->>](B)(I')
        \psline(B)(I')
        \psOutLine[arrows=->>,length=2](B')(I'){END3}
        \psOutLine[length=10](B')(I'){END4}
        \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
\endpspicture
}}
%
% 25 december 2002 Herbert <voss@perce.de>
% make the lenses dynamical to width _and_ height
% \pslens calculates the radius and the angles from the given values
% of lensWidth and lensHeight and draws the lens with it's origin (0,0)
% 
\def\pslensDVG{\pst@object{pslensDVG}}
\def\pslensDVG@i#1#2{%
	\begin@OpenObj
		\pssetlength\pst@dima{#1}%
		\pssetlength\pst@dimb{#2}%
		\addto@pscode{\pslensDVG@ii}%
	\end@OpenObj%
}
\def\pslensDVG@ii{%
	/w \pst@number\pst@dima def% lensWidth
	/wHalbe w 2 div def% half of the width
	/h \pst@number\pst@dimb 2 div def% the half of the height
	/Radius wHalbe 2 div dup mul h dup mul add wHalbe div def
	/x Radius wHalbe 2 div add def
	/y 0 def
	/angleA h x wHalbe sub atan neg def
	/angleB angleA neg def
	wHalbe h moveto
	x y Radius 180 angleA add 180 angleB add arc
	x neg y Radius angleA angleB arc
	wHalbe h lineto
}
%
\def\pslensCVG{\pst@object{pslensCVG}}
\def\pslensCVG@i#1#2{%
	\begin@OpenObj
		\pssetlength\pst@dima{#1}%
		\pssetlength\pst@dimb{#2}%
		\addto@pscode{\pslensCVG@ii}%
	\end@OpenObj%
}
%
\def\pslensCVG@ii{%
	/w \pst@number\pst@dima def% lensWidth
	/wHalbe w 2 div def% half of the width
	/h \pst@number\pst@dimb 2 div def% the half of the height
	/Radius wHalbe dup mul h dup mul add w div def
	/x Radius wHalbe sub def
	/y 0 def
	/angleA h x atan neg def
	/angleB angleA neg def
	0 h moveto
	x y Radius 180 angleA add 180 angleB add arc
	x neg y Radius angleA angleB arc
}
%
%22 juin 2001 / 25 december 2002
%Choisir la forme et la taille de la lentille
%Le dessin de la lentille
%
\define@key{psset}{lensScale}{\edef\psk@optic@lensScale{#1}}
\setkeys{psset}{lensScale=1}
\def\lensCVG{%
    \scalebox{\psk@optic@lensScale}{%
	\pscustom[linewidth=0.75\pslinewidth]{%
	    \pslensCVG{\psk@optic@lensWidth}{\psk@optic@lensHeight}
    	    \fill[fillstyle=solid,fillcolor=BleuVerre]
	}%
    }%
}
%
%
\def\lensDVG{%
	\scalebox{\psk@optic@lensScale}{%
		\pscustom[linewidth=0.75\pslinewidth]{%
			\pslensDVG{\psk@optic@lensWidth}{\psk@optic@lensHeight}
			\fill[fillstyle=solid,fillcolor=BleuVerre]%
		}%
	}%
}
%Sauvegarde des points pour le cas d'un
%système à deux lentilles (26 juin 2001)
\def\Transform{%
    \pnode(A){A1}
    \pnode(B){B1}
    \pnode(A'){A'1}
    \pnode(B'){B'1}
    \pnode(O){O1}
    \pnode(F){F1}
    \pnode(F'){F'1}
    \pnode(I){I11}
    \pnode(I'){I'1}
    \pnode(!%
        /XO1 XO def
        /YO1 YO def
        /O1A1' OA' def
        /A'1B'1 A'B' def
        XO1 YO1){factice}
}
%
%28 juin 2001 Parallèle à un rayon donné
\def\Parallel{\@ifnextchar[{\pst@Parallel}{\pst@Parallel[]}}
\def\pst@Parallel[#1](#2)(#3)(#4)#5{{%
    \setkeys{psset}{#1}%
    \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
	/XA exch \pst@number\psxunit 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
	/denominateur XB XA sub def
	/numerateur YB YA sub def
	/angleDirectionAB numerateur denominateur Atan def
	/XstartParallel XC LengthArrow angleDirectionAB cos mul add def
	/YstartParallel YC LengthArrow angleDirectionAB sin mul add def
	XstartParallel YstartParallel){#5}
    \psline[#1](#4)(#5)
}}
%
%intersection d'un rayon avec une lentille
\def\rayInterLens(#1)(#2)#3#4{{%
    \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
	/XE1 exch \pst@number\psxunit 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
	XB1 XE1 sub div
	XO2 XE1 sub
	mul
	YE1 add
	def
	XO2 YO2){#4}
}}
%
%eye du philatéliste
\def\eye{%
    \psarc[linewidth=2pt](0,2.5){2.5}{215}{270}%
    \psarc[linewidth=2pt](0,-2.5){2.5}{90}{140}%
    \psarc(-2.5,0){1}{-30}{30}%
    \psarc(0,0){1.75}{160}{200}
    \psclip{%
	\pscircle[linestyle=none](0,0){1.75}}
    \pscircle[fillstyle=solid,fillcolor=lightgray](-2.5,0){0.9}
    \endpsclip%
}
%
%intersection de deux droites
%2 juillet 2001
\def\ABinterCD(#1)(#2)(#3)(#4)#5{%
    \pst@getcoor{#1}\pst@tempa
    \pst@getcoor{#2}\pst@tempb
    \pst@getcoor{#3}\pst@tempc
    \pst@getcoor{#4}\pst@tempd
\pnode(!%
    \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
    /XB exch \pst@number\psxunit div def
    \pst@tempc /YC exch \pst@number\psyunit div def
    /XC exch \pst@number\psxunit div def
    \pst@tempd /YD exch \pst@number\psyunit div def
    /XD exch \pst@number\psxunit div def
    /A1 YB YA sub XB XA sub div def
    /B1 YA XA A1 mul sub def
    /A2 YD YC sub XD XC sub div def
    /B2 YC XC A2 mul sub def
    /Xinter B1 B2 sub
    A2 A1 sub div def
    /Yinter A1 Xinter mul B1 add def
    Xinter Yinter){#5}
    }
%
%
\def\nodeBetween(#1)(#2)#3{%    Herbert 2003/01/05
    \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
	XB XA add 2 div YB YA add 2 div){#3}
}
%
%
\def\mirrorCVGRay{\@ifnextchar[{% Herbert 2003/01/05
    \pst@mirrorCVGRay}{\pst@mirrorCVGRay[]}}
\def\pst@mirrorCVGRay[#1](#2)(#3)#4{{%
    \setkeys{psset}{#1}%
%
    \pnode(!%
	/YF \psk@optic@mirrorHeight\space dup mul 16 div \psk@optic@mirrorDepth\space div def
	/XF 0 def
	YF XF){Focus}
    \pst@getcoor{#2}\pst@tempa
    \pst@getcoor{#3}\pst@tempb
    \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
	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
	    /Root m2a dup mul m XA mul YA sub A div sub sqrt def
	    /Xp m2a Root add XA sub def
	    /Xn m2a Root sub XA sub def
	    /YSp m Xp mul YA add def
	    /XSp Xp XA add neg def
	    /YSn m Xn mul YA add def
	    /XSn Xn XA add neg def
	    YA 0 eq {0 0}{XB XA lt {YSn XSn}{YSp XSp} ifelse} ifelse} ifelse) {#4}
    % #4 is the point on the mirror
%{\psset{linecolor=red}
%\qdisk(#2){3pt}}
%{\psset{linecolor=green}
%\qdisk(#3){3pt}}
%{\psset{linecolor=blue}
%\qdisk(#4){3pt}}
    \pst@getcoor{#2}\pst@tempc% the starting point
%    \pst@getcoor{#3}\pst@tempb
    \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
	/XC \pst@tempc exch pop \pst@number\psyunit div neg def
	/YC \pst@tempc pop \pst@number\psxunit div def
% Mittelpunktsstrahl?
	XA abs 0.01 lt YA abs 0.01 lt and {%
	    /NoMoreReflection true def 
	    YC XC
	}{%
	    /DY YA YC sub def
	    /DX XA XC sub def
% Steigung der Tangente im Punkt (XA|YA) y'=2ax
	    /mRay A XA mul 2 mul def
% zugehoeriger Steigungswinkel alpha=arctan y'
	    /Alpha mRay 2 div 0.5 atan def
% das dazugehoerige Lot
	    /AlphaPerp 1.0 neg mRay atan def
% Winkel des einfallenden Strahls
	    /Beta DY DX atan def
% Winkel des ausfallenden Strahls
	    /BetaStrich AlphaPerp 2 mul Beta sub def 
% senkrechte Steigung? cos BetaStrich = 0 
	    BetaStrich cos abs 0.1 lt {%
		/NoMoreReflection true def 
		Ymax 2 mul XA neg
	    }{%
% Steigung
		/m BetaStrich sin BetaStrich cos div def
% Steigung, ab der kein Schnittpunkt mehr stattfindet
		/mMax 2 A mul Xmax mul def
		m abs mMax gt {
% no more second reflection
		    /NoMoreReflection true def 
		    Ymax 2 mul dup YA sub m div XA add neg
		}{
% moegliche 2. Reflektion
		    /NoMoreReflection false def 
% pq Formel anwenden
		    /m2a m A div 2 div def
		    /Root m2a dup mul m XA mul YA sub A div sub sqrt def
		    /X1 m2a Root add def
		    /X2 m2a Root sub def
% be sure, that we get the right point
		    /X XA X1 sub abs 0.01 gt {X1}{X2} ifelse def
		    /Y A X dup mul mul def
    		    Y X neg
		} ifelse 
	    } ifelse
	} ifelse){#4'}
%{\psset{linecolor=cyan}
%\qdisk(#4'){3pt}}
    \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
	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
	    /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 
		{YC YB sub XC XB sub atan}
		{90} ifelse def
	    /Gamma Alpha2 Beta sub def
	    /Delta Alpha2 Gamma add def
	    Delta cos abs 0.01 gt {%
		/mDelta Delta sin Delta cos div def
		/X YAtemp YB sub mDelta div XB add neg def}{%
		/X XB neg def} ifelse
	    m1 abs 0.01 lt {YAtemp XAtemp}{YAtemp X} ifelse 
	} ifelse ){#4''}
%{\psset{linecolor=cyan}
%\qdisk(#4''){5pt}}
    \ifPst@drawing
	\psline[#1](#2)(#4)
	\psline[#1](#4)(#4')
	\psline[#1](#4')(#4'')
    \fi
}}
%
%
\def\mirrorCVG{\@ifnextchar[{%  Herbert Voss 2003/01/05
    \pst@mirrorCVG}{\pst@mirrorCVG[]}}
\def\pst@mirrorCVG[#1]{{%
    \setkeys{psset}{AB=1.25,OA=5,XO=0,YO=0,xLeft=-5,xRight=5,yBottom=-3,yTop=3,%
	mirrorHeight=5,mirrorDepth=1,mirrorWidth=0.25}
    \setkeys{psset}{#1}%
    \pspicture(\psk@optic@xLeft,\psk@optic@yBottom)(\psk@optic@xRight,\psk@optic@yTop)
    \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}
    \pnode(!%
	\psk@optic@mirrorHeight\space dup mul 16 div 
	\psk@optic@mirrorDepth\space div neg XO add YO){Focus}
    \pnode(!%
	\psk@optic@mirrorHeight\space dup mul 16 div 
	\psk@optic@mirrorDepth\space div XO add YO){Focus}
    \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)
	\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
	}
	% (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)%
	% (w/2,-h/2)->(w/2,h/2)
	\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
	}
	\fill
    }
    \ifPst@drawing
	\qdisk(Focus){2pt}
	\uput[0](Focus){F}
	\psline[linewidth=3\pslinewidth]{->}(A)(B)
	\uput[0](A){A}
	\uput[0](B){B}
	\pnode(! 1 \psk@optic@AB\space){Dummy}
	\mirrorCVGRay[drawing=false](B)(Dummy){P}
	\qdisk(P){1.5pt}\uput[180](P){P}
	\qdisk(P''){1.5pt}\uput[0](P''){P''}
	\psset{%
	    linewidth=1.5\pslinewidth,%
	    linecolor=\psk@optic@rayColor,%
	    arrows=->}
	\nodeBetween(B)(P){Dummy}
	\psline(B)(Dummy)
	\psline(Dummy)(P)
	\nodeBetween(P)(P''){Dummy}
	\psline(P)(Dummy)
	\psline(Dummy)(P'')
%
	\mirrorCVGRay[drawing=false](B)(! 0 0){M}
	\qdisk(M){1.5pt}\uput{0.2}[180](M){M}
	\qdisk(M'){1.5pt}\uput{0.2}[0](M'){M'}
	\nodeBetween(B)(M){Dummy}
	\psline(B)(Dummy)
	\psline(Dummy)(M)
	\nodeBetween(M)(M'){Dummy}
	\psline(M)(Dummy)
	\psline(Dummy)(M')
%
	\mirrorCVGRay[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)
	\nodeBetween(FR)(FR'){Dummy}
	\psline(FR)(Dummy)
	\psline(Dummy)(FR')
    \fi
    \endpspicture
}}
%
%
\def\mirrorDVG{\@ifnextchar[{%  Herbert Voss 2003/01/05
    \pst@mirrorDVG}{\pst@mirrorDVG[]}}
\def\pst@mirrorDVG[#1]{{%
    \setkeys{psset}{AB=1.25,OA=4,XO=0,YO=0,xLeft=-5,xRight=5,yBottom=-3,yTop=3}
    \setkeys{psset}{#1}%
    \pspicture*(\psk@optic@xLeft,\psk@optic@yBottom)(\psk@optic@xRight,\psk@optic@yTop)
    \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}
    \pnode(!%
	\psk@optic@mirrorHeight\space dup mul 16 div 
	\psk@optic@mirrorDepth\space div neg XO add YO){Focus}
    \pscustom[fillstyle=solid,fillcolor=\psk@optic@mirrorColor,linecolor=\psk@optic@mirrorColor]{%
	% (d,h/2)->(d-w,h/2)
	\psline%
	    (! \psk@optic@mirrorDepth\space neg \psk@optic@mirrorHeight\space 2 div)%
	    (! \psk@optic@mirrorDepth\space \psk@optic@mirrorWidth\space add neg \psk@optic@mirrorHeight\space 2 div)
	% (-w/2,h/2)->(-w/2,-h/2)
	\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 neg \psk@optic@mirrorWidth\space sub t 2 div
	}
	% (d-w,-h/2)(d,-h/2)
	\psline%
	    (! \psk@optic@mirrorDepth\space \psk@optic@mirrorWidth\space add neg \psk@optic@mirrorHeight\space 2 div neg)
	    (! \psk@optic@mirrorDepth\space neg \psk@optic@mirrorHeight\space 2 div neg)%
	% (w/2,-h/2)->(w/2,h/2)
	\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 neg t 2 div
	}
	\fill
    }
    \ifPst@drawing
	\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){P}
	\qdisk(P){1.5pt}\uput{0.2}[180](P){P}
	\qdisk(P'){1.5pt}\uput{0.2}[0](P'){P'}
	\nodeBetween(B)(P){PDummy}
	\psline(B)(PDummy)
	\psline(PDummy)(P)
	\psline[arrows=-, linestyle=dotted](Focus)(P)
	\psOutLine[arrows=-,linestyle=dotted](P)(Focus){PBegin}
	\nodeBetween(P)(P'){PDummy}
	\psline(P)(PDummy)
	\psline(PDummy)(P')
%
	\mirrorDVGRay[drawing=false](B)(! 0 0){M}
	\qdisk(M){1.5pt}\uput{0.2}[180](M){M}
	\qdisk(M'){1.5pt}\uput{0.2}[0](M'){M'}
	\nodeBetween(B)(! 0 0){MDummy}
	\psline(B)(MDummy)
	\psline(MDummy)(! 0 0)
	\nodeBetween(M)(M'){MDummy}
	\psline(M)(MDummy)
	\psline(MDummy)(M')
%
	\mirrorDVGRay[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)
	\nodeBetween(FR)(FR'){Dummy}
	\psline(FR)(Dummy)
	\psline(Dummy)(FR')
	\psline[arrows=-,linestyle=dotted](Focus)(FR)
	\psOutLine[arrows=-, linestyle=dotted](FR)(Focus){PBegin}
    \fi
    \endpspicture
}}
%
\def\mirrorDVGRay{\@ifnextchar[{%  Herbert Voss 2003/01/05
    \pst@mirrorDVGRay}{\pst@mirrorDVGRay[]}}
\def\pst@mirrorDVGRay[#1](#2)(#3)#4{{%
    \setkeys{psset}{#1}%
%
    \pnode(!%
	\psk@optic@mirrorHeight\space dup mul 16 div 
	\psk@optic@mirrorDepth\space div neg 0){Focus}
    \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 }{
	    XB XA sub abs 0.01 lt 
		{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
		/Root m2a dup mul m XA mul YA sub A div sub sqrt def
		/X1 m2a Root add def
		/X2 m2a Root sub def
		/X XB X1 sub abs XB X2 sub abs lt 
	    	    {X1}{X2} ifelse def
		/Y A X dup mul mul def
		X abs Xmax lt 
	    	    {Y X neg}
	    	    {A Xmax dup mul mul Xmax neg} ifelse
	    } 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{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 abs 0.001 lt YA abs 0.001 lt and 
	    {YC XC}{
	    /YF \pst@tempf pop \pst@number\psxunit div def
	    /DY YA YC sub def
	    /DX XA XC sub def 
	    /Alpha A XA mul 0.5 atan def
	    /Delta 180 DY DX atan sub Alpha 2 mul add def 
	    Delta round cvi 90 mod 0 eq {YC XA neg}{
		/m DX abs 0.01 lt 
		    {YA YF sub XA div}
		    {Delta sin Delta cos div} ifelse def
		/X \psk@optic@length\space Delta cos mul neg XA add def
		/Y \psk@optic@length\space Delta sin mul neg YA add def
		Y X neg
	    } ifelse
	} ifelse){#4'}% second point on the mirror
    \ifPst@drawing
	\psline[#1](#2)(#4)(#4')
    \fi
}}
%
% HEadlight Herbert <voss@perce.de> 2003/01/23
%
\def\beamLight{\@ifnextchar[{\pst@beamLight}{\pst@beamLight[]}}
\def\pst@beamLight[#1]{{%
\setkeys{psset}{xLeft=-5,xRight=5,yBottom=-5,yTop=5,drawing=false}% the default
	\setkeys{psset}{#1}%
\begin{pspicture}*(\psk@optic@xLeft,\psk@optic@yBottom)(\psk@optic@xRight,\psk@optic@yTop)
	\rput(0,0){\mirrorCVG[drawing=false, #1 ]}
	\psline[linewidth=0.1cm]%
		(!\psk@optic@mirrorDepth\space \psk@optic@mirrorHeight\space 2 div neg)%
		(!\psk@optic@mirrorDepth\space \psk@optic@mirrorHeight\space 2 div)
	\psset{linewidth=0.75mm,fillstyle=solid}
	\psline(-1.1,1)(0.2,1)
	\psline(-1.1,-1)(0.2,-1)
	\pscurve(0.2,0.75)(1.6,1.5)(3,1)(3.5,0)(3,-1)(1.6,-1.5)(0.2,-0.75)
	\psframe(-1.1,-0.85)(0.2,0.85)
	\psframe(0.2,-0.3)(0.5,0.3)
	\psline(-1.1,-0.85)(-1.4,-0.6)(-1.4,0.6)(-1.1,0.85)
	\psline(0,0)(2.9,0)(2.9,0.5)(0.9,0.5)(0.9,0)%
	\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}
}}
%
%
%Telescope
%2 juillet 2001
%
\def\mirrorTwo{%
	\psframe[linestyle=none,%
		fillstyle=vlines,%
		hatchwidth=0.5\pslinewidth,%
		hatchsep=3\pslinewidth](-1,0)(1,0.2)
    \psline[linewidth=1.5\pslinewidth](-1,0)(1,0)%
}
%
\def\telescope{\@ifnextchar[{\pst@telescope}{\pst@telescope[]}}
\def\pst@telescope[#1]{{%
    \setkeys{psset}{xLeft=-0.5,xRight=11,yBottom=-6,yTop=2}% the default
    \setkeys{psset}{#1}%
    \pstVerb{%
	/mirrorFocus \psk@optic@mirrorFocus\space def
	/Coeff mirrorFocus 4 mul def
	/mirrorTwoAngle \psk@optic@mirrorTwoAngle\space def
	/posMirrorTwo \psk@optic@posMirrorTwo\space def
    }%
%
\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}
}}
%
%Images et réflexions sur un miroir plan
%(#1) coordonnées du point objet (XA,YA)
%(#2) coordonnées d'une extrémité du miroir (X1,Y1)
%(#3) coordonnées de l'autre extrémité du miroir (X2,Y2)
%{#4} nom de l'image A'
%
\def\planMirrorRay(#1)(#2)(#3)#4{{%
\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
    /XA exch \pst@number\psxunit 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
    /Dx X2 X1 sub def
    /Dy Y2 Y1 sub def
    /xH XA Dx Dx mul mul
        X1 Dy Dy mul mul
        add
        YA Y1 sub Dx Dy mul mul
        add
        Dx Dx mul Dy Dy mul add
        div
    def
    /yH YA Dy Dy mul mul
        Y1 Dx Dx mul mul
        add
        XA X1 sub Dx Dy mul mul
        add
        Dx dup mul Dy dup mul add
        div
    def
    /xA' 2 xH mul XA sub def
    /yA' 2 yH mul YA sub def
    /D12 Dx Dx mul Dy Dy mul add sqrt def
    xA' yA' moveto
    xH yH rlineto
    xA' yA'){#4}
}}
%
% 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%
    \leavevmode
    \hbox{%
	\pnode(!%
	    \pst@tempa /Y1 exch def
	    /X1 exch def
	    \pst@tempb /Y2 exch def
	    /X2 exch def
	    /DX X2 X1 sub def
	    /DY Y2 Y1 sub def
	    /D12 DX dup mul DY dup mul add def
	    /ax 2 DX dup mul mul D12 div 1 sub def
	    /by 2 DX DY mul mul D12 div def
	    /cx by def
	    /dy 2 DY dup mul mul D12 div 1 sub def
	    /tx X1 DY dup mul mul
	    Y1 DX DY mul mul sub
	    2 mul
	    D12 div
	    def
	    /ty Y1 DX dup mul mul
	    X1 DX DY mul mul sub
	    2 mul
	    D12 div
	    def
	    X1 Y1){Factice}%
	\pst@Verb{%
	    { [ax by cx dy tx ty] concat
	    } \tx@TMChange}%
	\box\pst@hbox
	\pst@Verb{\tx@TMRestore}}%
}}
%
\catcode`\@=\PstAtCode\relax
%% END: pst-optic.tex
\endinput
