summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-08-14 19:47:44 +0000
committerKarl Berry <karl@freefriends.org>2024-08-14 19:47:44 +0000
commit9e3210e185463abc60c9793cb8af3ce02ba22655 (patch)
treed0f254269b5c8d061e42bc78e0a4a787f1351ca6 /Master
parent907ddba6a6b87092805ecbd6698557fa96f927c8 (diff)
pst-coil (14aug24)
git-svn-id: svn://tug.org/texlive/trunk@72030 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/generic/pst-coil/Changes1
-rw-r--r--Master/texmf-dist/doc/generic/pst-coil/README2
-rw-r--r--Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.bib2
-rw-r--r--Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.pdfbin295379 -> 3748115 bytes
-rw-r--r--Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.tex159
-rw-r--r--Master/texmf-dist/dvips/pst-coil/pst-coil.pro21
-rw-r--r--Master/texmf-dist/tex/generic/pst-coil/pst-coil.tex63
-rw-r--r--Master/texmf-dist/tex/latex/pst-coil/pst-coil.sty2
8 files changed, 226 insertions, 24 deletions
diff --git a/Master/texmf-dist/doc/generic/pst-coil/Changes b/Master/texmf-dist/doc/generic/pst-coil/Changes
index d9028ebf314..c9fa1b1daeb 100644
--- a/Master/texmf-dist/doc/generic/pst-coil/Changes
+++ b/Master/texmf-dist/doc/generic/pst-coil/Changes
@@ -2,6 +2,7 @@ pst-coil.sty --------
2010-02-01 message for loading the pro file
pst-coil.tex --------
+v. 1.08 2024-08-13 - added alternative macro \psAltCoil
v. 1.07 2015-05-13 - modified psSin
v. 1.06 2011-09-18 - fix bug with \pszigzag
v. 1.05 2011-07-12 - added optional argument bow for circular
diff --git a/Master/texmf-dist/doc/generic/pst-coil/README b/Master/texmf-dist/doc/generic/pst-coil/README
index 8f8b07cfa0e..0484bb50781 100644
--- a/Master/texmf-dist/doc/generic/pst-coil/README
+++ b/Master/texmf-dist/doc/generic/pst-coil/README
@@ -9,4 +9,4 @@ pst-coil-doc.bib - The documentation, bibfile
--
-Herbert Voss 2006-11-05
+hoss@tug.org 2024-08-13
diff --git a/Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.bib b/Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.bib
index b29fe53b654..1281ed1318e 100644
--- a/Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.bib
+++ b/Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.bib
@@ -60,7 +60,7 @@
author = {Michel Goosens and Frank Mittelbach and Sebastian Rahtz and Denis Roegel and Herbert Vo{\ss}},
title = {The {\LaTeX} {G}raphics {C}ompanion},
publisher = {{Addison-Wesley Publishing Company}},
- edition = second,
+ edition = 2,
year = {2007},
address = {Reading, Mass.}
}
diff --git a/Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.pdf b/Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.pdf
index 26f0e655ba3..13ae4342bbd 100644
--- a/Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.pdf
+++ b/Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.tex b/Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.tex
index 201f8298c06..ebcd0aa0519 100644
--- a/Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.tex
+++ b/Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.tex
@@ -1,9 +1,13 @@
-%% $Id: pst-coil-doc.tex 539 2011-07-12 08:22:33Z herbert $
-\documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings
- headexclude,footexclude,oneside,dvipsnames,svgnames]{pst-doc}
+%% $Id: pst-coil-doc.tex 930 2024-08-13 18:19:44Z herbert $
+\errorcontextlines=100
+%\RequirePackage{pdfmanagement-testphase}
+\DocumentMetadata{}
+\documentclass[11pt,english,BCOR=10mm,DIV=12,bibliography=totoc,parskip=false,headings=small,
+ headinclude=false,footinclude=false,twoside,english]{pst-doc}
\listfiles
-\usepackage[utf8]{inputenc}
+\addbibresource{\jobname.bib}
+\usepackage{csquotes,animate}
\usepackage{pst-plot,pst-node,pst-coil}
\SpecialCoor
\let\pstFV\fileversion
@@ -25,7 +29,7 @@
\author{Timothy Van Zandt\\Herbert Vo\ss\\Michael Sharpe}
\date{\today}
-\maketitle
+\settitle
\begin{abstract}
Coils, springs and zigzag curves
@@ -42,7 +46,7 @@ elaborated on at the corresponding places.
\vfill
\noindent
Thanks to:
-Marco Daniel, Denis Girou, Uwe Siart.
+Marco Daniel, Denis Girou, Manuel Luque, Uwe Siart.
\end{abstract}
\clearpage
@@ -561,6 +565,146 @@ Th other connections behave completely analogue to those dealt with the
package \LPack{pst-node} so that
no further explanations are needed here.
+
+\section{Alternative macro}
+
+The macro \Lcs{psAltCoil} depends on the code from Manuel Luque. It uses a different way
+to draw coils with a kind of perspective view. The possible optional parameter are:
+
+\begin{itemize}
+ \item \Lkeyword{N}\textsf{=10} : number of coils
+ \item \Lkeyword{l0}\texttt{=5} : initial length in cm
+ \item \Lkeyword{R}\texttt{=0.5} : initial radius in cm
+ \item \Lkeyword{arm}\texttt{=0} : arm length in cm
+ \item \Lkeyword{alpha}\texttt{=15} : projection angle
+ \item \Lkeyword{nS}\texttt{=25} : number of steps per coil
+\end{itemize}
+
+
+\begin{LTXexample}[pos=t]
+\begin{pspicture}[showgrid,arrowsize=0.2,arrowinset=0.1](-2,-1.4)(14,2)
+\psAltCoil[N=20,l0=10,alpha=20,arm=0.5,linewidth=0.05]{*-*}(0,0)(11,0)
+\psline[linewidth=0.5\pslinewidth](0.5,0)(0.5,1.25)
+\psline[linewidth=0.5\pslinewidth](10.5,0)(10.5,1.25)
+\psline{<->}(0.5,1)(10.5,1)
+\uput[u](5.5,1){l0=10 cm}
+\psline[linewidth=0.5\pslinewidth](0,0)(0,1.25)
+\psline{>-}(-0.22,1)(0.5,1)
+\uput[u](0.25,1){dl}
+\psline[linewidth=0.5\pslinewidth](11,0)(11,1.25)
+\psline{-<}(10.5,1)(11.25,1)
+\uput[u](10.75,1){dl}
+\end{pspicture}
+\end{LTXexample}
+
+
+\begin{LTXexample}[pos=t]
+\begin{pspicture}[showgrid,arrowsize=0.2,arrowinset=0.1](-2,-1.4)(14,2)
+\psAltCoil[N=20,l0=10,R=0.5,alpha=20,arm=0.5,linewidth=0.05]{*-*}(-2,0)(14,0)
+\psline[linewidth=0.5\pslinewidth](-1.5,0)(-1.5,1.25)
+\psline[linewidth=0.5\pslinewidth](13.5,0)(13.5,1.25)
+\psline{<->}(-1.5,1)(13.5,1)
+\uput[u](5.5,1){L=15 cm}
+\psline[linewidth=0.5\pslinewidth](-2,0)(-2,1.25)
+\psline{>-}(-2.25,1)(-1.5,1)
+\uput[u](-1.75,1){dl}
+\psline[linewidth=0.5\pslinewidth](14,0)(14,1.25)
+\psline{-<}(13.5,1)(14.25,1)
+\uput[u](13.75,1){dl}
+\end{pspicture}
+\end{LTXexample}
+
+
+
+The next animation needs Adobe Acrobat to view:
+
+\begin{minipage}{4cm}
+\psset{unit=0.5}
+\def\nFrames{44}% 44 images
+\def\calc{
+ /Z0 -16 def
+ /OMEGA 20 0.1 div sqrt def % pulsation des oscillations
+ /Period TwoPi OMEGA div def % 0.4442883
+ /ti \rt\space def
+ /ZR Z0 -5 OMEGA RadtoDeg ti mul cos mul add def }
+\newcommand\bille{%
+ \psset{linewidth=0.02,fillstyle=solid,fillcolor=yellow!50}
+ \pscircle*[linecolor=yellow](0,0){0.5}
+ \psarc[linecolor=black](0,0){0.425}{-110}{90}
+ \psarc[linecolor=black](0,0){0.3}{-90}{70}
+ \psarc[linecolor=black](0,0){0.2}{-70}{60}}
+
+\begin{animateinline}[controls,loop,%
+ begin={\begin{pspicture}(-2,1)(2,-23)},
+ end={\end{pspicture}}]{5}% 5 images/s
+\multiframe{\nFrames}{rt=0+0.01}{%
+ \psframe*(-2,1)(2,-23)
+ \psframe[fillstyle=hlines,linestyle=none,hatchcolor=white](-1,0)(1,0.2)
+ \psline[linecolor=white](-1,0)(1,0)
+ \psdot[linecolor=white](0,0)
+ \psgrid[subgriddiv=0,gridcolor=white,griddots=10,gridlabels=0pt]
+ \psAltCoil[arm=0.5,alpha=25,N=20,l0=10,linecolor=white,linewidth=0.05](0,0)(! 0 \calc ZR)
+ \rput(! 0 \calc ZR 0.5 sub){\pscircle*[linecolor=yellow](0,0){0.5}}
+}
+\end{animateinline}
+\end{minipage}%
+\begin{minipage}{\dimexpr\linewidth-4cm}
+\begin{verbatim}
+\psset{unit=0.75}
+\def\nFrames{44}% 44 images
+\def\calc{
+ /Z0 -16 def
+ /OMEGA 20 0.1 div sqrt def
+ /Period TwoPi OMEGA div def % 0.4442883
+ /ti \rt\space def % rt variable from animate
+ /ZR Z0 -5 OMEGA RadtoDeg ti mul cos mul add def }
+\begin{animateinline}[controls,loop,%
+ begin={\begin{pspicture}(-2,1)(2,-23)},
+ end={\end{pspicture}}]{5}% 5 images/s
+\multiframe{\nFrames}{rt=0+0.01}{%
+ \psframe*(-2,1)(2,-23)
+ \psframe[fillstyle=hlines,linestyle=none,
+ hatchcolor=white](-1,0)(1,0.2)
+ \psline[linecolor=white](-1,0)(1,0)
+ \psdot[linecolor=white](0,0)
+ \psgrid[subgriddiv=0,gridcolor=white,griddots=10,gridlabels=0pt]
+ \psAltCoil[arm=0.5,alpha=25,N=20,l0=10,linecolor=white,
+ linewidth=0.05](0,0)(! 0 \calc ZR)
+ \rput(! 0 \calc ZR 0.5 sub){\pscircle*[linecolor=yellow](0,0){0.5}}
+}
+\end{animateinline}
+\end{verbatim}
+\end{minipage}
+
+
+
+\begin{LTXexample}[pos=l]
+\begin{pspicture}[showgrid](0,0)(6,11)
+\psAltCoil[linecolor=blue,N=20,linewidth=0.1,
+ alpha=-20,arm=1,arrowinset=0.1]{<->}(1,2)(5,10)
+\end{pspicture}
+\end{LTXexample}
+
+
+\begin{LTXexample}[pos=l]
+\begin{pspicture}[showgrid](0,0)(4,6)
+\psAltCoil[linecolor=red,N=20](1,5)(3,1)
+\end{pspicture}
+\end{LTXexample}
+
+
+\begin{LTXexample}[pos=t]
+\begin{pspicture}[showgrid](0,-5)(16,5)
+\psAltCoil[linecolor=blue,N=25,R=1,l0=5,arm=0.5,alpha=-20,
+ doubleline=true](0,3)(16,3)
+\psAltCoil[linecolor=red,N=8,alpha=25](0,0)(4,0)
+\psAltCoil[linecolor=black,N=8,alpha=25](16,0)
+\psAltCoil[linecolor=blue,N=15.5,l0=5,arm=0.5,alpha=0](0,-2)(16,-2)
+\end{pspicture}
+\end{LTXexample}
+
+
+
\clearpage
\section{List of all optional arguments for \texttt{pst-coil}}
@@ -570,8 +714,7 @@ no further explanations are needed here.
\nocite{*}
\bgroup
\RaggedRight
-\bibliographystyle{plain}
-\bibliography{pst-coil-doc}
+\printbibliography
\egroup
\printindex
diff --git a/Master/texmf-dist/dvips/pst-coil/pst-coil.pro b/Master/texmf-dist/dvips/pst-coil/pst-coil.pro
index 9513e991946..b5484af58c7 100644
--- a/Master/texmf-dist/dvips/pst-coil/pst-coil.pro
+++ b/Master/texmf-dist/dvips/pst-coil/pst-coil.pro
@@ -41,8 +41,8 @@
/roundValue ED
/relativePeriod ED
/Periods ED
- /y1 ED /x1 ED /y0 ED /x0 ED
- y1 y0 sub x1 x0 sub 2 copy Pyth
+ /y_1 ED /x_1 ED /y_0 ED /x_0 ED
+ y_1 y_0 sub x_1 x_0 sub 2 copy Pyth
dup /TotalLength ED
ArmA sub ArmB sub /SinLength ED
Atan /RotAngle ED
@@ -54,7 +54,7 @@
/dxStep SinLength 360 div def % the default step for x pos
/xStep 360 PointsPerPeriod div def % the step for the for loop
/mtrx CM def
- x0 y0 translate
+ x_0 y_0 translate
RotAngle rotate
1 0 0 0 ArrowA ArmA 0 lineto
1 xStep 360 { % PointsPerPeriod times
@@ -77,7 +77,9 @@
BeginAngle 180 div AspectCos mul add BeginAngle cos
/lineto load stopped { moveto } if
BeginAngle Inc EndAngle { CoilLoop } for
- EndAngle CoilLoop mtrx setmatrix } def
+ EndAngle CoilLoop mtrx setmatrix
+} def
+%
/ZigZag { 15 dict begin
/ArmB ED /ArmA ED
2 div /w ED
@@ -109,7 +111,7 @@
%/psi ang 90 sub theta sub def % angle of B from center if bow>0
/rho HalfLength theta sin div def % radius of circle
bow 0 gt { /direc 1 def /thetaB ang 90 sub theta sub def } % travel B to A in pos drn
- { /direc -1 def /thetaB ang 90 add theta add def } ifelse % travel B to A in neg drn
+ { /direc -1 def /thetaB ang 90 add theta add def } ifelse % travel B to A in neg drn
%thetaB=angle from center to B
rho thetaB 180 add PtoC translate % origin now at center
/h h rho div RadtoDeg def
@@ -123,9 +125,14 @@
/arg thetaB ArmB direc mul add def % argument for 2nd point
% thetaB = direc = bow = HalfLength = theta = rho = arg = h = n =
mark rho thetaB PtoC rho arg PtoC /arg arg h 2 div add def
- n { w 0 gt { rhoo }{ rhoi } ifelse arg PtoC /w w neg def /arg arg h add def } repeat
+ n {
+ w 0 gt { rhoo }{ rhoi } ifelse
+ arg PtoC
+ /w w neg def
+ /arg arg h add def
+ } repeat
rho thetaB theta2 ArmA sub direc mul add PtoC rho thetaB theta2 direc mul add PtoC
- } def
+} def
%
end
% END pst-coil.pro
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 cd15fa05373..0aff59732c5 100644
--- a/Master/texmf-dist/tex/generic/pst-coil/pst-coil.tex
+++ b/Master/texmf-dist/tex/generic/pst-coil/pst-coil.tex
@@ -1,4 +1,4 @@
-%% $Id: pst-coil.tex 578 2011-09-18 17:18:46Z herbert $
+%% $Id: pst-coil.tex 930 2024-08-13 18:19:44Z herbert $
%% BEGIN pst-coil.tex
%%
%% Coils and zigzags with PSTricks
@@ -7,7 +7,7 @@
%%
%%
%% COPYRIGHT 1993, 1994, 1999 by Timothy Van Zandt, tvz@nwu.edu.
-%% 2006-2015 Herbert Voss, hvoss@tug.org
+%% 2006-2024 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
@@ -21,8 +21,8 @@
\ifx\PSTnodeLoaded\endinput \else\input pst-node.tex\fi
\ifx\PSTXKeyLoaded\endinput \else\input pst-xkey \fi
%
-\def\fileversion{1.07}
-\def\filedate{2015/05/13}
+\def\fileversion{1.08}
+\def\filedate{2024/08/13}
%
\edef\TheAtCode{\the\catcode`\@}
\catcode`\@=11
@@ -48,7 +48,15 @@
\let\psk@coilarmB\psk@coilarmA}
\define@key[psset]{pst-coil}{coilaspect}[45]{\pst@getangle{#1}\psk@coilaspect}
\define@key[psset]{pst-coil}{coilinc}[10]{\pst@getangle{#1}\psk@coilinc}
-%
+%%%%%% alternative macro
+\define@key[psset]{pst-coil}{N}[10]{\def\psk@NoOfSpirals{#1 }}
+\define@key[psset]{pst-coil}{R}[1]{\def\psk@InitialWidth{#1 }}% in cm
+\define@key[psset]{pst-coil}{l0}[10]{\def\psk@InitialLength{#1 }}
+\define@key[psset]{pst-coil}{alpha}[15]{\def\psk@coil@Alpha{#1 }}
+\define@key[psset]{pst-coil}{arm}[0]{\def\psk@coil@arm{#1 }}
+\define@key[psset]{pst-coil}{nS}[25]{\def\psk@coil@NoOfPointsPerCoil{#1 }}
+\psset[pst-coil]{N=10,R=0.5,alpha=15,arm=0,l0=5,nS=25}
+
\psset[pst-coil]{coilaspect=45,coilarm=.5cm,coilheight=1,coilwidth=1cm,coilinc=10}
%
\def\pscoil{\def\pst@par{}\pst@object{pscoil}}
@@ -198,7 +206,7 @@
{ \psk@function }
\tx@Sin
}%
- \showpointsfalse%
+ \showpointsfalse
\end@OpenObj}
%
\def\ncsin{\pst@object{ncsin}}
@@ -220,6 +228,49 @@
\def\pcsin{\def\pst@par{}\pst@object{pcsin}}
\def\pcsin@i{\pc@object\ncsin@ii}
%
+\def\psAltCoil{\def\pst@par{}\pst@object{psAltCoil}}
+\def\psAltCoil@i{\pst@getarrows\psAltCoil@ii}
+\def\psAltCoil@ii(#1){\@ifnextchar({\psAltCoil@iii{1}(#1)}{\psAltCoil@iii{\z@}(0,0)(#1)}}
+\def\psAltCoil@iii#1(#2)(#3){%
+ \begin@OpenObj
+ \pst@getcoor{#2}\pst@tempa
+ \pst@getcoor{#3}\pst@tempb
+ \addto@pscode{%
+ \pst@tempa \pst@tempb
+ /y1 ED /x1 ED /y0 ED /x0 ED
+ x0 y0 translate
+ y1 y0 sub x1 x0 sub 2 copy Pyth
+ /Longueur ED
+ Atan rotate
+ /NoOfSpirals \psk@NoOfSpirals def % nombre de spires
+ /Alpha \psk@coil@Alpha def
+ /R_0 \psk@InitialWidth \pst@number\psunit mul def
+ /arm \psk@coil@arm \pst@number\psunit mul def
+ /l_0 \psk@InitialLength \pst@number\psunit mul def
+ /nS \psk@coil@NoOfPointsPerCoil def
+ /Pas_0 l_0 NoOfSpirals div def
+ /Pas Longueur 2 arm mul sub NoOfSpirals div def
+ % longueur de l'hélice sur un tour
+ % = sqrt(4*pi^2*R^2+p^2)
+ /Longueur_Helice_pas 39.47842 R_0 dup mul mul Pas_0 dup mul add sqrt def
+ % R=1/(2*pi)*sqrt(L^2-p^2)
+ /Radius 0.1591549 Longueur_Helice_pas dup mul Pas dup mul sub sqrt mul def
+ /xH {Radius 360 t mul cos mul Radius sub} def
+ /yH {Radius 360 t mul sin mul} def
+ /zH {Pas t mul arm add} def
+ /Inc 1 NoOfSpirals nS mul div def % nS(50) points par spires
+ 1 setlinejoin
+ 1 0 0 0 ArrowA arm 0 lineto
+ 0 Inc NoOfSpirals {
+ /t ED
+ zH xH Alpha tan mul sub
+ yH
+ lineto
+ } for
+ Longueur 0
+ ArrowB lineto
+ }%
+ \end@OpenObj}
%
\catcode`\@=\TheAtCode\relax
\endinput
diff --git a/Master/texmf-dist/tex/latex/pst-coil/pst-coil.sty b/Master/texmf-dist/tex/latex/pst-coil/pst-coil.sty
index d5b0311532b..1def1526c09 100644
--- a/Master/texmf-dist/tex/latex/pst-coil/pst-coil.sty
+++ b/Master/texmf-dist/tex/latex/pst-coil/pst-coil.sty
@@ -1,4 +1,4 @@
-%% $Id: pst-coil.sty 539 2011-07-12 08:22:33Z herbert $
+%% $Id: pst-coil.sty 930 2024-08-13 18:19:44Z herbert $
\RequirePackage{pstricks}
\ProvidesPackage{pst-coil}[2010/02/01 package wrapper for
pst-coil.tex (hv)]