diff options
author | Karl Berry <karl@freefriends.org> | 2010-01-30 23:05:43 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-01-30 23:05:43 +0000 |
commit | b94e5bfee70bad156b5d2dd12aa38f9f5ea1e2b7 (patch) | |
tree | 4e9c3ebd9d9b88746e2986a49b64bf7b5f261e97 /Master/texmf-dist/tex/generic | |
parent | a6fc090e9454533a71d2cc7a34f7810b124eb8b0 (diff) |
pst-coil 1.01 (30jan10)
git-svn-id: svn://tug.org/texlive/trunk@16873 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic')
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-coil/pst-coil.tex | 64 |
1 files changed, 54 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/generic/pst-coil/pst-coil.tex b/Master/texmf-dist/tex/generic/pst-coil/pst-coil.tex index 51af29883ef..077c71d5885 100644 --- a/Master/texmf-dist/tex/generic/pst-coil/pst-coil.tex +++ b/Master/texmf-dist/tex/generic/pst-coil/pst-coil.tex @@ -6,7 +6,7 @@ %% %% %% COPYRIGHT 1993, 1994, 1999 by Timothy Van Zandt, tvz@nwu.edu. -%% 2006 Herbert Voss, hvoss@tug.org +%% 2006-2010 Herbert Voss, hvoss@tug.org %% %% This program can be redistributed and/or modified under the terms %% of the LaTeX Project Public License Distributed from CTAN @@ -20,8 +20,8 @@ \fi \ifx\PSTXKeyLoaded\endinput\else\input pst-xkey \fi % -\def\fileversion{1.00} -\def\filedate{2006/11/05} +\def\fileversion{1.01} +\def\filedate{2010/01/30} % \edef\TheAtCode{\the\catcode`\@} \catcode`\@=11 @@ -31,15 +31,15 @@ \edef\pst@theheaders{\pst@theheaders,pst-coil.pro} \def\pst@coildict{tx@CoilDict begin } % -\define@key[psset]{pst-coil}{coilwidth}{\pst@getlength{#1}\psk@coilwidth} -\define@key[psset]{pst-coil}{coilheight}{\pst@checknum{#1}\pscoilheight} -\define@key[psset]{pst-coil}{coilarmA}{\pst@getlength{#1}\psk@coilarmA} -\define@key[psset]{pst-coil}{coilarmB}{\pst@getlength{#1}\psk@coilarmB} -\define@key[psset]{pst-coil}{coilarm}{% +\define@key[psset]{pst-coil}{coilwidth}[1cm]{\pst@getlength{#1}\psk@coilwidth} +\define@key[psset]{pst-coil}{coilheight}[1]{\pst@checknum{#1}\pscoilheight} +\define@key[psset]{pst-coil}{coilarmA}[0.5cm]{\pst@getlength{#1}\psk@coilarmA} +\define@key[psset]{pst-coil}{coilarmB}[0.5cm]{\pst@getlength{#1}\psk@coilarmB} +\define@key[psset]{pst-coil}{coilarm}[0.5cm]{% \pst@getlength{#1}\psk@coilarmA% \let\psk@coilarmB\psk@coilarmA} -\define@key[psset]{pst-coil}{coilaspect}{\pst@getangle{#1}\psk@coilaspect} -\define@key[psset]{pst-coil}{coilinc}{\pst@getangle{#1}\psk@coilinc} +\define@key[psset]{pst-coil}{coilaspect}[45]{\pst@getangle{#1}\psk@coilaspect} +\define@key[psset]{pst-coil}{coilinc}[10]{\pst@getangle{#1}\psk@coilinc} % \psset[pst-coil]{coilaspect=45,coilarm=.5cm,coilheight=1,coilwidth=1cm,coilinc=10} % @@ -59,6 +59,34 @@ \pst@coildict \tx@Coil end }% \showpointsfalse \end@OpenObj} +% +\define@key[psset]{pst-coil}{frequency}[1]{\def\psk@frequency{#1 }} +\define@key[psset]{pst-coil}{amplitude}[1]{\def\psk@amplitude{#1 }} +\define@key[psset]{pst-coil}{ppoints}[360]{\def\psk@ppoints{#1 }} +\define@key[psset]{pst-coil}{function}[sin]{\def\psk@function{#1 }} +\psset[pst-coil]{frequency=1,amplitude=1,ppoints=360,function=sin} +% +\def\tx@Sin{Sin } +% +\def\pssin{\pst@object{pssin}} +\def\pssin@i{\pst@getarrows\pssin@ii} +\def\pssin@ii(#1){\@ifnextchar({\pssin@iii{1}(#1)}{\pssin@iii{\z@}(0,0)(#1)}} +\def\pssin@iii#1(#2)(#3){% + \begin@OpenObj + \pst@getcoor{#2}\pst@tempa + \pst@getcoor{#3}\pst@tempb + \pst@optcp{#1}\pst@tempa + \addto@pscode{% + \pst@tempa \pst@tempb + \psk@frequency \psk@amplitude \pst@number\psyunit mul + \psk@coilarmA \psk@coilarmB + \psk@ppoints + { \psk@function } + \pst@coildict \tx@Sin end + }% + \showpointsfalse% + \end@OpenObj} +% \def\tx@CoilLoop{CoilLoop } \def\tx@Coil{Coil } \def\psCoil{\def\pst@par{}\pst@object{psCoil}} @@ -137,6 +165,22 @@ \def\pczigzag{\def\pst@par{}\pst@object{pczigzag}} \def\pczigzag@i{\pc@object\nczigzag@ii} % +\def\ncsin{\pst@object{ncsin}} +\def\ncsin@i{\check@arrow{\ncsin@ii}} +\def\ncsin@ii#1#2{\nc@object{Open}{#1}{#2}{.5}{% + \tx@NCCoor + tx@Dict begin + 4 2 roll + \psk@frequency \psk@amplitude \pst@number\psyunit mul + \psk@coilarmA \psk@coilarmB + \psk@ppoints + { \psk@function } + \pst@coildict \tx@Sin end + end }} +% +\def\pcsin{\def\pst@par{}\pst@object{pcsin}} +\def\pcsin@i{\pc@object\ncsin@ii} +% \catcode`\@=\TheAtCode\relax \endinput %% |