summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.tex
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/doc/generic/pst-coil/pst-coil-doc.tex
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/doc/generic/pst-coil/pst-coil-doc.tex')
-rw-r--r--Master/texmf-dist/doc/generic/pst-coil/pst-coil-doc.tex309
1 files changed, 175 insertions, 134 deletions
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 d32006bf87e..59385bf9df2 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,60 +1,34 @@
-\documentclass[english]{article}
-%
-\usepackage[T1]{fontenc}
-\usepackage[latin9]{inputenc}
+%% $Id: pst-plot-doc.tex 264 2010-01-22 13:00:07Z herbert $
+\documentclass[11pt,english,BCOR10mm,DIV12,bibliography=totoc,parskip=false,smallheadings
+ headexclude,footexclude,oneside,dvipsnames,svgnames]{pst-doc}
\listfiles
-\usepackage[scaled]{luximono}
-\usepackage{lmodern}
-\usepackage{xspace}
-\usepackage[bottom]{footmisc}
-\usepackage{tabularx}
-\usepackage{longtable}
-\usepackage[NewCommands,NewParameters]{ragged2e}
-\usepackage[dvipsnames]{pstricks}
-\usepackage{pst-node}% muss _nach_ pst-grad geladen werden
-\usepackage{pst-coil}
-\definecolor{hellgelb}{rgb}{1,1,0.8}
-%
-\def\PST{{\texttt{PSTricks}}\xspace}
-\def\PDF{{\texttt{PDF}}\xspace}
-\def\pst{{\texttt{pstricks}}\xspace}
-\def\PS{PostScript\xspace}
-\newcommand*\CMD[1]{{\UrlFont\texttt{\textbackslash #1}}}
-%
-\def\tIndex#1{\index{#1@{\UrlFont\texttt{#1}}}}
-\def\cIndex#1{\index{#1@\CMD{#1}}}
-\def\pIndex#1{\index{Parameter@\textbf{Parameter}!{\UrlFont\texttt{#1}}}}
-\def\ppIndex#1{\index{Parameter@\textbf{Parameter}!{#1}}}
-\def\sIndex#1{\index{Syntax@\textbf{Syntax}!\CMD{#1}}}
-\def\csIndex#1{\sIndex{#1}\cIndex{#1}}
-\def\PIndex#1{\index{Paket@\textbf{Paket}!\texttt{#1}}}
-\def\mIndex#1{\texttt{#1}\tIndex{#1}\pIndex{#1}}
-%
-\pretolerance=500
-\tolerance=1000
-\hbadness=3000
-\vbadness=3000
-\hyphenpenalty=400
-
-\usepackage{showexpl}% not a real PSTricks package
-\usepackage{babel}
-\usepackage{makeidx}
-\makeindex
-\usepackage[dvips,colorlinks,linktocpage]{hyperref} % PDF-support
-%
-\renewcommand{\ttdefault}{ul9}% Luxi Mono
-\lstset{keywordstyle=\small\fontfamily{ul9}\bfseries}
-\lstset{language=PSTricks,moredelim=**[is][\bf\color{blue}]{§}{§}}% oder andere Begrenzer
+
+\usepackage[utf8]{inputenc}
+\usepackage{pst-coil,pst-node}
+\SpecialCoor
+\let\pstFV\fileversion
+\let\belowcaptionskip\abovecaptionskip
%
+\def\bgImage{%
+\begin{pspicture}(6,2)
+ \cnode*(0,1){4pt}{A}\cnode*(6,1){4pt}{B}
+ \pcsin[linecolor=red,amplitude=0.75,frequency=20,function=dup 0.1 mul sin exch cos add](A)(B)
+\end{pspicture}
+}
+\lstset{explpreset={pos=l,width=-99pt,overhang=0pt,hsep=\columnsep,vsep=\bigskipamount,rframe={}},
+ escapechar=?}
+\def\textat{\char064}%
\begin{document}
-%
-\title{\texttt{pst-coil}:\newline Coils, springs and zigzag lines}
-\author{Herbert Voß\thanks{Thanks to Eugene Ressler for translating this documentation!}}
+\title{\texttt{pst-coil}\\Special node connections \\\small v.\pstFV}
+\docauthor{Herbert Vo\ss}
+\author{Timothy Van Zandt\\Herbert Vo\ss}
+\date{\today}
+
\maketitle
\begin{abstract}
-\index{Paket@\textbf{Paket}!\texttt{pst-coil}}Coils, springs and zigzag curves
+Coils, springs and zigzag curves
do not really count to the ordinary when creating graphics. They are of some
importance though when dealing with the creation of coilish connections. They
can also be used for node connections which will be shown
@@ -64,8 +38,14 @@ The parameters especially for the \verb+coil+ variants are only easy to
understand when keeping in mind that three dimensional helixes are dealt with,
which are only projected onto the two dimensional paper plane. This will be
elaborated on at the corresponding places.
+
+\vfill
+\noindent
+Thanks to:
+Denis Girou, Marco Daniel
\end{abstract}
+\clearpage
\tableofcontents
\clearpage
@@ -73,7 +53,7 @@ elaborated on at the corresponding places.
\section{Parameters}\label{sec:pstcoil:parameter}
% ---------------------------------------------------------------------------------------
Table~\ref{tab:pst-coil:parameter} shows a compilation of the special parameters
-valid for \verb+pst-coil+.
+valid for \LPack{pst-coil}.
\begin{longtable}{@{}>{\ttfamily}l>{\ttfamily}l>{\ttfamily}l@{}}
\caption{Compilation of all parameters for \texttt{pst-coil}}\label{tab:pst-coil:parameter}\\[-5pt]
@@ -81,21 +61,23 @@ valid for \verb+pst-coil+.
\endfirsthead
\textrm{name} & \textrm{value} & \textrm{default}\\\hline
\endhead
-coilwidth & <value[unit]> & 1cm\\
-coilheight & <value> & 1\\
-coilarm & <value[unit]> & 0.5cm\\
-coilarmA & <value[unit]> & 0.5cm\\
-coilarmB & <value[unit]> & 0.5cm\\
-coilaspect & <angle> & 45\\
-coilinc & <angle> & 45\\
+\Lkeyword{coilwidth} & <value[unit]> & 1cm\\
+\Lkeyword{coilheight} & <value> & 1\\
+\Lkeyword{coilarm} & <value[unit]> & 0.5cm\\
+\Lkeyword{coilarmA} & <value[unit]> & 0.5cm\\
+\Lkeyword{coilarmB} & <value[unit]> & 0.5cm\\
+\Lkeyword{coilaspect} & <angle> & 45\\
+\Lkeyword{coilinc} & <angle> & 45\\
+\Lkeyword{frequency} & <value> & 1\\
+\Lkeyword{amplitude} & <value> & 1\\
+\Lkeyword{function} & <PS code> & sin\\
+\Lkeyword{ppoints} & <dots per period> & 360\\
\end{longtable}
-\tIndex{coilwidth}\tIndex{coilheight}\tIndex{coilarm}\tIndex{coilaspect}\tIndex{coilinc}%
-\pIndex{coilwidth}\pIndex{coilheight}\pIndex{coilarm}\pIndex{coilaspect}\pIndex{coilinc}%
% ---------------------------------------------------------------------------------------
\subsection{\texttt{coilwidth}}\label{subsec:pstcoil:coilwidth}
% ---------------------------------------------------------------------------------------
-\tIndex{coilwidth}\verb+coilwidth+ denotes the diameter\index{diameter} of the
+\Lkeyword{coilwidth} denotes the diameter\index{diameter} of the
coil resp. the height of a zigzag line\index{zigzag line}\index{coil}. The
diameter corresponds to the height with a perpendicular parallel projection
transverse to the length.
@@ -167,7 +149,7 @@ transverse to the length.
% ---------------------------------------------------------------------------------------
\subsection{\texttt{coilheight}}\label{subsec:pstcoil:coilheight}
% ---------------------------------------------------------------------------------------
-\tIndex{coilheight}\verb+coilheight+ is in contrast to \verb+coilwidth+ no
+\Lkeyword{coilheight} is in contrast to \Lkeyword{coilwidth} no
length but only a factor, whereat the distance between two
windings\index{winding} resp. jags is composed as follows:
\begin{equation}dx = coilheight\cdot coilwidth \end{equation}
@@ -175,7 +157,7 @@ windings\index{winding} resp. jags is composed as follows:
As can be seen in the following example, not the same physical distance is
yielded. This is caused by the internal three dimensional
representation\index{three dimensional representation} of the coil; it is not
-seen under an angle of $90$° but $45$°. (section~\ref{subsec:pstcoil:coilaspect})
+seen under an angle of $90^\circ$ but $45^\circ$. (Section~\ref{subsec:pstcoil:coilaspect})
\medskip\noindent
\begin{LTXexample}[width=5cm]
@@ -227,13 +209,13 @@ seen under an angle of $90$° but $45$°. (section~\ref{subsec:pstcoil:coilaspect}
% ---------------------------------------------------------------------------------------
\subsection{\texttt{coilarm}, \texttt{coilarmA} and \texttt{coilarmB}}\label{subsec:pstcoil:coilarm}
% ---------------------------------------------------------------------------------------
-\tIndex{coilarm}\tIndex{coilarmA}\tIndex{coilarmB}\verb+coilarm+ denotes the
+\Lkeyword{coilarm}, \Lkeyword{coilarmA}, and \Lkeyword{coilarmB} denotes the
part of a straight line made left and right. Negative values are possible, but
do not make a lot of sense as a rule. As can be gathered from the example, the
coil is lenghtened by a negative value in this case, so that the part of a
straight line is led back to the specified starting point resp. endpoint and
consequently has a negative ``direction''{}. This parameter is not available for
-\CMD{psCoil}.
+\Lcs{psCoil}.
\medskip\noindent
\begin{LTXexample}[width=4cm]
@@ -262,11 +244,11 @@ consequently has a negative ``direction''{}. This parameter is not available for
% ---------------------------------------------------------------------------------------
\subsection{\texttt{coilaspect}}\label{subsec:pstcoil:coilaspect}
% ---------------------------------------------------------------------------------------
-\tIndex{coilaspect}In section~\ref{subsec:pstcoil:coilheight} the three
+In Section~\ref{subsec:pstcoil:coilheight} the three
dimensional representation of the coil has been pointed out already. If it was
regarded right-angled to its axis, the windings would not be recognizable. With
-\verb+coilaspect+ this ``perspective''{} can be influenced, which is only
-possible for the ``coil''{} variants of course. \verb+coilaspect=0+ yields a
+\Lkeyword{coilaspect} this ``perspective''{} can be influenced, which is only
+possible for the ``coil''{} variants of course. \Lkeyword{coilaspect}=0 yields a
sine curve.
\medskip\noindent
@@ -284,14 +266,14 @@ sine curve.
% ---------------------------------------------------------------------------------------
\subsection{\texttt{coilinc}}\label{subsec:pstcoil:coilinc}
% ---------------------------------------------------------------------------------------
-\tIndex{coilinc}The curve is drawn with the \verb+lineto+ procedure of \PS,
-whereat \verb+coilinc+ specifies the rotation angle in the angular measure at
+The curve is drawn with the \Lps{lineto} procedure of \PS,
+whereat \Lkeyword{coilinc} specifies the rotation angle in the angular measure at
which the next point is calculated. It has already been mentioned that the
calculation is done as a three dimensional coil and is projected onto the two
dimensional plane only in the end.
-\verb+coilinc+ does also not make sense for zigzag lines, so that this parameter
-again only is available for the \verb+coil+ variant. Large angles result in a
+\Lkeyword{coilinc} does also not make sense for zigzag lines, so that this parameter
+again only is available for the \Lkeyword{coil} variant. Large angles result in a
polygon line, small angles in harmonic progressions with increased calculation
effort.
@@ -309,34 +291,86 @@ effort.
% ---------------------------------------------------------------------------------------
+\subsection{\nxLkeyword{ppoints}}
+% ---------------------------------------------------------------------------------------
+By default a line or node connection divides the total length into 360 segments.
+This should be increased for long distances or great frequencies.
+
+\medskip\noindent
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(5,2)
+\pssin[ppoints=2000,
+ frequency=30](0,1)(5,1)
+\end{pspicture}
+\end{LTXexample}
+
+
+% ---------------------------------------------------------------------------------------
+\subsection{\nxLkeyword{frequency}}
+% ---------------------------------------------------------------------------------------
+The line from A to B is plotted as one period, which is the same as the relative
+\Lkeyword{frequency}=1. A setting of \Lkeyword{frequency}=3.3 plots the function 3.3 times
+for the given length.
+
+\medskip\noindent
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(5,2)
+\pssin[linecolor=blue](0,1)(5,1)
+\pssin[frequency=3.3](0,1)(5,1)
+\end{pspicture}
+\end{LTXexample}
+
+% ---------------------------------------------------------------------------------------
+\subsection{\nxLkeyword{amplitude}}
+% ---------------------------------------------------------------------------------------
+As usual the \Lkeyword{amplitude} is the maximum of the plotted curve and preset to
+\Lcs{psyunit}, eg 1cm.
+
+\medskip\noindent
+\begin{LTXexample}[width=5.5cm]
+\begin{pspicture}(5,2)
+\pssin[linecolor=blue](0,1)(5,1)
+\pssin[amplitude=0.5,
+ linecolor=red](0,1)(5,1)
+\end{pspicture}
+\end{LTXexample}
+
+% ---------------------------------------------------------------------------------------
+\subsection{\nxLkeyword{function}}
+% ---------------------------------------------------------------------------------------
+By default the curve is plotted as $y=sin(x)$, The optional argument \Lkeyword{function} allows
+to define any other object in \PS\ notation. The value of the variable $x$ is already on the stack!
+The following example plots the defualt curve and one with the function $y=cos(x\cdot\sin(x))$:
+
+\medskip\noindent
+\begin{LTXexample}[pos=t]
+\begin{pspicture}(\linewidth,2)
+\pssin[linecolor=blue](0,1)(\linewidth,1)
+\pssin[function=dup sin mul cos,
+ linecolor=red,ppoints=10000,
+ frequency=6](0,1)(\linewidth,1)
+\end{pspicture}
+\end{LTXexample}
+
+% ---------------------------------------------------------------------------------------
\section{Makros}\label{sec:pstcoil:makros}
% ---------------------------------------------------------------------------------------
-\verb+pst-coil+ defines three macros, which make the creation of coil or zigzag
+\LPack{pst-coil} defines three macros, which make the creation of coil or zigzag
shaped lines possible.\index{zigzag line}
-\begin{verbatim}
-\pscoil[<parameters>](<x1,y1>)
-\pscoil[<parameters>](<x0,y0>)(<x1,y1>)
-\pscoil[<parameters>]{<arrows>}(<x0,y0>)(<x1,y1>)
-\pscoil*[<parameters>](<x1,y1>)
-\pscoil*[<parameters>](<x0,y0>)(<x1,y1>)
-\pscoil*[<parameters>]{<arrows>}(<x0,y0>)(<x1,y1>)
-\psCoil[<parameters>]{<angle1>}{<angle2>}
-\psCoil*[<parameters>]{<angle1>}{<angle2>}
-\pszigzag[<parameters>](<x1,y1>)
-\pszigzag[<parameters>](<x0,y0>)(<x1,y1>)
-\pszigzag[<parameters>]{<arrows>}(<x0,y0>)(<x1,y1>)
-\pszigzag*[<parameters>](<x1,y1>)
-\pszigzag*[<parameters>](<x0,y0>)(<x1,y1>)
-\pszigzag*[<parameters>]{<arrows>}(<x0,y0>)(<x1,y1>)
-\end{verbatim}
-\csIndex{pscoil}\csIndex{psCoil}\csIndex{pszigzag}
+
+\begin{BDef}
+\LcsStar{pscoil}\OptArgs\OptArg*{\Largb{arrows}}\OptArg{\Largr{\coord0}}\Largr{\coord1}\\
+\LcsStar{psCoil}\OptArgs\Largb{angle1}\Largb{angle2}\\
+\LcsStar{pszigzag}\OptArgs\OptArg*{\Largb{arrows}}\OptArg{\Largr{\coord0}}\Largr{\coord1}\\
+\LcsStar{pssin}\OptArgs\OptArg*{\Largb{arrows}}\OptArg{\Largr{\coord0}}\Largr{\coord1}
+\end{BDef}
\begin{itemize}
\item If only one coordinate pair is specified, the first point is automatically
set to the origin of ordinates $(0,0)$.
\item Arrows may be set with the own parameter or with the optional parameter
- with \verb+arrows=<arrows>+.
-\item For \verb+psCoil+ the coils are principally drawn without ``arms''{}.
+ with \Lkeyword{arrows}\texttt{=<\ldots-\ldots>}.
+\item For \Lcs{psCoil} the coils are principally drawn without ``arms''{}.
\end{itemize}
@@ -346,10 +380,10 @@ parameters, but will not be described further in the following.
% ---------------------------------------------------------------------------------------
-\subsection{\CMD{pscoil}}\label{subsec:pstcoil:pscoil}
+\subsection{\nxLcs{pscoil}}\label{subsec:pstcoil:pscoil}
% ---------------------------------------------------------------------------------------
-Since \verb+pscoil+ is nothing but a polygon line, also all parameters are
-available which aplly for lines.
+Since \Lcs{pscoil} is nothing else than a polygon line, also all parameters are
+available which apply for lines.
\medskip\noindent
\begin{LTXexample}[width=4cm]
@@ -361,12 +395,12 @@ available which aplly for lines.
\end{LTXexample}
% ---------------------------------------------------------------------------------------
-\subsection{\CMD{psCoil}}\label{subsec:pstcoil:psCoil}
+\subsection{\nxLcs{psCoil}}\label{subsec:pstcoil:psCoil}
% ---------------------------------------------------------------------------------------
-\verb+\psCoil+ draws starting at the current point to the angle $\alpha$ an
+\Lcs{psCoil} draws starting at the current point to the angle $\alpha$ an
invisible line and then from $\alpha$ to $\beta$ a helix.
-\verb+\rput+\cIndex{rput} has to be used if they are to be placed at a
-particular position. The advantage is that with \verb+psCoil+ the number of
+\Lcs{rput} has to be used if they are to be placed at a
+particular position. The advantage is that with \Lcs{psCoil} the number of
helixes to draw can be specified exactly.
\medskip\noindent
@@ -381,11 +415,11 @@ helixes to draw can be specified exactly.
% ---------------------------------------------------------------------------------------
-\subsection{\CMD{pszigzag}}\label{subsec:pstcoil:zigzag}
+\subsection{\nxLcs{pszigzag}}\label{subsec:pstcoil:zigzag}
% ---------------------------------------------------------------------------------------
-\cIndex{pszigzag}This macro represents the two dimensional variant and is
-correspondly easy to use. Especially the \verb+linearc+ option can bring good
-results for \verb+\pszigzag+. The specification of the ``arm length''{} is not
+This macro represents the two dimensional variant and is
+correspondly easy to use. Especially the \Lkeyword{linearc} option can bring good
+results for \Lcs{pszigzag}. The specification of the ``arm length''{} is not
absolute here, since the line is principally ended in the geometrical middle and
then led to the specified arm length.
@@ -402,48 +436,55 @@ then led to the specified arm length.
% ---------------------------------------------------------------------------------------
\section{Node connections}\label{sec:pstcoil:knotenverbindungen}
% ---------------------------------------------------------------------------------------
-Prerequisite for this macro is that \verb+pst-node+\tIndex{pst-node}
-is loaded, then the following node connections are
-available:
-%
-\begin{verbatim}
-\nccoil[<parameters>]{<nodeA>}{<nodeB>}
-\nccoil[<parameters>]{<arrows>}{<nodeA>}{<nodeB>}
-\nccoil*[<parameters>]{<nodeA>}{<nodeB>}
-\nccoil*[<parameters>]{<arrows>}{<nodeA>}{<nodeB>}
-\nczigzag[<parameters>]{<nodeA>}{<nodeB>}
-\nczigzag[<parameters>]{<arrows>}{<nodeA>}{<nodeB>}
-\nczigzag*[<parameters>]{<nodeA>}{<nodeB>}
-\nczigzag*[<parameters>]{<arrows>}{<nodeA>}{<nodeB>}
-\pccoil[<parameters>](<nodeA>)(<nodeB>)
-\pccoil[<parameters>]{<arrows>}(<nodeA>)(<nodeB>)
-\pccoil*[<parameters>](<nodeA>)(<nodeB>)
-\pccoil*[<parameters>]{<arrows>}(<nodeA>)(<nodeB>)
-\pczigzag[<parameters>](<nodeA>)(<nodeB>)
-\pczigzag[<parameters>]{<arrows>}(<nodeA>)(<nodeB>)
-\pczigzag*[<parameters>](<nodeA>)(<nodeB>)
-\pczigzag*[<parameters>]{<arrows>}(<nodeA>)(<nodeB>)
-\end{verbatim}
-
-These connections behave completely analogue to those dealt with the
-package \verb+pst-node+ so that
-no further explanations are needed here.
+Prerequisite for this macro is that \LPack{pst-node}
+is loaded, then the following node connections are available:
+
+\bigskip
+\begin{BDef}
+\LcsStar{nccoil}\OptArgs\OptArg*{\Largb{arrows}}\Largb{nodeA}\Largb{nodeB}\\
+\LcsStar{nczigzag}\OptArgs\OptArg*{\Largb{arrows}}\Largb{nodeA}\Largb{nodeB}\\
+\LcsStar{pccoil}\OptArgs\OptArg*{\Largb{arrows}}\Largb{nodeA}\Largb{nodeB}\\
+\LcsStar{pczigzag}\OptArgs\OptArg*{\Largb{arrows}}\Largb{nodeA}\Largb{nodeB}\\
+\LcsStar{ncsin}\OptArgs\OptArg*{\Largb{arrows}}\Largb{nodeA}\Largb{nodeB}\\
+\LcsStar{pcsin}\OptArgs\OptArg*{\Largb{arrows}}\Largb{nodeA}\Largb{nodeB}
+\end{BDef}
\medskip\noindent
\begin{LTXexample}[width=4cm]
\begin{pspicture}(4,3)
-\cnode(0.5,0.5){0.5}{A}
-\cnode[fillstyle=solid,fillcolor=lightgray](3.5,2.5){0.5}{B}
-\nccoil[coilwidth=0.4,coilaspect=35,coilheight=0.5]{<->}{A}{B}
+\pnode(0.5,0.5){A}
+\pnode(3.5,2.5){B}
+\ncsin{<->}{A}{B}
+\end{pspicture}
+\end{LTXexample}
+
+
+\medskip\noindent
+\begin{LTXexample}[width=5cm]
+\begin{pspicture}(5,2)
+\pnode(0,1){A}
+\pnode(5,1){B}
+\ncsin[amplitude=0.5,frequency=30,coilarm=5pt,
+ function=dup 0.1 mul sin exch sin add]{A}{B}
\end{pspicture}
\end{LTXexample}
+Th other connections behave completely analogue to those dealt with the
+package \LPack{pst-node} so that
+no further explanations are needed here.
+
+\clearpage
+
+\section{List of all optional arguments for \texttt{pst-coil}}
+
+\xkvview{family=pst-coil,columns={key,type,default}}
+
\nocite{*}
\bgroup
-\raggedright
+\RaggedRight
\bibliographystyle{plain}
-\bibliography{\jobname}
+\bibliography{pst-coil-doc}
\egroup
\printindex