diff options
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-spirograph/Changes | 3 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-spirograph/README | 13 | ||||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-spirograph/pst-spirograph-doc.pdf | bin | 10451957 -> 75598078 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/generic/pst-spirograph/pst-spirograph-doc.tex | 99 | ||||
-rw-r--r-- | Master/texmf-dist/dvips/pst-spirograph/pst-spirograph.pro | 80 | ||||
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-spirograph/pst-spirograph.tex | 133 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/pst-spirograph/pst-spirograph.sty | 6 |
7 files changed, 298 insertions, 36 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-spirograph/Changes b/Master/texmf-dist/doc/generic/pst-spirograph/Changes index be4d45e3a4e..23eeed9eb41 100644 --- a/Master/texmf-dist/doc/generic/pst-spirograph/Changes +++ b/Master/texmf-dist/doc/generic/pst-spirograph/Changes @@ -1,15 +1,18 @@ ----- pst-spirograph.tex +0.50 2020-03-11 - added new optional argument TypeA for special graphs 0.41 2014-08-23 - updated documentation - move some more PS functions into the pro file 0.40 2014-08-18 - first CTAN version (hv) ----- pst-spirograph.pro +0.50 2020-03-11 - added some more functions 0.41 2014-08-23 - added some more functions 0.40 2014-08-18 - first CTAN version (hv) ----- pst-spirograph.sty +0.50 2020-03-11 - updated file dates 0.41 2014-08-23 - updated file dates 0.40 2014-08-18 - first CTAN version (hv) diff --git a/Master/texmf-dist/doc/generic/pst-spirograph/README b/Master/texmf-dist/doc/generic/pst-spirograph/README index 0a01494a04d..c1968e1db72 100644 --- a/Master/texmf-dist/doc/generic/pst-spirograph/README +++ b/Master/texmf-dist/doc/generic/pst-spirograph/README @@ -1,15 +1,12 @@ This version of pst-spirograph uses the xkeyval package, the extended version of keyval. -Save the files pst-spirograph.sty|.tex| in a directory, which is part of your -local TeX node. Then do not forget to run texhash to update this node -if these packages are new to your TeX distribution. -For more information see the documentation of your LaTeX distribution -on installing packages into your LaTeX distribution or the -TeX Frequently Asked Questions: -(http://www.tex.ac.uk/cgi-bin/texfaq2html?label=instpackages). - pst-spirograph needs pstricks, which should be part of your local TeX installation, otherwise get it from a CTAN server, f.ex. http://mirror.ctan.org/graphics/pstricks/ +%% This program can be redistributed and/or modified under the terms +%% of the LaTeX Project Public License Distributed from CTAN archives +%% in directory CTAN:/macros/latex/base/lppl.txt. + +hvoss@tug.org diff --git a/Master/texmf-dist/doc/generic/pst-spirograph/pst-spirograph-doc.pdf b/Master/texmf-dist/doc/generic/pst-spirograph/pst-spirograph-doc.pdf Binary files differindex c99901f2bb5..8f855e7883b 100644 --- a/Master/texmf-dist/doc/generic/pst-spirograph/pst-spirograph-doc.pdf +++ b/Master/texmf-dist/doc/generic/pst-spirograph/pst-spirograph-doc.pdf diff --git a/Master/texmf-dist/doc/generic/pst-spirograph/pst-spirograph-doc.tex b/Master/texmf-dist/doc/generic/pst-spirograph/pst-spirograph-doc.tex index a83e72190b8..b61131c97ae 100644 --- a/Master/texmf-dist/doc/generic/pst-spirograph/pst-spirograph-doc.tex +++ b/Master/texmf-dist/doc/generic/pst-spirograph/pst-spirograph-doc.tex @@ -1,7 +1,7 @@ -%% $Id: pst-spirograph-doc.tex 80 2014-08-23 05:50:14Z herbert $ +%% $Id: pst-spirograph-doc.tex 81 2014-08-23 07:08:21Z herbert $ \documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings headexclude,footexclude,oneside]{pst-doc} -\usepackage[utf8]{inputenc} +\errorcontextlines=150 \usepackage{pst-spirograph} \let\pstFV\fileversion \usepackage{pst-node,pst-plot} @@ -22,6 +22,9 @@ \lstset{basicstyle=\ttfamily\footnotesize} +\addbibresource{\jobname.bib} + + \begin{document} \author{Manuel Luque\\Herbert Vo\ss} \docauthor{} @@ -247,14 +250,19 @@ This value defines the look of a ``teeth''. Values greater than 30 make no real \clearpage \section{Animations} +\begin{sloppypar} With package \LPack{animate} one can easily create animations. You get a better result with -\verb:\multiframe{360}{iA=0+4}{...}: but that increases the file size of the PDF. +\verb:\multiframe{360}{iA=0+4}{...}: but that increases the file size of the PDF. To save diskspace the following +examples use a bigger angle step than useful for a single animation. +\end{sloppypar} + +%\psset{unit=0.75cm} \begin{LTXexample}[pos=t] \begin{animateinline}[ width=0.9\linewidth, - begin={\begin{pspicture}(-3.5,-3.5)(3.5,3.5)}, + begin={\begin{pspicture}(-4,-4)(4,4)}, end={\end{pspicture}}, palindrome,controls, % autoplay @@ -266,8 +274,86 @@ With package \LPack{animate} one can easily create animations. You get a better \end{LTXexample} +\psset{linewidth=0.1pt} + +\begin{LTXexample}[pos=t] +\psset{unit=0.3cm} +\begin{animateinline}[ + width=0.9\linewidth, begin={\begin{pspicture}(-11,-11)(11,11)}, end={\end{pspicture}}, palindrome,controls,]{5} +\multiframe{109}{i=0+10}{% +\psgrid[style=gridstyleA](-10,-10)(10,10)% +\ifnum\i=109 \psset{gearwheels=false}\fi +\psSpirograph[Z1=24,Z2=16,m=0.5,ap=22,TypeA=false,linewidth=0.2pt,fillstyle=solid,opacity=0.5, + polarangle=\i,circles=false,thetamax=\i,curvecolor=blue,curvewidth=2pt,HolePos=1.1,color1=magenta]} +\end{animateinline} +\end{LTXexample} + + +\iffalse +\begin{LTXexample}[pos=t] +\psset{unit=0.5cm} +\begin{animateinline}[ + width=0.9\linewidth,begin={\begin{pspicture}(-10,-10)(10,10)},end={\end{pspicture}},palindrome,controls]{5} +\multiframe{721}{i=0+2}{% +\psgrid[subgriddiv=0,gridcolor=red,unit=1.5](-10,-10)(10,10)% +\ifnum\i=721 \psset{gearwheels=false}\fi +\psSpirograph[Z1=24,Z2=18,m=0.5,ap=22,linewidth=0.025,TypeA=false,fillstyle=solid,opacity=0.5,polarangle=\i,circles=false, + thetamax=\i,curvecolor=blue,curvewidth=2pt,HolePos=1.75,color1=magenta]} +\end{animateinline} +\end{LTXexample} +\fi + + + +\begin{LTXexample}[pos=t] +\psset{unit=0.6cm} +\begin{animateinline}[ + width=0.9\linewidth,begin={\begin{pspicture}(-14,-14)(14,14)},end={\end{pspicture}},palindrome,controls]{5} +\multiframe{181}{i=0+10}{% + \psgrid[style=gridstyleA,unit=1.4](-10,-10)(10,10)% + \ifnum\i=181 \psset{gearwheels=false}\fi + \psSpirograph[Z1=50,Z2=20,m=0.2,linewidth=0.025,fillstyle=solid,opacity=0.75,polarangle=\i,circles,TypeA=false, + thetamax=\i,curvecolor=red,curvewidth=2pt,HolePos=1.05]} +\end{animateinline} +\end{LTXexample} + + +\iffalse +\begin{LTXexample}[pos=t] +\psset{unit=0.4cm} +\begin{animateinline}[ + width=0.9\linewidth,begin={\begin{pspicture}(-18,-18)(18,18)},end={\end{pspicture}},palindrome,controls]{5} +\multiframe{181}{i=0+10}{% +\psgrid[style=gridstyleA]% +\ifnum\i=181 \psset{gearwheels=false}\fi +\psSpirograph[Z1=60,Z2=24,m=0.2,linewidth=0.025,TypeA=false, + linecolor=blue,fillstyle=solid,opacity=0.75,polarangle=\i,circles=false,thetamax=\i,curvecolor=red,curvewidth=2pt,HolePos=1.7]} +\end{animateinline} +\end{LTXexample} +\fi + + + +\begin{LTXexample}[pos=t] +\psset{unit=0.25cm} +\begin{animateinline}[ + width=0.9\linewidth,begin={\begin{pspicture}(-20,-20)(20,20)},end={\end{pspicture}},palindrome,controls]{5} +\multiframe{324}{i=0+10}{% +\psgrid[subgriddiv=0,gridcolor=black!20,unit=2](-10,-10)(10,10)% +\ifnum\i=324 \psset{gearwheels=false}\fi +\psSpirograph[Z1=72,Z2=16,m=0.2,ap=10,TypeA=false,linewidth=0.02,linecolor={[rgb]{0.5 0 0 }},fillstyle=solid, + opacity=0.75,polarangle=\i,circles=false,thetamax=\i,curvecolor=blue,curvewidth=3pt, + HolePos=0.5,color1=cyan!10,color2=cyan!10,strokeopacity=0.5]% +%\psSpirograph[Z1=72,Z2=16,m=0.2,ap=10,TypeA=false,linewidth=0.02,linecolor={[rgb]{0.5 0 0 }},fillstyle=solid, +% opacity=0.75,polarangle=\i,circles=false,thetamax=\i,curvecolor=green,curvewidth=3pt, +% HolePos=1.5,color1=cyan!10,color2=cyan!10,strokeopacity=0.5] +} +\end{animateinline} +\end{LTXexample} + + -There are some more examples in the documention directory of the package. +%There are some more examples in the documention directory of the package. \clearpage @@ -279,8 +365,7 @@ There are some more examples in the documention directory of the package. \bgroup \nocite{*} \raggedright -\bibliographystyle{plain} -\bibliography{\jobname} +\printbibliography \egroup \printindex diff --git a/Master/texmf-dist/dvips/pst-spirograph/pst-spirograph.pro b/Master/texmf-dist/dvips/pst-spirograph/pst-spirograph.pro index e1295ed6c3b..588345b42e4 100644 --- a/Master/texmf-dist/dvips/pst-spirograph/pst-spirograph.pro +++ b/Master/texmf-dist/dvips/pst-spirograph/pst-spirograph.pro @@ -1,8 +1,8 @@ -%% $Id: pst-spirograph.pro 80 2014-08-23 05:50:14Z herbert $ +%% $Id: pst-spirograph.pro 1159 2020-03-12 15:13:17Z herbert $ %% % PostScript prologue for pst-spirograph.tex. % -% Version 0.41, 2014/08/23 +% Version 0.50, 2020/03/11 % /tx@spirographDict 50 dict def tx@spirographDict begin @@ -305,5 +305,81 @@ tx@spirographDict begin grestore end } def + /Roue3 { + % arc de développante + /tabArcDev [ 0 1 ThetaTdeg { /i@ exch def [i@ devCercle] } for ] def + /n@ tabArcDev length def + /tabDent [ + % l'arc de developpante initial + tabArcDev aload pop + % l'arc ce cercle de tete + DeltaT 0.1 2Beta DeltaT sub {/i@ exch def [Rt cm i@ cos mul Rt cm i@ sin mul] } for + % le symetrique de l'arc de developpante par rapport a l'axe de la dent + n@ 1 sub -1 0 { /compteur exch def [tabArcDev compteur get aload pop symAxe] } for + ] def + % tracé de la dent + /n2@ tabDent length def + newpath + ptC moveto + 0 1 Z@ 1 sub { /i@ exch AngleDent mul def + wheel 2 eq { ptA RotDent ptB RotDent Rarct arct ptB RotDent lineto } + { ptA RotDent lineto ptB RotDent lineto } ifelse + 0 1 n2@ 1 sub { /compteur exch def tabDent compteur get aload pop RotDent lineto } for + wheel 2 eq { + Rp Rb eq { ptA' RotDent lineto ptC' RotDent lineto } + { ptA' RotDent ptC' RotDent Rarct arct ptC' RotDent lineto } ifelse + } { ptA' RotDent lineto ptC' RotDent lineto } ifelse + } for + } def + %%%% fin de la definition de la roue dentee %%% + /COURONNE { 0 0 Rt 1.25 mul cm 360 0 arcn } def + /plaquette { + Beta_ neg rotate + /alpha1 1 R1 2 mul atan 2 div def + /alpha2 1 R1 2 mul 2 m1 mul sub 2 div atan 2 div def + /xR1 R1 2 mul cm def + /yR1 0.5 cm def + /xR2 R1 2 mul cm def + /yR2 -0.5 cm def + /xR3 R1 2 mul 2 m1 mul sub 2 div R1 2 div sub cm def + /yR3 -0.5 cm def + /xR4 R1 2 mul 2 m1 mul sub 2 div R1 2 div sub cm def + /yR4 0.5 cm def + newpath + xR1 yR1 moveto + xR2 yR2 lineto + xR3 yR3 lineto + xR4 yR4 lineto + closepath + iffill { color1 Fill } if + newpath + xR1 yR1 moveto + xR2 yR2 lineto + xR3 yR3 lineto + xR4 yR4 lineto + closepath + linecolor + stroke + R1 cm HolePos mul 0 GetCurveWidth 1.5 mul 0 360 arc + curvecolor + fill + 0 setgray + R1 cm HolePos mul 0 GetCurveWidth 1.5 mul 0 360 arc + stroke + } def + %% calculs des points de la courbe + /coorPen3 { + 4 dict begin + /t exch def + % r2 qi t cos mul ki qi t mul 60 ni mul sub cos mul add mul cm + % r2 qi t sin mul ki qi t mul 60 ni mul sub sin mul sub mul cm + /beta t R1 R2 sub R1 div mul def + /xC R1 R2 sub t cos mul def + /yC R1 R2 sub t sin mul def + R1 HolePos mul beta cos mul xC add cm + R1 HolePos mul beta sin mul yC add cm + end + } def +% end %%
\ No newline at end of file diff --git a/Master/texmf-dist/tex/generic/pst-spirograph/pst-spirograph.tex b/Master/texmf-dist/tex/generic/pst-spirograph/pst-spirograph.tex index c015ca5bca2..02cfbcd4cfc 100644 --- a/Master/texmf-dist/tex/generic/pst-spirograph/pst-spirograph.tex +++ b/Master/texmf-dist/tex/generic/pst-spirograph/pst-spirograph.tex @@ -6,7 +6,7 @@ %% %% Package `pst-spirograph.tex' %% -%% COPYRIGHT 2015 by +%% COPYRIGHT 2020- by %% Manuel Luque <manuel.luque27@gmail.com> %% Herbert Voss <hvoss@tug.org> %% @@ -23,8 +23,8 @@ % Requires some packages \ifx\PSTricksLoaded\endinput\else \input pstricks \fi \ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi -\def\fileversion{0.41} -\def\filedate{2014/08/23} +\def\fileversion{0.50} +\def\filedate{2020/03/11} \message{`PSTSPIROGRAPH' v\fileversion, \filedate\ (ml,hv)} \edef\PstAtCode{\the\catcode`\@} @@ -64,11 +64,23 @@ %% === pour dessiner cercle de base et cercle primitif \define@boolkey[psset]{pst-spirograph}[Pst@spirograph@]{circles}[true]{} \psset[pst-spirograph]{circles=false} -% + + +%% hole position +\define@key[psset]{pst-spirograph}{HolePos}{\def\psk@HolePos{#1 }} +\psset[pst-spirograph]{HolePos=1.5} % 1<HolePos<2 + +\define@boolkey[psset]{pst-spirograph}[Pst@spirograph@]{gearwheels}[true]{} +\psset[pst-spirograph]{gearwheels} + +\define@boolkey[psset]{pst-spirograph}[Pst@spirograph@]{TypeA}[true]{} +\psset[pst-spirograph]{TypeA} + + \def\psSpirograph{\def\pst@par{}\pst@object{psSpirograph}} \def\psSpirograph@i{\@ifnextchar({\psSpirograph@ii}{\psSpirograph@ii(0,0)}} \def\psSpirograph@ii(#1){% - \begin@SpecialObj + \begin@ClosedObj \pst@@getcoor{#1}% \addto@pscode{ tx@spirographDict begin @@ -82,18 +94,24 @@ /ap \psk@ap def /polarAngle \psk@polarangle def /setlinedash { [ \psk@dash\space ] 0 setdash } def - /ni \psk@holenumber def % numero du trou - ni 8 gt {/ni 8 def} if + /ni \psk@holenumber def ni 8 gt { /ni 8 def } if /thetamax \psk@thetamax def % /ifinner \ifPst@spirograph@inner true \else false \fi def /ifcircles \ifPst@spirograph@circles true \else false \fi def - /iffill \ifx\psk@fillstyle\relax false \else true \fi def - /Fill { \tx@setTransparency fill } def -% - /ki 1 ni 9 div sub def - /r2 m1 Z2 mul 2 div def - /qi Z1 Z2 div 1 sub def + /iffill \ifx\psk@fillstyle\psfs@none false \else true \fi def + /Fill { \tx@setTransparency fill stroke } def + % on teste si le nombre de dents est pair + Z1 2 mod 1 eq { /Z1 Z1 1 sub def } if + Z2 2 mod 1 eq { /Z2 Z2 1 sub def } if + /HolePos \psk@HolePos def + HolePos 0 lt HolePos 2 ge or { /HolePos 1.5 def } if + /Fill { \psk@opacityalpha .setopacityalpha fill } def + /R1 Z1 m1 mul 2 div def + /R2 Z2 m1 mul 2 div def + /ki 1 ni 9 div sub def + /r2 m1 Z2 mul 2 div def + /qi Z1 Z2 div 1 sub def /qi2 Z1 Z2 div 1 add def thetamax 0 le {/pas -1 def}{/pas 1 def} ifelse % tableau des points de l'hypocycloide @@ -108,13 +126,96 @@ /curvecolor {\pst@usecolor\pscolord } def /linecolor {\pst@usecolor\pslinecolor} def /fillopacity \psk@opacityalpha def + /GetCurveWidth { \pst@number\pscurvewidth } def /SetCurveWidth { \pst@number\pscurvewidth SLW } def % - Roue1 - Roue2 + \ifPst@spirograph@TypeA + Roue1 + Roue2 + \else + %%%% definition de la roue dentee %%%%%% + thetamax 0 le { /pas -1 def }{ /pas 1 def } ifelse + /tabSpirograph [ 0 pas thetamax {/i_ exch def [ i_ coorPen3 ] } for ] def + %%% Les dessins de l'engrenage %%%%%% + %%%%%%%%%% Roue N°2 %%%%%%%%%%% + %%%%%%%%%% roue fixe %%%%%%%%%% + \ifPst@spirograph@gearwheels + /wheel 2 def + gsave + m2 Z2 Datas1 + Calculs + Beta_ rotate + Roue3 + closepath +% \ifx\psk@fillstyle\empty\else color2 Fill \fi + iffill { color2 Fill } if + Roue3 + closepath + linecolor + stroke + grestore + gsave + %% la vis de fixation de la roue sur la feuille + 0 0 0.5 cm 0 360 arc + 0.8 0.8 0 setrgbcolor + fill + 0 setgray + 0 0 0.5 cm 0 360 arc + stroke + 1 setlinewidth + -0.5 cm 0 moveto 0.5 cm 0 lineto + 0 -0.5 cm moveto 0 0.5 cm lineto + stroke + grestore + \ifPst@spirograph@circles Circles \fi + \fi + gsave + tabSpirograph 0 get aload pop moveto + 1 1 tabSpirograph length 1 sub {/nP exch def tabSpirograph nP get aload pop lineto } for + curvecolor + \pst@number\pscurvewidth SLW + stroke + grestore + %%%%%%%%%% Roue N°1 %%%%%%%%%%%%%%%%% + %%%%%%%%%% roue tournante %%%%%%%%%% + \ifPst@spirograph@gearwheels + /wheel 1 def + gsave + m2 Z2 Datas1 + Calculs + /a@ex m2 Z1 Z2 add mul 2 div cm def % entraxe engrenage exterieur + /a@in m2 Z1 Z2 sub mul 2 div cm def % entraxe engrenage interieur + a@in polarAngle cos mul a@in polarAngle sin mul translate + polarAngle Z1 Z2 sub Z1 div mul rotate + m1 Z1 + Datas2 + Calculs + Beta_ rotate + Roue3 + COURONNE + closepath + iffill { color1 Fill } if +% \ifx\psk@fillstyle\@empty\else color1 Fill \fi + Roue3 + closepath + linecolor + stroke + COURONNE + closepath + linecolor + stroke + Roue3 + closepath + linecolor + stroke + plaquette + \ifPst@spirograph@circles Circles \fi + grestore + \fi + \fi end }% - \end@SpecialObj + \end@ClosedObj \ignorespaces} % \catcode`\@=\PstAtCode\relax diff --git a/Master/texmf-dist/tex/latex/pst-spirograph/pst-spirograph.sty b/Master/texmf-dist/tex/latex/pst-spirograph/pst-spirograph.sty index c85a30c84a7..5ee1f43f9fe 100644 --- a/Master/texmf-dist/tex/latex/pst-spirograph/pst-spirograph.sty +++ b/Master/texmf-dist/tex/latex/pst-spirograph/pst-spirograph.sty @@ -4,7 +4,7 @@ %% %% IMPORTANT NOTICE: %% -%% pst-spirograph.sty Copyright (C) 2015 +%% pst-spirograph.sty Copyright (C) 2020- %% Manuel Luque %% Herbert VoĂ <hvoss@tug.org> %% @@ -18,12 +18,12 @@ [2014/08/23 v0.41 LaTeX wrapper for `pst-spirograph' (hv)] % \RequirePackage{pstricks} -\ProvidesPackage{pst-spirograph}[2014/08/23 package wrapper for pst-spirograph.tex] +\ProvidesPackage{pst-spirograph}[2020/03/11 package wrapper for pst-spirograph.tex] \input{pst-spirograph.tex} \ProvidesFile{pst-spirograph.tex} [\filedate\space \fileversion\space `pst-spirograph' (ml,hv)] \IfFileExists{pst-spirograph.pro}{% \ProvidesFile{pst-spirograph.pro} - [2014/08/23 v. 0.41, PostScript prologue file (hv)] + [2020/03/11 v. 0.50, PostScript prologue file (hv)] \@addtofilelist{pst-spirograph.pro}}{}% \endinput |