summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/dvips/pst-coil
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-01-30 23:05:43 +0000
committerKarl Berry <karl@freefriends.org>2010-01-30 23:05:43 +0000
commitb94e5bfee70bad156b5d2dd12aa38f9f5ea1e2b7 (patch)
tree4e9c3ebd9d9b88746e2986a49b64bf7b5f261e97 /Master/texmf-dist/dvips/pst-coil
parenta6fc090e9454533a71d2cc7a34f7810b124eb8b0 (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/dvips/pst-coil')
-rw-r--r--Master/texmf-dist/dvips/pst-coil/pst-coil.pro29
1 files changed, 27 insertions, 2 deletions
diff --git a/Master/texmf-dist/dvips/pst-coil/pst-coil.pro b/Master/texmf-dist/dvips/pst-coil/pst-coil.pro
index 2e58074b963..2bde2b1f5c2 100644
--- a/Master/texmf-dist/dvips/pst-coil/pst-coil.pro
+++ b/Master/texmf-dist/dvips/pst-coil/pst-coil.pro
@@ -1,6 +1,6 @@
-%!
+%!ps
% PostScript prologue for pst-coil.tex.
-% Version 1.00, 2006/11/05
+% Version 1.01, 2010/01/30
% For distribution, see pstricks.tex.
%
/tx@CoilDict 40 dict def tx@CoilDict begin
@@ -30,6 +30,31 @@
TotalLength 0 ArrowB lineto
pop pop pop pop } def
% DG/SR modification end
+%
+/Sin {
+ /Func ED
+ /PointsPerPeriod ED
+ /ArmB ED
+ /ArmA ED
+ /Amplitude ED /Frequency ED
+ /y1 ED /x1 ED /y0 ED /x0 ED
+ x0 y0 translate y1 y0 sub x1 x0 sub 2 copy Pyth
+ dup /TotalLength ED
+ ArmA sub ArmB sub /SinLength ED
+ Atan rotate
+ 1 0 0 0 ArrowA ArmA 0 lineto
+ /mtrx CM def
+ /dxStep SinLength 360 div def % the default step for x pos
+ /xStep 360 PointsPerPeriod div def % the step for the for loop
+ 1 xStep 360 { % PointsPerPeriod times
+ dup dxStep mul ArmA add exch % x pos and value for the func
+ Frequency mul Func Amplitude mul lineto
+ } for
+ mtrx setmatrix TotalLength ArmB sub 0 lineto CP
+ TotalLength 0 ArrowB lineto
+ pop pop pop pop
+} def
+%
/AltCoil {
/Inc ED
dup sin /AspectSin ED