texlive[54257] Master/texmf-dist: pst-spirograph (12mar20)
commits+karl at tug.org
commits+karl at tug.org
Thu Mar 12 21:25:18 CET 2020
Revision: 54257
http://tug.org/svn/texlive?view=revision&revision=54257
Author: karl
Date: 2020-03-12 21:25:17 +0100 (Thu, 12 Mar 2020)
Log Message:
-----------
pst-spirograph (12mar20)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/generic/pst-spirograph/Changes
trunk/Master/texmf-dist/doc/generic/pst-spirograph/README
trunk/Master/texmf-dist/doc/generic/pst-spirograph/pst-spirograph-doc.pdf
trunk/Master/texmf-dist/doc/generic/pst-spirograph/pst-spirograph-doc.tex
trunk/Master/texmf-dist/dvips/pst-spirograph/pst-spirograph.pro
trunk/Master/texmf-dist/tex/generic/pst-spirograph/pst-spirograph.tex
trunk/Master/texmf-dist/tex/latex/pst-spirograph/pst-spirograph.sty
Modified: trunk/Master/texmf-dist/doc/generic/pst-spirograph/Changes
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-spirograph/Changes 2020-03-12 20:11:04 UTC (rev 54256)
+++ trunk/Master/texmf-dist/doc/generic/pst-spirograph/Changes 2020-03-12 20:25:17 UTC (rev 54257)
@@ -1,4 +1,5 @@
----- 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)
@@ -5,11 +6,13 @@
----- 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)
Modified: trunk/Master/texmf-dist/doc/generic/pst-spirograph/README
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-spirograph/README 2020-03-12 20:11:04 UTC (rev 54256)
+++ trunk/Master/texmf-dist/doc/generic/pst-spirograph/README 2020-03-12 20:25:17 UTC (rev 54257)
@@ -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 at tug.org
Modified: trunk/Master/texmf-dist/doc/generic/pst-spirograph/pst-spirograph-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/generic/pst-spirograph/pst-spirograph-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/pst-spirograph/pst-spirograph-doc.tex 2020-03-12 20:11:04 UTC (rev 54256)
+++ trunk/Master/texmf-dist/doc/generic/pst-spirograph/pst-spirograph-doc.tex 2020-03-12 20:25:17 UTC (rev 54257)
@@ -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 @@
\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,9 +274,87 @@
\end{LTXexample}
+\psset{linewidth=0.1pt}
-There are some more examples in the documention directory of the package.
+\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.
+
\clearpage
\section{List of all optional arguments for \texttt{pst-spirograph}}
@@ -279,8 +365,7 @@
\bgroup
\nocite{*}
\raggedright
-\bibliographystyle{plain}
-\bibliography{\jobname}
+\printbibliography
\egroup
\printindex
Modified: trunk/Master/texmf-dist/dvips/pst-spirograph/pst-spirograph.pro
===================================================================
--- trunk/Master/texmf-dist/dvips/pst-spirograph/pst-spirograph.pro 2020-03-12 20:11:04 UTC (rev 54256)
+++ trunk/Master/texmf-dist/dvips/pst-spirograph/pst-spirograph.pro 2020-03-12 20:25:17 UTC (rev 54257)
@@ -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 at spirographDict 50 dict def
tx at spirographDict begin
@@ -305,5 +305,81 @@
grestore
end
} def
+ /Roue3 {
+ % arc de d\xE9veloppante
+ /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\xE9 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
Modified: trunk/Master/texmf-dist/tex/generic/pst-spirograph/pst-spirograph.tex
===================================================================
--- trunk/Master/texmf-dist/tex/generic/pst-spirograph/pst-spirograph.tex 2020-03-12 20:11:04 UTC (rev 54256)
+++ trunk/Master/texmf-dist/tex/generic/pst-spirograph/pst-spirograph.tex 2020-03-12 20:25:17 UTC (rev 54257)
@@ -6,7 +6,7 @@
%%
%% Package `pst-spirograph.tex'
%%
-%% COPYRIGHT 2015 by
+%% COPYRIGHT 2020- by
%% Manuel Luque <manuel.luque27 at gmail.com>
%% Herbert Voss <hvoss at 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 at boolkey[psset]{pst-spirograph}[Pst at spirograph@]{circles}[true]{}
\psset[pst-spirograph]{circles=false}
-%
+
+
+%% hole position
+\define at key[psset]{pst-spirograph}{HolePos}{\def\psk at HolePos{#1 }}
+\psset[pst-spirograph]{HolePos=1.5} % 1<HolePos<2
+
+\define at boolkey[psset]{pst-spirograph}[Pst at spirograph@]{gearwheels}[true]{}
+\psset[pst-spirograph]{gearwheels}
+
+\define at boolkey[psset]{pst-spirograph}[Pst at spirograph@]{TypeA}[true]{}
+\psset[pst-spirograph]{TypeA}
+
+
\def\psSpirograph{\def\pst at par{}\pst at object{psSpirograph}}
\def\psSpirograph at i{\@ifnextchar({\psSpirograph at ii}{\psSpirograph at ii(0,0)}}
\def\psSpirograph at ii(#1){%
- \begin at SpecialObj
+ \begin at ClosedObj
\pst@@getcoor{#1}%
\addto at pscode{
tx at spirographDict begin
@@ -82,18 +94,24 @@
/ap \psk at ap def
/polarAngle \psk at polarangle def
/setlinedash { [ \psk at dash\space ] 0 setdash } def
- /ni \psk at holenumber def % numero du trou
- ni 8 gt {/ni 8 def} if
+ /ni \psk at holenumber def ni 8 gt { /ni 8 def } if
/thetamax \psk at thetamax def
%
/ifinner \ifPst at spirograph@inner true \else false \fi def
/ifcircles \ifPst at spirograph@circles true \else false \fi def
- /iffill \ifx\psk at fillstyle\relax false \else true \fi def
- /Fill { \tx at 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 at fillstyle\psfs at none false \else true \fi def
+ /Fill { \tx at 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 at HolePos def
+ HolePos 0 lt HolePos 2 ge or { /HolePos 1.5 def } if
+ /Fill { \psk at 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 at usecolor\pscolord } def
/linecolor {\pst at usecolor\pslinecolor} def
/fillopacity \psk at opacityalpha def
+ /GetCurveWidth { \pst at number\pscurvewidth } def
/SetCurveWidth { \pst at number\pscurvewidth SLW } def
%
- Roue1
- Roue2
+ \ifPst at 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\xB02 %%%%%%%%%%%
+ %%%%%%%%%% roue fixe %%%%%%%%%%
+ \ifPst at spirograph@gearwheels
+ /wheel 2 def
+ gsave
+ m2 Z2 Datas1
+ Calculs
+ Beta_ rotate
+ Roue3
+ closepath
+% \ifx\psk at 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 at 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 at number\pscurvewidth SLW
+ stroke
+ grestore
+ %%%%%%%%%% Roue N\xB01 %%%%%%%%%%%%%%%%%
+ %%%%%%%%%% roue tournante %%%%%%%%%%
+ \ifPst at spirograph@gearwheels
+ /wheel 1 def
+ gsave
+ m2 Z2 Datas1
+ Calculs
+ /a at ex m2 Z1 Z2 add mul 2 div cm def % entraxe engrenage exterieur
+ /a at in m2 Z1 Z2 sub mul 2 div cm def % entraxe engrenage interieur
+ a at in polarAngle cos mul a at 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 at fillstyle\@empty\else color1 Fill \fi
+ Roue3
+ closepath
+ linecolor
+ stroke
+ COURONNE
+ closepath
+ linecolor
+ stroke
+ Roue3
+ closepath
+ linecolor
+ stroke
+ plaquette
+ \ifPst at spirograph@circles Circles \fi
+ grestore
+ \fi
+ \fi
end
}%
- \end at SpecialObj
+ \end at ClosedObj
\ignorespaces}
%
\catcode`\@=\PstAtCode\relax
Modified: trunk/Master/texmf-dist/tex/latex/pst-spirograph/pst-spirograph.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pst-spirograph/pst-spirograph.sty 2020-03-12 20:11:04 UTC (rev 54256)
+++ trunk/Master/texmf-dist/tex/latex/pst-spirograph/pst-spirograph.sty 2020-03-12 20:25:17 UTC (rev 54257)
@@ -4,7 +4,7 @@
%%
%% IMPORTANT NOTICE:
%%
-%% pst-spirograph.sty Copyright (C) 2015
+%% pst-spirograph.sty Copyright (C) 2020-
%% Manuel Luque
%% Herbert Voß <hvoss at 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
More information about the tex-live-commits
mailing list.