summaryrefslogtreecommitdiff
path: root/obsolete/macros/latex209/contrib/curves
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /obsolete/macros/latex209/contrib/curves
Initial commit
Diffstat (limited to 'obsolete/macros/latex209/contrib/curves')
-rw-r--r--obsolete/macros/latex209/contrib/curves/curves.sty522
-rw-r--r--obsolete/macros/latex209/contrib/curves/curves.tex821
-rw-r--r--obsolete/macros/latex209/contrib/curves/curvesls.sty511
3 files changed, 1854 insertions, 0 deletions
diff --git a/obsolete/macros/latex209/contrib/curves/curves.sty b/obsolete/macros/latex209/contrib/curves/curves.sty
new file mode 100644
index 0000000000..81c4169eb0
--- /dev/null
+++ b/obsolete/macros/latex209/contrib/curves/curves.sty
@@ -0,0 +1,522 @@
+% curves.sty version 1.42 for LaTeX 2.09, SLiTeX, and LaTeX2e.
+% I.L. Maclaine-cross, The University of New South Wales.
+% Internet: i.maclaine-cross@unsw.edu.au
+\typeout{Document Style Option `curves' <12 August 2000>}
+% Draws curves in LaTeX picture environment using parabolas between points
+% with continuous slope at points. Equivalent to technical pens with
+% compasses and French curves.
+% A Command Summary is at the end of this file.
+%
+% curvesls.sty is a faster equivalent requiring less memory which uses
+% straight line drawing \specials like emTeX's.
+
+% Make `;' appear like a letter so control sequences can use it and they
+% will not be accidently used by other macro packages.
+\catcode`\;=11
+
+\newcount\;sc % number of symbols on Bezier segment
+\newcount\;scp
+\newcount\;t
+\newcount\;cc % coordinate count
+\newcount\;cnd % actual point count to next dot
+\newcount\;mcnd % maximum point count to next dot
+\newcount\;np
+\newcount\;overhang
+\newcount\;pns
+\newcount\;psc % maximum dot spacing on line in sp.
+\newcount\;pbs
+\newcount\;rc
+\newcount\;rtc
+\newcount\;tc
+\let\;tca=\@tempcnta
+\let\;tcb=\@tempcntb
+
+\newdimen\csdiameter
+\newdimen\curvelength
+\newdimen\overhang \overhang\z@
+\newdimen\;dx
+\newdimen\;ddx
+\newdimen\;dy
+\newdimen\;ddy
+\newdimen\;pl \;pl\z@
+\newdimen\;ucd
+\newdimen\;y
+\let\;td=\@tempdima
+\let\;ytd=\@tempdimb
+
+\newsavebox{\;csbox}
+\newsavebox{\;pt}
+
+\newif\ifcurvewarn \curvewarntrue % Warn about curve problems
+\newif\if;ccn % coordinate number correct
+\newif\if;pt % plot points if true
+\newif\if;csym % curve symbol defined
+\newif\if;scnt % symbol or pattern count <>0
+
+\newhelp\;strline{curve straight from}
+\newhelp\m;ssingcoord{curve needs more points, add them.}
+\newhelp\;negdash{curvedashes needs the same sign for all arguments.}
+\newhelp\;oddcoord{curve requires two co-ordinates for each point,
+ count them.}
+
+\newcommand\arc{\@ifnextchar[\;arc{\;arc[0]}}
+\newcommand\;arc{}
+\def\;arc[#1](#2,#3)#4{\;setpoint{#1}\scaleput(#2,#3){\;ddx-#3\unitlength
+ \;ddy#2\unitlength \;firstpoint \;td#4\p@ \;drwarc}}
+
+
+% Redefines version in LaTeX 2e of 1 June 1994.
+\def\bezier#1)#2(#3)#4({\@bezier#1)(#3)(}
+\def\@bezier#1(#2,#3)(#4,#5)(#6,#7){\;dx#4\unitlength \;ddx-\;dx
+ \advance\;dx-#2\unitlength \advance\;ddx#6\unitlength \;dy#5\unitlength
+ \;ddy-\;dy \advance\;dy-#3\unitlength \advance\;ddy#7\unitlength
+ \;setpoint{#1}\scaleput(#2,#3){\;firstpoint \;bezier}}
+
+\newcommand\bigcircle{\@ifnextchar[\;bgcrcl{\;bgcrcl[0]}}
+\newcommand\;bgcrcl{}
+\def\;bgcrcl[#1]#2{\;setpoint{#1}\;dx\unitlength \global\divide\unitlength\tw@
+ \scaleput(#2,0){\;ddx\z@ \;ddy#2\unitlength \global\unitlength\;dx \;td360\p@
+ \;drwarc}}
+
+\newcommand\closecurve{\@ifnextchar[\;closecurve{\;closecurve[0]}}
+\newcommand\;closecurve{}
+\def\;closecurve[#1](#2){\;coordn\closecurve\thr@@{#2}{#1}%
+ \if;ccn\scaleput(\;xb,\;yb){\edef\;ci{\;xa,\;ya,#2,\;xb,\;yb,\;xc,\;yc}%
+ \advance\;cc\thr@@ \;tagcurve\;ci}\fi}
+
+\newcommand\curve{\@ifnextchar[\;curve{\;curve[0]}}
+\newcommand\;curve{}
+\def\;curve[#1](#2){\;coordn\curve\tw@{#2}{#1}%
+ \if;ccn \scaleput(\;xa,\;ya){\;firstpoint
+ \ifnum\;cc=\tw@ \;slbezd \;slbez
+ \else \;scbezd\;dx\;ddx\;xa\;xb\;xc \;scbezd\;dy\;ddy\;ya\;yb\;yc
+ \;bezier \;tagcurve{#2}\ifnum\;cc>6\;endcurve\fi \fi}\fi}
+\newcommand\;scbezd[5]{\;slcd#2#3#5\divide#24\;slcd#1#3#4\advance#1-#2}
+\newcommand\;xa{} \newcommand\;xb{} \newcommand\;xc{}
+\newcommand\;ya{} \newcommand\;yb{} \newcommand\;yc{}
+\newcommand\;ci{}
+
+\newcommand\curvesymbol[1]{\def\;curvesymbol{#1}\ch;ckcs
+ \global\setbox\;csbox\hbox{#1}\csdiameter\wd\;csbox}
+\newcommand\;curvesymbol{} \def\;curvesymbol{}
+
+\newcommand\curvedashes{\@ifnextchar[\;crvdshs{\;crvdshs[\unitlength]}}
+\newcommand\;crvdshs{}
+\def\;crvdshs[#1]#2{\;ucd#1\def\;icurvedashes{#2}\;ccnfalse \;pl\z@
+ \@for \;ci:=#2\do{\ifdim\;ci\;ucd<\z@ \;ccntrue \@latexerr{\string
+ \curvedashes\space sign bad at \;ci}{\the\;negdash ^^J\@eha}%
+ \else \advance\;pl\;ci\;ucd \fi}\if;ccn\;pl\z@\fi}
+\newcommand\;icurvedashes{}
+
+\newcommand\diskpitchstretch{\@ne}
+
+\newcommand\tagcurve{\@ifnextchar[\;tgcrv{\;tgcrv[0]}}
+\newcommand\;tgcrv{}
+\def\;tgcrv[#1](#2){\;coordn\tagcurve\thr@@{#2}{#1}\if;ccn
+ \scaleput(\;xb,\;yb){\;firstpoint \;tagcurve{#2}}\fi}
+
+\newcommand\scaleput{}
+\long\def\scaleput(#1,#2)#3{\@killglue \;td#2\unitlength
+ \raise\yscale\;td \hbox to \z@{\kern\xscaley\;td \;td#1\unitlength
+ \kern\xscale\;td \raise\yscalex\;td \hbox{#3}\hss}\ignorespaces}
+\newcommand\xscale{\@ne}
+\newcommand\xscaley{0}
+\newcommand\yscale{\@ne}
+\newcommand\yscalex{0}
+
+% Plot first point if any.
+\newcommand\;firstpoint{\ifdim\;pl=\z@\;point\fi}
+
+% Calculates segment count, sine, cosine and differences then plots segments.
+\newcommand\;drwarc{\;cc\;td \;np\;td \;td23\p@ \divide\;cc\;td
+ \;abs\;cc \advance\;cc\@ne \;pns\p@ \divide\;pns\tw@
+ \divide\;np\;cc \;rc\;np \divide\;rc\;pns \;abs\;rc
+ \advance\;rc\@ne \divide\;np\;rc \multiply\;np\;pns \divide\;np14668 %
+ \multiply\;np\;rc \divide\;np\@cclvi \;scp\p@ \multiply\;scp\@cclvi
+ \;t\;pns \;csi\;csi\;csi\;csi \;rxy\;ddx\;ddy \divide\;rc\p@
+ \advance\;rc\@ne \;rtc\;rc \advance\;rc\;rc \;ndd\;ddx \;ndd\;ddy
+ \;csi \;rxy\;ddx\;ddy \divide\;rc\;pns \advance\;rc\@ne
+ \@whilenum\;cc>\z@ \do{\advance\;cc\m@ne \;dx\;ddx \;dy\;ddy
+ \divide\;ddx\;rc \divide\;ddy\;rc \;td\;ddx \;ddx\;t\;td
+ \advance\;ddx-\;np\;ddy \;ddy\;t\;ddy \advance\;ddy\;np\;td
+ \divide\;ddx\;pns \divide\;ddy\;pns \;ddx\;rc\;ddx \;ddy\;rc\;ddy
+ {\;bezier \global\;ytd\;y \global\;tca\;overhang}\;y\;ytd \;overhang\;tca}}
+\newcommand\;ndd[1]{\divide#1\;rc \multiply#1\;np \divide#1\;t #1\;rtc#1}
+% Cosine and sine half angle iteration.
+\newcommand\;csi{\;tcb\;np \multiply\;np\;t \divide\;np\;pns \;t\;tcb
+ \multiply\;t\;t \divide\;t-\;scp \advance\;t\;pns \divide\;scp4 }
+
+% Count the number of co-ordinate specified and warns if incorrect.
+\newcommand\;coordn[4]{\;setpoint{#4}\ifx#1\closecurve\;cc\tw@\else\;cc\z@\fi
+ \@for\;ci:=#3\do{\advance\;cc\@ne
+ \ifcase\;cc \or \;d;f\;xa \or \;d;f\;ya \or \;d;f\;xb
+ \or \;d;f\;yb \or \;d;f\;xc \or \;d;f\;yc \fi
+ \ifx#1\closecurve\ifodd\;cc \;d;f\;xa \else \;d;f\;ya \fi\fi}%
+ \;ccnfalse \ifx#1\closecurve \advance\;cc-\tw@ \fi
+ \ifodd\;cc \@latexerr{\string #1\space points odd}{\the\;oddcoord ^^J\@eha}%
+ \else \divide\;cc\tw@
+ \ifnum#2>\;cc \@latexerr{\string #1 needs \the#2 points}%
+ {\the\m;ssingcoord ^^J\@eha}%
+ \else \;ccntrue \fi\fi}
+
+% Sets symbol, character or disk depending on how line is to be plotted.
+% Corrects overhang to be positive or zero but no greater than \;pl.
+\newcommand\;setpoint[1]{\curvelength\z@ \def\;po;nt{\raise\;y\copy\;pt}\ch;ckcs
+ \ifnum#1=\z@\;scntfalse\else\;scnttrue\fi \;sc#1\relax \;abs\;sc \;psc\;sc
+ \ifdim\;pl>\z@ \;overhang\overhang
+ \ifnum\;overhang=\z@\else \;np\;overhang \divide\;np\;pl \multiply\;np\;pl
+ \ifnum\;overhang<\z@ \advance\;overhang\;pl
+ \else \ifnum\;overhang=\;np\advance\;overhang\;pl\fi
+ \fi \advance\;overhang-\;np
+ \fi \if;csym \if;scnt\;setdisk\else\;setsymbol\;td\p@\fi \else \;setdisk \fi
+ \s;tpitch
+ \else\ifnum#1>\z@ \s;tcirc{\hss\vrule\@height\@wholewidth\@width\@wholewidth}%
+ \else\ifnum#1<\z@ \if;csym\;setsymbol\else\set;pt{}\fi
+ \else \;setdisk \s;tpitch \fi\fi\fi
+ \edef\;point{\;po;nt}\;y\dp\;pt \advance\;y-\ht\;pt \divide\;y\tw@}
+\newcommand\;setsymbol{\s;tcirc{\hss\unhcopy\;csbox}\edef\;po;nt{\;po;nt
+ \s;tcirc{\hss\noexpand\noexpand\noexpand\;curvesymbol}%
+ \global\setbox\;csbox\copy\;pt}}
+\newcommand\s;tpitch{\;td\diskpitchstretch\;td \;psc\;td}
+\newcommand\;po;nt{} \newcommand\;point{}
+
+% Sets LaTeX disk character and calculates maximum spacing or selects period.
+\newcommand\;setdisk{\ifdim\@halfwidth>.85\p@
+ \s;tcirc{\@circ{\@wholewidth}{112}}\;td\@wholewidth
+ \divide\;td 8\advance\;td.6\p@ \ifdim\;td>\thr@@\p@\;td\thr@@\p@\fi
+ \else \;setperiod \fi}%
+
+% OFSS, SLiTeX or NFSS version for period selected at load time.
+% NFSS fix requested by Peter Vanroose and
+% Michel Goossens who also supplied a workable patch.
+\@ifundefined{selectfont}{\@ifundefined{fourteenrm}{%
+\newcommand\;setperiod{\ifdim\@halfwidth>.6\p@ \let\;ci\svtnrm \;td.7\p@
+ \else\ifdim\@wholewidth>.85\p@ \let\;ci\twlrm \;td.48\p@
+ \else \ifdim\@wholewidth>.6\p@ \let\;ci\egtrm \else \let\;ci\fivrm \fi
+ \;td.34\p@ \fi\fi \s;tcirc{\;ci\hss.}}%
+ }{%
+\newcommand\;setperiod{\;td.7\p@ \s;tcirc{\fourteenrm\hss.}}%
+ }}{%
+\newcommand\;setperiod{%
+ \ifdim\@halfwidth>.6\p@ \;tcb17\;td.7\p@
+ \else\ifdim\@wholewidth>.85\p@ \;tcb12\;td.48\p@
+ \else \ifdim\@wholewidth>.6\p@ \;tcb8\else \;tcb5\fi \;td.34\p@ \fi\fi
+ \s;tcirc{\rm \fontseries m\fontshape n\fontsize{\the\;tcb}\p@
+ \selectfont \hss.}}%
+ }
+
+% Check if curvesymbol exists and set switch.
+\newcommand\ch;ckcs{\ifx\;curvesymbol\@empty\;csymfalse\else\;csymtrue\fi}
+
+% Makes zero width box \;pt of point
+\newcommand\s;tcirc[1]{\set;pt to\z@{#1\hss}}
+
+% Set global box \;pt
+\newcommand\set;pt{\global\setbox\;pt\hbox}
+
+% Plots last segment of curve from coordinates already read.
+\newcommand\;endcurve{\;ecbezd\;dx\;ddx\;xa\;xb\;xc
+ \;ecbezd\;dy\;ddy\;ya\;yb\;yc \;bezier}
+\newcommand\;ecbezd[5]{\;slcd#1#3#5\divide#14 #2-#1\advance#2#5\unitlength
+ \advance#2-#4\unitlength}
+
+% Reads coordinates of four points before going to difference calculation.
+\newcommand\;tagcurve[1]{\ifnum\;cc=\thr@@ \;endcurve \else \;cc\z@
+ \@for\;ci:=#1\do{\advance\;cc\@ne \ifnum\;cc>6 %
+ \ifodd\;cc \;slcd\;dx\;xa\;xc \let\;xa\;xb \let\;xb\;xc \;d;f\;xc
+ \else \t;gcrv \fi \fi}\fi}
+
+% Calculates differences over whole segment from four points.
+\newcommand\t;gcrv{\;slcd\;dy\;ya\;yc \let\;ya\;yb \let\;yb\;yc \;d;f\;yc
+ \;rxy\;dx\;dy \divide\;dx\;rtc \divide\;dy\;rtc
+ \;ddx-\;ya\;dx \advance\;ddx\;xa\;dy \;ddy\;ddx
+ \advance\;ddx\;yb\;dx \advance\;ddx-\;xb\;dy
+ \advance\;ddy\;yc\;dx \advance\;ddy-\;xc\;dy
+ \;slbezd \;td\;ddy \divide\;td\@m
+ \ifdim\;td=\z@ \ifcurvewarn
+ \@warning{\the\;strline \;xa,\;ya\space to \;xb,\;yb}\fi \;slbez
+ \else \;td\unitlength \;rtc\;td \advance\;rtc\;rtc
+ \divide\;rtc\p@ \advance\;rtc\@ne \divide\;td\;rtc
+ \;t\;ddx \;scp\;t \;abs\;t
+ \advance\;t\;t \divide\;t\p@ \advance\;t\@ne \divide\;scp\;t
+ \multiply\;td\;scp \divide\;td\;ddy \multiply\;td\;rtc \multiply\;td\;t
+ \;ddx\;xc\;td \advance\;ddx-\;xa\;td \advance\;dx-\;ddx
+ \;ddy\;yc\;td \advance\;ddy-\;ya\;td \advance\;dy-\;ddy \;bezier \fi}
+
+% Avoid repeating {\;ci}
+\newcommand\;d;f[1]{\edef#1{\;ci}}
+
+\newcommand\;slbezd{\;slcd\;dx\;xa\;xb \;slcd\;dy\;ya\;yb}
+
+% Calculates difference between two coordinates.
+\newcommand\;slcd[3]{#1#3\unitlength \advance#1-#2\unitlength}
+
+% Calculates differences for bezier straight line.
+\newcommand\;slbez{\divide\;dx\tw@ \;ddx\;dx \divide\;dy\tw@ \;ddy\;dy \;bezier}
+
+% Scales segment differences, then calculates segment pattern and disk count,
+% and initial disk differences; selects line or dashes.
+\newcommand\;bezier{\;scale\;dx\;dy \;scp\;rc \;np\;rc \;scale\;ddx\;ddy
+ \ifnum\;rc>\;np\;np\;rc\fi \advance\;np\;np
+ \advance\;scp\;rc \;bezc\;dx\;ddx \;bezc\;dy\;ddy \;rxy\;ddx\;ddy
+ \divide\;rc\p@ \advance\;rc\thr@@
+ \;tc\;rc \;sroot\;sroot\;sroot \;tca\;rc \;rxy\;dx\;dy
+ \advance\;rc\;scp \divide\;rc\thr@@ \global\advance\curvelength\;rc sp%
+ \divide\;np\;psc \ifnum\;np<\@ne\;np\@ne\fi \;t\;np
+ \if;scnt\ifdim\;pl=\z@ \;t\;sc
+ \else\;np
+ \if;csym \;rc \divide\;np\;sc \advance\;np-\csdiameter
+ \;td\;pl \divide\;td\tw@ \advance\;np\;td \divide\;np\;pl
+ \ifnum\;np<\@ne\;np\@ne\fi \multiply\;np\;sc
+ \else \;sc \fi \advance\;t\;np \divide\;t\;np \multiply\;t\;np
+ \fi \fi
+ \ifnum\;t>\;tca \;mcnd\;t \divide\;mcnd\;tca \else \;mcnd\@ne \;tca\;t \fi
+ \;tc\;t \advance\;tc\;tc \;rtc\;tc
+ \;tcb\;tca \advance\;tcb\@ne \multiply\;tcb\;mcnd \advance\;rtc-\;tcb
+ \multiply\;rtc\;tca \;tcb\;t \multiply\;tcb\;tcb \divide\;tcb\;mcnd
+ \;bezd\;dx\;ddx \;bezd\;dy\;ddy \edef\;tplot{\;po;nts}\;cnd\;mcnd
+ \ifdim\;pl>\z@ \;dashes \else \;points \fi}
+\newcommand\;scale[2]{\;td\xscale#1\advance\;td\xscaley#2%
+ #2\yscale#2\advance#2\yscalex#1#1\;td \;rxy#1#2}
+\newcommand\;bezc[2]{\advance#1#1\advance#2#2\;td#2\advance#2-#1\advance#1\;td}
+\newcommand\;bezd[2]{\divide#2\;tcb \;td#2\multiply\;td\;rtc \advance#1-\;td
+ \divide#1\;tc}
+
+% Calculates length of vector \;rc from coordinates #1,#2
+\newcommand\;rxy[2]{\;tc#1\;abs\;tc \;tcb#2\;abs\;tcb
+ \;rc\;tc \advance\;rc\;tcb
+ \ifnum\;rc>\z@ \;rtc\;rc \advance\;rtc\;rtc \divide\;rtc\p@
+ \ifnum\;rtc>\z@ \advance\;rtc\@ne \divide\;tc\;rtc
+ \divide\;tcb\;rtc \divide\;rc\;rtc
+ \else \;rtc\@ne \fi \multiply\;tc\;tc \multiply\;tcb\;tcb
+ \advance\;tc\;tcb \;sroot \multiply\;rc\;rtc \fi}
+
+% Replaces argument by magnitude
+\newcommand\;abs[1]{\ifnum#1<\z@ #1-#1\fi}
+
+% Iteration of square root calculation by Newton's method.
+\newcommand\;sroot{\;rroot\;rroot\;rroot}
+\newcommand\;rroot{\;tcb\;tc \divide\;tcb\;rc \advance\;rc\;tcb \divide\;rc\tw@}
+
+% Variable uses in \;dashes, \;scdashes, \;nscdashes, \;pdashes and \;dash.
+% counts
+% \;scp = distance between points.
+% \;rc = length of Bezier segment.
+% \;rtc = total points in Bezier segment.
+% \;np = number of whole patterns in Bezier segment or scratch.
+% \;overhang = of dash pattern past symbol or end of segment.
+% \;pbs = total points between symbols
+% \;pns = points to next symbol or dot.
+% \;tc = number of points to blank for curve symbol.
+% \;tcb = number of points along pattern.
+% dimens
+% \;pl = length of dash pattern.
+% \;ucd = dash pattern unit length.
+
+% Initializes dash plot for segment and selects symbol count alternative.
+\newcommand\;dashes{\let\;ticd\;icurvedashes \let\;tucd\;ucd \divide\;rc\;t
+ \;rtc\;t \;tc\;rc \advance\;tc\csdiameter \divide\;tc\;rc
+ \divide\;tc\tw@ \;t\;tc \multiply\;tc\tw@ \;ptfalse
+ \;pbs\;rc \divide\;pbs\tw@ \advance\;overhang\;pbs \divide\;overhang-\;rc
+ \if;scnt \;scdashes \else \;nscdashes \fi \multiply\;overhang\;rc}
+
+% Plots dash pattern when a nonzero symbol count is specified.
+\newcommand\;scdashes{\;pbs\;rtc \divide\;pbs\;sc \;ccss \;scp
+ \if;csym \;pl \multiply\;scp\;np \divide\;scp\;sc \advance\;pbs-\;tc
+ \else \;pbs \multiply\;scp\;rc \fi \;np\;overhang \;overhang\z@
+ \divide\;scp\;pbs \;tcb\z@ \;pns\;t \;dash \;overhang\;np
+ \if;csym\else \advance\;overhang-\;tcb \advance\;rtc-\;tcb
+ \advance\;pbs-\;tc \fi
+ \;pns\;pbs \advance\;pns-\;np \if;csym\else\advance\;pns\;tcb\fi
+ \@whilenum\;rtc>\z@\do{\;pdashes \;ptfalse \;t\;tc \;pns\;t \;dash
+ \;pns\;pbs \;overhang\if;csym\;np\else-\;overhang\fi
+ \advance\;pns-\;overhang}\;overhang-\if;csym\;np\else\;overhang
+ \;ptfalse \;t\;tc \;tcb\;overhang
+ \divide\;t\tw@ \;rtc\;t \;pns\;t \;dash \fi}
+
+% Plots symbols at natural pattern length but shrinks pattern to fit between.
+\newcommand\;nscdashes{\advance\;pbs\;pl \divide\;pbs\;rc
+ \if;csym \;bpdashes \fi \;ccss \;pns\;t
+ \;dash \advance\;pbs-\;tc \;scp\;pl \divide\;scp\;pbs \;pns\;pbs
+ \@whilenum\;rtc>\z@\do{\;pdashes \;ptfalse \;t\;tc \;pns\;t \;dash
+ \;pns\;pbs}\if;csym \else \divide\;tc\tw@ \advance\;overhang\;tc \fi}
+
+% If large symbol spaces, blank curve.
+\newcommand\;ccss{\ifnum\;pbs>\;tc\else \;bpdashes \fi}
+
+% A blank or symbol plotting dash pattern
+\newcommand\;bpdashes{\let\;tucd\;pl \let\;ticd\;ricd \;tc\z@ \;t\z@}
+\newcommand\;ricd{1,0}
+
+% Reads dash pattern plotting dashes and spaces up to next symbol space.
+\newcommand\;pdashes{\ifnum\;pns>\z@ \;td\z@ \;tcb\z@ \;ptfalse
+ \@for\;ci:=\;ticd \do{\advance\;td\;ci\;tucd \;t\;scp \divide\;t\tw@
+ \advance\;t\;td \divide\;t\;scp \advance\;t-\;tcb \;dash
+ \if;pt\;ptfalse\else\;pttrue\fi}%
+ \let\n;xt\;pdashes \else \let\n;xt\relax \fi \n;xt}
+
+% Checks if dash or space occurs before or after curve, calculates fractions.
+\newcommand\;dash{\ifnum\;t=\z@ \if;csym\ifnum\;rtc>\z@\if;pt\;point\fi\fi\fi
+ \else \advance\;tcb\;t \advance\;pns-\;t
+ \ifnum\;overhang<\z@ \advance\;overhang\;t
+ \ifnum\;overhang<\z@ \;t\z@ \else \;t\;overhang \;overhang\;tcb \fi
+ \else \;overhang\;tcb \fi
+ \ifnum\;pns<\z@ \advance\;overhang\;pns \advance\;tcb\;pns
+ \advance\;t\;pns \;pns\z@ \fi \advance\;rtc-\;t
+ \ifnum\;rtc<\z@ \advance\;overhang\;rtc \advance\;t\;rtc\fi
+ \ifnum\;t>\z@ \if;pt\;point\;points\else\let\n;xt\;space\;space\fi \fi\fi}
+
+% Makes \;tplot then plots a single dash.
+\newcommand\;points{\let\n;xt\;sdash \;sdash}
+\newcommand\;sdash{\let\n;;t\;tplot \ifnum\;t<\;cnd \let\n;xt\relax
+ \advance\;cnd-\;t \;tca\;t \;tplot
+ \else \advance\;t-\;cnd \;tca\;cnd \;tplot
+ \advance\;dx\;ddx \advance\;dy\;ddy \;cnd\;mcnd
+ \fi \n;xt}
+
+% A fast single macro for drawing straight lines.
+\newcommand\;tplot{}
+\newcommand\;po;nts{\noexpand\ifnum\;tca>\z@
+ \advance\;y\;dy \kern\;dx \;po;nt \advance\;tca\m@ne
+ \noexpand\else \let\noexpand\n;;t\relax \noexpand\fi \noexpand\n;;t}
+
+% Plots a single space at high speed.
+\newcommand\;space{\ifnum\;t<\;cnd \let\n;xt\relax
+ \advance\;cnd-\;t \advance\;y\;t\;dy \kern\;t\;dx
+ \else \advance\;t-\;cnd \advance\;y\;cnd\;dy \kern\;cnd\;dx
+ \advance\;dx\;ddx \advance\;dy\;ddy \;cnd\;mcnd
+ \fi \n;xt}
+
+% Make `;' a punctuation mark again.
+ \catcode`\;=12
+
+\endinput
+
+MODIFICATION HISTORY
+--------------------
+1.0 26 June 1991
+1.1 8 Jan 1992 large \diskpitchstretch and maximum integer=2^30 - 1.
+1.11 6 April 1993 Correct \@setdisk defined for SLiTeX.
+1.12 20 April 1993 Scaling improved in \t@gcrv to allow large \curves.
+1.13 23 April 1993 Calculation of differences corrected in \@bezier.
+1.14 29 April 1993 Alignment of spaces improved in \@nscdashes, \overhang
+ normalized.
+1.15 1 May 1993 Rounding errors in \nscdashes and \pdashes improved.
+1.16 8 May 1993 Increased speed and dots corrected.
+1.2 23 May 1993 Variable curve symbol introduced.
+1.21 8 June 1993 \unitlength corrected in \bigcircle.
+1.22 15 June 1993 \csb@x saves curve symbol, pattern selection rounded.
+1.23 18 June 1993 test for bad point order tightened. 1st network release.
+ 2421 words of TeX main memory.
+1.30 9 July 1993 2nd network release.
+ Bugs Fixed:
+ Blank curve if \csdiameter too large;
+ Thicknesses of thin curves set correct for 300dpi fonts;
+ Made compatible with NFSS of Mittelbach and Sch\"opf;
+ Transfer of \@y and \@overhang from inner loop of \@drwarc;
+ Missing \pt@false in \@ncsdashes and \@pdashes;
+ Check for zero \@np in \@bezier.
+ Improvements (?):
+ New internal macros to save tokens;
+ Uses LaTeX error messages and warnings;
+ Checks \curvedashes signs;
+ Potential conflicts with other macros reduced with new \@y, \@tc;
+ Warns more readily and replaces possible inflexions with straight line;
+ Some internal variable names rationalized.
+ 2410 words of TeX main memory with NFSS, 2400 with OFSS.
+1.31 10 July 1993 \shape changed to \fontshape etc. for NFSS.
+1.32 14 June 1994 3rd network release tested with LaTeX 2e of February 1994.
+1.33 28 June 1994 4th network release tested with LaTeX 2e of 1 June 1994.
+ Redefines \bezier from June LaTeX 2e.
+ \@bezier renamed to \@Vbezier to avoid conflict with June LaTeX 2e.
+1.40 20 August 1995 .
+ Bug Fixed: All curves use straight segments to reduce rounding error.
+ Improvements:
+ \curvewarnfalse stops warning of straight line use between points;
+ ; catcoded to character to protect internal names;
+ New internal macros save tokens and increase speed;
+ 1799 nett extra words of TeX main memory (LaTeX 2e 1995/6/1 pl1).
+1.41 22 August 1995 5th network release tested with LaTeX 2e of 1 June 1995
+ \edef\;tplot moved to speed dash plotting.
+1.42 12 August 2000 6th Network release and last tested and
+ working with LaTeX 2.09.
+
+CURVES SUMMARY
+--------------
+The commands following are for the picture environment in the LaTeX manual.
+
+Arguments of Commands:
+<blank length> decimal number of <unit len> blank. Not negative.
+<character or symbol> is anything which a \put or \multiput may plot.
+<coordinates> are decimal numbers giving alternate x and y coordinates of
+ the curve as multiples of \unitlength, comma separated.
+<[,dash...]> optional continuation of alternating dash and blank numbers
+ of unit lengths, comma separated. Not negative. Decimals allowed.
+<diameter> is a decimal number giving the diameter in \unitlengths.
+<symbol count> is the number of symbols or patterns to be plotted, default 0.
+<unit len> unit length dimension e.g., 2.5mm, 10pt, used in measuring
+ blanks and dashes. Not negative. Default value is \unitlength.
+
+Lengths used by Commands:
+\csdiameter is the size of the space left for a symbol and can be
+ increased or set with \settowidth{\csdiameter}{<character or symbol>}.
+\curvelength is the total length of the curve calculated before drawing
+ by using Simpson's rule once between each pair of coordinate points.
+\overhang length of as drawn dash pattern overlapping start of dashes.
+
+Control Commands:
+\curvewarntrue warns every time a straight line is used between points
+ to avoid possible worse errors (default).
+\curvewarnfalse use the straight line without warning.
+
+Parameter Setting Commands:
+\curvesymbol{<character or symbol>} sets symbol and \csdiameter.
+\curvedashes[<unit len>]{<blank length><[,dash...]>} Drawing commands before a
+ \curvedashes or after one with an empty or zero length pattern will draw:
+ if <symbol count> is zero or missing, a continuous curve;
+ else if <symbol count> is positive, <symbol count>-1 squares of line
+ thickness size between and additional squares at coordinates or bezier
+ end points;
+ else if no <character or symbol> exists, nothing;
+ else, -<symbol count>-1 characters or symbols between coordinates and
+ additional ones at coordinates or bezier end points.
+After a \curvedashes command defining a pattern whose length exceeds
+ zero, commands draw:
+ if <symbol count> is zero or missing then at a spacing equal to the
+ specified pattern length,
+ if no <character or symbol> exists, a dash pattern reduced in length
+ by \csdiameter to fit between symbol spaces of \csdiameter,
+ else if \overhang is not 0pt, a <character or symbol> at all positions,
+ else a <character or symbol> with the first position blank;
+ else, \csdiameter wide symbol spaces, one at and |<symbol count>|-1 between
+ coordinate points with dash pattern lengths,
+ if no <character or symbol> exists, exact but broken by the spaces,
+ else, adjusted to give a whole number of patterns between spaces.
+\diskpitchstretch is initially 1 but \renewcommand can change it to a higher
+ value like 5 to save memory in drafts of complex documents or a lower local
+ value like 0.5 to smooth curve digitization.
+\linethickness{<len>} sets line or dash thicknesses to <len> from 0.5pt up to
+ 15pt (0.17mm to 5mm). \thicklines and \thinlines also set the thickness.
+\xscale, \xscaley, \yscale and \yscalex are scale factors initially set to
+ 1, 0, 1 and 0 respectively which \renewcommand or \def can reset.
+
+Curve Drawing Commands:
+Curves drawn consist of parabolic arcs between coordinate points with
+tangents at each point parallel to the straight line through adjacent points.
+\arc[<symbol count>](X1,Y1){<angle>} draws a circular arc centred on current
+ position, starting from (X1,Y1) and proceeding counterclockwise for
+ <angle> degrees.
+\bezier{<symbol count>}(X1,Y1)(X2,Y2)(X3,Y3) draws a curve through the points
+ (X1,Y1) and (X3,Y3) tangent to the straight lines joining them to (X2,Y2).
+ Faster and more powerful replacement for bezier.sty version.
+\bigcircle[<symbol count>]{<diameter>} draws a circle of diameter equal to
+ <diameter> times \unitlength.
+\closecurve[<symbol count>](<coordinates>) draws a closed curve with continuous
+ tangents at all points. At least 6 coordinates required.
+\curve[<symbol count>](<coordinates>) draws a curve through the specified
+ <coordinates>. For 4 coordinates this is a straight line.
+\scaleput(X1,Y1){<picture object>} places a picture object in a position
+ scaled by \xscale, \xscaley, \yscale and \yscalex for axonometric projection
+ or rotations.
+\tagcurve[<symbol count>](<coordinates>) draws a curve without its first and
+ last segments but if only 6 coordinates draws the last segment only. \ No newline at end of file
diff --git a/obsolete/macros/latex209/contrib/curves/curves.tex b/obsolete/macros/latex209/contrib/curves/curves.tex
new file mode 100644
index 0000000000..32df0f162c
--- /dev/null
+++ b/obsolete/macros/latex209/contrib/curves/curves.tex
@@ -0,0 +1,821 @@
+ % To LaTeX this file requires curves.sty in the default or
+ % a texinputs directory.
+ % Requires 55000 word of TeX main memory.
+ \documentstyle[curves]{article}
+ \newcommand{\version}{1.42}
+ \pagestyle{headings}
+ \begin{document}
+ \title{Curves in \LaTeX\ Pictures\\
+ A Manual for {\tt CURVES.STY} and {\tt CURVESLS.STY}\\Version \version}
+ \author{Ian Maclaine-cross\thanks{Current Internet address: {\tt
+i.maclaine-cross@unsw.edu.au}}\\
+ \small School of Mechanical and Manufacturing Engineering\\
+ \small The University of New South Wales\\
+ \small UNSW Sydney 2052, Australia}
+ \date{12th August 2000}
+ \maketitle
+ \thispagestyle{empty}
+ \tableofcontents
+ \section{Introduction}
+ Version \version\ is the last release of {\tt curves} tested with \LaTeX\
+ 2.09. Future releases will be tested only with later versions of \LaTeX\
+ and may be found in the directory tree for the later \LaTeX\ version.
+Future {\tt curves} releases are unlikely to work with \LaTeX\ 2.09.
+
+ The picture environment in the \LaTeX \footnote{Leslie Lamport, {\sl
+\LaTeX\ A Document Preparation System 2nd ed.,} Addison-Wesley, 1994.} macro
+package for \TeX \footnote{Donald E. Knuth, {\sl The \TeX book,}
+Addison-Wesley, 1984.} allows simple line drawing using
+characters. These characters include quadrant circular arcs, solid
+disks with diameters from 1 to 15pt\footnote{A printer's point,
+abbreviated pt, is approximately 0.351460 mm.} and short lines with a
+limited range of slopes in two thicknesses. A \verb?\begin{picture}?
+command defines an area where following commands place these
+characters to draw a \LaTeX\ picture.
+
+ \LaTeX\ pictures save disk space for source descriptions and
+computer time in producing documents compared with printer commands or
+bit mapped graphics. From initial pencil sketch on squared graph
+paper to final printout, they take half the time for manual pen
+drawings. The labor savings are higher for revisions and
+rewrites. Unfortunately standard \LaTeX\ cannot yet draw curves like a
+pen, compass and French curves can.
+
+ Superimposing characters closely can draw any curve. Disks give directional
+independence of line thickness and visual smoothness at large pitch.
+Smoothness increases with output resolution but is almost independent of disk
+pitch below a critical maximum. The following table suggests this maximum
+varies from 0.34pt for an 0.5pt thick curve to 3pt for a 15pt curve.
+ \begin{center}
+ \setlength{\unitlength}{1pt}
+ \begin{tabular}{cccc}
+ Thickness & \makebox[3em][l]{Magnified} & Comments & Line at 1/6 slope \\
+ \hline
+ 15pt & $\times1$ & 1pt pitch disks&
+ \begin{picture}(80,20)(0,15) \linethickness{15pt}
+ \renewcommand{\diskpitchstretch}{0.33} \curve(10,15, 70,25)
+ \end{picture} \\
+ 15pt & $\times1$ & 3pt pitch disks&
+ \begin{picture}(80,20)(0,15) \linethickness{15pt} \curve(10,15, 70,25)
+ \end{picture} \\
+ $\approx$0.5pt & $\times1$ & \LaTeX\ \verb?\line(6,1)? &
+ \begin{picture}(80,20)(0,15) \thinlines \put(10,15){\line(6,1){60}}
+ \end{picture} \\
+ $\approx$0.5pt & $\times1$ & 0.34pt pitch disks &
+ \begin{picture}(80,20)(0,15) \thinlines
+ \curve(10,15, 70,25)
+ \end{picture} \\
+ $\approx$0.5pt & $\times30$ \rule[-10pt]{0pt}{10pt} &
+\parbox{8em}{\centering 0.34pt pitch disks\\ resolution $\times30$ } &
+ \begin{picture}(80,20)(0,15) \multiput(10,15)(10.2,1.7){7}{\circle*{15}}
+ \end{picture} \\
+ \hline
+ \end{tabular}
+ \end{center}
+
+ \LaTeX\ \verb?\line?\footnotemark[1] or line drawing \verb?\special?
+commands require a tenth the \TeX\ memory so are preferable to disks if
+available. A smooth curve may require thousands of disks or hundreds of lines.
+\LaTeX\ can load \TeX\footnote{Donald E. Knuth, {\sl The \TeX book,}
+ Addison-Wesley, 1984, Chapter 20.} macros from style files with a
+\verb?.sty? extension. These macros can calculate the disk or line positions
+for a curve.
+
+ {\tt curves.sty} provides macro commands for drawing curves using disks.
+Version \version\ loads in about 2500 words\footnote{A character or token
+takes a \TeX\ word, 32 bits or larger.} of \TeX's main memory, which allows a
+small \TeX. Complex or numerous floating drawings still require a big \TeX\
+with {\tt curves.sty}. {\tt curvesls.sty} uses fewer disks and line drawing
+\verb?\special?s for increased speed and a tenth the \TeX\ memory.
+
+ The capabilities of these macros are:---
+ \begin{itemize}
+ \item A compatible replacement for \verb?\bezier?\footnote{See your Local
+Guide. Try the system command {\tt latex local} to get a \LaTeX ed Guide.}
+from {\tt bezier.sty} or {\tt LaTeX2e}.
+ \item Work with {\makeatletter \@ifundefined{SLiTeX}{\tt SLiTeX}{\SLiTeX}}
+for overhead transparencies and {\tt LaTeX2e}\footnote{Michel Goossens, Frank
+Mittelbach and Alexander Samarin, {\sl The \LaTeX\ Companion,} Addison-Wesley,
+1994.}
+ \item Curves have the minimum number of disks or straight lines for visual
+smoothness.
+ \item Curve thickness adjustable from 0.5 to 15pt (0.17 to 5mm).
+ \item Curves have continuous slope.
+ \item Curves for any number of points greater than one using \verb?\curve?.
+ \item Control of end slopes using \verb?\tagcurve?.
+ \item Closed curves with continuous slope using \verb?\closecurve?.
+ \item Large circles \verb?\bigcircle? and circular arcs \verb?\arc?.
+ \item Independent scaling of curve abscissa and ordinates to fit graphs.
+ \item Affine scaling for making arcs or circles elliptical.
+ \item Symbols and dash patterns combined without interference.
+ \item Any dash length or spacing.
+ \item Three methods for fitting dash patterns to curves.
+ \end{itemize}
+
+ Parabolas approximate the segments between the specified coordinate points.
+At an internal point, the slope of the parabolas joining from either side is
+the same as the straight line joining the points on either side. For an end
+segment, the inside point of the parabola is made a vertex which determines
+the slope of the end point. \verb?\tagcurve? has hidden end segments which
+allows complete control of slope at the visible end point when desired.
+
+ The four points at the end and adjacent to a segment may make a parabola
+inappropriate. The points could be close to a straight line or consistent with
+an inflexion point. A straight line then replaces the parabola and optionally
+a warning is issued.
+
+The parabolas are drawn as a series of short straight line segments.
+For {\tt curvesls.sty}, the dvi driver draws the straight lines as instructed
+by \verb?\special? commands. For {\tt curves.sty}, the straight lines are
+drawn as overlapping disks at high speed using a simple tail chasing macro.
+This macro's arithmetic calculations are two fixed point additions per disk
+drawn.
+
+The \TeX\ arithmetic in {\tt curves.sty} for the initial differences
+between disk positions gives an error of less than 0.005\% at the
+segment end. Even for a segment 1000pt long, this is less than 0.05pt and the
+resolution of most output devices. Errors are sometimes slightly larger
+between coordinates but you can reduce them if necessary by specifying more
+coordinates.
+
+ For circles and circular arcs, a parabola approximates an arc segment no
+more than 23$^\circ$ giving a radius increase between segment ends less than
+0.02\%. The error in computing and multiplying by sine and cosine is usually
+less than 0.01\% of the radius at the far end of an arc.
+
+ Brief descriptions, simple examples and a command summary follow. They
+presume familiarity with relevant chapters of the \LaTeX\
+manual\footnotemark[1].
+
+ \section{Installation}
+
+ Name either {\tt curves} or {\tt curvesls} in the \verb?\usepackage?
+command at the top of your main {\tt .tex} file {\it e.g.\/,}
+ \begin{verbatim}
+ \documentclass[11pt]{article}
+ \usepackage{curves}
+ \end{verbatim}
+ {\tt curves.sty} or {\tt curvesls.sty} should be in the default or a {\tt
+texinput} directory. For the older \LaTeX\ 2.09 name them in the
+\verb?\documentstyle? command.
+
+ Do not combine {\tt curves} or {\tt curvesls} with {\tt bezier} in this
+command. They contain a fast powerful replacement for \verb?\bezier?.
+Drawings using \verb?\bezier? should not change their appearance.
+
+ \newcommand{\PiCTeX}{\relax P\kern-.10em\lower.4ex\hbox{I}\kern
+ -.10em\/C\kern-0.15em\TeX}
+ \PiCTeX\footnote{Michael J. Wichura, {\sl The \PiCTeX\ Manual,} Chicago,
+1987, available from \TeX\ Users' Group.} is a large set of \TeX nical drawing
+macros for plain \TeX\ which \LaTeX\ pictures can also use. \PiCTeX\ requires
+a big \TeX. I have not checked compatibility with {\tt curves} or {\tt
+curvesls} because I do not use \PiCTeX.
+ \renewcommand{\PiCTeX}{}
+
+ {\tt curvesls.sty} uses line drawing \verb?\special?s to reduce required
+memory and increase speed. As originally supplied it uses the \verb?\special?s
+of em\TeX\ by Eberhard Mattes for IBM PC compatibles. em\TeX\ is available
+from CTAN\footnote{Directory {\tt /tex-archive/systems/msdos/emtex} at {\tt
+ftp.shsu.edu} for example.} and the \TeX\ Users' Group. The em\TeX\
+\verb?\special?s are also available for Tomas Rokicki's {\tt dvips}. If you
+use {\tt dvips}, ask if they have been compiled in. To use other line drawing
+ \verb?\special?s substitute them at {\tt curvesls.sty}'s start. Your system
+guru may do this for you. You can test {\tt curvesls.sty} after substituting
+\verb?\special?s, by replacing {\tt curves} with {\tt curvesls} in this file's
+\verb?\documentstyle? command. This file looks the same \LaTeX ed with either
+{\tt curves} or {\tt curvesls}.
+
+ A drawing frequently uses auxiliary commands to size, place, label and
+caption it. The following commands draw the box in Figure~\ref{box} on
+page~\pageref{box}:
+
+ \begin{figure}
+ \begin{center}
+ \setlength{\unitlength}{1mm}
+ \begin{picture}(100,50) \large\sf
+ \linethickness{1mm}
+ \put(20,5){\framebox(60,40){BOX}}
+ \end{picture}
+ \end{center}
+ \caption{This is a box.}
+ \label{box}
+ \end{figure}
+
+ \begin{verbatim}
+ \begin{figure}
+ \begin{center}
+ \setlength{\unitlength}{1mm}
+ \begin{picture}(100,50) \large\sf
+ \linethickness{1mm}
+ \put(20,5){\framebox(60,40){BOX}}
+ \end{picture}
+ \end{center}
+ \caption{This is a box.}
+ \label{box}
+ \end{figure}
+ \end{verbatim}
+ Lamport\footnotemark[1] explains these commands. This example is for those
+unfamiliar with the \LaTeX\ picture environment. The following examples avoid
+the {\tt figure} environment but it is often essential.
+
+ \section{Curves}
+ \label{curves}
+ The curve drawing commands, \verb?\curve?, \verb?\closecurve? and
+\verb?\tagcurve?, draw parabola segments between coordinate points in the
+argument. The segments' tangents at these points are parallel to each other
+and to straight lines through the points either side. Segments at curve ends
+are from parabolas through the last three points. \verb?\closecurve? adds a
+parabola between end points to close the curve. \verb?\tagcurve? omits the
+first and last segments drawing curves with end tangents specified. The
+following table shows these features.
+
+ \begin{center}
+ \setlength\unitlength{0.4pt}
+ \linethickness{0.7mm}
+ \begin{tabular}{lc}
+ Example & Curve \\
+ \hline
+ \raisebox{60\unitlength}{\tt\char92 curve(0,0, 50,100, 100,0)} &
+ \begin{picture}(100,120)(0,-10)
+ \curve(0,0, 50,100, 100,0)
+ \end{picture}\\
+ \raisebox{80\unitlength}{\tt\char92 closecurve(0,0, 50,100, 100,0)} &
+ \begin{picture}(100,170)(0,-60)
+ \closecurve(0,0, 50,100, 100,0)
+ \end{picture} \\
+ \raisebox{60\unitlength}{
+ \tt\char92 tagcurve(100,0, 0,0, 50,100, 100,0, 0,0)} &
+ \begin{picture}(120,120)(-10,-10)
+ \tagcurve(100,0, 0,0, 50,100, 100,0, 0,0)
+ \end{picture} \\
+ \hline
+ \end{tabular}
+ \end{center}
+
+ Axial flow fans often use the RAF 6E aerofoil section. The section
+coordinates in the following macro come directly from aerodynamic
+tables\footnote{R.A. Wallis, {\sl Axial Flow Fans,} Academic Press, 1961,
+p.335}. The \verb?\arc? commands draw the leading and trailing radii and the
+two coordinate \verb?\curve? the flat chord.
+ \begin{verbatim}
+ \newcommand{\RAFsixE}{
+ \scaleput(1.25,1.25){\arc(0,-1.25){-135}}
+ \scaleput(0,0){\curve(0.366,2.133, 1.25,3.19, 2.5,4.42,
+ 5.0,6.10, 7.5,7.24, 10,8.09, 15,9.28, 20,9.90, 30,10.3,
+ 40,10.22, 50,9.80, 60,8.98, 70,7.70, 80,5.91, 90,3.79,
+ 95,2.58, 99.24,1.52)}
+ \scaleput(99.24,0.76){\arc(0,-0.76){180}}
+ \scaleput(0,0){\curve(1.25,0, 99.24,0)}
+ }
+ \end{verbatim}
+ \newcommand{\RAFsixE}{
+ \scaleput(1.25,1.25){\arc(0,-1.25){-135}}
+ \scaleput(0,0){\curve(0.366,2.133, 1.25,3.19, 2.5,4.42,
+ 5.0,6.10, 7.5,7.24, 10,8.09, 15,9.28, 20,9.90, 30,10.3,
+ 40,10.22, 50,9.80, 60,8.98, 70,7.70, 80,5.91, 90,3.79,
+ 95,2.58, 99.24,1.52)}
+ \scaleput(99.24,0.76){\arc(0,-0.76){180}}
+ \scaleput(0,0){\curve(1.25,0, 99.24,0)}
+ }
+ In a picture environment like:
+ \begin{verbatim}
+ \begin{picture}(100,20)
+ \RAFsixE
+ \end{picture}
+ \end{verbatim}
+ this macro draws:
+ \linethickness{0.7mm}
+ \setlength\unitlength{0.5mm}
+ \begin{center}
+ \begin{picture}(100,20)
+ \RAFsixE
+ \end{picture}\\
+ The RAF 6E has a flat undersurface.
+ \end{center}
+
+ The drawing command \verb?\bigcircle? works similarly to \verb?\circle?
+except there is no \verb?\circle*? equivalent. The following section scales it
+to an ellipse.
+
+ \section{Scaling}
+ The size of \LaTeX\ picture objects may be uniformly scaled by preceding
+them with:
+ \begin{verbatim}
+ \setlength{\unitlength}{x\unitlength}
+ \end{verbatim}
+ where {\tt x} the desired scale factor is a decimal number.
+
+ The \verb?\scaleput?s in \verb?\RAFsixE? position the curves using the scale
+factors \verb?\xscale?, \verb?\xscaley?, \verb?\yscale? and \verb?\yscalex?.
+The drawing commands use the same scale factors. {\tt curve} initially sets
+these scale factors to 1, 0, 1 and 0 respectively. \verb?\renewcommand? may
+reset them to any decimal number. These factors can rotate pictures. The
+factors following rotate the RAF~6E through 12$^\circ$ clockwise about its
+{\tt (0,0)} co-ordinate:
+ \begin{verbatim}
+ \renewcommand{\xscale}{0.9781}
+ \renewcommand{\xscaley}{0.2079}
+ \renewcommand{\yscale}{0.9781}
+ \renewcommand{\yscalex}{-0.2079}
+ \put(0,20){\RAFsixE}
+ \end{verbatim}
+ This draws:
+ \begin{center}
+ \begin{picture}(120,30)(-20,0)
+ \renewcommand{\xscale}{0.9781}
+ \renewcommand{\xscaley}{0.2079}
+ \renewcommand{\yscale}{0.9781}
+ \renewcommand{\yscalex}{-0.2079}
+ \put(0,20){\RAFsixE}
+ \thicklines
+ \put(-20,5){\vector(1,0){20}}
+ \end{picture}
+
+ The RAF 6E has maximum lift at angles of attack over 12$^\circ$.
+ \end{center}
+ Note that \(\cos12^\circ\approx0.9781\) and \(\sin12^\circ\approx0.2079\)
+ \let\RAFsixE\relax
+
+
+ Axonometric projection is another scaling application. Circles become
+ellipses and circular arcs become elliptical arcs. The commands drawing the
+ellipse and arc in the following washer are:
+ \begin{verbatim}
+ \put(20,5){
+ \renewcommand{\xscale}{1}
+ \renewcommand{\xscaley}{-1}
+ \renewcommand{\yscale}{0.6}
+ \renewcommand{\yscalex}{0.6}
+ \scaleput(10,10){\bigcircle{10}}
+ \put(0,-2){
+ \scaleput(10,10){\arc(5,0){121}}
+ \scaleput(10,10){\arc(5,0){-31}}
+ }
+ }
+ \end{verbatim}
+ {\tt (20,5)} are the drawing coordinates of the upper vertex of the washer
+closest to the reader. The angles for the \verb?\arc?s were found by trial and
+error.
+ \begin{center}
+ \setlength\unitlength{1mm}
+ \begin{picture}(40,30)
+ \thicklines
+ \multiput(20,5)(20,12){2}{\line(0,-1){2}\line(-5,3){20}}
+ \multiput(20,5)(-20,12){2}{\line(5,3){20}}
+ \put(20,3){\line(5,3){20}}
+ \put(20,3){\line(-5,3){20}}
+ \put(0,15){\line(0,1){2}}
+ \linethickness{1pt}
+ \put(20,5){
+ \renewcommand{\xscale}{1}
+ \renewcommand{\xscaley}{-1}
+ \renewcommand{\yscale}{0.6}
+ \renewcommand{\yscalex}{0.6}
+ \scaleput(10,10){\bigcircle{10}}
+ \put(0,-2){
+ \scaleput(10,10){\arc(5,0){121}}
+ \scaleput(10,10){\arc(5,0){-31}}
+ }
+ }
+ \end{picture}
+
+ Square washers are sometimes preferred for soft materials.
+ \end{center}
+
+ \section{Symbols}
+ \label{symbols}
+
+ {\tt curves} can also place symbols. \verb?\curvesymbol? must first define
+the symbol as anything a \verb?\put? or \verb?\multiput? may draw. A negative
+symbol count between drawing command and coordinates {\it e.g.,}
+\verb?\tagcurve[-3](0,100,...)? fixes the number of symbols per curve segment.
+
+ These commands draw flight times and successive positions in the following
+drawing:
+ \begin{verbatim}
+ \newcounter{time}
+ \curvesymbol{\thetime\,s\addtocounter{time}{1}}
+ \put(5,4){\curve[-2](0,0, 9.8,19.6, 19.6,0)}
+ \curvesymbol{\phantom{\circle*{1}}\circle*{1}}
+ \put(5,2){\curve[-2](0,0, 9.8,19.6, 19.6,0)}
+ \end{verbatim}
+ where \verb?\phantom? is a plain \TeX\ command from the \TeX
+book\footnotemark[2].
+ \begin{center}
+ \setlength\unitlength{2mm}
+ \begin{picture}(40,35)(-5,-5) \sf
+ \thicklines
+ \newcounter{time}
+ \curvesymbol{\thetime\,s\addtocounter{time}{1}}
+ \put(5,4){\curve[-2](0,0, 9.8,19.6, 19.6,0)}
+ \curvesymbol{\phantom{\circle*{1}}\circle*{1}}
+ \put(5,2){\curve[-2](0,0, 9.8,19.6, 19.6,0)}
+ \put(0,0){\vector(0,1){28}}
+ \put(0,0){\vector(1,0){30}}
+ \multiput(5,0)(5,0){5}{\line(0,1){1}}
+ \multiput(0,5)(0,5){5}{\line(1,0){1}}
+ \setcounter{time}{0}
+ \multiput(0,-1)(5,0){6}{\makebox(0,0)[t]{\thetime}\addtocounter{time}{5}}
+ \put(28,-1){\makebox(0,0)[tl]{$x$ (m)}}
+ \setcounter{time}{0}
+ \multiput(-1,0)(0,5){6}{\makebox(0,0)[r]{\thetime}\addtocounter{time}{5}}
+ \put(-1,27){\makebox(0,0)[rb]{$y$ (m)}}
+ \end{picture} \\
+ Successive positions of a sphere with initial position $(5,2)$ m,\\ initial
+velocity $(4.9,9.8)$ m/s, and acceleration $(0,-9.8)$ m/s$^2$. \\
+ The flight time is recorded above each sphere position.
+ \end{center}
+
+ Fixed spacing of symbols at lengths other than the segment's requires more
+commands. Empty \verb?\curvedashes?, empty \verb?\curvesymbol? and negative
+symbol count stops drawing so a drawing command will calculate
+\verb?\curvelength? only. \verb?\curvesymbol? then resets the symbol and
+\verb?\curvedashes? sets the spacing to its pattern length. If there are no
+symbols at the ends, \verb?\overhang? pulls symbols along the curve. The last
+command with no symbol count draws the symbols.
+
+ \verb?\arc? and \verb?\bigcircle? use sixteen segments for a circle so if
+eight symbols are required the fixed spacing technique is necessary. The
+following commands draw the pin numbers on a relay base:
+
+ \begin{verbatim}
+ \newcounter{pin}
+ \curvedashes{}
+ \curvesymbol{}
+ \put(60,60){\arc[-1](40,0){-360}}
+ \setlength{\curvelength}{0.125\curvelength}
+ \curvedashes[\curvelength]{1}
+ \setlength{\overhang}{0.5\curvelength}
+ \curvesymbol{\addtocounter{pin}{1}\thepin}
+ \put(60,60){\arc(40,0){-360}}
+ \end{verbatim}
+
+ \begin{center}
+ \setlength\unitlength{0.3mm}
+ \begin{picture}(120,120) \sf
+ \thicklines
+ \linethickness{1pt}
+ \curvedashes{}
+ \curvesymbol{}
+ % base
+ \put(60,60){\bigcircle{100}}
+ % spigot
+ \put(60,60){\arc(10,3){325}\put(10,0){\arc(0,3){-180}}}
+ % pins
+ \put(60,60){\bigcircle[-1]{60}}
+ \setlength{\curvelength}{0.125\curvelength}
+ \curvedashes[\curvelength]{1}
+ \overhang0.5\curvelength
+ \curvesymbol{\phantom{\circle{5}}\circle{5}}
+ \put(60,60){\bigcircle{60}}
+ % pin numbers
+ \newcounter{pin}
+ \curvedashes{}
+ \curvesymbol{}
+ \put(60,60){\arc[-1](40,0){-360}}
+ \divide\curvelength8
+ \curvedashes[\curvelength]{1}
+ \setlength{\overhang}{0.5\curvelength}
+ \curvesymbol{\addtocounter{pin}{1}\thepin}
+ \put(60,60){\arc(40,0){-360}}
+ \end{picture} \\
+ The pin numbering of plug-in relays is clockwise \\
+ from the spigot key when viewed from below.
+ \end{center}
+
+ If symbols and dash pattern exist and \verb?\overhang? is 0pt, \verb?curves?
+draw the first position blank. For equal spacing they draw the last position
+blank if rounding error causes the last pattern to be slightly short. If
+\verb?\renewcommand? changes \verb?\diskpitchstretch?, rounding error changes
+and the final symbol may reappear. To avoid fiddling with
+\verb?\diskpitchstretch? for closed curves with symbols equally spaced, use an
+\verb?\overhang? which is a fraction of a pattern length as in the previous
+example.
+
+ \section{Dashes}
+
+ \verb?\curvedashes? must first define a dash pattern with length greater
+than 0pt. Many symbol and pattern combinations are possible. The fixed number
+and fixed spacing methods of symbol drawing described in Section~\ref{symbols}
+work with three methods of drawing dashes which are:
+ \begin{enumerate}
+ \item if there is no symbol count and no symbol, a dash pattern with its
+length reduced by \verb?\csdiameter? is drawn between symbols spaces of width
+close to \verb?\csdiameter? to give an overall spacing equal to the pattern
+length specified by the \verb?\curvedashes? command;
+ \item if there is a symbol count but no symbol, the dash patterns drawn have
+their length equal to that defined by \verb?\curvedashes? with
+\verb?\csdiameter? gaps at symbol positions;
+ \item if there is a symbol count and a symbol, the dash patterns drawn have
+their length adjusted slightly so an integral number of patterns fit between
+symbol positions.
+ \end{enumerate}
+
+ Dash pattern commands for centrelines\footnote{R.N. Roth and I.A. van
+Haeringen, {\sl The Australian Engineering Drawing Handbook, Part~1 Basic
+Principles and Techniques,} The Institution of Engineers, Australia, Canberra,
+1986.} follow for the three techniques above in order:
+ \begin{verbatim}
+ \linethickness{0.25mm}
+ \curvedashes[1.2mm]{0,8,1,3,1,8}
+ \settowidth{\csdiameter}{00}
+ \put(0,20){\curve(0,0, 30,5, 60,0)}
+ \put(0,10){\curve[1](0,0, 30,5, 60,0)}
+ \curvesymbol{\thepin\addtocounter{pin}{1}}
+ \setlength{\csdiameter}{2\csdiameter}
+ \put(0,0){\curve[1](0,0, 30,5, 60,0)}
+ \end{verbatim}
+
+ The following figure shows the resulting dash patterns. The upper line has
+first position blank because the \verb?\overhang? is 0pt. It has patterns
+shrunk to scale between symbol spaces {\it e.g.,}~1 to~2, and symbol space
+centres one pattern length apart. The middle line has patterns close to
+defined length but with the first dash part blanked by half of symbol space~3
+and the second pattern broken in its first dash by symbol space~4. The lower
+line patterns are stretched between symbol spaces. Which pattern is
+appropriate depends on picture meaning and function.
+
+ \begin{center}
+ \setlength\unitlength{1mm}
+ \begin{picture}(60,25) \sf
+ \setcounter{pin}{1}
+ \linethickness{0.25mm}
+ \curvedashes[1.2mm]{0,8,1,3,1,8}
+ \settowidth{\csdiameter}{00}
+ \put(0,20){\curve(0,0, 30,5, 60,0)}
+ \put(0,10){\curve[1](0,0, 30,5, 60,0)}
+ \curvesymbol{\thepin\addtocounter{pin}{1}}
+ \setlength{\csdiameter}{2\csdiameter}
+ \put(0,0){\bezier{-2}(0,0)(30,10)(60,0)}
+ \put(0,20){\curve(0,0, 30,5, 60,0)}
+ \curvedashes{}
+ \put(0,10){\curve[-1](0,0, 30,5, 60,0)}
+ \put(0,0){\bezier{-2}(0,0)(30,10)(60,0)}
+ \end{picture} \\
+ Centrelines and Symbols
+ \end{center}
+
+ \section{Errors}
+ Syntax errors like incorrect or missing punctuation while using {\tt curves}
+will result in \TeX\ or \LaTeX\ error messages. The \TeX book\footnotemark[2]
+and \LaTeX\ manual\footnotemark[1] explain the meaning and correction of these
+errors. The previous examples and Section~\ref{summary} should make the
+correct syntax for {\tt curves} commands clear.
+
+ {\tt curves} will write a {\tt LaTeX error.} message to the screen and {\tt
+log} file if you supply an incorrect number of coordinates.
+
+ If four sequential points in a drawing command argument have the line
+through the first and third parallel to the line through the second and
+fourth:
+ \begin{itemize}
+ \item exactly or closely, {\tt curves} knows it cannot draw a parabola
+tangent to two parallel lines, issues to the screen and log file:\\
+ {\tt LaTeX Warning: \string\curve\ straight from \ldots}\\
+ and draws a straight line;
+ \item or approximately, {\tt curves} may draw an unexpected curve with no
+warning.
+ \end{itemize}
+ If four sequential points in a drawing command argument have the line
+through the first and second parallel to the line through the third and
+fourth:
+ \begin{itemize}
+ \item {\tt curves} draws a parabola which may be nowhere near the curve.
+ \end{itemize}
+ If the four points were on a straight line, removing one or more points is
+a remedy. If they are not on a straight line, adding points may help.
+ Specifying many points will give you a satisfactory curve with perhaps an
+annoying number of \verb?\curve straight? warnings. After a
+\verb?\curvewarnfalse?, {\tt curves} still uses the straight lines but does
+not tell you.
+
+ Curvature changes sign on curves like \(y=\sin x\). Specifying inflection
+points as {\tt curve} coordinates will reduce error and specifying sufficient
+coordinates will then give satisfactory results. For discontinuous tangents
+splitting a curve into pieces is unavoidable. Splitting a curve into pieces
+with curvature the same sign can give satisfactory results with fewer
+coordinates. \verb?\tagcurve? can prevent tangent discontinuities. If an
+inflexion point's exact location is unknown, try the midpoint of the straight
+line through the ends of its segment.
+
+ Curves appear rougher than horizontal and vertical lines. Picture
+digitization causes this not inaccuracy in \TeX, {\tt curves.sty} or {\tt
+curvesls.sty}. Setting \verb?\diskpitchstretch? to a value less than one with
+\verb?\renewcommand? may smooth an unusually rough curve.
+
+ Symbols and symbol spaces misaligned are usually due to rounding error.
+Adjusting \verb?\diskpitchstretch? below one can reduce rounding error and
+increase alignment accuracy. This should be limited to the misaligned curve
+with {\tt \{\ \}}\footnotemark[1].
+
+ The replacement \verb?\bezier? does not give exactly the same results as the
+original in {\tt bezier.sty} or in {\tt LaTeX2e}. The difference is extremely
+small but if it is important to you comment out the five lines of code for
+\verb?\bezier? and \verb?\@bezier? near the start of {\tt curves.sty} or {\tt
+curvesls.sty}. You now have a \verb?\bezier? which is slower and needs more
+memory but has only its original capabilities and gives only its original
+results.
+
+Please email me examples of any errors not covered above. You may have found a
+bug in the code or documentation.
+
+\section{Pleas for the Future}
+
+{\tt curves} will never work with plain \TeX\ and it will never be as
+powerful as {\sf METAFONT} or importing encapsulated PostScript
+files. Suggestions or criticisms by email are
+welcome. Version \version\ has benefitted greatly from previous
+help. The latest versions are first available at URL:
+ \begin{verbatim}
+ ftp://ilm.mech.unsw.edu.au/pub/archive/latex/macros/curves/
+ \end{verbatim}
+ At your local CTAN mirror the latest version should be near the
+ directory for the latest version of \LaTeX. Please use
+ CTAN to reduce Internet load.
+
+{\tt curvesls.sty} uses much less \TeX\ memory and is faster than
+{\tt curves.sty}. More people could use {\tt curvesls.sty} if em\TeX\
+or equivalent line drawing \verb?\special?s were compiled into dvi
+drivers for viewing and printing. Ask your system people for this!
+
+A {\tt .dvi} file containing curves produced with {\tt curvesls.sty}
+has many occurrences of the text strings {\tt em:lineto}, {\tt
+em:moveto} and {\tt em:linewidth XXXXpt} placed by the em\TeX\
+\verb?\special?s. These strings would have earlier occupied \TeX\
+memory. Extra space is also taken by the disks {\tt curvesls} uses to
+cover the cracks between square line ends at a slight angle. Renaming
+these \verb?\special?s to {\tt L}, {\tt M} and {\tt W XXXXpt}
+respectively would save \TeX\ memory. Even better, {\tt W XXXXpt}
+could also calculate and store the bitmap of a disk which {\tt L}
+would add to its line end to round it so {\tt curvesls} need not add
+disks to cover cracks. A fourth \verb?\special?, {\tt D}, could place
+the disk at the current position which {\tt curvesls} would use to
+round the beginning of a curve. If you write dvi drivers, please add
+these four proposed \verb?\special?s.
+
+
+
+
+ \section{Curves Summary}
+ \label{summary}
+ The commands following are for the picture environment in the \LaTeX\
+manual\footnotemark[1].
+ \makeatletter
+ % Hanging indentation with paragraph separation for author-date, etc.
+ \newenvironment{hanging}{\list{}{\topsep\itemsep \advance\topsep-\parskip
+ \parsep\itemsep \itemsep\z@skip \partopsep\parskip
+ \ifdim\parindent>\z@ \@tempdimb\parindent \else \@tempdimb1.5 em\fi
+ \leftmargin\@tempdimb \listparindent-\@tempdimb \itemindent-\@tempdimb
+ \rightmargin\z@ \labelsep\z@ \labelwidth\z@ }\item[]}%
+ {\endlist \addvspace\parsep}
+ \makeatother
+
+
+ \subsection{Arguments of Commands}
+
+ \begin{hanging}
+
+{\tt <blank length>} decimal number of {\tt <unit len>} blank. Not negative.
+
+ {\tt <character or symbol>} is anything which a \verb?\put? or
+\verb?\multiput? may draw.
+
+ {\tt <coordinates>} are decimal numbers giving alternate $x$ and $y$
+ coordinates of the curve as multiples of \verb?\unitlength?, comma
+separated.
+
+{\tt <[,dash...]>} optional continuation of alternating dash and blank numbers
+of unit lengths, comma separated. Not negative. Allows decimal points.
+
+ {\tt <diameter>} is a decimal number giving the diameter in
+ \verb?\unitlength?s.
+
+ {\tt <symbol count>} is the number of symbols or patterns to be drawn,
+default 0.
+
+ {\tt <unit len>} unit length dimension {\it e.g.\/,} 2.5mm, 10pt, used in
+measuring blanks and dashes. Not negative. Default value is
+\verb?\unitlength?.
+
+ \end{hanging}
+
+
+ \subsection{Lengths used by Commands}
+ \begin{hanging}
+
+ \verb?\csdiameter? is the size of the space left for a symbol and can be
+increased or set with \verb?\settowidth{\csdiameter}{<character or symbol>}?.
+
+ \verb?\curvelength? is the total length of the curve calculated before
+drawing by using Simpson's rule once between each pair of coordinate points.
+
+\verb?\overhang? length of as drawn dash pattern overlapping start of
+patterns.
+ \end{hanging}
+ \subsection{Control Commands}
+ \begin{hanging}
+ \verb?\curvewarntrue? turns warning of parabola replacement by straight
+lines on (default).
+
+ \verb?\curvewarnfalse? turns warning of parabola replacement by straight
+lines off.
+ \end{hanging}
+ \subsection{Parameter Setting Commands}
+
+ \begin{hanging}
+ \verb?\curvesymbol{<character or symbol>}? sets symbol and
+ \verb?\csdiameter?.
+
+ \verb?\curvedashes[<unit len>]{<blank length><[,dash...]>}? A drawing
+command before a \verb?\curvedashes? or after one with an empty or zero length
+pattern will draw:
+
+ \begin{hanging}
+
+ if {\tt <symbol count>} is zero or missing, a continuous curve;
+
+else if {\tt <symbol count>} is positive, {\tt <symbol count>-1} squares of
+line thickness size between and additional squares at coordinates or bezier
+end points;
+
+else if no {\tt <character or symbol>} exists, nothing;
+
+ else, {\tt -<symbol count>-1} characters or symbols between coordinates and
+additional ones at coordinates or bezier end points.
+
+ \end{hanging}
+ After a \verb?\curvedashes? command defining a pattern whose length exceeds
+zero, commands draw:
+
+ \begin{hanging}
+
+if {\tt <symbol count>} is zero or missing then at a spacing equal to the
+specified pattern length,
+
+ \begin{hanging}
+ if no {\tt <character or symbol>} exists, a dash pattern reduced in length
+by \verb?\csdiameter? to fit between symbol spaces of \verb?\csdiameter?,
+
+ else if \verb?\overhang? is not 0pt, a {\tt <character or symbol>} at all
+positions,
+
+ else a {\tt <character or symbol>} with the first position blank;
+
+ \end{hanging}
+
+else, \verb?\csdiameter? wide symbol spaces, one at and
+ {\tt |<symbol count>|-1} between coordinate points with dash pattern
+lengths,
+ \begin{hanging}
+ if no {\tt <character or symbol>} exists, exact but broken by the spaces,
+
+else, adjusted to give a whole number of patterns between spaces.
+ \end{hanging}
+ \end{hanging}
+
+
+ \verb?\diskpitchstretch? is initially 1 but \verb?\renewcommand? can
+change it to a higher value like 5 to save memory in drafts of complex
+documents or a lower local value like 0.5 to smooth curve digitization.
+
+ \verb?\linethickness{<len>}? sets line or dash thicknesses to {\tt
+<len>} from 0.5pt up to 15pt (0.17mm to 5mm). \verb?\thicklines? and
+\verb?\thinlines? also set thickness.
+
+ \verb?\xscale?, \verb?\xscaley?, \verb?\yscale? and \verb?\yscalex? are
+scale factors initially set to 1, 0, 1 and 0 respectively which
+\verb?\renewcommand? or \verb?\def? can reset.
+ \end{hanging}
+
+
+ \subsection{Curve Drawing Commands}
+ Curves drawn consist of parabolic arcs between coordinate points with
+tangents at each point parallel to the straight line through adjacent points.
+
+ \begin{hanging}
+ \verb?\arc[<symbol count>](X1,Y1){<angle>}? draws a circular arc centred
+on current position, starting from {\tt (X1,Y1)} and proceeding
+counterclockwise for {\tt <angle>} degrees.
+
+ \verb?\bezier{<symbol count>}(X1,Y1)(X2,Y2)(X3,Y3)? draws a curve through
+the end points {\tt (X1,Y1)} and {\tt (X3,Y3)} tangent to the straight lines
+joining each of them to {\tt (X2,Y2)}. Extended faster replacement for {\tt
+bezier.sty} version.
+
+ \verb?\bigcircle[<symbol count>]{<diameter>}? draws a circle of diameter
+equal to {\tt <diameter>} times \verb?\unitlength?.
+
+ \verb?\closecurve[<symbol count>](<coordinates>)? draws a closed curve
+with continuous tangents at all points. At least 6 coordinates required.
+
+ \verb?\curve[<symbol count>](<coordinates>)? draws a curve through the
+specified {\tt <coordinates>}. For 4 coordinates this is a straight line.
+
+ \verb?\scaleput(X1,Y1){<picture object>}? places a picture object in a
+position scaled by \verb?\xscale?, \verb?\xscaley?, \verb?\yscale? and
+\verb?\yscalex? for axonometric projection or rotations.
+
+ \verb?\tagcurve[<symbol count>](<coordinates>)? draws a curve without its
+first and last segments but if only 6 coordinates draws the last segment only.
+ \end{hanging}
+ \end{document} \ No newline at end of file
diff --git a/obsolete/macros/latex209/contrib/curves/curvesls.sty b/obsolete/macros/latex209/contrib/curves/curvesls.sty
new file mode 100644
index 0000000000..841eb55dc7
--- /dev/null
+++ b/obsolete/macros/latex209/contrib/curves/curvesls.sty
@@ -0,0 +1,511 @@
+% curvesls.sty version 1.42 for LaTeX 2.09 and LaTeX2e.
+% I.L. Maclaine-cross, The University of New South Wales.
+% Internet: i.maclaine-cross@unsw.edu.au
+\typeout{Document Style Option `curvesls' <12th August 2000>}
+% Draws curves in LaTeX picture environment using parabolas between points
+% with continuous slope at points. Equivalent to technical pens with
+% compasses and French curves.
+% A Command Summary is at the end of this file.
+
+% Make `;' appear like a letter so control sequences can use it and they
+% will not be accidently used by other macro packages.
+\catcode`\;=11
+
+% DRIVER SPECIFIC COMMANDS
+% These are not required by curves.sty a companion macro package
+% which is slower and requires more TeX memory.
+% Requires the dvi driver have the following three line drawing \specials
+% which draw straight lines rectangular at both ends. curvesls.sty adds a
+% circle of appropriate size to smooth junctions and round ends.
+% If these are unavailable use the slower curves.sty with more TeX memory.
+% The \special text in the following three commands is for emTeX's dvi drivers:
+% before drawing every line sets the driver's straight line width
+% to dimen #1;
+\newcommand\;linewidth[1]{\special{em:linewidth \the#1}}
+% sets driver page position to current TeX page position;
+\newcommand\;startline{\special{em:moveto}}
+% draws straight line from last driver position to current TeX position and
+% then resets driver position to current TeX page position.
+\newcommand\;stopl;ne{\special{em:lineto}}
+% To use other dvi drivers which draw straight lines like emTeX, alter the
+% above three commands to make their function the same as described above.
+% The manual for Tomas Rokicki's DVIPS version 5.515 for the IBM PC says
+% that this PostScript driver supports the above emTeX \specials. This style
+% file works unmodified with Rokicki's driver when the emTeX specials are
+% compiled in.
+
+\newcount\;sc % number of symbols on Bezier segment
+\newcount\;scp
+\newcount\;t
+\newcount\;cc % coordinate count
+\newcount\;cnd % actual point count to next dot
+\newcount\;mcnd % maximum point count to next dot
+\newcount\;np
+\newcount\;overhang
+\newcount\;pbs
+\newcount\;pns
+\newcount\;psc % maximum dot spacing on line in sp.
+\newcount\;rc
+\newcount\;rtc
+\newcount\;tc
+\let\;tca=\@tempcnta
+\let\;tcb=\@tempcntb
+
+\newdimen\csdiameter \csdiameter\z@
+\newdimen\curvelength
+\newdimen\overhang \overhang\z@
+\newdimen\;dx
+\newdimen\;ddx
+\newdimen\;dy
+\newdimen\;ddy
+\newdimen\;pl \;pl\z@
+\newdimen\;ucd
+\newdimen\;y
+\let\;td=\@tempdima
+\let\;ytd=\@tempdimb
+
+\newsavebox{\;csbox}
+\newsavebox{\;pt}
+
+\newif\ifcurvewarn \curvewarntrue % Warn about curve problems
+\newif\if;ccn % coordinate number correct
+\newif\if;pt % plot points if true
+\newif\if;csym % curve symbol defined
+\newif\if;scnt % symbol or pattern count <>0
+
+\newhelp\;strline{curve straight from}
+\newhelp\m;ssingcoord{curve needs more points, add them.}
+\newhelp\;negdash{curvedashes needs the same sign for all arguments.}
+\newhelp\;oddcoord{curve requires two co-ordinates for each point,
+ count them.}
+
+\newcommand\arc{\@ifnextchar[\;arc{\;arc[0]}}
+\newcommand\;arc{}
+\def\;arc[#1](#2,#3)#4{\;setpoint{#1}\scaleput(#2,#3){\;ddx-#3\unitlength
+ \;ddy#2\unitlength \;firstpoint \;td#4\p@ \;drwarc}}
+
+
+% Redefines version in LaTeX 2e of 1 June 1994.
+\def\bezier#1)#2(#3)#4({\@bezier#1)(#3)(}
+\def\@bezier#1(#2,#3)(#4,#5)(#6,#7){\;dx#4\unitlength \;ddx-\;dx
+ \advance\;dx-#2\unitlength \advance\;ddx#6\unitlength \;dy#5\unitlength
+ \;ddy-\;dy \advance\;dy-#3\unitlength \advance\;ddy#7\unitlength
+ \;setpoint{#1}\scaleput(#2,#3){\;firstpoint \;bezier}}
+
+\newcommand\bigcircle{\@ifnextchar[\;bgcrcl{\;bgcrcl[0]}}
+\newcommand\;bgcrcl{}
+\def\;bgcrcl[#1]#2{\;setpoint{#1}\;dx\unitlength \global\divide\unitlength\tw@
+ \scaleput(#2,0){\;startline \;ddx\z@ \;ddy#2\unitlength \global\unitlength\;dx
+ \;td360\p@ \;drwarc}}
+
+\newcommand\closecurve{\@ifnextchar[\;closecurve{\;closecurve[0]}}
+\newcommand\;closecurve{}
+\def\;closecurve[#1](#2){\;coordn\closecurve\thr@@{#2}{#1}%
+ \if;ccn\scaleput(\;xb,\;yb){\;startline
+ \edef\;ci{\;xa,\;ya,#2,\;xb,\;yb,\;xc,\;yc}%
+ \advance\;cc\thr@@ \;tagcurve\;ci}\fi}
+
+\newcommand\curve{\@ifnextchar[\;curve{\;curve[0]}}
+\newcommand\;curve{}
+\def\;curve[#1](#2){\;coordn\curve\tw@{#2}{#1}%
+ \if;ccn \scaleput(\;xa,\;ya){\;firstpoint
+ \ifnum\;cc=\tw@ \;slbezd \;slbez
+ \else \;scbezd\;dx\;ddx\;xa\;xb\;xc \;scbezd\;dy\;ddy\;ya\;yb\;yc
+ \;bezier \;tagcurve{#2}\ifnum\;cc>6\;endcurve\fi \fi}\fi}
+\newcommand\;scbezd[5]{\;slcd#2#3#5\divide#24\;slcd#1#3#4\advance#1-#2}
+\newcommand\;xa{} \newcommand\;xb{} \newcommand\;xc{}
+\newcommand\;ya{} \newcommand\;yb{} \newcommand\;yc{}
+\newcommand\;ci{}
+
+\newcommand\curvesymbol[1]{\def\;curvesymbol{#1}\ch;ckcs
+ \global\setbox\;csbox\hbox{#1}\csdiameter\wd\;csbox}
+\newcommand\;curvesymbol{} \def\;curvesymbol{}
+
+\newcommand\curvedashes{\@ifnextchar[\;crvdshs{\;crvdshs[\unitlength]}}
+\newcommand\;crvdshs{}
+\def\;crvdshs[#1]#2{\;ucd#1\def\;icurvedashes{#2}\;ccnfalse \;pl\z@
+ \@for \;ci:=#2\do{\ifdim\;ci\;ucd<\z@ \;ccntrue \@latexerr{\string
+ \curvedashes\space sign bad at \;ci}{\the\;negdash ^^J\@eha}%
+ \else \advance\;pl\;ci\;ucd \fi}\if;ccn\;pl\z@\fi}
+\newcommand\;icurvedashes{}
+
+\newcommand\diskpitchstretch{\@ne}
+
+\newcommand\tagcurve{\@ifnextchar[\;tgcrv{\;tgcrv[0]}}
+\newcommand\;tgcrv{}
+\def\;tgcrv[#1](#2){\;coordn\tagcurve\thr@@{#2}{#1}\if;ccn
+ \scaleput(\;xb,\;yb){\;firstpoint \;tagcurve{#2}}\fi}
+
+\newcommand\scaleput{}
+\long\def\scaleput(#1,#2)#3{\@killglue \;td#2\unitlength
+ \raise\yscale\;td \hbox to \z@{\kern\xscaley\;td \;td#1\unitlength
+ \kern\xscale\;td \raise\yscalex\;td \hbox{#3}\hss}\ignorespaces}
+\newcommand\xscale{\@ne}
+\newcommand\xscaley{0}
+\newcommand\yscale{\@ne}
+\newcommand\yscalex{0}
+
+% Plot first point if any.
+\newcommand\;firstpoint{\;startline \ifdim\;pl=\z@\;point\relax\fi}
+
+% Calculates segment count, sine, cosine and differences then plots segments.
+\newcommand\;drwarc{\;cc\;td \;np\;td \;td23\p@ \divide\;cc\;td
+ \;abs\;cc \advance\;cc\@ne \;pns\p@ \divide\;pns\tw@
+ \divide\;np\;cc \;rc\;np \divide\;rc\;pns \;abs\;rc
+ \advance\;rc\@ne \divide\;np\;rc \multiply\;np\;pns \divide\;np14668 %
+ \multiply\;np\;rc \divide\;np\@cclvi \;scp\p@ \multiply\;scp\@cclvi
+ \;t\;pns \;csi\;csi\;csi\;csi \;rxy\;ddx\;ddy \divide\;rc\p@
+ \advance\;rc\@ne \;rtc\;rc \advance\;rc\;rc \;ndd\;ddx \;ndd\;ddy
+ \;csi \;rxy\;ddx\;ddy \divide\;rc\;pns \advance\;rc\@ne
+ \@whilenum\;cc>\z@ \do{\advance\;cc\m@ne \;dx\;ddx \;dy\;ddy
+ \divide\;ddx\;rc \divide\;ddy\;rc \;td\;ddx \;ddx\;t\;td
+ \advance\;ddx-\;np\;ddy \;ddy\;t\;ddy \advance\;ddy\;np\;td
+ \divide\;ddx\;pns \divide\;ddy\;pns \;ddx\;rc\;ddx \;ddy\;rc\;ddy
+ {\;bezier \global\;ytd\;y \global\;tca\;overhang}\;y\;ytd \;overhang\;tca}}
+\newcommand\;ndd[1]{\divide#1\;rc \multiply#1\;np \divide#1\;t #1\;rtc#1}
+% Cosine and sine half angle iteration.
+\newcommand\;csi{\;tcb\;np \multiply\;np\;t \divide\;np\;pns \;t\;tcb
+ \multiply\;t\;t \divide\;t-\;scp \advance\;t\;pns \divide\;scp4 }
+
+% Count the number of co-ordinate specified and warns if incorrect.
+\newcommand\;coordn[4]{\;setpoint{#4}\ifx#1\closecurve\;cc\tw@\else\;cc\z@\fi
+ \@for\;ci:=#3\do{\advance\;cc\@ne
+ \ifcase\;cc \or \;d;f\;xa \or \;d;f\;ya \or \;d;f\;xb
+ \or \;d;f\;yb \or \;d;f\;xc \or \;d;f\;yc \fi
+ \ifx#1\closecurve\ifodd\;cc \;d;f\;xa \else \;d;f\;ya \fi\fi}%
+ \;ccnfalse \ifx#1\closecurve \advance\;cc-\tw@ \fi
+ \ifodd\;cc \@latexerr{\string #1\space points odd}{\the\;oddcoord ^^J\@eha}%
+ \else \divide\;cc\tw@
+ \ifnum#2>\;cc \@latexerr{\string #1 needs \the#2 points}%
+ {\the\m;ssingcoord ^^J\@eha}%
+ \else \;ccntrue \fi\fi}
+
+% Sets symbol, character or disk depending on how line is to be plotted.
+% Corrects overhang to be positive or zero but no greater than \;pl.
+\newcommand\;setpoint[1]{\curvelength\z@ \let\;stopline\relax
+ \def\;point##1{\raise\;y\hbox{{\copy\;pt##1}}}\ch;ckcs
+ \ifnum#1=\z@\;scntfalse\else\;scnttrue\fi \;sc#1\relax \;abs\;sc \;psc\;sc
+ \ifdim\;pl>\z@ \;overhang\overhang
+ \ifnum\;overhang=\z@\else \;np\;overhang \divide\;np\;pl \multiply\;np\;pl
+ \ifnum\;overhang<\z@ \advance\;overhang\;pl
+ \else \ifnum\;overhang=\;np\advance\;overhang\;pl\fi
+ \fi \advance\;overhang-\;np \fi
+ \if;csym \if;scnt\;setdisk\else\;setsymbol\fi \else \;setdisk \fi\s;tpitch
+ \else\ifnum#1>\z@ \s;tcirc{\hss\vrule\@height\@wholewidth\@width\@wholewidth}%
+ \else\ifnum#1<\z@ \if;csym\;setsymbol\else\set;pt{}\fi
+ \else\;setdisk\s;tpitch
+ \fi\fi\fi \;y\dp\;pt \advance\;y-\ht\;pt \divide\;y\tw@}
+\newcommand\;setsymbol{\s;tcirc{\hss\unhcopy\;csbox}\edef\;point{\;point\relax
+ \s;tcirc{\hss\noexpand\;curvesymbol}\global\setbox\;csbox\copy\;pt}}
+\newcommand\s;tpitch{\;td\diskpitchstretch\p@ \;psc\;td}
+\newcommand\;stopline{} \newcommand\;point{}
+
+% Sets LaTeX disk character and thickness.
+\newcommand\;setdisk{\@killglue \ifdim\@halfwidth>\p@
+ \set;pt{\@circ\@wholewidth{112}}\;linewidth{\wd\;pt}\s;tcirc{\unhbox\;pt}%
+ \else \;linewidth\@wholewidth \set;pt{}\fi \let\;stopline\;stopl;ne}
+
+% Check if curvesymbol exists and set switch.
+\newcommand\ch;ckcs{\ifx\;curvesymbol\@empty\;csymfalse\else\;csymtrue\fi}
+
+% Makes zero width box \;pt of point
+\newcommand\s;tcirc[1]{\set;pt to\z@{#1\hss}}
+
+% Set global box \;pt
+\newcommand\set;pt{\global\setbox\;pt\hbox}
+
+% Plots last segment of curve from coordinates already read.
+\newcommand\;endcurve{\;ecbezd\;dx\;ddx\;xa\;xb\;xc
+ \;ecbezd\;dy\;ddy\;ya\;yb\;yc \;bezier}
+\newcommand\;ecbezd[5]{\;slcd#1#3#5\divide#14 #2-#1\advance#2#5\unitlength
+ \advance#2-#4\unitlength}
+
+% Reads coordinates of four points before going to difference calculation.
+\newcommand\;tagcurve[1]{\ifnum\;cc=\thr@@ \;endcurve \else \;cc\z@
+ \@for\;ci:=#1\do{\advance\;cc\@ne \ifnum\;cc>6 %
+ \ifodd\;cc \;slcd\;dx\;xa\;xc \let\;xa\;xb \let\;xb\;xc \;d;f\;xc
+ \else \t;gcrv \fi \fi}\fi}
+
+% Calculates differences over whole segment from four points.
+\newcommand\t;gcrv{\;slcd\;dy\;ya\;yc \let\;ya\;yb \let\;yb\;yc \;d;f\;yc
+ \;rxy\;dx\;dy \divide\;dx\;rtc \divide\;dy\;rtc
+ \;ddx-\;ya\;dx \advance\;ddx\;xa\;dy \;ddy\;ddx
+ \advance\;ddx\;yb\;dx \advance\;ddx-\;xb\;dy
+ \advance\;ddy\;yc\;dx \advance\;ddy-\;xc\;dy
+ \;slbezd \;td\;ddy \divide\;td\@m
+ \ifdim\;td=\z@ \ifcurvewarn
+ \@warning{\the\;strline \;xa,\;ya\space to \;xb,\;yb}\fi \;slbez
+ \else \;td\unitlength \;rtc\;td \advance\;rtc\;rtc
+ \divide\;rtc\p@ \advance\;rtc\@ne \divide\;td\;rtc
+ \;t\;ddx \;scp\;t \;abs\;t
+ \advance\;t\;t \divide\;t\p@ \advance\;t\@ne \divide\;scp\;t
+ \multiply\;td\;scp \divide\;td\;ddy \multiply\;td\;rtc \multiply\;td\;t
+ \;ddx\;xc\;td \advance\;ddx-\;xa\;td \advance\;dx-\;ddx
+ \;ddy\;yc\;td \advance\;ddy-\;ya\;td \advance\;dy-\;ddy \;bezier \fi}
+
+% Avoid repeating {\;ci}
+\newcommand\;d;f[1]{\edef#1{\;ci}}
+
+\newcommand\;slbezd{\;slcd\;dx\;xa\;xb \;slcd\;dy\;ya\;yb}
+
+% Calculates difference between two coordinates.
+\newcommand\;slcd[3]{#1#3\unitlength \advance#1-#2\unitlength}
+
+% Calculates differences for bezier straight line.
+\newcommand\;slbez{\divide\;dx\tw@ \;ddx\;dx \divide\;dy\tw@ \;ddy\;dy \;bezier}
+
+% Scales segment differences, then calculates segment pattern and disk count,
+% and initial disk differences; selects line or dashes.
+\newcommand\;bezier{\;scale\;dx\;dy \;scp\;rc \;scale\;ddx\;ddy
+ \advance\;scp\;rc \;bezc\;dx\;ddx \;bezc\;dy\;ddy \;rxy\;ddx\;ddy
+ \divide\;rc\p@ \advance\;rc\thr@@
+ \;tc\;rc \;sroot\;sroot\;sroot \;t\;rc \;mcnd\@ne \;rxy\;dx\;dy
+ \advance\;rc\;scp \divide\;rc\thr@@ \global\advance\curvelength\;rc sp%
+ \ifdim\;pl>\z@ \;np\;rc \divide\;np\;psc
+ \ifnum\;t<\;np \;mcnd\;np \divide\;mcnd\;t
+ \divide\;np\;mcnd \multiply\;np\;mcnd \;t\;np
+ \fi \fi
+ \if;scnt\ifdim\;pl=\z@ \;t\;sc
+ \else\;np
+ \if;csym \;rc \divide\;np\;sc \advance\;np-\csdiameter
+ \;td\;pl \divide\;td\tw@ \advance\;np\;td \divide\;np\;pl
+ \ifnum\;np<\@ne\;np\@ne\fi \multiply\;np\;sc
+ \else \;sc \fi \advance\;t\;np \divide\;t\;np \multiply\;t\;np
+ \fi \fi \;rtc\;t \divide\;rtc\;mcnd \;tcb\;rtc \multiply\;tcb\;t
+ \advance\;rtc\m@ne \multiply\;rtc\;t \;tc\;t \advance\;tc\;tc
+ \;bezd\;dx\;ddx \;bezd\;dy\;ddy
+ \ifdim\;pl>\z@ \;dashes \else \let\n;xt\;spoints \;spoints \fi}
+\newcommand\;scale[2]{\;td\xscale#1\advance\;td\xscaley#2%
+ #2\yscale#2\advance#2\yscalex#1#1\;td \;rxy#1#2}
+\newcommand\;bezc[2]{\advance#1#1\advance#2#2\;td#2\advance#2-#1\advance#1\;td}
+\newcommand\;bezd[2]{\divide#2\;tcb \;td#2\multiply\;td\;rtc \advance#1-\;td
+ \divide#1\;tc}
+
+% Plots a continuous line or equispaced squares or symbols along a segment.
+\newcommand\;spoints{\advance\;y\;dy \kern\;dx
+ \;point\;stopline \advance\;t\m@ne
+ \ifnum\;t>\z@ \advance\;dx\;ddx \advance\;dy\;ddy
+ \else \let\n;xt\relax \fi \n;xt}
+
+% Calculates length of vector \;rc from coordinates #1,#2
+\newcommand\;rxy[2]{\;tc#1\;abs\;tc \;tcb#2\;abs\;tcb
+ \;rc\;tc \advance\;rc\;tcb
+ \ifnum\;rc>\z@ \;rtc\;rc \advance\;rtc\;rtc \divide\;rtc\p@
+ \ifnum\;rtc>\z@ \advance\;rtc\@ne \divide\;tc\;rtc
+ \divide\;tcb\;rtc \divide\;rc\;rtc
+ \else \;rtc\@ne \fi \multiply\;tc\;tc \multiply\;tcb\;tcb
+ \advance\;tc\;tcb \;sroot \multiply\;rc\;rtc \fi}
+
+% Replaces argument by magnitude
+\newcommand\;abs[1]{\ifnum#1<\z@ #1-#1\fi}
+
+% Iteration of square root calculation by Newton's method.
+\newcommand\;sroot{\;rroot\;rroot\;rroot}
+\newcommand\;rroot{\;tcb\;tc \divide\;tcb\;rc \advance\;rc\;tcb \divide\;rc\tw@}
+
+% Variable uses in \;dashes, \;scdashes, \;nscdashes, \;pdashes and \;dash.
+% counts
+% \;scp = distance between points.
+% \;rc = length of Bezier segment.
+% \;rtc = total points in Bezier segment.
+% \;np = number of whole patterns in Bezier segment or scratch.
+% \;overhang = of dash pattern past symbol or end of segment.
+% \;pbs = total points between symbols
+% \;pns = points to next symbol or dot.
+% \;tc = number of points to blank for curve symbol.
+% \;tcb = number of points along pattern.
+% dimens
+% \;pl = length of dash pattern.
+% \;ucd = dash pattern unit length.
+
+% Initializes dash plot for segment and selects symbol count alternative.
+\newcommand\;dashes{\let\;ticd\;icurvedashes \let\;tucd\;ucd \divide\;rc\;t
+ \;rtc\;t \;tc\;rc \advance\;tc\csdiameter \divide\;tc\;rc
+ \divide\;tc\tw@ \;t\;tc \multiply\;tc\tw@ \;ptfalse \;cnd\;mcnd
+ \;pbs\;rc \divide\;pbs\tw@ \advance\;overhang\;pbs \divide\;overhang-\;rc
+ \if;scnt \;scdashes \else \;nscdashes \fi \multiply\;overhang\;rc}
+
+% Plots dash pattern when a nonzero symbol count is specified.
+\newcommand\;scdashes{\;pbs\;rtc \divide\;pbs\;sc \;ccss \;scp
+ \if;csym \;pl \multiply\;scp\;np \divide\;scp\;sc \advance\;pbs-\;tc
+ \else \;pbs \multiply\;scp\;rc \fi \;np\;overhang \;overhang\z@
+ \divide\;scp\;pbs \;tcb\z@ \;pns\;t \;dash \;overhang\;np
+ \if;csym\else \advance\;overhang-\;tcb \advance\;rtc-\;tcb
+ \advance\;pbs-\;tc \fi
+ \;pns\;pbs \advance\;pns-\;np \if;csym\else\advance\;pns\;tcb\fi
+ \@whilenum\;rtc>\z@\do{\;pdashes \;ptfalse \;t\;tc \;pns\;t \;dash
+ \;pns\;pbs \;overhang\if;csym\;np\else-\;overhang\fi
+ \advance\;pns-\;overhang}\;overhang-\if;csym\;np\else\;overhang
+ \;ptfalse \;t\;tc \;tcb\;overhang
+ \divide\;t\tw@ \;rtc\;t \;pns\;t \;dash \fi}
+
+% Plots symbols at natural pattern length but shrinks pattern to fit between.
+\newcommand\;nscdashes{\advance\;pbs\;pl \divide\;pbs\;rc
+ \if;csym \;bpdashes \fi \;ccss \;pns\;t
+ \;dash \advance\;pbs-\;tc \;scp\;pl \divide\;scp\;pbs \;pns\;pbs
+ \@whilenum\;rtc>\z@\do{\;pdashes \;ptfalse \;t\;tc \;pns\;t \;dash
+ \;pns\;pbs}\if;csym \else \divide\;tc\tw@ \advance\;overhang\;tc \fi}
+
+% If large symbol spaces, blank curve.
+\newcommand\;ccss{\ifnum\;pbs>\;tc\else \;bpdashes \fi}
+
+% A blank or symbol plotting dash pattern
+\newcommand\;bpdashes{\let\;tucd\;pl \let\;ticd\;ricd \;tc\z@ \;t\z@}
+\newcommand\;ricd{1,0}
+
+% Reads dash pattern plotting dashes and spaces up to next symbol space.
+\newcommand\;pdashes{\ifnum\;pns>\z@ \;td\z@ \;tcb\z@ \;ptfalse
+ \@for\;ci:=\;ticd \do{\advance\;td\;ci\;tucd \;t\;scp \divide\;t\tw@
+ \advance\;t\;td \divide\;t\;scp \advance\;t-\;tcb \;dash
+ \if;pt\;ptfalse\else\;pttrue\fi}%
+ \let\n;xt\;pdashes \else \let\n;xt\relax \fi \n;xt}
+
+% Checks if dash or space occurs before or after curve, calculates fractions.
+\newcommand\;dash{\ifnum\;t=\z@
+ \if;csym \ifnum\;rtc>\z@ \if;pt\;point\;startline\fi \fi \fi
+ \else \advance\;tcb\;t \advance\;pns-\;t
+ \ifnum\;overhang<\z@ \advance\;overhang\;t
+ \;t \ifnum\;overhang<\z@ \z@ \else \;overhang \;overhang\;tcb \fi
+ \else \;overhang\;tcb \fi
+ \ifnum\;pns<\z@ \advance\;overhang\;pns \advance\;tcb\;pns
+ \advance\;t\;pns \;pns\z@ \fi \advance\;rtc-\;t
+ \ifnum\;rtc<\z@ \advance\;overhang\;rtc \advance\;t\;rtc\fi
+ \ifnum\;t>\z@ \if;pt\;point\;startline\fi \let\n;xt\;points \;points \fi\fi}
+
+% Plots a single dash or space depending on \if;pt.
+\newcommand\;points{\ifnum\;t<\;cnd \;tca\;t \else \;tca\;cnd \fi
+ \advance\;y\;tca\;dy \kern\;tca\;dx \if;pt\;point\;stopline\fi
+ \ifnum\;t<\;cnd \let\n;xt\relax \advance\;cnd-\;t
+ \else \advance\;t-\;cnd \advance\;dx\;ddx \advance\;dy\;ddy \;cnd\;mcnd
+ \fi \n;xt}
+
+% Make `;' a punctuation mark again.
+ \catcode`\;=12
+
+\endinput
+
+
+MODIFICATION HISTORY
+--------------------
+curves.sty 1.0 26 June 1991
+curves.sty 1.1 8 Jan 1992 large \diskpitchstretch and maximum integer=2^30 - 1.
+curvesls.sty 1.0 21 Mar 1993 draw lines using emTeX dvidriver \special's.
+1.1 23 April, 1993 corrected for large \curves and 2nd differences.
+1.14 29 April, 1993 Alignment of spaces improved in \@nscdashes, \overhang
+ normalized.
+1.15 1 May, 1993 Rounding errors in \nscdashes and \pdashes improved.
+1.16 8 May, 1993 Reduced .dvi size and dots corrected.
+1.2 23 May, 1993 Variable curve symbol introduced.
+1.21 8 June, 1993 \unitlength corrected in \bigcircle.
+1.22 15 June, 1993 \csb@x saves curve symbol, dash pattern selection rounded.
+1.23 18 June, 1993 extra \@killglue and curve smoothing, test for
+ bad point order tightened. 1st network release.
+ 2517 words of TeX main memory.
+1.30 9 July 1993 2nd network release.
+ Bugs Fixed:
+ Blank curve if \csdiameter too large;
+ Transfer of \@y and \@overhang from inner loop of \@drwarc;
+ Missing \pt@false in \@ncsdashes and \@pdashes;
+ Check for zero \@np in \@bezier.
+ Improvements (?):
+ New internal macros to save tokens;
+ Uses LaTeX error messages and warnings;
+ Checks \curvedashes signs;
+ Potential conflicts with other macros reduced with new \@y, \@tc;
+ Warns more readily and replaces possible inflexions with straight line;
+ Some internal variable names rationalized.
+ 2489 words of TeX main memory.
+1.32 14 June 1994 3rd network release tested with LaTeX 2e of February 1994.
+1.33 28 June 1994 4th network release tested with LaTeX 2e of 1 June 1994.
+ Redefines \bezier from June LaTeX 2e.
+ \@bezier renamed to \@Vbezier to avoid conflict with June LaTeX 2e.
+1.40 20 August 1995 5th network release tested with LaTeX 2e of 1 June 1995.
+ Bug Fixed: Dashed curves use straight segments to reduce rounding error.
+ Improvements:
+ \curvewarnfalse stops warning of straight line use between points;
+ ; catcoded to character to protect internal names;
+ New internal macros save tokens and increase speed;
+ 1772 nett extra words of TeX main memory (LaTeX 2e 1995/6/1 pl1).
+1.41 28 November 1996 \;points for wrong \;dy in dash.
+1.42 12th August 2000 6th Network release and last tested and
+ working with LaTeX 2.09.
+
+CURVESLS SUMMARY
+----------------
+The commands following are for the picture environment in the LaTeX manual.
+
+Arguments of Commands:
+<blank length> decimal number of <unit len> blank. Not negative.
+<character or symbol> is anything which a \put or \multiput may plot.
+<coordinates> are decimal numbers giving alternate x and y coordinates of
+ the curve as multiples of \unitlength, comma separated.
+<[,dash...]> optional continuation of alternating dash and blank numbers
+ of unit lengths, comma separated. Not negative. Decimals allowed.
+<diameter> is a decimal number giving the diameter in \unitlengths.
+<symbol count> is the number of symbols or patterns to be plotted, default 0.
+<unit len> unit length dimension e.g., 2.5mm, 10pt, used in measuring
+ blanks and dashes. Not negative. Default value is \unitlength.
+
+Lengths used by Commands:
+\csdiameter is the size of the space left for a symbol and can be
+ increased or set with \settowidth{\csdiameter}{<character or symbol>}.
+\curvelength is the total length of the curve calculated before drawing
+ by using Simpson's rule once between each pair of coordinate points.
+\overhang length of as drawn dash pattern overlapping start of dashes.
+
+Control Commands:
+\curvewarntrue warns every time a straight line is used between points
+ to avoid possible worse errors (default).
+\curvewarnfalse use the straight line without warning.
+
+Parameter Setting Commands:
+\curvesymbol{<character or symbol>} sets symbol and \csdiameter.
+\curvedashes[<unit len>]{<blank length><[,dash...]>} Drawing commands before a
+ \curvedashes or after one with an empty or zero length pattern will draw:
+ if <symbol count> is zero or missing, a continuous curve;
+ else if <symbol count> is positive, <symbol count>-1 squares of line
+ thickness size between and additional squares at coordinates or bezier
+ end points;
+ else if no <character or symbol> exists, nothing;
+ else, -<symbol count>-1 characters or symbols between coordinates and
+ additional ones at coordinates or bezier end points.
+After a \curvedashes command defining a pattern whose length exceeds
+ zero, commands draw:
+ if <symbol count> is zero or missing then at a spacing equal to the
+ specified pattern length,
+ if no <character or symbol> exists, a dash pattern reduced in length
+ by \csdiameter to fit between symbol spaces of \csdiameter,
+ else if \overhang is not 0pt, a <character or symbol> at all positions,
+ else a <character or symbol> with the first position blank;
+ else, \csdiameter wide symbol spaces, one at and |<symbol count>|-1 between
+ coordinate points with dash pattern lengths,
+ if no <character or symbol> exists, exact but broken by the spaces,
+ else, adjusted to give a whole number of patterns between spaces.
+\diskpitchstretch is initially 1 but \renewcommand can change it to a higher
+ value like 5 to save memory in drafts of complex documents or a lower local
+ value like 0.5 to smooth curve digitization.
+\linethickness{<len>} sets line or dash thicknesses to <len> from 0.5pt up to
+ 15pt (0.17mm to 5mm). \thicklines and \thinlines also set the thickness.
+\xscale, \xscaley, \yscale and \yscalex are scale factors initially set to
+ 1, 0, 1 and 0 respectively which \renewcommand or \def can reset.
+
+Curve Drawing Commands:
+Curves drawn consist of parabolic arcs between coordinate points with
+tangents at each point parallel to the straight line through adjacent points.
+\arc[<symbol count>](X1,Y1){<angle>} draws a circular arc centred on current
+ position, starting from (X1,Y1) and proceeding counterclockwise for
+ <angle> degrees.
+\bezier{<symbol count>}(X1,Y1)(X2,Y2)(X3,Y3) draws a curve through the points
+ (X1,Y1) and (X3,Y3) tangent to the straight lines joining them to (X2,Y2).
+ Faster and more powerful replacement for bezier.sty version.
+\bigcircle[<symbol count>]{<diameter>} draws a circle of diameter equal to
+ <diameter> times \unitlength.
+\closecurve[<symbol count>](<coordinates>) draws a closed curve with continuous
+ tangents at all points. At least 6 coordinates required.
+\curve[<symbol count>](<coordinates>) draws a curve through the specified
+ <coordinates>. For 4 coordinates this is a straight line.
+\scaleput(X1,Y1){<picture object>} places a picture object in a position
+ scaled by \xscale, \xscaley, \yscale and \yscalex for axonometric projection
+ or rotations.
+\tagcurve[<symbol count>](<coordinates>) draws a curve without its first and
+ last segments but if only 6 coordinates draws the last segment only.