From 7aabd76a5961aed06ec6edd2a33e46246b48209d Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 2 Nov 2014 21:52:04 +0000 Subject: pst-optexp (2nov14) git-svn-id: svn://tug.org/texlive/trunk@35486 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/latex/pst-optexp/pst-optexp.sty | 128 ++++++++++++++++++++- 1 file changed, 126 insertions(+), 2 deletions(-) (limited to 'Master/texmf-dist/tex/latex/pst-optexp') diff --git a/Master/texmf-dist/tex/latex/pst-optexp/pst-optexp.sty b/Master/texmf-dist/tex/latex/pst-optexp/pst-optexp.sty index 02f6447b991..5e8a6ad2b8e 100644 --- a/Master/texmf-dist/tex/latex/pst-optexp/pst-optexp.sty +++ b/Master/texmf-dist/tex/latex/pst-optexp/pst-optexp.sty @@ -9,7 +9,7 @@ %% This is a generated file. %% %% Project: pst-optexp -%% Version: 4.10 (2014/06/04) +%% Version: 5.0 (2014/10/30) %% %% Copyright (C) 2007-2014 by Christoph Bersch %% @@ -31,7 +31,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{pst-optexp} - [2014/06/04 v4.10 Optical experimental setups with PSTricks] + [2014/10/30 v5.0 Optical experimental setups with PSTricks] \RequirePackage{ifthen} \RequirePackage{pstricks} \RequirePackage{pst-xkey} @@ -39,6 +39,7 @@ \RequirePackage{pst-plot} \RequirePackage{multido} \RequirePackage{pst-eucl} +\RequirePackage{pst-intersect} \RequirePackage{pstricks-add} \RequirePackage{environ} \@addtofilelist{pst-optexp.pro}{}% @@ -950,6 +951,16 @@ mirrortype=plain, mirrorlinewidth=2\pslinewidth }% +\define@key[psset]{optexp}{parmirrorwidth}{% + \pst@checknum{#1}\POE@key@parmirrorwidth +} +\define@key[psset]{optexp}{parmirrorheight}{% + \pst@checknum{#1}\POE@key@parmirrorheight +} +\psset[optexp]{% + parmirrorwidth=1, + parmirrorheight=1 +}% \define@key[psset]{optexp}{optgridcount}{% \pst@checknum{#1}\POE@key@gratingcount \PackageWarning{pst-optexp}{% @@ -2542,6 +2553,96 @@ { \tx@NodeScale @NewNode @NewNode } if }% }% +\pst@def{Drawbeam}< + { counttomark 6 le { + exit + } if + 3 index not { + pop pop pop + }{ + exit + } ifelse + } loop + { counttomark 3 le { + exit + } if + counttomark 3 sub index not { + counttomark -3 roll pop pop pop + }{ + exit + } ifelse + } loop + counttomark 3 le { + cleartomark + }{ + counttomark 3 div cvi /N ED + (\psk@ArrowInside) length 0 gt { + \ifx\psk@arrowA\arrowType@H % do we have a Hook arrow at the beginning? + \pst@number\pshooklength % yes + \else + \psk@arrowsize\space CLW mul add dup \psk@arrowlength\space mul exch \psk@arrowinset mul neg add + \fi + /arrowlength exch def + 6 copy pop % copy all four values for the arrow line + /y1 ED /x1 ED pop /y2 ED /x2 ED % save them + /Alpha y2 y1 sub x2 x1 sub Atan def % the gradient of the line + pop 3 -1 roll 5 1 roll + ArrowA + x1 Alpha cos arrowlength mul add % dx add + y1 Alpha sin arrowlength mul add % dy add, to get the current point at the end of the arrow tip + 5 -1 roll 3 1 roll true + /N N 1 sub def + N { + 6 copy pop + /y1 ED /x1 ED pop /y2 ED /x2 ED /draw ED + x1 y1 x2 y2 @ABDist dup + \POE@key@ArrowInsideMinLength\space\pst@number\psunit mul ge + exch \POE@key@ArrowInsideMaxLength\space\pst@number\psunit mul dup 0 lt + 3 1 roll le or and { + x1 y1 + \psk@ArrowInsidePos\space 1 gt { + /Alpha y2 y1 sub x2 x1 sub Atan def + /ArrowPos \psk@ArrowInsideOffset\space def + /dArrowPos \psk@ArrowInsidePos\space abs def + \psk@ArrowInsideNo\space cvi { + /ArrowPos ArrowPos dArrowPos add def + x1 Alpha cos ArrowPos mul add + y1 Alpha sin ArrowPos mul add + 6 index { ArrowInside } if + pop pop + } repeat + }{ + /ArrowPos \psk@ArrowInsideOffset\space def + /dArrowPos \psk@ArrowInsideNo 1 gt {% + 1.0 \psk@ArrowInsideNo 1.0 add div + }{\psk@ArrowInsidePos } ifelse def + \psk@ArrowInsideNo\space cvi { + /ArrowPos ArrowPos dArrowPos add def + x2 x1 sub ArrowPos mul x1 add + y2 y1 sub ArrowPos mul y1 add + 6 index { ArrowInside } if + pop pop + } repeat + } ifelse + pop pop + } if + draw {Lineto}{moveto} ifelse + } repeat + }{ + pop 5 copy 3 -1 roll pop + ArrowA pop pop pop pop + counttomark 3 idiv -1 2 { + pop { + lineto + }{ + moveto + } ifelse + } for + } ifelse + {CP 4 2 roll ArrowB lineto pop pop } {moveto} ifelse + pop + } ifelse +> \def\POE@getcomprange#1-#2\@nil{% \ifx\\#2\\% \ifx\\#1\\% @@ -2864,6 +2965,7 @@ \def\oenode@TrefA#1{\oenode{@TrefA}{#1}}% \def\oenode@TrefB#1{\oenode{@TrefB}{#1}}% \def\oenode@Origin#1{\oenode{Origin}{#1}}% +\def\oenode@Path#1{\oenode{Path@#1}{}}% \def\oenodeIfc#1#2{% \ifnum9<1#1 % \oenode{#1}{#2}% @@ -3709,6 +3811,7 @@ \newOptexpDipole{optdiode}{allowbeaminside=false} \newOptexpDipole{doveprism} \newOptexpDipole{glanthompson} +\newOptexpDipole{parabolicmirror}{position=end, ref@angle=-90} \newOptexpTripole{mirror} \newOptexpTripole[ref@angle=45]{beamsplitter} \newOptexpTripole{optgrating} @@ -4242,6 +4345,27 @@ \fi){0.6}{160}{200} \fi }% +\def\parabolicmirror@nodes{% + \pssavepath[linestyle=none, arrows=-,ArrowInside=-]{\oenode@Path{A}}{% + \parametricplot[algebraic, VarStep, VarStepEpsilon=1e-7, plotstyle=cspline]% + {0}{\POE@key@parmirrorheight\space 0.5 mul}% + {-\POE@key@parmirrorwidth/(0.25*\POE@key@parmirrorheight^2)*t^2|-t}} + \pssavepath[linestyle=none, arrows=-,ArrowInside=-]{\oenode@Path{B}}{% + \parametricplot[algebraic, VarStep, VarStepEpsilon=1e-7, plotstyle=cspline]% + {0}{\POE@key@parmirrorheight\space 0.5 mul}% + {-\POE@key@parmirrorwidth/(0.25*\POE@key@parmirrorheight^2)*t^2|t}} + \newOptexpComp{% + {-\POE@key@parmirrorwidth\space 0.16 mul \POE@key@parmirrorheight\space -0.2 mul} + tx@IntersectDict /\PIT@name{\oenode@Path{A}} get 0 0 refl {PathIfc} + {0 0} {1 0} 0 0 trans {PlainIfc} + {-\POE@key@parmirrorwidth\space 0.16 mul \POE@key@parmirrorheight\space 0.2 mul} + tx@IntersectDict /\PIT@name{\oenode@Path{B}} get 0 0 refl {PathIfc} + 1 }% +\ignorespaces}% +\def\parabolicmirror@comp{% + \pstracecurve{\oenode@Path{A}} + \pstracecurve{\oenode@Path{B}} +\ignorespaces} \def\lens@ref{% \ifdim\POE@key@lensradiusleft pt=0pt \edef\@th{0 }% -- cgit v1.2.3