From 6ffb78835e54834c65b3bd1c35e3ad939b61c5d9 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 15 Feb 2009 00:42:49 +0000 Subject: pst-optic 1.00 (11feb09) git-svn-id: svn://tug.org/texlive/trunk@12158 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/generic/pst-optic/pst-optic.tex | 172 ++++++++------------- 1 file changed, 68 insertions(+), 104 deletions(-) (limited to 'Master/texmf-dist/tex/generic') 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 8ca214b87a7..74d9c2a3e04 100644 --- a/Master/texmf-dist/tex/generic/pst-optic/pst-optic.tex +++ b/Master/texmf-dist/tex/generic/pst-optic/pst-optic.tex @@ -30,8 +30,8 @@ \ifx\PSTMultidoLoaded\endinput\else\input multido.tex\fi \ifx\PSTXKeyLoaded\endinput\else\input pst-xkey \fi % -\def\fileversion{0.96} -\def\filedate{2006/08/02} +\def\fileversion{0.97} +\def\filedate{2007/01/07} \message{`PST-Optic' v\fileversion, \filedate\space (Manuel Luque and Herbert Voss)} % \edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax @@ -88,34 +88,22 @@ % % ------- the global definitions for the pspicture frame ------ % -\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}} +\define@key[psset]{pst-optic}{xLeft}[-7.5]{\def\psk@optic@xLeft{#1}} +\define@key[psset]{pst-optic}{xRight}[7.5]{\def\psk@optic@xRight{#1}} +\define@key[psset]{pst-optic}{yBottom}[-3.0]{\def\psk@optic@yBottom{#1}} +\define@key[psset]{pst-optic}{yTop}[3.0]{\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}{\def\psk@optic@lensType{#1}}% CVG|DVG|PCVG|PDVG -\define@key[psset]{pst-optic}{lensColor}{\def\psk@optic@lensColor{#1}} -\define@key[psset]{pst-optic}{lensWidth}{% the thichness of the lens - \def\psk@optic@lensWidth{#1}% -} -\define@key[psset]{pst-optic}{lensDepth}{% - \def\psk@optic@lensDepth{#1}% -} -\define@key[psset]{pst-optic}{lensHeight}{% the TOTAL height of the lens - \def\psk@optic@lensHeight{#1}% -} -\define@key[psset]{pst-optic}{lensScale}{% more or less obsolete - \def\psk@optic@lensScale{#1}% -} -\define@key[psset]{pst-optic}{lensArrowSize}{% for the AB,... Arrows - \def\psk@optic@lensArrowSize{#1}% -} -\define@key[psset]{pst-optic}{lensArrowInset}{% - \def\psk@optic@lensArrowInset{#1}% -} +\define@key[psset]{pst-optic}{lensType}[CVG]{\def\psk@optic@lensType{#1}}% CVG|DVG|PCVG|PDVG +\define@key[psset]{pst-optic}{lensColor}[lightgray]{\def\psk@optic@lensColor{#1}} +\define@key[psset]{pst-optic}{lensWidth}[0.5]{\def\psk@optic@lensWidth{#1}}% the thichness of the lens +\define@key[psset]{pst-optic}{lensDepth}[1]{\def\psk@optic@lensDepth{#1}} +\define@key[psset]{pst-optic}{lensHeight}[5]{\def\psk@optic@lensHeight{#1}}% the TOTAL height of the lens +\define@key[psset]{pst-optic}{lensScale}[1]{\def\psk@optic@lensScale{#1}}% more or less obsolete +\define@key[psset]{pst-optic}{lensArrowSize}[0.2]{\def\psk@optic@lensArrowSize{#1}}% for the AB,... Arrows +\define@key[psset]{pst-optic}{lensArrowInset}[0.5]{\def\psk@optic@lensArrowInset{#1}} \def\lensTypeCVG{CVG} \def\lensTypeDVG{DVG} \def\lensTypePCVG{PCVG} @@ -125,79 +113,51 @@ % % ---------------- the mirrors ----------------- % -\define@key[psset]{pst-optic}{mirrorType}{% PLAN|PARAbolic|SPHerical - \def\psk@optic@mirrorType{#1}% -} -\define@key[psset]{pst-optic}{mirrorDepth}{\def\psk@optic@mirrorDepth{#1}} -\define@key[psset]{pst-optic}{mirrorHeight}{% it's the TOTAL height - \def\psk@optic@mirrorHeight{#1}% -} -\define@key[psset]{pst-optic}{mirrorWidth}{\def\psk@optic@mirrorWidth{#1}} -\define@key[psset]{pst-optic}{mirrorColor}{\def\psk@optic@mirrorColor{#1}} -\define@key[psset]{pst-optic}{mirrorFocus}{\def\psk@optic@mirrorFocus{#1}} -\define@key[psset]{pst-optic}{posMirrorTwo}{% a sencond mirror? (telescope) - \def\psk@optic@posMirrorTwo{#1}% -} -\define@key[psset]{pst-optic}{mirrorTwoAngle}{% the angle for the 2. plan mirror (telescope) - \def\psk@optic@mirrorTwoAngle{#1}% -} +\define@key[psset]{pst-optic}{mirrorType}[CVG]{\def\psk@optic@mirrorType{#1}}% PLAN|PARAbolic|SPHerical +\define@key[psset]{pst-optic}{mirrorDepth}[1]{\def\psk@optic@mirrorDepth{#1}} +\define@key[psset]{pst-optic}{mirrorHeight}[5]{\def\psk@optic@mirrorHeight{#1}}% it's the TOTAL height +\define@key[psset]{pst-optic}{mirrorWidth}[0.25]{\def\psk@optic@mirrorWidth{#1}} +\define@key[psset]{pst-optic}{mirrorColor}[lightgray]{\def\psk@optic@mirrorColor{#1}} +\define@key[psset]{pst-optic}{mirrorFocus}[8]{\def\psk@optic@mirrorFocus{#1}} +\define@key[psset]{pst-optic}{posMirrorTwo}[6]{\def\psk@optic@posMirrorTwo{#1}}% a sencond mirror? (telescope) +\define@key[psset]{pst-optic}{mirrorTwoAngle}[45]{\def\psk@optic@mirrorTwoAngle{#1}}% the angle for the 2. plan mirror (telescope) \def\mirrorType{CVG} \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}{\def\psk@optic@refractA{#1}} -\define@key[psset]{pst-optic}{refractB}{\def\psk@optic@refractB{#1}} +\define@key[psset]{pst-optic}{refractA}[1]{\def\psk@optic@refractA{#1}} +\define@key[psset]{pst-optic}{refractB}[1.41]{\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 - \def\psk@optic@XO{#1}% -} -\define@key[psset]{pst-optic}{YO}{% the y-offset - \def\psk@optic@YO{#1}% -} -\define@key[psset]{pst-optic}{posStart}{% where the arrows start - \def\psk@optic@posStart{#1}% -} -\define@key[psset]{pst-optic}{length}{% the length of the before|outlines - \def\psk@optic@length{#1}% -} -\define@key[psset]{pst-optic}{focus}{% for lenses/mirrors with a fixed focus - \def\psk@optic@focus{#1}% -} -\define@key[psset]{pst-optic}{AB}{% the length of the object arrow - \def\psk@optic@AB{#1}% -} -\define@key[psset]{pst-optic}{OA}{% the xcoordinate of the object arrow - \def\psk@optic@OA{#1}% -} -\define@key[psset]{pst-optic}{arrowOffset}{% offset for \arrowLine - \def\psk@optic@arrowOffset{#1}% -} +\define@key[psset]{pst-optic}{XO}[0]{\def\psk@optic@XO{#1}}% the X-offset +\define@key[psset]{pst-optic}{YO}[0]{\def\psk@optic@YO{#1}}% the y-offset +\define@key[psset]{pst-optic}{posStart}[0]{\def\psk@optic@posStart{#1}}% where the arrows start +\define@key[psset]{pst-optic}{length}[2]{\def\psk@optic@length{#1}}% the length of the before|outlines +\define@key[psset]{pst-optic}{focus}[2]{\def\psk@optic@focus{#1}}% for lenses/mirrors with a fixed focus +\define@key[psset]{pst-optic}{AB}[1]{\def\psk@optic@AB{#1}}% the length of the object arrow +\define@key[psset]{pst-optic}{OA}[-3]{\def\psk@optic@OA{#1}}% the xcoordinate of the object arrow +\define@key[psset]{pst-optic}{arrowOffset}[0]{\def\psk@optic@arrowOffset{#1}}%offset for \arrowLine % \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 - \def\psk@optic@nameA{#1}% -} -\define@key[psset]{pst-optic}{spotA}{% where to draw the label - \def\psk@optic@spotA{#1}% -} -\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}} +\define@key[psset]{pst-optic}{nameA}[A]{\def\psk@optic@nameA{#1}}% start of the object arrow +\define@key[psset]{pst-optic}{spotA}[270]{\def\psk@optic@spotA{#1}}% where to draw the label +\define@key[psset]{pst-optic}{nameB}[B]{\def\psk@optic@nameB{#1}} +\define@key[psset]{pst-optic}{spotB}[90]{\def\psk@optic@spotB{#1}} +\define@key[psset]{pst-optic}{nameF}[F]{\def\psk@optic@nameF{#1}} +\define@key[psset]{pst-optic}{spotF}[270]{\def\psk@optic@spotF{#1}} +\define@key[psset]{pst-optic}{nameO}[O]{\def\psk@optic@nameO{#1}} +\define@key[psset]{pst-optic}{spotO}[225]{\def\psk@optic@spotO{#1}} +\define@key[psset]{pst-optic}{nameAi}[A']{\def\psk@optic@nameAi{#1}} +\define@key[psset]{pst-optic}{spotAi}[90]{\def\psk@optic@spotAi{#1}} +\define@key[psset]{pst-optic}{nameBi}[B']{\def\psk@optic@nameBi{#1}} +\define@key[psset]{pst-optic}{spotBi}[270]{\def\psk@optic@spotBi{#1}} +\define@key[psset]{pst-optic}{nameFi}[F']{\def\psk@optic@nameFi{#1}} +\define@key[psset]{pst-optic}{spotFi}[270]{\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, @@ -206,12 +166,14 @@ % -------------------- colors/fillstyles ------------------- % \definecolor{BleuVerre}{cmyk}{0.2,0,0,0} -\definecolor{JauneVert}{rgb}{0.7,1,0} -\newpsstyle{rayuresJaunes}{% - fillstyle=hlines,hatchsep=2\pslinewidth,hatchcolor=JauneVert% -} -\define@key[psset]{pst-optic}{rayColor}{\def\psk@optic@rayColor{#1}} +\definecolor{JauneVert}{cmyk}{0.3,0,1,0} +\newpsstyle{rayuresJaunes}{fillstyle=hlines,hatchsep=2\pslinewidth,hatchcolor=JauneVert} +\define@key[psset]{pst-optic}{rayColor}[red]{\pst@getcolor{#1}\psk@optic@rayColor} \psset[pst-optic]{rayColor=red} +\define@key[psset]{pst-optic}{rayWidth}[1.5\pslinewidth]{\def\psk@optic@rayWidth{#1}} +\psset[pst-optic]{rayWidth=1.5\pslinewidth} +% +\newpsstyle{opticalAxis}{linewidth=0.5pt,linecolor=black,linestyle=solid} % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -522,7 +484,7 @@ \endgroup \ifPst@drawing % optical axes - \psline[linewidth=0.5pt](xLeft)(xRight) + \psline[style=opticalAxis](xLeft)(xRight) \psset{dotstyle=|} \psdots(Center') \uput[-90](Center'){Center'} @@ -852,7 +814,7 @@ \endgroup% \ifPst@drawing % axe optique - \psline(! \psk@optic@xLeft\space YO)(! \psk@optic@xRight\space YO) + \psline[style=opticalAxis](! \psk@optic@xLeft\space YO)(! \psk@optic@xRight\space YO) \ifx\psk@optic@lensType\lensTypeDVG\pst@drawDVGRays\else \ifx\psk@optic@lensType\lensTypePDVG\pst@drawDVGRays\else \pst@drawCVGRays\fi\fi @@ -1230,7 +1192,7 @@ \fill } \ifPst@drawing - \psline[linewidth=0.5pt,linecolor=black](O)(xRight) + \psline[style=opticalAxis](O)(xRight) \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) @@ -1331,7 +1293,7 @@ \fill% } \ifPst@drawing - \psline[linecolor=black,linewidth=0.5pt](xLeft)(xRight) + \psline[style=opticalAxis](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) @@ -1502,7 +1464,7 @@ /posMirrorTwo \psk@optic@posMirrorTwo\space def }% % -\begin{pspicture}*(\psk@optic@xLeft,\psk@optic@yBottom)(\psk@optic@xRight,\psk@optic@yTop) +\begin{pspicture*}(\psk@optic@xLeft,\psk@optic@yBottom)(\psk@optic@xRight,\psk@optic@yTop) \rput(0,0){% \mirrorCVG[% mirrorHeight=4,% @@ -1563,7 +1525,7 @@ \rput{-90}(!% \psk@optic@posMirrorTwo\space \psk@optic@posMirrorTwo\space neg){\psscalebox{0.6}{\eye}} -\end{pspicture}% +\end{pspicture*}% }\ignorespaces} % %Images et réflexions sur un miroir plan @@ -1895,9 +1857,9 @@ \psarc{->}(0,0){1}{! AnglePrism neg}{!alpha2 AnglePrism sub} \uput{1.2}[!alpha2 2 div AnglePrism sub](0,0){$i_2$} \uput{0.4}[90](0,0){$I_2$}} - \psline[linecolor={[wave]{\psk@Prism@Lambda}},arrowscale=2]{->}(P1)(I2)(R2) - \psline[linecolor={[wave]{\psk@Prism@Lambda}}](E1)(P1) - \psline[linecolor={[wave]{\psk@Prism@Lambda}},arrowscale=2]{->}(E1)(!i1x E1x add 2 div i1y E1y add 2 div) + \psline[linewidth=\psk@optic@rayWidth,linecolor={[wave]{\psk@Prism@Lambda}},arrowscale=2]{->}(P1)(I2)(R2) + \psline[linewidth=\psk@optic@rayWidth,linecolor={[wave]{\psk@Prism@Lambda}}](E1)(P1) + \psline[linewidth=\psk@optic@rayWidth,linecolor={[wave]{\psk@Prism@Lambda}},arrowscale=2]{->}(E1)(!i1x E1x add 2 div i1y E1y add 2 div) \psarc(0,0){0.8}{!90 AnglePrism sub}{!90 AnglePrism add} \uput[90](0,0.8){$\widehat{A}$} \psdot[dotstyle=o](O) @@ -2025,14 +1987,15 @@ \pnode(! i1x i1y){I1} \pnode(! i2x i2y){I2} \pnode(! r2x r2y){R2} - \psline[linecolor=prism](I1)(I2)(R2)} - \psline[linecolor=white,linewidth=0.5mm](E1)(I1) - \psline[linecolor=white,linewidth=0.5mm,arrowscale=2]{->}(E1)(!i1x E1x add 2 div i1y E1y add 2 div) + \psline[linewidth=\psk@optic@rayWidth,linecolor=prism](I1)(I2)(R2)} + \psline[linewidth=\psk@optic@rayWidth,linecolor=\psk@optic@rayColor,linewidth=0.5mm](E1)(I1) + \psline[linewidth=\psk@optic@rayWidth,linecolor=\psk@optic@rayColor,linewidth=0.5mm,arrowscale=2]{->}(E1)(!i1x E1x add 2 div i1y E1y add 2 div) \end@SpecialObj% } % % \def\resetOpticOptions{% hv 2006-07-20 + \newpsstyle{opticalAxis}{linewidth=0.5pt,linecolor=black,linestyle=solid} \psset[pst-optic]{% lensGlass=false,drawing=true,,lensTwo,rightRay, xLeft=-7.5,xRight=7.5,yBottom=-3.0,yTop=3.0, @@ -2045,7 +2008,8 @@ nameO=O,spotO=225,nameAi=A',spotAi=90,nameBi=B',spotBi=270, nameFi=F',spotFi=270, rayColor=red,% - AnglePrism=60,AnglePlan1=25,AnglePlan2=55,k=1,lambda=632.8,notations=true}% + AnglePrism=60,AnglePlan1=25,AnglePlan2=55,k=1,lambda=632.8,notations=true, + rayWidth=\pslinewidth}% % \gdef\mirrorType{CVG}% % \gdef\lensTypeCVG{CVG}% } -- cgit v1.2.3