summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/dvips
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-03-12 20:25:17 +0000
committerKarl Berry <karl@freefriends.org>2020-03-12 20:25:17 +0000
commit6b1bdd702a6038b08d5165743cd556cccba34777 (patch)
tree2e247aa68e5299641e6528085c9a1520da0fe30b /Master/texmf-dist/dvips
parente80aa3da60a566208de46fe70a6c8800ab0af7fc (diff)
pst-spirograph (12mar20)
git-svn-id: svn://tug.org/texlive/trunk@54257 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/dvips')
-rw-r--r--Master/texmf-dist/dvips/pst-spirograph/pst-spirograph.pro80
1 files changed, 78 insertions, 2 deletions
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