| 1 |
% \def\InternetAddress{[email protected]} |
| 2 |
% \iffalse meta-comment |
| 3 |
% |
| 4 |
% Program curves |
| 5 |
% Copyright (C) 1991 - 2017 Ian Maclaine-Cross |
| 6 |
% |
| 7 |
% This work may be distributed and/or modified under the |
| 8 |
% conditions of the LaTeX Project Public License, either version 1.3 |
| 9 |
% of this license or (at your option) any later version. |
| 10 |
% The latest version of this license is in |
| 11 |
% http://www.latex-project.org/lppl.txt |
| 12 |
% and version 1.3 or later is part of all distributions of LaTeX |
| 13 |
% version 2005/12/01 or later. |
| 14 |
% |
| 15 |
% This work has the LPPL maintenance status `maintained'. |
| 16 |
% |
| 17 |
% The Current Maintainer of this work is Ian Maclaine-Cross |
| 18 |
% <[email protected]>. |
| 19 |
% |
| 20 |
% This work consists of the files README and curves.dtx, curves.ins |
| 21 |
% and the derived files curves.sty and curvesls.sty. |
| 22 |
% |
| 23 |
% Curves.sty provides curve and polygon drawing commands for |
| 24 |
% the standard LaTeX picture environment. |
| 25 |
% |
| 26 |
% When LaTeX is run with input file curves.ins, the docstrip |
| 27 |
% utility generates curves.sty and curvesls.sty and when run |
| 28 |
% with file curves.dtx the users manual. |
| 29 |
% |
| 30 |
% \fi |
| 31 |
% |
| 32 |
% \CheckSum{2060} |
| 33 |
% |
| 34 |
% \CharacterTable |
| 35 |
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z |
| 36 |
% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z |
| 37 |
% Digits \0\1\2\3\4\5\6\7\8\9 |
| 38 |
% Exclamation \! Double quote \" Hash (number) \# |
| 39 |
% Dollar \$ Percent \% Ampersand \& |
| 40 |
% Acute accent \' Left paren \( Right paren \) |
| 41 |
% Asterisk \* Plus \+ Comma \, |
| 42 |
% Minus \- Point \. Solidus \/ |
| 43 |
% Colon \: Semicolon \; Less than \< |
| 44 |
% Equals \= Greater than \> Question mark \? |
| 45 |
% Commercial at \@ Left bracket \[ Backslash \\ |
| 46 |
% Right bracket \] Circumflex \^ Underscore \_ |
| 47 |
% Grave accent \` Left brace \{ Vertical bar \| |
| 48 |
% Right brace \} Tilde \~} |
| 49 |
% |
| 50 |
% \iffalse |
| 51 |
%<*dtx> |
| 52 |
\ProvidesFile{curves.dtx} |
| 53 |
%</dtx> |
| 54 |
%<package,ls>\NeedsTeXFormat{LaTeX2e} |
| 55 |
%<package>\ProvidesPackage{curves} |
| 56 |
%<driver>\ProvidesFile{curves.drv} |
| 57 |
%<*package,driver> |
| 58 |
% \fi |
| 59 |
% \ProvidesFile{curves.dtx} |
| 60 |
[2017/08/25 1.55 Curves for LaTeX picture environment] |
| 61 |
% |
| 62 |
% \iffalse |
| 63 |
%</package,driver> |
| 64 |
%<*driver> |
| 65 |
\documentclass{ltxdoc} |
| 66 |
\usepackage{curves} |
| 67 |
%% \usepackage[dvips]{curves} |
| 68 |
\usepackage{hyperref} |
| 69 |
%% Insert % at the start of the \OnlyDescription line below to |
| 70 |
%% add commented listings of curves.sty and curvesls.sty to print out. |
| 71 |
\OnlyDescription |
| 72 |
\begin{document} |
| 73 |
\DocInput{curves.dtx} |
| 74 |
\end{document} |
| 75 |
%</driver> |
| 76 |
% \fi |
| 77 |
% |
| 78 |
% \GetFileInfo{curves.dtx} |
| 79 |
% |
| 80 |
% \changes{1.42}{2000/08/12}{Last compatible with LaTeX 2.09} |
| 81 |
% \changes{1.50}{2000/08/22}{Files merged, docstrip, LPPL and PostScript added} |
| 82 |
% \changes{1.51}{2008/04/24}{New email address and corrections in doc} |
| 83 |
% \changes{1.52}{2008/08/29}{Upstream website in doc, straight segment switch} |
| 84 |
% \changes{1.53}{2008/09/29}{Hyperref in doc} |
| 85 |
% \changes{1.55}{2017/08/25}{Error figures p.4 Thomas Bucaioni} |
| 86 |
% |
| 87 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 88 |
% |
| 89 |
% \title{\bf The \textsf{curves} Package\thanks{This file |
| 90 |
% has version number \fileversion, last |
| 91 |
% revised \filedate.}} |
| 92 |
% |
| 93 |
% \author{Ian Maclaine-Cross\\ |
| 94 |
% \small Internet: \texttt{\InternetAddress}} |
| 95 |
% \date{25 August 2017} |
| 96 |
% \maketitle |
| 97 |
% |
| 98 |
% \begin{abstract} |
| 99 |
% Draws curves in the \LaTeXe\ |picture| environment using |
| 100 |
% parabolic arcs between data points with continuous slope at |
| 101 |
% joins. For circles and circular arcs uses up to 16 parabolic |
| 102 |
% arcs. Also draws symbols or dash patterns along curves. A |
| 103 |
% straight side switch changes curves to polygons. Extends |
| 104 |
% |picture| capability without extra programs and data files. |
| 105 |
% Parabolic arcs consist of short chords drawn by overlapping disks |
| 106 |
% or line drawing |\special|s selected by package options. |
| 107 |
% \end{abstract} |
| 108 |
% \thispagestyle{empty} |
| 109 |
% \tableofcontents |
| 110 |
% \section{Introduction} |
| 111 |
% |
| 112 |
% The |picture| environment in the \LaTeXe \footnote{Leslie Lamport, |
| 113 |
% {\sl \LaTeX\ A Document Preparation System 2nd ed.,} |
| 114 |
% Addison-Wesley, 1994.} macro package for \TeX \footnote{Donald |
| 115 |
% E. Knuth, {\sl The \TeX book,} Addison-Wesley, 1984.} allows |
| 116 |
% simple line drawing using characters. These characters include |
| 117 |
% quadrant circular arcs, solid disks with diameters from 1 to |
| 118 |
% 15pt\footnote{A printer's point, abbreviated pt, is approximately |
| 119 |
% 0.351460 mm.} and short lines with a limited range of slopes in |
| 120 |
% two thicknesses. A |\begin{picture}| command defines an area where |
| 121 |
% following commands place these characters to draw a \LaTeX\ picture. |
| 122 |
% |
| 123 |
% \LaTeX\ \textsf{picture}s save disk space for source descriptions and |
| 124 |
% computer time in producing documents compared with printer commands or |
| 125 |
% bit mapped graphics. From initial pencil sketch on squared graph |
| 126 |
% paper to final printout, they take half the time for manual pen |
| 127 |
% drawings. The labor savings are higher for revisions and rewrites. |
| 128 |
% Unfortunately standard \LaTeX\ cannot yet draw curves like a |
| 129 |
% pen, compass and French curves can. Fortunately there are many macro |
| 130 |
% packages which supplement \LaTeXe's capabilities and do |
| 131 |
% marvellous graphical things for any printing need\footnote{Michel |
| 132 |
% Goossens, Sebastian Rahtz and Frank Mittelbach, |
| 133 |
% \textsl{The LaTeX Graphics Companion,} Addison-Wesley, 1997.}. |
| 134 |
% \textsf{Curves} just adds curve and polygon drawing |
| 135 |
% to \LaTeX\ \texttt{picture}s. With \textsf{curves} most line drawings |
| 136 |
% require no additional source or binary files or programs. |
| 137 |
% |
| 138 |
% Brief descriptions, simple examples and a command summary follow. They |
| 139 |
% presume familiarity with relevant chapters of the \LaTeX\ |
| 140 |
% manual\footnotemark[1]. |
| 141 |
% |
| 142 |
% \section{Installation} |
| 143 |
% |
| 144 |
% \DescribeMacro{curves.sty} |
| 145 |
% To create the file \texttt{curves.sty} you need \LaTeXe\ and a command like: |
| 146 |
% \begin{verbatim} |
| 147 |
% $ latex curves.ins |
| 148 |
% \end{verbatim} |
| 149 |
% Put \texttt{curves.sty} and \texttt{curvesls.sty} in your default or a |
| 150 |
% \texttt{texinput} directory. The package \textsf{curvesls} provides |
| 151 |
% compatibility for old documents. Comprehensive \TeX\ distributions |
| 152 |
% preinstall \textsf{curves} so for most users the above step is unnecessary. |
| 153 |
% |
| 154 |
% Put \texttt{curves} in a |\usepackage| command at the top of your |
| 155 |
% main {\tt .tex} file for any document where you wish to use |
| 156 |
% \textsf{curves} {\it e.g.\/,} |
| 157 |
% \begin{verbatim} |
| 158 |
% \documentclass[11pt]{article} |
| 159 |
% \usepackage{curves} |
| 160 |
% \end{verbatim} |
| 161 |
% Do not combine {\tt curves} with {\tt bezier} in this command. |
| 162 |
% \textsf{Curves} contains a fast powerful replacement for the |\bezier| |
| 163 |
% command. Drawings using the |\bezier| command should not change |
| 164 |
% their appearance. |
| 165 |
% |
| 166 |
% \DescribeMacro{dvips} \DescribeMacro{emtex} \DescribeMacro{xdvi} |
| 167 |
% \DescribeMacro{WML} |
| 168 |
% The \textsf{curves} package has options to save \TeX\ memory and runtime |
| 169 |
% using |\special| commands to draw the straight lines which approximate |
| 170 |
% curves. Select an option only if your program for |
| 171 |
% viewing or printing \TeX's |dvi| files recognizes and uses the |
| 172 |
% corresponding |\special|s. Otherwise the curves or polygons on |
| 173 |
% your drawings will be invisible. The \texttt{dvips} option uses the |
| 174 |
% em\TeX\ |\special|s of |dvips| which draw lines with rounded ends. |
| 175 |
% The \texttt{emtex} option uses the original |\special|s of |
| 176 |
% em\TeX\ by Eberhard Mattes with disks added to hide their square ends. |
| 177 |
% The \texttt{xdvi} option uses the PostScript |\special|s of Tomas |
| 178 |
% Rokicki's |dvips| to draw lines which the \texttt{xdvi} viewer now |
| 179 |
% implements. |WML| are new versions of the em\TeX\ |\special|s in |
| 180 |
% |dvips| with compact names. No options draws lines using |
| 181 |
% disks from standard \LaTeX\ fonts. |
| 182 |
% No options or |dvips| work with the \textsf{color} package |
| 183 |
% but other drivers may or may not. Select package options when required by |
| 184 |
% modifying |\usepackage| like: |
| 185 |
% \begin{verbatim} |
| 186 |
% \usepackage[dvips]{curves} |
| 187 |
% \end{verbatim} |
| 188 |
% |
| 189 |
% \DescribeMacro{PDF} |
| 190 |
% Use no option with single pass pdf\TeX\footnote{\label{fn:MG}Frank |
| 191 |
% Mittelbach and Michel Goossens, {\sl The \LaTeX\ Companion 2nd ed.,} |
| 192 |
% Addison-Wesley, 2004.} or pdf\LaTeX. |
| 193 |
% With \textsf{curves} the \texttt{dvips} option with \LaTeX\ |
| 194 |
% followed by \texttt{dvips} and \texttt{ps2pdf}\footnote{A script |
| 195 |
% which converts PostScript to PDF using |
| 196 |
% \textsf{ghostscript}.} usually produces the smallest Portable Document |
| 197 |
% Format file. |
| 198 |
% |
| 199 |
% \DescribeMacro{BOX} |
| 200 |
% A drawing frequently uses auxiliary commands to size, place, label and |
| 201 |
% caption it. The following commands draw the box in Figure~\ref{box} on |
| 202 |
% page~\pageref{box}: |
| 203 |
% |
| 204 |
% \begin{figure} |
| 205 |
% \begin{center} |
| 206 |
% \setlength{\unitlength}{1mm} |
| 207 |
% \begin{picture}(100,50) \large\sf |
| 208 |
% \linethickness{1mm} |
| 209 |
% \put(20,5){\framebox(60,40){BOX}} |
| 210 |
% \end{picture} |
| 211 |
% \end{center} |
| 212 |
% \caption{This is a box.} |
| 213 |
% \label{box} |
| 214 |
% \end{figure} |
| 215 |
% |
| 216 |
% \begin{verbatim} |
| 217 |
% \begin{figure} |
| 218 |
% \begin{center} |
| 219 |
% \setlength{\unitlength}{1mm} |
| 220 |
% \begin{picture}(100,50) \large\sf |
| 221 |
% \linethickness{1mm} |
| 222 |
% \put(20,5){\framebox(60,40){BOX}} |
| 223 |
% \end{picture} |
| 224 |
% \end{center} |
| 225 |
% \caption{This is a box.} |
| 226 |
% \label{box} |
| 227 |
% \end{figure} |
| 228 |
% \end{verbatim} |
| 229 |
% Lamport\footnotemark[1] explains these commands. This example is for those |
| 230 |
% unfamiliar with the \LaTeX\ picture environment. The following examples |
| 231 |
% avoid the \textsf{figure} environment but it is often essential. |
| 232 |
% |
| 233 |
% \section{Curves and Polygons} |
| 234 |
% \label{curves} |
| 235 |
% |
| 236 |
% \DescribeMacro{\curve} \DescribeMacro{\closecurve} \DescribeMacro{\tagcurve} |
| 237 |
% The commands, |\curve|, |\closecurve| and |
| 238 |
% |\tagcurve|, draw parabolic arcs between coordinate points in the |
| 239 |
% argument\footnote{Please see Section~\ref{summary} for full |
| 240 |
% descriptions of \textsf{curves} commands.}. |
| 241 |
% The segments' tangents at these points are parallel to each other |
| 242 |
% and to straight lines through the points either side. Segments at |
| 243 |
% |\curve| ends are parabolic arcs with the point second from the end a |
| 244 |
% vertex. |\closecurve| adds a |
| 245 |
% parabolic arc between end points to close the curve. |\tagcurve| omits the |
| 246 |
% first and last segments drawing curves with end tangents specified. |
| 247 |
% When only three points are specified |\tagcurve| draws the last segment. The |
| 248 |
% table following shows these features. |
| 249 |
% |
| 250 |
% \DescribeMacro{\straightfalse} \DescribeMacro{\straighttrue} |
| 251 |
% The command |\straighttrue| causes all following \textsf{curves} |
| 252 |
% to use straight lines between coordinate points giving polygons |
| 253 |
% as in the following table. |
| 254 |
% The default or after the command |\straightfalse| is to draw the |
| 255 |
% curves described in the preceding paragraph. |
| 256 |
% |
| 257 |
% \begin{flushright} |
| 258 |
% \setlength\unitlength{0.4pt} |
| 259 |
% \linethickness{0.7mm} |
| 260 |
% \makebox[0pt][r]{ |
| 261 |
% \begin{tabular}{lcc} |
| 262 |
% Example & Curve & Polygon\\ |
| 263 |
% & \makebox[6em][r]{\tt\char92 straightfalse} |
| 264 |
% & \makebox[6em][l]{\tt\char92 straighttrue}\\ |
| 265 |
% \hline |
| 266 |
% \raisebox{60\unitlength}{\tt\char92 curve(0,0, 50,100, 100,0)} & |
| 267 |
% \straighttrue |
| 268 |
% \begin{picture}(100,120)(0,-10) |
| 269 |
% \straightfalse |
| 270 |
% \curve(0,0, 50,100, 100,0) |
| 271 |
% \end{picture} & |
| 272 |
% \straighttrue |
| 273 |
% \begin{picture}(100,120)(0,-10) |
| 274 |
% \straighttrue |
| 275 |
% \curve(0,0, 50,100, 100,0) |
| 276 |
% \end{picture}\\ |
| 277 |
% \raisebox{80\unitlength}{\tt\char92 closecurve(0,0, 50,100, 100,0)} & |
| 278 |
% \begin{picture}(100,170)(0,-60) |
| 279 |
% \straightfalse |
| 280 |
% \closecurve(0,0, 50,100, 100,0) |
| 281 |
% \end{picture} & |
| 282 |
% \begin{picture}(100,170)(0,-60) |
| 283 |
% \straighttrue |
| 284 |
% \closecurve(0,0, 50,100, 100,0) |
| 285 |
% \end{picture} \\ |
| 286 |
% \raisebox{60\unitlength}{% |
| 287 |
% \tt\char92 tagcurve(100,0, 0,0, 50,100, 100,0, 0,0)} & |
| 288 |
% \begin{picture}(120,120)(-10,-10) |
| 289 |
% \straightfalse |
| 290 |
% \tagcurve(100,0, 0,0, 50,100, 100,0, 0,0) |
| 291 |
% \end{picture} & |
| 292 |
% \begin{picture}(120,120)(-10,-10) |
| 293 |
% \straighttrue |
| 294 |
% \tagcurve(100,0, 0,0, 50,100, 100,0, 0,0) |
| 295 |
% \end{picture} \\ |
| 296 |
% \hline |
| 297 |
% \end{tabular}}\\ |
| 298 |
% \end{flushright} |
| 299 |
% |
| 300 |
% \DescribeMacro{\arc} \DescribeMacro{\curve} |
| 301 |
% Axial flow fans often use the RAF 6E aerofoil section. The section |
| 302 |
% coordinates in the following macro come directly from aerodynamic |
| 303 |
% tables\footnote{R.A. Wallis, {\sl Axial Flow Fans,} Academic Press, 1961, |
| 304 |
% p.335}. The |\arc| commands draw the leading and trailing radii and the |
| 305 |
% two coordinate |\curve| the flat chord. |
| 306 |
% \begin{verbatim} |
| 307 |
% \newcommand{\RAFsixE}{ |
| 308 |
% \scaleput(1.25,1.25){\arc(0,-1.25){-135}} |
| 309 |
% \scaleput(0,0){\curve(0.366,2.133, 1.25,3.19, 2.5,4.42, |
| 310 |
% 5.0,6.10, 7.5,7.24, 10,8.09, 15,9.28, 20,9.90, 30,10.3, |
| 311 |
% 40,10.22, 50,9.80, 60,8.98, 70,7.70, 80,5.91, 90,3.79, |
| 312 |
% 95,2.58, 99.24,1.52)} |
| 313 |
% \scaleput(99.24,0.76){\arc(0,-0.76){180}} |
| 314 |
% \scaleput(0,0){\curve(1.25,0, 99.24,0)} |
| 315 |
% } |
| 316 |
% \end{verbatim} |
| 317 |
% \newcommand{\RAFsixE}{% |
| 318 |
% \scaleput(1.25,1.25){\arc(0,-1.25){-135}} |
| 319 |
% \scaleput(0,0){\curve(0.366,2.133, 1.25,3.19, 2.5,4.42, |
| 320 |
% 5.0,6.10, 7.5,7.24, 10,8.09, 15,9.28, 20,9.90, 30,10.3, |
| 321 |
% 40,10.22, 50,9.80, 60,8.98, 70,7.70, 80,5.91, 90,3.79, |
| 322 |
% 95,2.58, 99.24,1.52)} |
| 323 |
% \scaleput(99.24,0.76){\arc(0,-0.76){180}} |
| 324 |
% \scaleput(0,0){\curve(1.25,0, 99.24,0)} |
| 325 |
% } |
| 326 |
% In a picture environment like: |
| 327 |
% \begin{verbatim} |
| 328 |
% \begin{picture}(100,20) |
| 329 |
% \RAFsixE |
| 330 |
% \end{picture} |
| 331 |
% \end{verbatim} |
| 332 |
% this macro draws: |
| 333 |
% \linethickness{0.7mm} |
| 334 |
% \setlength\unitlength{0.5mm} |
| 335 |
% \begin{center} |
| 336 |
% \begin{picture}(100,20) |
| 337 |
% \RAFsixE |
| 338 |
% \end{picture}\\ |
| 339 |
% The RAF 6E has a flat undersurface. |
| 340 |
% \end{center} |
| 341 |
% |
| 342 |
% \DescribeMacro{\bigcircle} |
| 343 |
% The drawing command |\bigcircle| works similarly to |\circle| |
| 344 |
% except there is no |\circle*| equivalent. The following section scales it |
| 345 |
% to an ellipse. |
| 346 |
% |
| 347 |
% \section{Scaling} |
| 348 |
% \DescribeMacro{\unitlength} \DescribeMacro{\put} |
| 349 |
% The size of \LaTeX\ picture objects may be uniformly scaled by preceding |
| 350 |
% them with: |
| 351 |
% \begin{verbatim} |
| 352 |
% \setlength{\unitlength}{\scale\unitlength} |
| 353 |
% \end{verbatim} |
| 354 |
% the desired scale factor |\scale| |
| 355 |
% is previously defined perhaps with |
| 356 |
% |\newcommand| |
| 357 |
% as a decimal number. The new coordinates of a point \((x',y')\) |
| 358 |
% relative to the current origin are related to the old |
| 359 |
% coordinates \((x,y)\) relative to the same origin by |
| 360 |
% \begin{eqnarray*} |
| 361 |
% x' &=& x \times |\scale| \\ |
| 362 |
% y' &=& y \times |\scale| |
| 363 |
% \end{eqnarray*} |
| 364 |
% If a |\put(|$x,y$|){...}| followed the change in |\unitlength| it would |
| 365 |
% actually put the objects |{...}| at \((x',y')\). |
| 366 |
% Objects defined by |\unitlength| in |{...}| would also be larger by |
| 367 |
% |\scale|. Lamport\footnotemark[1] describes these commands. |
| 368 |
% |
| 369 |
% \DescribeMacro{\scaleput} \DescribeMacro{\xscale} |
| 370 |
% \DescribeMacro{\xscaley} |
| 371 |
% \DescribeMacro{\yscale} \DescribeMacro{\yscalex} |
| 372 |
% The scale factors |\xscale|, |\xscaley|, |\yscale| and |\yscalex| |
| 373 |
% are initially defined to be 1, 0, 1 and 0 respectively but may be |
| 374 |
% redefined to any decimal number using |\renewcommand|. After they |
| 375 |
% are redefined the new coordinates of a point \((x',y')\) |
| 376 |
% relative to the current origin are related to the old |
| 377 |
% coordinates \((x,y)\) relative to the same origin by |
| 378 |
% \begin{eqnarray*} |
| 379 |
% x' &=& x \times |\xscale| + y \times |\xscaley|\\ |
| 380 |
% y' &=& x \times |\yscalex| + y \times |\yscale| |
| 381 |
% \end{eqnarray*} |
| 382 |
% If a |\scaleput(|$x,y$|){...}| followed the change in these factors it would |
| 383 |
% actual put the objects |{...}| at \((x',y')\). All the drawing |
| 384 |
% commands in \textsf{curves} use the current values of these four scale |
| 385 |
% factors in placing disks and chords. |
| 386 |
% |
| 387 |
% These factors can rotate pictures which like |\RAFsixE| are made solely |
| 388 |
% with \textsf{curves} commands. The |
| 389 |
% factors following rotate the RAF~6E through 12$^\circ$ clockwise about its |
| 390 |
% {\tt (0,0)} co-ordinate: |
| 391 |
% \begin{verbatim} |
| 392 |
% \renewcommand{\xscale}{0.9781} |
| 393 |
% \renewcommand{\xscaley}{0.2079} |
| 394 |
% \renewcommand{\yscale}{0.9781} |
| 395 |
% \renewcommand{\yscalex}{-0.2079} |
| 396 |
% \put(0,20){\RAFsixE} |
| 397 |
% \end{verbatim} |
| 398 |
% This draws: |
| 399 |
% \begin{center} |
| 400 |
% \begin{picture}(120,30)(-20,0) |
| 401 |
% \renewcommand{\xscale}{0.9781} |
| 402 |
% \renewcommand{\xscaley}{0.2079} |
| 403 |
% \renewcommand{\yscale}{0.9781} |
| 404 |
% \renewcommand{\yscalex}{-0.2079} |
| 405 |
% \put(0,20){\RAFsixE} |
| 406 |
% \thicklines |
| 407 |
% \put(-20,5){\vector(1,0){20}} |
| 408 |
% \end{picture} |
| 409 |
% |
| 410 |
% The RAF 6E has maximum lift at angles of attack over 12$^\circ$. |
| 411 |
% \end{center} |
| 412 |
% Note that \(\cos12^\circ\approx0.9781\) and \(\sin12^\circ\approx0.2079\) |
| 413 |
% \let\RAFsixE\relax |
| 414 |
% |
| 415 |
% \DescribeMacro{\arc} \DescribeMacro{\bigcircle} |
| 416 |
% Axonometric projection is another scaling application. Circles become |
| 417 |
% ellipses and circular arcs become elliptical arcs. The commands drawing the |
| 418 |
% ellipse and arc in the following washer are: |
| 419 |
% \begin{verbatim} |
| 420 |
% \put(20,5){ |
| 421 |
% \renewcommand{\xscale}{1} |
| 422 |
% \renewcommand{\xscaley}{-1} |
| 423 |
% \renewcommand{\yscale}{0.6} |
| 424 |
% \renewcommand{\yscalex}{0.6} |
| 425 |
% \scaleput(10,10){\bigcircle{10}} |
| 426 |
% \put(0,-2){ |
| 427 |
% \scaleput(10,10){\arc(5,0){121}} |
| 428 |
% \scaleput(10,10){\arc(5,0){-31}} |
| 429 |
% } |
| 430 |
% } |
| 431 |
% \end{verbatim} |
| 432 |
% {\tt (20,5)} are the drawing coordinates of the upper vertex of the washer |
| 433 |
% closest to the reader. The angles for the |\arc|s were found by trial and |
| 434 |
% error. |
| 435 |
% \begin{center} |
| 436 |
% \setlength\unitlength{1mm} |
| 437 |
% \begin{picture}(40,30) |
| 438 |
% \thicklines |
| 439 |
% \multiput(20,5)(20,12){2}{\line(0,-1){2}\line(-5,3){20}} |
| 440 |
% \multiput(20,5)(-20,12){2}{\line(5,3){20}} |
| 441 |
% \put(20,3){\line(5,3){20}} |
| 442 |
% \put(20,3){\line(-5,3){20}} |
| 443 |
% \put(0,15){\line(0,1){2}} |
| 444 |
% \linethickness{1pt} |
| 445 |
% \put(20,5){ |
| 446 |
% \renewcommand{\xscale}{1} |
| 447 |
% \renewcommand{\xscaley}{-1} |
| 448 |
% \renewcommand{\yscale}{0.6} |
| 449 |
% \renewcommand{\yscalex}{0.6} |
| 450 |
% \scaleput(10,10){\bigcircle{10}} |
| 451 |
% \put(0,-2){ |
| 452 |
% \scaleput(10,10){\arc(5,0){121}} |
| 453 |
% \scaleput(10,10){\arc(5,0){-31}} |
| 454 |
% } |
| 455 |
% } |
| 456 |
% \end{picture} |
| 457 |
% |
| 458 |
% Square washers are sometimes preferred for soft materials. |
| 459 |
% \end{center} |
| 460 |
% |
| 461 |
% \section{Symbols} |
| 462 |
% \label{symbols} |
| 463 |
% |
| 464 |
% \DescribeMacro{\curvesymbol} \DescribeMacro{\curve} |
| 465 |
% \textsf{Curves} can also place symbols. |\curvesymbol| must first define |
| 466 |
% the symbol as anything a |\put| or |\multiput| may draw. A negative |
| 467 |
% symbol count between drawing command and coordinates {\it e.g.,} |
| 468 |
% |\tagcurve[-3](0,100,...)| fixes the number of symbols per curve segment. |
| 469 |
% |
| 470 |
% These commands draw flight times and successive positions in the following |
| 471 |
% drawing: |
| 472 |
% \begin{verbatim} |
| 473 |
% \newcounter{time} |
| 474 |
% \curvesymbol{\thetime\,s\addtocounter{time}{1}} |
| 475 |
% \put(5,4){\curve[-2](0,0, 9.8,19.6, 19.6,0)} |
| 476 |
% \curvesymbol{\phantom{\circle*{1}}\circle*{1}} |
| 477 |
% \put(5,2){\curve[-2](0,0, 9.8,19.6, 19.6,0)} |
| 478 |
% \end{verbatim} |
| 479 |
% where |\phantom| is a plain \TeX\ command from the \TeX |
| 480 |
% book\footnotemark[2]. The \LaTeX\ |\circle| characters have centres |
| 481 |
% on the left side of their \TeX\ boxes. The invisible |\phantom{\circle*{1}}| |
| 482 |
% increases the width of the box on the left so the visible |\circle*{1}| is |
| 483 |
% at the centre of the box formed by the two characters. |
| 484 |
% \begin{center} |
| 485 |
% \setlength\unitlength{2mm} |
| 486 |
% \begin{picture}(40,35)(-5,-5) \sf |
| 487 |
% \thicklines |
| 488 |
% \newcounter{time} |
| 489 |
% \curvesymbol{\thetime\,s\addtocounter{time}{1}} |
| 490 |
% \put(5,4){\curve[-2](0,0, 9.8,19.6, 19.6,0)} |
| 491 |
% \curvesymbol{\phantom{\circle*{1}}\circle*{1}} |
| 492 |
% \put(5,2){\curve[-2](0,0, 9.8,19.6, 19.6,0)} |
| 493 |
% \put(0,0){\vector(0,1){28}} |
| 494 |
% \put(0,0){\vector(1,0){30}} |
| 495 |
% \multiput(5,0)(5,0){5}{\line(0,1){1}} |
| 496 |
% \multiput(0,5)(0,5){5}{\line(1,0){1}} |
| 497 |
% \setcounter{time}{0} |
| 498 |
% \multiput(0,-1)(5,0){6}{\makebox(0,0)[t]{\thetime}\addtocounter{time}{5}} |
| 499 |
% \put(28,-1){\makebox(0,0)[tl]{$x$ (m)}} |
| 500 |
% \setcounter{time}{0} |
| 501 |
% \multiput(-1,0)(0,5){6}{\makebox(0,0)[r]{\thetime}\addtocounter{time}{5}} |
| 502 |
% \put(-1,27){\makebox(0,0)[rb]{$y$ (m)}} |
| 503 |
% \end{picture} \\ |
| 504 |
% Successive positions of a sphere with initial position $(5,2)$ m,\\ initial |
| 505 |
% velocity $(4.9,19.6)$ m/s, and acceleration $(0,-9.8)$ m/s$^2$. \\ |
| 506 |
% The flight time is recorded above each sphere position. |
| 507 |
% \end{center} |
| 508 |
% |
| 509 |
% \DescribeMacro{\curvedashes} \DescribeMacro{\curvelength} |
| 510 |
% \DescribeMacro{\curvesymbol} |
| 511 |
% Fixed spacing of symbols at lengths other than the segment's requires more |
| 512 |
% commands. Empty |\curvedashes|, empty |\curvesymbol| and negative |
| 513 |
% symbol count stops drawing so a drawing command will calculate |
| 514 |
% |\curvelength| only. |\curvesymbol| then resets the symbol and |
| 515 |
% |\curvedashes| sets the spacing to its pattern length. If there are no |
| 516 |
% symbols at the ends, |\overhang| pulls symbols along the curve. The last |
| 517 |
% command with no symbol count draws the symbols. |
| 518 |
% |
| 519 |
% \DescribeMacro{\arc} \DescribeMacro{\bigcircle} |
| 520 |
% |\arc| and |\bigcircle| use sixteen segments for a circle so if |
| 521 |
% eight symbols are required the fixed spacing technique is necessary. The |
| 522 |
% following commands draw the pin numbers on a relay base: |
| 523 |
% |
| 524 |
% \begin{verbatim} |
| 525 |
% \newcounter{pin} |
| 526 |
% \curvedashes{} |
| 527 |
% \curvesymbol{} |
| 528 |
% \put(60,60){\arc[-1](40,0){-360}} |
| 529 |
% \setlength{\curvelength}{0.125\curvelength} |
| 530 |
% \curvedashes[\curvelength]{1} |
| 531 |
% \setlength{\overhang}{0.5\curvelength} |
| 532 |
% \curvesymbol{\addtocounter{pin}{1}\thepin} |
| 533 |
% \put(60,60){\arc(40,0){-360}} |
| 534 |
% \end{verbatim} |
| 535 |
% |
| 536 |
% \begin{center} |
| 537 |
% \setlength\unitlength{0.3mm} |
| 538 |
% \begin{picture}(120,120) \sf |
| 539 |
% \thicklines |
| 540 |
% \linethickness{1pt} |
| 541 |
% \curvedashes{} |
| 542 |
% \curvesymbol{} |
| 543 |
% ^^A base |
| 544 |
% \put(60,60){\bigcircle{100}} |
| 545 |
% ^^A spigot |
| 546 |
% \put(60,60){\arc(10,3){325}\put(10,0){\arc(0,3){-180}}} |
| 547 |
% ^^A pins |
| 548 |
% \put(60,60){\bigcircle[-1]{60}} |
| 549 |
% \setlength{\curvelength}{0.125\curvelength} |
| 550 |
% \curvedashes[\curvelength]{1} |
| 551 |
% \overhang0.5\curvelength |
| 552 |
% \curvesymbol{\phantom{\circle{5}}\circle{5}} |
| 553 |
% \put(60,60){\bigcircle{60}} |
| 554 |
% ^^A pin numbers |
| 555 |
% \newcounter{pin} |
| 556 |
% \curvedashes{} |
| 557 |
% \curvesymbol{} |
| 558 |
% \put(60,60){\arc[-1](40,0){-360}} |
| 559 |
% \divide\curvelength8 |
| 560 |
% \curvedashes[\curvelength]{1} |
| 561 |
% \setlength{\overhang}{0.5\curvelength} |
| 562 |
% \curvesymbol{\addtocounter{pin}{1}\thepin} |
| 563 |
% \put(60,60){\arc(40,0){-360}} |
| 564 |
% \end{picture} \\ \nobreak |
| 565 |
% The pin numbering of plug-in relays is clockwise \\ |
| 566 |
% from the spigot key when viewed from below. |
| 567 |
% \end{center} |
| 568 |
% |
| 569 |
% \DescribeMacro{\patternresolution} \DescribeMacro{\overhang} |
| 570 |
% If symbols and dash pattern exist and |\overhang| is 0pt, \textsf{curves} |
| 571 |
% draw the first position blank. For equal spacing they draw the last position |
| 572 |
% blank if rounding error causes the last pattern to be slightly short. If |
| 573 |
% |\renewcommand| changes |\patternresolution|, rounding error changes |
| 574 |
% and the final symbol may reappear. To avoid fiddling with |
| 575 |
% |\patternresolution| for closed curves with symbols equally spaced, use an |
| 576 |
% |\overhang| which is a fraction of a pattern length as in the previous |
| 577 |
% example. |
| 578 |
% |
| 579 |
% \section{Dashes} |
| 580 |
% |
| 581 |
% \DescribeMacro{\curvedashes} |
| 582 |
% |\curvedashes| must first define a dash pattern with length greater |
| 583 |
% than 0pt. Many symbol and pattern combinations are possible. The fixed number |
| 584 |
% and fixed spacing methods of symbol drawing described in |
| 585 |
% Section~\ref{symbols} |
| 586 |
% work with three methods of drawing dashes which are: |
| 587 |
% \begin{enumerate} |
| 588 |
% \item if there is no symbol count and no symbol, a dash pattern with its |
| 589 |
% length reduced by |\csdiameter| is drawn between symbols spaces of width |
| 590 |
% close to |\csdiameter| to give an overall spacing equal to the pattern |
| 591 |
% length specified by the |\curvedashes| command; |
| 592 |
% \item if there is a symbol count but no symbol, the dash patterns drawn have |
| 593 |
% their length equal to that defined by |\curvedashes| with |
| 594 |
% |\csdiameter| gaps at symbol positions; |
| 595 |
% \item if there is a symbol count and a symbol, the dash patterns drawn have |
| 596 |
% their length adjusted slightly so an integral number of patterns fit between |
| 597 |
% symbol positions. |
| 598 |
% \end{enumerate} |
| 599 |
% |
| 600 |
% Dash pattern commands for centrelines\footnote{R.N. Roth and I.A. van |
| 601 |
% Haeringen, {\sl The Australian Engineering Drawing Handbook, Part~1 Basic |
| 602 |
% Principles and Techniques,} The Institution of Engineers, Australia, |
| 603 |
% Canberra, 1986.} follow for the three techniques above in order: |
| 604 |
% \begin{verbatim} |
| 605 |
% \linethickness{0.25mm} |
| 606 |
% \curvedashes[1.2mm]{0,8,1,3,1,8} |
| 607 |
% \settowidth{\csdiameter}{00} |
| 608 |
% \put(0,20){\curve(0,0, 30,5, 60,0)} |
| 609 |
% \put(0,10){\curve[1](0,0, 30,5, 60,0)} |
| 610 |
% \curvesymbol{\thepin\addtocounter{pin}{1}} |
| 611 |
% \setlength{\csdiameter}{2\csdiameter} |
| 612 |
% \put(0,0){\curve[1](0,0, 30,5, 60,0)} |
| 613 |
% \end{verbatim} |
| 614 |
% |
| 615 |
% The following figure shows the resulting dash patterns. The upper line has |
| 616 |
% first position blank because the |\overhang| is 0pt. It has patterns |
| 617 |
% shrunk to scale between symbol spaces {\it e.g.,}~1 to~2, and symbol space |
| 618 |
% centres one pattern length apart. The middle line has patterns close to |
| 619 |
% defined length but with the first dash part blanked by half of symbol space~3 |
| 620 |
% and the second pattern broken in its first dash by symbol space~4. The lower |
| 621 |
% line patterns are stretched between symbol spaces. Which pattern is |
| 622 |
% appropriate depends on picture meaning and function. |
| 623 |
% |
| 624 |
% \begin{center} |
| 625 |
% \setlength\unitlength{1mm} |
| 626 |
% \begin{picture}(60,25) \sf |
| 627 |
% \setcounter{pin}{1} |
| 628 |
% \linethickness{0.25mm} |
| 629 |
% \curvedashes[1.2mm]{0,8,1,3,1,8} |
| 630 |
% \settowidth{\csdiameter}{00} |
| 631 |
% \put(0,20){\curve(0,0, 30,5, 60,0)} |
| 632 |
% \put(0,10){\curve[1](0,0, 30,5, 60,0)} |
| 633 |
% \curvesymbol{\thepin\addtocounter{pin}{1}} |
| 634 |
% \setlength{\csdiameter}{2\csdiameter} |
| 635 |
% \put(0,0){\bezier{-2}(0,0)(30,10)(60,0)} |
| 636 |
% \put(0,20){\curve(0,0, 30,5, 60,0)} |
| 637 |
% \curvedashes{} |
| 638 |
% \put(0,10){\curve[-1](0,0, 30,5, 60,0)} |
| 639 |
% \put(0,0){\bezier{-2}(0,0)(30,10)(60,0)} |
| 640 |
% \end{picture} \\ |
| 641 |
% Centrelines and Symbols |
| 642 |
% \end{center} |
| 643 |
% |
| 644 |
% \section{Errors} |
| 645 |
% Syntax errors like incorrect or missing punctuation while |
| 646 |
% using \textsf{curves} |
| 647 |
% will result in \TeX\ or \LaTeX\ error messages. The \TeX book\footnotemark[2] |
| 648 |
% and \LaTeX\ manual\footnotemark[1] explain the meaning and |
| 649 |
% correction of these |
| 650 |
% errors. The previous examples and Section~\ref{summary} should make the |
| 651 |
% correct syntax for \textsf{curves} commands clear. |
| 652 |
% |
| 653 |
% \textsf{Curves} will write a {\tt Package curves Error:\ldots} message |
| 654 |
% to the screen and {\tt |
| 655 |
% log} file if you supply an incorrect number of coordinates. |
| 656 |
% |
| 657 |
% If four sequential points in a drawing command argument have the line |
| 658 |
% through the first and third parallel to the line through the second and |
| 659 |
% fourth: |
| 660 |
% \begin{itemize} |
| 661 |
% \item exactly or closely, \textsf{curves} knows |
| 662 |
% it cannot draw a parabolic arc |
| 663 |
% tangent to two parallel lines, issues to the screen and log file:\\ |
| 664 |
% {\tt Package curve Warning: \string\curve\ straight from \ldots}\\ |
| 665 |
% and draws a straight line; |
| 666 |
% \item or approximately, \textsf{curves} may draw an unexpected curve with no |
| 667 |
% warning. |
| 668 |
% \end{itemize} |
| 669 |
% If four sequential points in a drawing command argument have the line |
| 670 |
% through the first and second parallel to the line through the third and |
| 671 |
% fourth: |
| 672 |
% \begin{itemize} |
| 673 |
% \item \textsf{curves} draws a parabolic arc which may be nowhere |
| 674 |
% near the curve. |
| 675 |
% \end{itemize} |
| 676 |
% |
| 677 |
% \DescribeMacro{\curvewarnfalse} |
| 678 |
% If the four points were on a straight line, removing one or more points is |
| 679 |
% a remedy. If they are not on a straight line, adding points may help. |
| 680 |
% Specifying many points will give you a satisfactory curve with perhaps an |
| 681 |
% annoying number of |\curve straight| warnings. After a |
| 682 |
% |\curvewarnfalse|, \textsf{curves} still uses the straight lines but does |
| 683 |
% not tell you. |
| 684 |
% |
| 685 |
% \DescribeMacro{\tagcurve} |
| 686 |
% Curvature changes sign on curves like \(y=\sin x\). Specifying inflection |
| 687 |
% points as {\tt curve} coordinates will reduce error and specifying |
| 688 |
% sufficient |
| 689 |
% coordinates will then give satisfactory results. For discontinuous tangents |
| 690 |
% splitting a curve into pieces is unavoidable. Splitting a curve into pieces |
| 691 |
% with curvature the same sign can give satisfactory results with fewer |
| 692 |
% coordinates. |\tagcurve| can prevent tangent discontinuities. If an |
| 693 |
% inflexion point's exact location is unknown, try the midpoint of the straight |
| 694 |
% line through the ends of its segment. |
| 695 |
% |
| 696 |
% \DescribeMacro{\diskpitchstretch} |
| 697 |
% Curves appear rougher than horizontal and vertical lines. Picture |
| 698 |
% digitization causes this not inaccuracy in \TeX\ or {\tt curves.sty}. |
| 699 |
% Setting |\diskpitchstretch| to a value less than one with |
| 700 |
% |\renewcommand| may smooth an unusually rough curve without package options. |
| 701 |
% |
| 702 |
% \DescribeMacro{\patternresolution} |
| 703 |
% Symbols and symbol spaces misaligned are usually due to rounding error. |
| 704 |
% Adjusting |\patternresolution| below one can reduce rounding error and |
| 705 |
% increase alignment accuracy. This should be limited to the misaligned curve |
| 706 |
% with {\tt \{\ \}}\footnotemark[1]. |
| 707 |
% |
| 708 |
% The replacement |\bezier| does not give exactly the same results as the |
| 709 |
% original in {\tt bezier.sty} or in {\tt LaTeX2e}. The difference is |
| 710 |
% extremely |
| 711 |
% small but if it is important to you comment out the five lines of code for |
| 712 |
% |\bezier| and |\@bezier| near the start of {\tt curves.sty}. |
| 713 |
% You now have a |\bezier| which is slower and needs more |
| 714 |
% memory but has only its original capabilities and gives only its original |
| 715 |
% results. |
| 716 |
% |
| 717 |
% Please email \texttt{\InternetAddress} examples of any errors not covered |
| 718 |
% above. You may have found a |
| 719 |
% bug in the code or documentation. |
| 720 |
% |
| 721 |
% |
| 722 |
% \section{Curves Summary} |
| 723 |
% \label{summary} |
| 724 |
% |
| 725 |
% The commands following are for the picture environment in the \LaTeXe\ |
| 726 |
% manual\footnotemark[1]. |
| 727 |
% |
| 728 |
% \subsection{Loading \textsf{curves}} |
| 729 |
% |
| 730 |
% \DescribeMacro{\usepackage} |
| 731 |
% A |\usepackage{curves}| |
| 732 |
% between |\documentclass| and |\begin{document}| commands loads |
| 733 |
% \textsf{curves}. If you have a \TeX\ printing or viewing program which |
| 734 |
% accepts the following |\special| commands you may optionally use |
| 735 |
% them to allow larger |picture|s faster. Support for \textsf{color} may |
| 736 |
% be lost. |
| 737 |
% |
| 738 |
% You use |\usepackage[|\meta{option}|]{curves}| to load a |\special| option |
| 739 |
% for drawing the straight line chords which make curves |
| 740 |
% where \meta{option} is one of: |
| 741 |
% |
| 742 |
% { \setlength\parindent{0pt} |
| 743 |
% |
| 744 |
% \DescribeEnv{dvips} |
| 745 |
% uses the em\TeX\ |\special|s with rounded |
| 746 |
% line ends supported by |dvips|. Works with \textsf{color}. |
| 747 |
% |
| 748 |
% \DescribeEnv{emtex} |
| 749 |
% uses the original em\TeX\ |\special|s with rectangular |
| 750 |
% line ends. Curves adds a disk to round them. |
| 751 |
% |
| 752 |
% \DescribeEnv{xdvi} |
| 753 |
% uses the PostScript |\special|s of |dvips|. |
| 754 |
% |
| 755 |
% \DescribeEnv{WML} |
| 756 |
% the same as |dvips| but with single character names |W|, |M| and |
| 757 |
% |L| to minimize |
| 758 |
% \TeX\ memory with large |picture|s. |
| 759 |
% |
| 760 |
% \subsection{Arguments of Commands} |
| 761 |
% |
| 762 |
% \DescribeEnv{\meta{blank length}} decimal number of |
| 763 |
% \meta{unit len} blanks. Not negative. |
| 764 |
% |
| 765 |
% \DescribeEnv{\meta{character or symbol}} is anything which a |\put| or |
| 766 |
% |\multiput| may draw. |
| 767 |
% |
| 768 |
% \DescribeEnv{\meta{coordinates}} are decimal numbers giving |
| 769 |
% alternate $x$ and $y$ |
| 770 |
% coordinates of the curve as multiples of |\unitlength|, comma |
| 771 |
% separated. |
| 772 |
% |
| 773 |
% \DescribeEnv{\meta{[,dash...]}} optional continuation of alternating |
| 774 |
% dash |
| 775 |
% and blank numbers |
| 776 |
% of unit lengths, comma separated. Not negative. Allows decimal points. |
| 777 |
% |
| 778 |
% \DescribeEnv{\meta{diameter}} is a decimal number giving the diameter in |
| 779 |
% |\unitlength|s. |
| 780 |
% |
| 781 |
% \DescribeEnv{\meta{symbol count}} is the number of symbols or |
| 782 |
% patterns to be drawn, default 0. |
| 783 |
% |
| 784 |
% \DescribeEnv{\meta{unit len}} unit length dimension {\it e.g.\/,} |
| 785 |
% 2.5mm, 10pt, used in measuring blanks and dashes. Not negative. |
| 786 |
% Default value is |\unitlength|. |
| 787 |
% |
| 788 |
% \subsection{Lengths used by Commands} |
| 789 |
% |
| 790 |
% \DescribeMacro{\csdiameter} is the size of the space left for a |
| 791 |
% symbol and can be increased or set with |
| 792 |
% |\settowidth{\csdiameter}{|\meta{character or symbol}|}|. |
| 793 |
% |
| 794 |
% \DescribeMacro{\curvelength} is the total length of the curve |
| 795 |
% calculated before |
| 796 |
% drawing by using Simpson's rule once between each pair of coordinate points. |
| 797 |
% |
| 798 |
% \DescribeMacro{\overhang} length of as drawn dash pattern |
| 799 |
% overlapping start of |
| 800 |
% patterns. |
| 801 |
% |
| 802 |
% \subsection{Control Commands} |
| 803 |
% |
| 804 |
% \DescribeMacro{\curvewarntrue} turns warning of parabolic arc |
| 805 |
% replacement by straight lines on (default). |
| 806 |
% |
| 807 |
% \DescribeMacro{\curvewarnfalse} turns warning of parabolic arc |
| 808 |
% replacement by straight lines off. |
| 809 |
% |
| 810 |
% \DescribeMacro{\straighttrue} replaces parabolic arcs |
| 811 |
% between \meta{coordinates} |
| 812 |
% by straight lines replacing curves by polygons. |
| 813 |
% |
| 814 |
% \DescribeMacro{\straightfalse} draw parabolic arcs between \meta{coordinates} |
| 815 |
% (default). |
| 816 |
% |
| 817 |
% \subsection{Parameter Setting Commands} |
| 818 |
% |
| 819 |
% \DescribeMacro{\curvesymbol} |{|\meta{character or |
| 820 |
% symbol}|}| sets symbol and |\csdiameter|. |
| 821 |
% |
| 822 |
% \DescribeMacro{\curvedashes} |
| 823 |
% |[|\meta{unit len}|]{|\meta{blank length}\meta{[,dash...]}|}| A drawing |
| 824 |
% command not following a |\curvedashes| or following one with |
| 825 |
% an empty or zero length pattern will draw: |
| 826 |
% |
| 827 |
% \makeatletter |
| 828 |
% ^^A Hanging indentation with paragraph separation for author-date, etc. |
| 829 |
% \newenvironment{hanging}{\list{}{\topsep\itemsep \advance\topsep-\parskip |
| 830 |
% \parsep\itemsep \itemsep\z@skip \partopsep\parskip |
| 831 |
% \ifdim\parindent>\z@ \@tempdimb\parindent \else \@tempdimb1.5 em\fi |
| 832 |
% \leftmargin\@tempdimb \listparindent-\@tempdimb \itemindent-\@tempdimb |
| 833 |
% \rightmargin\z@ \labelsep\z@ \labelwidth\z@ }\item[]}% |
| 834 |
% {\endlist \addvspace\parsep} |
| 835 |
% \makeatother |
| 836 |
% |
| 837 |
% \begin{hanging} |
| 838 |
% if \meta{symbol count} is zero or missing, a continuous curve; |
| 839 |
% |
| 840 |
% else if \meta{symbol count} is positive, \meta{symbol count}-1 squares of |
| 841 |
% line thickness size between and additional squares at coordinates or |\bezier| |
| 842 |
% end points; |
| 843 |
% |
| 844 |
% else if no \meta{character or symbol} exists, nothing; |
| 845 |
% |
| 846 |
% else, -\meta{symbol count}-1 characters or symbols between coordinates and |
| 847 |
% additional ones at coordinates or |\bezier| end points. |
| 848 |
% |
| 849 |
% \end{hanging} |
| 850 |
% After a |\curvedashes| command defining a pattern whose length exceeds |
| 851 |
% zero, commands draw: |
| 852 |
% |
| 853 |
% |
| 854 |
% \begin{hanging} |
| 855 |
% |
| 856 |
% if \meta{symbol count} is zero or missing then at a spacing equal to the |
| 857 |
% specified pattern length, |
| 858 |
% |
| 859 |
% \begin{hanging} |
| 860 |
% |
| 861 |
% if no \meta{character or symbol} exists, a dash pattern reduced in length |
| 862 |
% by |\csdiameter| to fit between symbol spaces of |\csdiameter|, |
| 863 |
% |
| 864 |
% else if |\overhang| is not 0pt, a \meta{character or symbol} at all |
| 865 |
% positions, |
| 866 |
% |
| 867 |
% else a \meta{character or symbol} with the first position blank; |
| 868 |
% |
| 869 |
% \end{hanging} |
| 870 |
% |
| 871 |
% else, |\csdiameter| wide symbol spaces, one at and |
| 872 |
% \meta{symbol count}-1 between coordinate points with dash pattern |
| 873 |
% lengths, |
| 874 |
% |
| 875 |
% \begin{hanging} |
| 876 |
% if no \meta{character or symbol} exists, exact but broken by the spaces, |
| 877 |
% |
| 878 |
% else, adjusted to give a whole number of patterns between spaces. |
| 879 |
% |
| 880 |
% \end{hanging} |
| 881 |
% \end{hanging} |
| 882 |
% |
| 883 |
% \DescribeMacro{\diskpitchstretch} is initially 1 but |\renewcommand| can |
| 884 |
% change it to a higher value like 5 to save memory in drafts of complex |
| 885 |
% documents or a lower local value like 0.5 to smooth curve digitization. |
| 886 |
% |
| 887 |
% \DescribeMacro{\linethickness} |{|\meta{len}|}| sets line or dash |
| 888 |
% thicknesses to \meta{len} from 0.5pt up to 15pt (0.17mm to 5mm). |
| 889 |
% |\thicklines| and |\thinlines| also set thickness. |
| 890 |
% |
| 891 |
% \DescribeMacro{\patternresolution} is initially 1 but |\renewcommand| can |
| 892 |
% change it to a higher value like 5 to save memory in drafts of complex |
| 893 |
% documents or a lower local value like 0.5 for greater dash |
| 894 |
% pattern accuracy. |
| 895 |
% |
| 896 |
% \DescribeMacro{\xscale} \DescribeMacro{\xscaley} |
| 897 |
% \DescribeMacro{\yscale} \DescribeMacro{\yscalex} are |
| 898 |
% scale factors initially set to 1, 0, 1 and 0 respectively which |
| 899 |
% |\renewcommand| can reset. |
| 900 |
% |
| 901 |
% \subsection{Curve Drawing Commands} |
| 902 |
% Curves commands draw straight lines between coordinate points |
| 903 |
% or parabolic arcs with |
| 904 |
% tangents at each point parallel to the straight line through adjacent points. |
| 905 |
% |
| 906 |
% \DescribeMacro{\arc} |[|\meta{symbol count}|](X1,Y1){|\meta{angle}|}| |
| 907 |
% draws a circular arc centred |
| 908 |
% on current position, starting from {\tt (X1,Y1)} and proceeding |
| 909 |
% counterclockwise for \meta{angle} degrees. |
| 910 |
% |
| 911 |
% \DescribeMacro{\bezier} |{|\meta{symbol count}|}(X1,Y1)(X2,Y2)(X3,Y3)| |
| 912 |
% draws a curve through |
| 913 |
% the end points {\tt (X1,Y1)} and {\tt (X3,Y3)} tangent to the straight lines |
| 914 |
% joining each of them to {\tt (X2,Y2)}. Extended faster replacement for {\tt |
| 915 |
% bezier.sty} version. |
| 916 |
% |
| 917 |
% \DescribeMacro{\bigcircle} |[|\meta{symbol count}|]{|\meta{diameter}|}| |
| 918 |
% draws a circle of diameter |
| 919 |
% equal to \meta{diameter} times |\unitlength|. |
| 920 |
% |
| 921 |
% \DescribeMacro{\closecurve}|[|\meta{symbol count}|](|\meta{coordinates}|)| |
| 922 |
% draws a closed curve |
| 923 |
% with continuous tangents at all points. At least 6 coordinates required. |
| 924 |
% |
| 925 |
% \DescribeMacro{\curve}|[|\meta{symbol count}|](|\meta{coordinates}|)| |
| 926 |
% draws a curve through the \meta{coordinates} |
| 927 |
% specified. For 4 coordinates this is a straight line. |
| 928 |
% |
| 929 |
% \DescribeMacro{\scaleput}|(X1,Y1){|\meta{picture object}|}| |
| 930 |
% places a picture object in a |
| 931 |
% position scaled by |\xscale|, |\xscaley|, |\yscale| and |
| 932 |
% |\yscalex| for axonometric projection or rotations. |
| 933 |
% |
| 934 |
% \DescribeMacro{\tagcurve} |[|\meta{symbol count}|](|\meta{coordinates}|)| |
| 935 |
% draws a curve without its |
| 936 |
% first and last segments but if only 6 coordinates draws the last segment |
| 937 |
% only. |
| 938 |
% |
| 939 |
% } |
| 940 |
% |
| 941 |
% \typeout{} |
| 942 |
% {\catcode`\%=12 \typeout{Please place a `%' at the start of the line near}} |
| 943 |
% \typeout{the start of curves.dtx containing just} |
| 944 |
% \typeout{`\string\OnlyDescription' if you also wish to print out long} |
| 945 |
% \typeout{commented LaTeXed listings of curves.sty and curvesls.sty.} |
| 946 |
% \typeout{} |
| 947 |
% |
| 948 |
% \StopEventually{} ^^A |
| 949 |
% |
| 950 |
% \section{How \textsf{curves} Works} |
| 951 |
% |
| 952 |
% Superimposing characters closely can draw any curve. Disks give |
| 953 |
% directional independence of line thickness and visual smoothness at |
| 954 |
% large pitch. Smoothness increases with output resolution but is |
| 955 |
% almost independent of disk pitch below a critical maximum. The |
| 956 |
% following table suggests this maximum varies from 0.34pt for an |
| 957 |
% 0.5pt thick curve to 3pt for a 15pt curve. |
| 958 |
% |
| 959 |
% \begin{center} |
| 960 |
% \setlength{\unitlength}{1pt} |
| 961 |
% \begin{tabular}{cccc} |
| 962 |
% Thickness & \makebox[3em][l]{Magnified} & Comments & Line at 1/6 slope \\ |
| 963 |
% \hline |
| 964 |
% 15pt & $\times1$ & 1pt pitch disks& |
| 965 |
% \begin{picture}(80,20)(0,15) \multiput(10,15)(1,0.1667){61}{\circle*{15}} |
| 966 |
% \end{picture} \\ |
| 967 |
% 15pt & $\times1$ & 3pt pitch disks& |
| 968 |
% \begin{picture}(80,20)(0,15) \multiput(10,15)(3,0.5){21}{\circle*{15}} |
| 969 |
% \end{picture} \\ |
| 970 |
% $\approx$0.5pt & $\times1$ & \LaTeX\ |\line(6,1)| & |
| 971 |
% \begin{picture}(80,20)(0,15) \thinlines \put(10,15){\line(6,1){60}} |
| 972 |
% \end{picture} \\ |
| 973 |
% $\approx$0.5pt & $\times1$ & 0.34pt pitch disks & |
| 974 |
% \begin{picture}(80,20)(0,15) |
| 975 |
% \multiput(10,15)(0.3333,0.05556){181}{\tiny .} |
| 976 |
% \end{picture} \\ |
| 977 |
% $\approx$0.5pt & $\times30$ \rule[-10pt]{0pt}{10pt} & |
| 978 |
% \parbox{8em}{\centering 0.34pt pitch disks\\ resolution $\times30$ } & |
| 979 |
% \begin{picture}(80,20)(0,15) \multiput(10,15)(10.0,1.667){7}{\circle*{15}} |
| 980 |
% \end{picture} \\ |
| 981 |
% \hline |
| 982 |
% \end{tabular} |
| 983 |
% \end{center} |
| 984 |
% |
| 985 |
% \LaTeX\ |\line|\footnotemark[1] or line drawing |\special| commands |
| 986 |
% require a tenth the \TeX\ memory so are preferable to disks if |
| 987 |
% available. \LaTeX\ can load \TeX\footnote{Donald E. Knuth, {\sl |
| 988 |
% The \TeX book,} Addison-Wesley, 1984, Chapter 20.} macros from |
| 989 |
% package files with a |.sty| extension. These macros can calculate |
| 990 |
% the disk or line positions for a curve. |
| 991 |
% |
| 992 |
% Parabolic arcs are also quadratic B\'ezier curves which can be |
| 993 |
% generated from first and second differences without multiplication. |
| 994 |
% The accuracy at a given fixed point is greater if the differences |
| 995 |
% are larger. Straight lines generated by just first differences can |
| 996 |
% be used to interpolate between these points. \TeX's integer |
| 997 |
% arithmetic allows this to be done precisely. |
| 998 |
% |
| 999 |
% The difference in the changes in position between successive pairs |
| 1000 |
% of disks may be so small that \TeX\ rounding causes visible curve |
| 1001 |
% error. The difference between a curve and straight chords joining |
| 1002 |
% points many disks apart can be invisible with invisible \TeX\ |
| 1003 |
% rounding also. \TeX\ can efficiently draw visibly accurate curves |
| 1004 |
% as a sequence of straight chords. Straight line drawing |\special|s |
| 1005 |
% are often incompatible so multiple line options are desirable in |
| 1006 |
% macros. A smooth curve may require thousands of disks but only |
| 1007 |
% hundreds of chords so line |\special|s may prevent a complex |
| 1008 |
% drawing from overflowing \TeX\ memory. |
| 1009 |
% |
| 1010 |
% {\tt curves.sty} provides macro commands for drawing curves as |
| 1011 |
% chords. Version \fileversion\ loads in less than 2000 |
| 1012 |
% words\footnote{A character or token takes a \TeX\ word, 32 bits or |
| 1013 |
% larger.} of \TeX's main memory, which allows a small \TeX. |
| 1014 |
% Complex or numerous floating drawings still require a big \TeX\ |
| 1015 |
% with {\tt curves.sty}. Current options for line |\special|s are |
| 1016 |
% |dvips|, |emtex|, |xdvi|, and |WML|. |
| 1017 |
% |
| 1018 |
% The capabilities of these macros are:--- |
| 1019 |
% \begin{itemize} |
| 1020 |
% \item A compatible replacement for |\bezier|\footnote{See your Local |
| 1021 |
% Guide. Try the system command {\tt latex local} to get a \LaTeX ed Guide.} |
| 1022 |
% from {\tt bezier.sty} or \LaTeXe. |
| 1023 |
% \item Work with |slides| class |
| 1024 |
% for overhead transparencies with \LaTeXe\footnotemark[5]. |
| 1025 |
% \item Curves have the minimum number of disks or chords for visual |
| 1026 |
% smoothness. |
| 1027 |
% \item Curve thickness adjustable from 0.5 to 15pt (0.17 to 5mm). |
| 1028 |
% \item Curves have continuous slope. |
| 1029 |
% \item Curves for any number of points greater than one using |\curve|. |
| 1030 |
% \item Control of end slopes using |\tagcurve|. |
| 1031 |
% \item Closed curves with continuous slope using |\closecurve|. |
| 1032 |
% \item Polygons replace curves after |\straighttrue|. |
| 1033 |
% \item Large circles |\bigcircle| and circular arcs |\arc|. |
| 1034 |
% \item Independent scaling of curve abscissa and ordinates to fit graphs. |
| 1035 |
% \item Affine scaling for making arcs or circles elliptical. |
| 1036 |
% \item Symbols and dash patterns combined without interference. |
| 1037 |
% \item Any dash length or spacing. |
| 1038 |
% \item Three methods for fitting dash patterns to curves. |
| 1039 |
% \end{itemize} |
| 1040 |
% |
| 1041 |
% Parabolic arcs approximate the curve segments between the specified |
| 1042 |
% coordinate points. At an internal curve point, the slope of the |
| 1043 |
% two parabolic arcs which join is the slope of the straight line |
| 1044 |
% joining the adjacent points. For an end segment, the inside point |
| 1045 |
% of the arc is made a vertex which determines the slope of the end |
| 1046 |
% point. |\tagcurve| has hidden end segments which allows complete |
| 1047 |
% control of slope at the visible end point when desired. This |
| 1048 |
% scheme makes the curves and slopes continuous and the discontinuity |
| 1049 |
% in curvature is small with sufficient data points. |
| 1050 |
% |
| 1051 |
% Usually four points determine the parabolic arc between the two |
| 1052 |
% inside points. The four points could be close to a straight line or |
| 1053 |
% consistent with an inflexion point. A straight line then replaces |
| 1054 |
% the parabolic arc between the inside points and optionally a |
| 1055 |
% warning is issued. |
| 1056 |
% |
| 1057 |
% Each parabolic arc is drawn as a series of short chords. |
| 1058 |
% For line |\special|s, the dvi driver draws the straight lines. |
| 1059 |
% Otherwise, the chords are drawn as overlapping disks at high speed |
| 1060 |
% using a simple tail chasing macro. This macro's arithmetic |
| 1061 |
% calculations are two fixed point additions per disk drawn. |
| 1062 |
% |
| 1063 |
% For circles and circular arcs, a parabolic arc approximates a |
| 1064 |
% circular arc subtending no more than 23$^\circ$ giving a radius |
| 1065 |
% increase between segment ends less than 0.02\%. A full circle uses |
| 1066 |
% 16 parabolic arcs. The error in computing and multiplying by sine |
| 1067 |
% and cosine is usually less than 0.01\% of the radius at the far end |
| 1068 |
% of an arc. |
| 1069 |
% |
| 1070 |
% \section{Pleas for the Future} |
| 1071 |
% |
| 1072 |
% \textsf{Curves} will never work with plain \TeX\ and it will never be as |
| 1073 |
% powerful as {\sf METAPOST} or importing encapsulated PostScript |
| 1074 |
% files. Suggestions or criticisms by email are |
| 1075 |
% welcome. Version \fileversion\ has benefitted greatly from previous |
| 1076 |
% help. The latest versions are first available at URL: |
| 1077 |
% \begin{verbatim} |
| 1078 |
% http://patch.bpa.nu/pub/archive/latex/macros/curves/ |
| 1079 |
% \end{verbatim} |
| 1080 |
% At your local CTAN mirror the latest version should be near the |
| 1081 |
% directory for the latest version of \LaTeX. Please use |
| 1082 |
% CTAN to reduce Internet load. |
| 1083 |
% |
| 1084 |
% \DescribeMacro{WML} |
| 1085 |
% A {\tt .dvi} file containing curves produced with the |emtex| option |
| 1086 |
% has many occurrences of the text strings {\tt em:lineto}, {\tt |
| 1087 |
% em:moveto} and {\tt em:linewidth XXXXpt} placed by the em\TeX\ |
| 1088 |
% |\special|s. These strings would have earlier occupied \TeX\ |
| 1089 |
% memory. Extra memory is also taken by the disks used to |
| 1090 |
% cover the cracks between square line ends at a slight angle. Renaming |
| 1091 |
% these |\special|s to {\tt L}, {\tt M} and {\tt W XXXXpt} |
| 1092 |
% respectively would save \TeX\ memory. Even better, {\tt W XXXXpt} |
| 1093 |
% could calculate and store the bitmap of a disk which {\tt L} |
| 1094 |
% would add to its line ends to round them so {\tt curves} need not add |
| 1095 |
% disks\footnote{\texttt{dvips}'s em\TeX\ \texttt{\bslash special}s |
| 1096 |
% round line ends but not all em\TeX\ \texttt{\bslash special}s do.}. |
| 1097 |
% If you write dvi drivers, please add |
| 1098 |
% these three proposed |\special|s. |
| 1099 |
% |
| 1100 |
% \section{\texttt{curves.sty}} |
| 1101 |
% |
| 1102 |
% The description of the algorithms following is minimal. |
| 1103 |
% Future releases will add more. |
| 1104 |
% \begin{macrocode} |
| 1105 |
%<*package> |
| 1106 |
% \end{macrocode} |
| 1107 |
|
| 1108 |
% \noindent Make `;' appear like a letter so control sequences can use |
| 1109 |
% it and they |
| 1110 |
% will not be accidently used by other macro packages. |
| 1111 |
% \begin{macrocode} |
| 1112 |
\catcode`\;=11 |
| 1113 |
|
| 1114 |
% \end{macrocode} |
| 1115 |
% \subsection{Registers} |
| 1116 |
% Counts |
| 1117 |
% |
| 1118 |
% \noindent number of symbols on parabolic arc |
| 1119 |
% \begin{macrocode} |
| 1120 |
\newcount\;sc |
| 1121 |
\newcount\;scp |
| 1122 |
\newcount\;t |
| 1123 |
% \end{macrocode} |
| 1124 |
% coordinate count |
| 1125 |
% \begin{macrocode} |
| 1126 |
\newcount\;cc |
| 1127 |
% \end{macrocode} |
| 1128 |
% actual point count to next dot |
| 1129 |
% \begin{macrocode} |
| 1130 |
\newcount\;cnd |
| 1131 |
% \end{macrocode} |
| 1132 |
% maximum point count to next dot |
| 1133 |
% \begin{macrocode} |
| 1134 |
\newcount\;mcnd |
| 1135 |
\newcount\;np |
| 1136 |
\newcount\;overhang |
| 1137 |
\newcount\;pbs |
| 1138 |
\newcount\;pns |
| 1139 |
% \end{macrocode} |
| 1140 |
% maximum dot spacing on line in sp. |
| 1141 |
% \begin{macrocode} |
| 1142 |
\newcount\;psc |
| 1143 |
\newcount\;rc |
| 1144 |
\newcount\;rtc |
| 1145 |
\newcount\;tc |
| 1146 |
\let\;tca=\@tempcnta |
| 1147 |
\let\;tcb=\@tempcntb |
| 1148 |
|
| 1149 |
% \end{macrocode} |
| 1150 |
% Dimens |
| 1151 |
% \begin{macrocode} |
| 1152 |
\newlength\csdiameter |
| 1153 |
\newlength\curvelength |
| 1154 |
\newlength\overhang |
| 1155 |
\newlength\;x |
| 1156 |
\newlength\;dx |
| 1157 |
\newlength\;ddx |
| 1158 |
\newlength\;y |
| 1159 |
\newlength\;dy |
| 1160 |
\newlength\;ddy |
| 1161 |
\newlength\;pl |
| 1162 |
\newlength\;ucd |
| 1163 |
\let\;td=\@tempdima |
| 1164 |
\let\;ytd=\@tempdimb |
| 1165 |
|
| 1166 |
% \end{macrocode} |
| 1167 |
% Boxes |
| 1168 |
% \begin{macrocode} |
| 1169 |
\newsavebox{\;csbox} |
| 1170 |
\newsavebox{\;pt} |
| 1171 |
|
| 1172 |
% \end{macrocode} |
| 1173 |
% \subsection{Boolean} |
| 1174 |
% |
| 1175 |
% has an option been selected |
| 1176 |
% \begin{macrocode} |
| 1177 |
\newif\if;noopt \;noopttrue |
| 1178 |
% \end{macrocode} |
| 1179 |
% Warn about curve problems |
| 1180 |
% \begin{macrocode} |
| 1181 |
\newif\ifcurvewarn \curvewarntrue |
| 1182 |
% \end{macrocode} |
| 1183 |
% Plot straightline segments instead of curves. |
| 1184 |
% \begin{macrocode} |
| 1185 |
\newif\ifstraight |
| 1186 |
% \end{macrocode} |
| 1187 |
% coordinate number correct |
| 1188 |
% \begin{macrocode} |
| 1189 |
\newif\if;ccn |
| 1190 |
% \end{macrocode} |
| 1191 |
% plot points if true |
| 1192 |
% \begin{macrocode} |
| 1193 |
\newif\if;pt |
| 1194 |
% \end{macrocode} |
| 1195 |
% curve symbol defined |
| 1196 |
% \begin{macrocode} |
| 1197 |
\newif\if;csym |
| 1198 |
% \end{macrocode} |
| 1199 |
% symbol or pattern count |
| 1200 |
% \begin{macrocode} |
| 1201 |
\newif\if;scnt |
| 1202 |
|
| 1203 |
% \end{macrocode} |
| 1204 |
% help strings |
| 1205 |
% \begin{macrocode} |
| 1206 |
\newhelp\;strline{curve straight from} |
| 1207 |
\newhelp\m;ssingcoord{curve needs more points, add them.} |
| 1208 |
\newhelp\;negdash{curvedashes needs the same sign for all arguments.} |
| 1209 |
\newhelp\;oddcoord{curve requires two co-ordinates for each point, |
| 1210 |
count them.} |
| 1211 |
|
| 1212 |
% \end{macrocode} |
| 1213 |
% |
| 1214 |
% \subsection{Driver Options} |
| 1215 |
% |
| 1216 |
% The following three commands may be reset |
| 1217 |
% by \textsf{curves} options to contain straight |
| 1218 |
% line drawing |\special|s which some |dvi| drivers |
| 1219 |
% may have. The usual default for unimplemented |
| 1220 |
% |\special|s is the driver |
| 1221 |
% draws nothing. If no option is specified \LaTeX\ period and circle |
| 1222 |
% fonts are used to plot straight lines segments efficiently. |
| 1223 |
% This should always work with \LaTeXe. |
| 1224 |
% The resulting curves differ |
| 1225 |
% in run time, \TeX\ memory use, |
| 1226 |
% |.dvi| and printer file size but not in output |picture|s. |
| 1227 |
% |
| 1228 |
% |
| 1229 |
% \noindent Sets the line width |
| 1230 |
% \begin{macrocode} |
| 1231 |
\newcommand\;linewidth[1]{} |
| 1232 |
% \end{macrocode} |
| 1233 |
% Sets the start of the line |
| 1234 |
% \begin{macrocode} |
| 1235 |
\newcommand\;startline{} |
| 1236 |
% \end{macrocode} |
| 1237 |
% Draws the line and sets next start. |
| 1238 |
% \begin{macrocode} |
| 1239 |
\newcommand\;stopl;ne{} |
| 1240 |
|
| 1241 |
\newcommand\;optioncheck[2]{% |
| 1242 |
\DeclareOption{#1}{% |
| 1243 |
\if;noopt |
| 1244 |
#2\;nooptfalse |
| 1245 |
\else |
| 1246 |
\PackageError{curves}{Option |
| 1247 |
\CurrentOption\space ignored}{curves uses only one dvi option}% |
| 1248 |
\fi |
| 1249 |
}% |
| 1250 |
} |
| 1251 |
|
| 1252 |
% \end{macrocode} |
| 1253 |
% Sets thickness and no disk character for rounded line ends. |
| 1254 |
% \begin{macrocode} |
| 1255 |
\newcommand\;setdisk{\@killglue \;linewidth\@wholewidth |
| 1256 |
\set;pt{}\let\;stopline\;stopl;ne} |
| 1257 |
\newcommand\s;tpitch{\;td\patternresolution\p@ \;psc\;td} |
| 1258 |
|
| 1259 |
\;optioncheck{dvips}{ |
| 1260 |
% \end{macrocode} |
| 1261 |
% Works with the \textsf{color} package. |
| 1262 |
% \begin{macrocode} |
| 1263 |
\renewcommand\;linewidth[1]{\special{em:linewidth \the#1}}% |
| 1264 |
\renewcommand\;startline{\special{em:moveto}}% |
| 1265 |
\renewcommand\;stopl;ne{\special{em:lineto}}% |
| 1266 |
} |
| 1267 |
|
| 1268 |
\;optioncheck{emtex}{ |
| 1269 |
\renewcommand\;linewidth[1]{\special{em:linewidth \the#1}}% |
| 1270 |
\renewcommand\;startline{\special{em:moveto}}% |
| 1271 |
\renewcommand\;stopl;ne{\special{em:lineto}}% |
| 1272 |
\renewcommand\;setdisk{\@killglue |
| 1273 |
\ifdim\@halfwidth>\p@ |
| 1274 |
\set;pt{\@circ\@wholewidth{112}}\;linewidth{\wd\;pt}% |
| 1275 |
\s;tcirc{\unhbox\;pt}% |
| 1276 |
\else \;linewidth\@wholewidth \set;pt{}\fi \let\;stopline\;stopl;ne} |
| 1277 |
} |
| 1278 |
|
| 1279 |
\;optioncheck{xdvi}{ |
| 1280 |
% \end{macrocode} |
| 1281 |
% Works with |xdvi| and |dvips| but not \textsf{color}. |
| 1282 |
% |
| 1283 |
% Divide the excess precision of scaled points by 256 to save |
| 1284 |
% \TeX\ memory and |dvi| file size. Device independent for |
| 1285 |
% resolutions smaller than 18501 dots per inch. |
| 1286 |
% Note: \(72.27\times256/72=256.96\) exactly so errors occur only after the |
| 1287 |
% |\divide|s in the |\;stopl;ne|. |
| 1288 |
% \begin{macrocode} |
| 1289 |
\special{!/;L{1 256.96 div dup scale 1 setlinecap |
| 1290 |
setlinewidth newpath 0 0 moveto lineto stroke}def}% |
| 1291 |
\newcount\;wc |
| 1292 |
\newlength\;X |
| 1293 |
\newlength\;Y |
| 1294 |
\renewcommand\;linewidth[1]{\;wc#1}% |
| 1295 |
\renewcommand\;startline{\global\;X\;x \global\;Y\;y}% |
| 1296 |
\renewcommand\;stopl;ne{% |
| 1297 |
\;tca\;X \advance\;tca-\;x \;tcb\;Y \advance\;tcb-\;y |
| 1298 |
\divide\;tca\@cclvi \divide\;tcb\@cclvi \divide\;wc\@cclvi |
| 1299 |
\special{"\the\;tca\space \the\;tcb\space \the\;wc\space ;L}% |
| 1300 |
\;startline |
| 1301 |
}% |
| 1302 |
} |
| 1303 |
|
| 1304 |
\;optioncheck{WML}{ |
| 1305 |
\renewcommand\;linewidth[1]{\special{W \the#1}}% |
| 1306 |
\renewcommand\;startline{\special{M}}% |
| 1307 |
\renewcommand\;stopl;ne{\special{L}}% |
| 1308 |
\;nooptfalse |
| 1309 |
} |
| 1310 |
|
| 1311 |
\let\;optioncheck\relax |
| 1312 |
\ProcessOptions\relax |
| 1313 |
|
| 1314 |
\if;noopt |
| 1315 |
|
| 1316 |
\newcount\;wc |
| 1317 |
\newlength\;X |
| 1318 |
\newlength\;Y |
| 1319 |
|
| 1320 |
\newcommand\;setperiod{\;tcb |
| 1321 |
\ifdim\@halfwidth>.6\p@ 17\;td.7 |
| 1322 |
\else \ifdim\@wholewidth>.85\p@ 12\;td.48 |
| 1323 |
\else \ifdim\@wholewidth>.6\p@ 8\else 5\fi \;td.34 |
| 1324 |
\fi |
| 1325 |
\fi \p@ |
| 1326 |
\s;tcirc{\rm \fontseries m\fontshape n\fontsize{\the\;tcb}\p@ |
| 1327 |
\selectfont \hss.}}% |
| 1328 |
|
| 1329 |
% \end{macrocode} |
| 1330 |
% Sets LaTeX disk character and calculates maximum spacing or selects period. |
| 1331 |
% \begin{macrocode} |
| 1332 |
\renewcommand\;setdisk{\@killglue \ifdim\@halfwidth>.85\p@ |
| 1333 |
\s;tcirc{\@circ{\@wholewidth}{112}}\;td\@wholewidth |
| 1334 |
\divide\;td 8\advance\;td.6\p@ \ifdim\;td>\thr@@\p@\;td\thr@@\p@\fi |
| 1335 |
\else \;setperiod \fi \let\;stopline\;stopl;ne}% |
| 1336 |
|
| 1337 |
\renewcommand\s;tpitch{\;ytd\diskpitchstretch\;td \;wc\;ytd |
| 1338 |
\;td\patternresolution\p@ \;psc\;td } |
| 1339 |
|
| 1340 |
\renewcommand\;startline{\global\;X\;x \global\;Y\;y} |
| 1341 |
|
| 1342 |
\renewcommand\;stopl;ne{% |
| 1343 |
% \end{macrocode} |
| 1344 |
% This plots just the intermediate disks of a straight line segment which |
| 1345 |
% requires any. The end disks are plotted in the device independent code. |
| 1346 |
% \begin{macrocode} |
| 1347 |
\;td\;X \advance\;td-\;x \;ytd\;Y \advance\;ytd-\;y |
| 1348 |
\;startline \;rxya\;td\;ytd \divide\;rc\;wc |
| 1349 |
\ifnum\;rc>\z@ \advance\;rc\@ne |
| 1350 |
\divide\;td\;rc \divide\;ytd\;rc \;y\z@ |
| 1351 |
\advance\;rc\m@ne \;tca\;rc |
| 1352 |
\let\n;xt\;ls \;ls \kern-\;rc\;td |
| 1353 |
\fi} |
| 1354 |
|
| 1355 |
\newcommand\;ls{\advance\;y\;ytd \kern\;td \raise\;y\copy\;pt |
| 1356 |
\advance\;tca\m@ne \ifnum\;tca=\z@ \let\n;xt\relax \fi \n;xt} |
| 1357 |
|
| 1358 |
\fi |
| 1359 |
|
| 1360 |
% \end{macrocode} |
| 1361 |
% \subsection{User Command Definitions} |
| 1362 |
% \begin{macrocode} |
| 1363 |
\newcommand\arc[1][0]{\;arc[#1]} |
| 1364 |
\newcommand\;arc{} |
| 1365 |
\def\;arc[#1](#2,#3)#4{\;setpoint{#1}\scaleput(#2,#3){\;ddx |
| 1366 |
-#3\unitlength \;ddy#2\unitlength \;firstpoint \;td#4\p@ \;drwarc}} |
| 1367 |
|
| 1368 |
% \end{macrocode} |
| 1369 |
% Redefines version in LaTeX 2e of 1 June 1994. |
| 1370 |
% \begin{macrocode} |
| 1371 |
\def\bezier#1)#2(#3)#4({\@bezier#1)(#3)(} |
| 1372 |
\def\@bezier#1(#2,#3)(#4,#5)(#6,#7){\;dx#4\unitlength \;ddx-\;dx |
| 1373 |
\advance\;dx-#2\unitlength \advance\;ddx#6\unitlength |
| 1374 |
\;dy#5\unitlength \;ddy-\;dy \advance\;dy-#3\unitlength |
| 1375 |
\advance\;ddy#7\unitlength |
| 1376 |
\;setpoint{#1}\scaleput(#2,#3){\;firstpoint \;bezier}} |
| 1377 |
|
| 1378 |
\newcommand\bigcircle[2][0]{\;setpoint{#1}\;dx\unitlength |
| 1379 |
\global\divide\unitlength\tw@ |
| 1380 |
\scaleput(#2,0){\;startline \;ddx\z@ \;ddy#2\unitlength |
| 1381 |
\global\unitlength\;dx \;td360\p@ \;drwarc}} |
| 1382 |
|
| 1383 |
\newcommand\closecurve[1][0]{\;closecurve[#1]} |
| 1384 |
\newcommand\;closecurve{} |
| 1385 |
\def\;closecurve[#1](#2){\;coordn\closecurve\thr@@{#2}{#1}% |
| 1386 |
\if;ccn\scaleput(\;xb,\;yb){\;startline |
| 1387 |
\edef\;ci{\;xa,\;ya,#2,\;xb,\;yb,\;xc,\;yc}% |
| 1388 |
\advance\;cc\thr@@ \;tagcurve\;ci}\fi} |
| 1389 |
|
| 1390 |
\newcommand\curve[1][0]{\;curve[#1]} |
| 1391 |
\newcommand\;curve{} |
| 1392 |
\def\;curve[#1](#2){\;coordn\curve\tw@{#2}{#1}% |
| 1393 |
\if;ccn \scaleput(\;xa,\;ya){\;firstpoint |
| 1394 |
\ifnum\;cc=\tw@ \;slbezd \;slbez |
| 1395 |
\else \;scbezd\;dx\;ddx\;xa\;xb\;xc \;scbezd\;dy\;ddy\;ya\;yb\;yc |
| 1396 |
\;bezier \;tagcurve{#2}\ifnum\;cc>6\;endcurve\fi \fi}\fi} |
| 1397 |
% \end{macrocode} |
| 1398 |
% \(|#1|= (|#4|-|#3|- (|#5|-|#3|)/4)|\unitlength|\), |
| 1399 |
% \(|#2|=(|#5|-|#3|)|\unitlength|/4\). |
| 1400 |
% \begin{macrocode} |
| 1401 |
\newcommand\;scbezd[5]{\;slcd#2#3#5\divide#24\;slcd#1#3#4\advance#1-#2} |
| 1402 |
\newcommand\;xa{} \newcommand\;xb{} \newcommand\;xc{} |
| 1403 |
\newcommand\;ya{} \newcommand\;yb{} \newcommand\;yc{} |
| 1404 |
\newcommand\;ci{} |
| 1405 |
|
| 1406 |
\newcommand\curvesymbol[1]{\def\;curvesymbol{#1}\ch;ckcs |
| 1407 |
\global\sbox\;csbox{#1}\csdiameter\wd\;csbox} |
| 1408 |
\newcommand\;curvesymbol{} \def\;curvesymbol{} |
| 1409 |
|
| 1410 |
\newcommand\curvedashes[2][\unitlength]{\;ucd#1\def\;icurvedashes{#2}% |
| 1411 |
\;ccnfalse \;pl\z@ |
| 1412 |
\@for \;ci:=#2\do{\ifdim\;ci\;ucd<\z@ \;ccntrue |
| 1413 |
\PackageError{curves}{\string |
| 1414 |
\curvedashes\space sign bad at \;ci\MessageBreak}{\the\;negdash}% |
| 1415 |
\else \advance\;pl\;ci\;ucd \fi}\if;ccn\;pl\z@\fi} |
| 1416 |
\newcommand\;icurvedashes{} |
| 1417 |
|
| 1418 |
\newcommand\tagcurve[1][0]{\;tgcrv[#1]} |
| 1419 |
\newcommand\;tgcrv{} |
| 1420 |
\def\;tgcrv[#1](#2){\;coordn\tagcurve\thr@@{#2}{#1}\if;ccn |
| 1421 |
\scaleput(\;xb,\;yb){\;firstpoint \;tagcurve{#2}}\fi} |
| 1422 |
|
| 1423 |
\newcommand\scaleput{} |
| 1424 |
\long\def\scaleput(#1,#2)#3{\@killglue \;td#2\unitlength |
| 1425 |
\raise\yscale\;td \hbox to \z@{\kern\xscaley\;td \;td#1\unitlength |
| 1426 |
\kern\xscale\;td \raise\yscalex\;td \hbox{#3}\hss}\ignorespaces} |
| 1427 |
\newcommand\xscale{\@ne} |
| 1428 |
\newcommand\xscaley{0} |
| 1429 |
\newcommand\yscale{\@ne} |
| 1430 |
\newcommand\yscalex{0} |
| 1431 |
|
| 1432 |
\newcommand\diskpitchstretch{\@ne} |
| 1433 |
\newcommand\patternresolution{\@ne} |
| 1434 |
|
| 1435 |
% \end{macrocode} |
| 1436 |
% |
| 1437 |
% \subsection{Drawing Command Details} |
| 1438 |
% |
| 1439 |
% Plot first point if any. |
| 1440 |
% \begin{macrocode} |
| 1441 |
\newcommand\;firstpoint{\;startline \ifdim\;pl=\z@\;point\relax\fi} |
| 1442 |
|
| 1443 |
% \end{macrocode} |
| 1444 |
% Calculates segment count, sine, cosine and differences then plots segments. |
| 1445 |
% \begin{macrocode} |
| 1446 |
\newcommand\;drwarc{\;cc\;td \;np\;td \;td23\p@ \divide\;cc\;td |
| 1447 |
\;abs\;cc \advance\;cc\@ne \;pns\p@ \divide\;pns\tw@ |
| 1448 |
\divide\;np\;cc \;rc\;np \divide\;rc\;pns \;abs\;rc |
| 1449 |
\advance\;rc\@ne \divide\;np\;rc \multiply\;np\;pns \divide\;np14668 % |
| 1450 |
\multiply\;np\;rc \divide\;np\@cclvi \;scp\p@ \multiply\;scp\@cclvi |
| 1451 |
\;t\;pns \;csi\;csi\;csi\;csi \;rxya\;ddx\;ddy \divide\;rc\p@ |
| 1452 |
\advance\;rc\@ne \;rtc\;rc \advance\;rc\;rc \;ndd\;ddx \;ndd\;ddy |
| 1453 |
\;csi \;rxya\;ddx\;ddy \divide\;rc\;pns \advance\;rc\@ne |
| 1454 |
\@whilenum\;cc>\z@ \do{\advance\;cc\m@ne \;dx\;ddx \;dy\;ddy |
| 1455 |
\divide\;ddx\;rc \divide\;ddy\;rc \;td\;ddx \;ddx\;t\;td |
| 1456 |
\advance\;ddx-\;np\;ddy \;ddy\;t\;ddy \advance\;ddy\;np\;td |
| 1457 |
\divide\;ddx\;pns \divide\;ddy\;pns \;ddx\;rc\;ddx \;ddy\;rc\;ddy |
| 1458 |
{\;bezier \global\;td\;x \global\;ytd\;y |
| 1459 |
\global\;tca\;overhang}\;y\;ytd \;x\;td \;overhang\;tca}} |
| 1460 |
\newcommand\;ndd[1]{\divide#1\;rc \multiply#1\;np |
| 1461 |
\divide#1\;t #1\;rtc#1} |
| 1462 |
% \end{macrocode} |
| 1463 |
% Cosine and sine half angle iteration. |
| 1464 |
% \begin{macrocode} |
| 1465 |
\newcommand\;csi{\;tcb\;np \multiply\;np\;t \divide\;np\;pns \;t\;tcb |
| 1466 |
\multiply\;t\;t \divide\;t-\;scp \advance\;t\;pns \divide\;scp4 } |
| 1467 |
|
| 1468 |
% \end{macrocode} |
| 1469 |
% Count the number of coordinates specified and warn if incorrect. |
| 1470 |
% \begin{macrocode} |
| 1471 |
\newcommand\;coordn[4]{\;setpoint{#4}\ifx#1\closecurve\;cc\tw@ |
| 1472 |
\else\;cc\z@\fi |
| 1473 |
\@for\;ci:=#3\do{\advance\;cc\@ne |
| 1474 |
\ifcase\;cc \or \;d;f\;xa \or \;d;f\;ya \or \;d;f\;xb |
| 1475 |
\or \;d;f\;yb \or \;d;f\;xc \or \;d;f\;yc \fi |
| 1476 |
\ifx#1\closecurve\ifodd\;cc \;d;f\;xa \else \;d;f\;ya \fi\fi}% |
| 1477 |
\;ccnfalse \ifx#1\closecurve \advance\;cc-\tw@ \fi |
| 1478 |
\ifodd\;cc |
| 1479 |
\PackageError{curves}{\string #1\space points odd}{\the\;oddcoord}% |
| 1480 |
\else \divide\;cc\tw@ |
| 1481 |
\ifnum#2>\;cc \PackageError{curves}{\string #1\space needs \the#2 |
| 1482 |
points\MessageBreak}{\the\m;ssingcoord}% |
| 1483 |
\else \;ccntrue \fi\fi} |
| 1484 |
|
| 1485 |
% \end{macrocode} |
| 1486 |
% Sets symbol, character or disk depending on how line is to be plotted. |
| 1487 |
% Corrects overhang to be positive or zero but no greater than |\;pl|. |
| 1488 |
% \begin{macrocode} |
| 1489 |
\newcommand\;setpoint[1]{\curvelength\z@ \let\;stopline\relax |
| 1490 |
\def\;point##1{\raise\;y\hbox{{\copy\;pt##1}}}\ch;ckcs |
| 1491 |
\ifnum#1=\z@\;scntfalse\else\;scnttrue\fi |
| 1492 |
\;sc#1\relax \;abs\;sc \;psc\;sc |
| 1493 |
\ifdim\;pl>\z@ \;overhang\overhang |
| 1494 |
\ifnum\;overhang=\z@\else \;np\;overhang |
| 1495 |
\divide\;np\;pl \multiply\;np\;pl |
| 1496 |
\ifnum\;overhang<\z@ \advance\;overhang\;pl |
| 1497 |
\else \ifnum\;overhang=\;np\advance\;overhang\;pl\fi |
| 1498 |
\fi \advance\;overhang-\;np \fi |
| 1499 |
\if;csym \if;scnt\;setdisk\else\;setsymbol\fi |
| 1500 |
\else \;setdisk \fi\s;tpitch |
| 1501 |
\else\ifnum#1>\z@ |
| 1502 |
\s;tcirc{\hss\vrule\@height\@wholewidth\@width\@wholewidth}% |
| 1503 |
\else\ifnum#1<\z@ \if;csym\;setsymbol\else\set;pt{}\fi |
| 1504 |
\else\;setdisk\s;tpitch |
| 1505 |
\fi\fi\fi \;x\z@ \;y\dp\;pt \advance\;y-\ht\;pt \divide\;y\tw@} |
| 1506 |
\newcommand\;setsymbol{\s;tcirc{\hss\unhcopy\;csbox}% |
| 1507 |
\edef\;point{\;point\relax |
| 1508 |
\s;tcirc{\hss\noexpand\;curvesymbol}\global\setbox\;csbox\copy\;pt}} |
| 1509 |
\newcommand\;stopline{} \newcommand\;point{} |
| 1510 |
|
| 1511 |
% \end{macrocode} |
| 1512 |
% Check if curvesymbol exists and set switch. |
| 1513 |
% \begin{macrocode} |
| 1514 |
\newcommand\ch;ckcs{\ifx\;curvesymbol\@empty\;csymfalse |
| 1515 |
\else\;csymtrue\fi} |
| 1516 |
|
| 1517 |
% \end{macrocode} |
| 1518 |
% Makes zero width box |\;pt| of point |
| 1519 |
% \begin{macrocode} |
| 1520 |
\newcommand\s;tcirc[1]{\set;pt to\z@{#1\hss}} |
| 1521 |
|
| 1522 |
% \end{macrocode} |
| 1523 |
% Set global box |\;pt| |
| 1524 |
% \begin{macrocode} |
| 1525 |
\newcommand\set;pt{\global\setbox\;pt\hbox} |
| 1526 |
|
| 1527 |
% \end{macrocode} |
| 1528 |
% Plots last segment of curve from coordinates already read. |
| 1529 |
% \begin{macrocode} |
| 1530 |
\newcommand\;endcurve{\;ecbezd\;dx\;ddx\;xa\;xb\;xc |
| 1531 |
\;ecbezd\;dy\;ddy\;ya\;yb\;yc \;bezier} |
| 1532 |
\newcommand\;ecbezd[5]{\;slcd#1#3#5\divide#14 |
| 1533 |
#2-#1\advance#2#5\unitlength |
| 1534 |
\advance#2-#4\unitlength} |
| 1535 |
|
| 1536 |
% \end{macrocode} |
| 1537 |
% Reads coordinates of four points before going to difference calculation. |
| 1538 |
% \begin{macrocode} |
| 1539 |
\newcommand\;tagcurve[1]{\ifnum\;cc=\thr@@ \;endcurve \else \;cc\z@ |
| 1540 |
\@for\;ci:=#1\do{\advance\;cc\@ne \ifnum\;cc>6 % |
| 1541 |
\ifodd\;cc \;slcd\;dx\;xa\;xc \let\;xa\;xb \let\;xb\;xc \;d;f\;xc |
| 1542 |
\else \t;gcrv \fi \fi}\fi} |
| 1543 |
|
| 1544 |
% \end{macrocode} |
| 1545 |
% Calculates differences over whole segment from four points. |
| 1546 |
% \begin{macrocode} |
| 1547 |
\newcommand\t;gcrv{\;slcd\;dy\;ya\;yc |
| 1548 |
\let\;ya\;yb \let\;yb\;yc \;d;f\;yc |
| 1549 |
\;rxy\;dx\;dy \divide\;dx\;rtc \divide\;dy\;rtc |
| 1550 |
\;ddx-\;ya\;dx \advance\;ddx\;xa\;dy \;ddy\;ddx |
| 1551 |
\advance\;ddx\;yb\;dx \advance\;ddx-\;xb\;dy |
| 1552 |
\advance\;ddy\;yc\;dx \advance\;ddy-\;xc\;dy |
| 1553 |
\;slbezd \;td\;ddy \divide\;td\@m |
| 1554 |
\ifdim\;td=\z@ \ifcurvewarn |
| 1555 |
\PackageWarning{curves}{\the\;strline\MessageBreak |
| 1556 |
\;xa,\;ya\space to \;xb,\;yb\MessageBreak}\fi |
| 1557 |
\;slbez |
| 1558 |
\else \;td\unitlength \;rtc\;td \advance\;rtc\;rtc |
| 1559 |
\divide\;rtc\p@ \advance\;rtc\@ne \divide\;td\;rtc |
| 1560 |
\;t\;ddx \;scp\;t \;abs\;t |
| 1561 |
\advance\;t\;t \divide\;t\p@ \advance\;t\@ne \divide\;scp\;t |
| 1562 |
\multiply\;td\;scp \divide\;td\;ddy |
| 1563 |
\multiply\;td\;rtc \multiply\;td\;t |
| 1564 |
\;ddx\;xc\;td \advance\;ddx-\;xa\;td \advance\;dx-\;ddx |
| 1565 |
\;ddy\;yc\;td \advance\;ddy-\;ya\;td \advance\;dy-\;ddy |
| 1566 |
\;bezier \fi} |
| 1567 |
|
| 1568 |
% \end{macrocode} |
| 1569 |
% Avoid repeating |{\;ci}| |
| 1570 |
% \begin{macrocode} |
| 1571 |
\newcommand\;d;f[1]{\edef#1{\;ci}} |
| 1572 |
|
| 1573 |
\newcommand\;slbezd{\;slcd\;dx\;xa\;xb \;slcd\;dy\;ya\;yb} |
| 1574 |
|
| 1575 |
% \end{macrocode} |
| 1576 |
% Calculates \(|#1| = (|#3|-|#2|)|\unitlength|\). |
| 1577 |
% \begin{macrocode} |
| 1578 |
\newcommand\;slcd[3]{#1#3\unitlength \advance#1-#2\unitlength} |
| 1579 |
|
| 1580 |
% \end{macrocode} |
| 1581 |
% Calculates differences for |bezier| straight line. |
| 1582 |
% \begin{macrocode} |
| 1583 |
\newcommand\;slbez{\divide\;dx\tw@ \;ddx\;dx \divide\;dy\tw@ |
| 1584 |
\;ddy\;dy \;bezier} |
| 1585 |
|
| 1586 |
% \end{macrocode} |
| 1587 |
% \newcommand\bs{\symbol{'134}} |
| 1588 |
% \subsubsection{\texttt{\bs ;bezier}} |
| 1589 |
% |\;bezier| is called by all curve and polygon drawing commands. |
| 1590 |
% If straight line between points |\;bezier| recalculates differences. |
| 1591 |
% Scales segment differences, then calculates segment pattern and disk count, |
| 1592 |
% and initial disk differences; selects line or dashes. Dash patterns |
| 1593 |
% were originally measured out in multiples of the disk pitch and are currently |
| 1594 |
% in points but can be adjusted with |\patternresolution|. This should |
| 1595 |
% be reprogrammed in scaled points. |
| 1596 |
% |
| 1597 |
% \paragraph{ \texttt{\bs ;bezier} Inputs:} |
| 1598 |
% \begin{center} |
| 1599 |
% \setlength\unitlength{1pt} |
| 1600 |
% \begin{picture}(200,100)\sf |
| 1601 |
% \thicklines |
| 1602 |
% \put(0,0){\vector(0,1){100}} |
| 1603 |
% \put(0,0){\vector(1,0){200}} |
| 1604 |
% \put(3,98){$y$} |
| 1605 |
% \put(198,3){$x$} |
| 1606 |
% \bezier{0}(20,60)(100,100)(180,30) |
| 1607 |
% \thinlines |
| 1608 |
% \curve(20,60, 100,100) |
| 1609 |
% \curve(100,100, 180,30) |
| 1610 |
% \put(20,60){\circle*{4}} |
| 1611 |
% \put(100,100){\circle*{4}} |
| 1612 |
% \put(180,30){\circle*{4}} |
| 1613 |
% \put(12,51){$(x_a,y_a)$} |
| 1614 |
% \put(103,100){$(x_b,y_b)$} |
| 1615 |
% \put(183,28){$(x_c,y_c)$} |
| 1616 |
% \end{picture}\\ |
| 1617 |
% Coordinate points for drawing parabolic arc.\\ |
| 1618 |
% \end{center} |
| 1619 |
% |
| 1620 |
% \noindent counts |
| 1621 |
% |
| 1622 |
% |\;psc| = maximum dot spacing on line |
| 1623 |
% |
| 1624 |
% |\;sc| = symbol count on parabolic arc |
| 1625 |
% |
| 1626 |
% \noindent dimens |
| 1627 |
% |
| 1628 |
% |\;dx| $=x_b-x_a$ |
| 1629 |
% |
| 1630 |
% |\;ddx| $=x_c-x_b$ |
| 1631 |
% |
| 1632 |
% |\;dy| $=y_b-y_a$ |
| 1633 |
% |
| 1634 |
% |\;ddy| $=y_c-y_b$ |
| 1635 |
% |
| 1636 |
% |\;pl| = dash pattern length |
| 1637 |
% |
| 1638 |
% |\curvelength| = curvelength up to start of parabolic arc |
| 1639 |
% |
| 1640 |
% \noindent boolean |
| 1641 |
% |
| 1642 |
% |\if;scnt| = true if a symbol count defined |
| 1643 |
% |
| 1644 |
% |\if;csym| = true if a curvesymbol defined |
| 1645 |
% |
| 1646 |
% |\ifstraight| = true if straight line replacing parabolic arc |
| 1647 |
% |
| 1648 |
% \paragraph{ \texttt{\bs ;bezier} Outputs:} \mbox{ } |
| 1649 |
% |
| 1650 |
% \noindent counts |
| 1651 |
% |
| 1652 |
% |\;mcnd| = number of pattern increments in straight segment (default 1) |
| 1653 |
% |
| 1654 |
% |\;np| = number of complete patterns or symbols in parabolic arc |
| 1655 |
% |
| 1656 |
% |\;t| = number of pattern increments in parabolic arc |
| 1657 |
% |
| 1658 |
% |\;rc| = length of parabolic arc in scaled points |
| 1659 |
% |
| 1660 |
% \noindent dimens |
| 1661 |
% |
| 1662 |
% |\;dx| = increment of |\;x| before line, blank, point or symbol plotted |
| 1663 |
% |
| 1664 |
% |\;ddx| = increment of |\;dx| after line, blank, point or symbol plotted |
| 1665 |
% |
| 1666 |
% |\;dy| = increment of |\;y| before line, blank, point or symbol plotted |
| 1667 |
% |
| 1668 |
% |\;ddy| = increment of |\;dy| after line, blank, point or symbol plotted |
| 1669 |
% |
| 1670 |
% \begin{macrocode} |
| 1671 |
\newcommand\;bezier{\ifstraight \av;d\;dx\;ddx \av;d\;dy\;ddy \fi |
| 1672 |
\;scale\;dx\;dy \;scp\;rc \;scale\;ddx\;ddy |
| 1673 |
\advance\;scp\;rc \;bezc\;dx\;ddx \;bezc\;dy\;ddy \;rxy\;ddx\;ddy |
| 1674 |
\divide\;rc\p@ \advance\;rc\thr@@ |
| 1675 |
\;tc\;rc \ifnum\;rc>\sixt@@n\;rc\sixt@@n\fi |
| 1676 |
\;rroot\;rroot\;rroot\;rroot |
| 1677 |
\;t\;rc \;rxy\;dx\;dy \advance\;rc\;scp \divide\;rc\thr@@ |
| 1678 |
\global\advance\curvelength\;rc sp\;mcnd\@ne |
| 1679 |
% \end{macrocode} |
| 1680 |
% Here |
| 1681 |
% |
| 1682 |
% |\;rc| = parabolic arc length in scaled points accurately |
| 1683 |
% approximated using Simpson's Rule \textit{i.e.} |
| 1684 |
% \[ |\;rc| = \frac13(\mid\mathbf r_b - \mathbf r_a \mid +\, |
| 1685 |
% 2\mid\mathbf r_c - \mathbf r_a\mid + \mid\mathbf r_c -\mathbf |
| 1686 |
% r_b\mid ) \] \indent which is exact for consecutive points a, b and |
| 1687 |
% c on a straight line; |
| 1688 |
% |
| 1689 |
% \noindent and |
| 1690 |
% |
| 1691 |
% |\;t| = number of straight line segments (polygon sides) in |
| 1692 |
% parabolic arc |
| 1693 |
% \[ |\;t| = \sqrt{3 + \frac{\mid \mathbf r_a -2 \mathbf r_b + \mathbf |
| 1694 |
% r_c\mid}{32768}}\] \indent which is rounded up for dash pattern |
| 1695 |
% and gives a maximum deviation of polygon from arc about 0.25\,pt. |
| 1696 |
% |
| 1697 |
% \begin{macrocode} |
| 1698 |
\ifdim\;pl>\z@ \;np\;rc \divide\;np\;psc |
| 1699 |
\ifnum\;t<\;np \;mcnd\;np \divide\;mcnd\;t |
| 1700 |
\divide\;np\;mcnd \multiply\;np\;mcnd \;t\;np |
| 1701 |
\fi |
| 1702 |
\fi |
| 1703 |
\if;scnt |
| 1704 |
\ifdim\;pl=\z@ \;t\;sc |
| 1705 |
\else \;np |
| 1706 |
\if;csym \;rc \divide\;np\;sc \advance\;np-\csdiameter |
| 1707 |
\;td\;pl \divide\;td\tw@ \advance\;np\;td \divide\;np\;pl |
| 1708 |
\ifnum\;np<\@ne\;np\@ne\fi \multiply\;np\;sc |
| 1709 |
\else \;sc |
| 1710 |
\fi |
| 1711 |
\advance\;t\;np \divide\;t\;np \multiply\;t\;np |
| 1712 |
\fi |
| 1713 |
\fi |
| 1714 |
% \end{macrocode} |
| 1715 |
% Here |\;mcnd| is the number of pattern increments in a straight |
| 1716 |
% segment and |\;t| in the parabolic arc. |
| 1717 |
% |\;np| is the number of complete patterns when known. |
| 1718 |
% |
| 1719 |
% The calculation following ensures that the end point of the parabolic |
| 1720 |
% arc is as accurate as possible. |
| 1721 |
% |
| 1722 |
% \begin{macrocode} |
| 1723 |
\;rtc\;t \divide\;rtc\;mcnd \;tcb\;rtc \multiply\;tcb\;t |
| 1724 |
\advance\;rtc\m@ne \multiply\;rtc\;t \;tc\;t \advance\;tc\;tc |
| 1725 |
\;bezd\;dx\;ddx \;bezd\;dy\;ddy |
| 1726 |
% \end{macrocode} |
| 1727 |
% Here |
| 1728 |
% \[ |\;ddx| = \frac{2(x_a-2x_b+x_c)}{ ({\tt\bs;t)^2 / \bs;mcnd }} \] |
| 1729 |
% \[ |\;dx| = \frac{2(x_c-x_a)-{\tt\bs;t(\bs;t/\bs;mcnd}-1){\tt\bs;ddx}}{ |
| 1730 |
% {2\tt\bs;t }} \] |
| 1731 |
% \[ |\;ddy| = \frac{2(y_a-2y_b+y_c)}{ ({\tt\bs;t)^2 / \bs;mcnd }} \] |
| 1732 |
% \[ |\;dy| = \frac{2(y_c-y_a)-{\tt\bs;t(\bs;t/\bs;mcnd}-1){\tt\bs;ddy}}{ |
| 1733 |
% {2\tt\bs;t }} \] |
| 1734 |
% \begin{macrocode} |
| 1735 |
\ifdim\;pl>\z@ \;dashes \else \let\n;xt\;spoints \;spoints \fi} |
| 1736 |
% \end{macrocode} |
| 1737 |
% |\av;d| replaces each of |#1| and |#2| by \((|#1|+|#2|)/2\). |
| 1738 |
% \begin{macrocode} |
| 1739 |
\newcommand\av;d[2]{\advance#1#2\divide#1\tw@#2#1} |
| 1740 |
% \end{macrocode} |
| 1741 |
% |\;scale| replaces each of dimen parameters |#1| and |#2| by scaled |
| 1742 |
% values and writes their scaled vector length to |\;rc|. |
| 1743 |
% \begin{macrocode} |
| 1744 |
\newcommand\;scale[2]{\;td\xscale#1\advance\;td\xscaley#2% |
| 1745 |
#2\yscale#2\advance#2\yscalex#1#1\;td \;rxy#1#2} |
| 1746 |
% \end{macrocode} |
| 1747 |
% |\;bezc| replaces dimen parameters |#1| and |#2| by \(2(|#1|+|#2|)\) and |
| 1748 |
% \(2(|#2|-|#1|)\) respectively. |
| 1749 |
% \begin{macrocode} |
| 1750 |
\newcommand\;bezc[2]{\advance#1#1\advance#2#2% |
| 1751 |
\;td#2\advance#2-#1\advance#1\;td} |
| 1752 |
% \end{macrocode} |
| 1753 |
% |\;bezd| replaces dimen parameter |#1| by |
| 1754 |
% \((|#1|-|\;rtc||#2|/|\;tcb|)/|\;tc|\) and |#2| by \(|#2|/|\;tcb|\). |
| 1755 |
% \begin{macrocode} |
| 1756 |
\newcommand\;bezd[2]{\divide#2\;tcb \;td#2\multiply\;td\;rtc |
| 1757 |
\advance#1-\;td \divide#1\;tc} |
| 1758 |
|
| 1759 |
% \end{macrocode} |
| 1760 |
% Plots a continuous line or equispaced squares or symbols along a segment. |
| 1761 |
% \begin{macrocode} |
| 1762 |
\newcommand\;spoints{\advance\;y\;dy \advance\;x\;dx \kern\;dx |
| 1763 |
\;point\;stopline \advance\;t\m@ne |
| 1764 |
\ifnum\;t>\z@ \advance\;dx\;ddx \advance\;dy\;ddy |
| 1765 |
\else \let\n;xt\relax \fi \n;xt} |
| 1766 |
|
| 1767 |
% \end{macrocode} |
| 1768 |
% Calculates length of vector |\;rc| from coordinates |#1|, |#2| |
| 1769 |
% \begin{macrocode} |
| 1770 |
\newcommand\;rxy[2]{\;rxya#1#2% |
| 1771 |
\ifnum\;rc>\z@ \;rtc\;rc \advance\;rtc\;rtc \divide\;rtc\p@ |
| 1772 |
\ifnum\;rtc>\z@ \advance\;rtc\@ne \divide\;tc\;rtc |
| 1773 |
\divide\;tcb\;rtc \divide\;rc\;rtc |
| 1774 |
\else \;rtc\@ne |
| 1775 |
\fi |
| 1776 |
\multiply\;tc\;tc \multiply\;tcb\;tcb |
| 1777 |
\advance\;tc\;tcb \;rroot\;rroot \multiply\;rc\;rtc |
| 1778 |
\fi} |
| 1779 |
|
| 1780 |
% \end{macrocode} |
| 1781 |
% Estimate length of vector |\;rc| from coordinates |#1|, |#2|. |
| 1782 |
% For \DeleteShortVerb{\|} \(1>|x|\ge|y|>0\), \(|x|+|y|/3\) is |
| 1783 |
% \MakeShortVerb{\|} within 6\% of \(\sqrt{x^2+y^2}\). |
| 1784 |
% \begin{macrocode} |
| 1785 |
\newcommand\;rxya[2]{\;tc#1\;abs\;tc \;tcb#2\;abs\;tcb |
| 1786 |
\ifnum\;tc>\;tcb \;rc\;tcb \;tcb\;tc \;tc\;rc \fi |
| 1787 |
\;rc\;tc \divide\;rc\thr@@ \advance\;rc\;tcb |
| 1788 |
} |
| 1789 |
|
| 1790 |
% \end{macrocode} |
| 1791 |
% Replaces argument by magnitude |
| 1792 |
% \begin{macrocode} |
| 1793 |
\newcommand\;abs[1]{\ifnum#1<\z@ #1-#1\fi} |
| 1794 |
|
| 1795 |
% \end{macrocode} |
| 1796 |
% One iteration of square root calculation by Newton's method. |
| 1797 |
% \begin{macrocode} |
| 1798 |
\newcommand\;rroot{\;tcb\;tc \divide\;tcb\;rc |
| 1799 |
\advance\;rc\;tcb \divide\;rc\tw@} |
| 1800 |
|
| 1801 |
% \end{macrocode} |
| 1802 |
% |
| 1803 |
% \subsection{Dash Pattern Drawing} |
| 1804 |
% |
| 1805 |
% Variable uses in |\;dashes|, |\;scdashes|, |\;nscdashes|, |\;pdashes| |
| 1806 |
% and |\;dash|. |
| 1807 |
% |
| 1808 |
% counts |
| 1809 |
% |
| 1810 |
% |\;scp| = distance between points. |
| 1811 |
% |
| 1812 |
% |\;rc| = length of parabolic arc. |
| 1813 |
% |
| 1814 |
% |\;rtc| = total points in parabolic arc. |
| 1815 |
% |
| 1816 |
% |\;np| = number of whole patterns in parabolic arc or scratch. |
| 1817 |
% |
| 1818 |
% |\;overhang| = of dash pattern past symbol or end of segment. |
| 1819 |
% |
| 1820 |
% |\;pbs| = total points between symbols |
| 1821 |
% |
| 1822 |
% |\;pns| = points to next symbol or dot. |
| 1823 |
% |
| 1824 |
% |\;tc| = number of points to blank for curve symbol. |
| 1825 |
% |
| 1826 |
% |\;tcb| = number of points along pattern. |
| 1827 |
% |
| 1828 |
% dimens |
| 1829 |
% |
| 1830 |
% |\;pl| = length of dash pattern. |
| 1831 |
% |
| 1832 |
% |\;ucd| = dash pattern unit length. |
| 1833 |
% |
| 1834 |
% Initializes dash plot for segment and selects symbol count alternative. |
| 1835 |
% \begin{macrocode} |
| 1836 |
\newcommand\;dashes{\let\;ticd\;icurvedashes |
| 1837 |
\let\;tucd\;ucd \divide\;rc\;t |
| 1838 |
\;rtc\;t \;tc\;rc \advance\;tc\csdiameter \divide\;tc\;rc |
| 1839 |
\divide\;tc\tw@ \;t\;tc \multiply\;tc\tw@ \;ptfalse \;cnd\;mcnd |
| 1840 |
\;pbs\;rc \divide\;pbs\tw@ |
| 1841 |
\advance\;overhang\;pbs \divide\;overhang-\;rc |
| 1842 |
\if;scnt \;scdashes \else \;nscdashes \fi \multiply\;overhang\;rc} |
| 1843 |
|
| 1844 |
% \end{macrocode} |
| 1845 |
% Plots dash pattern when a nonzero symbol count is specified. |
| 1846 |
% \begin{macrocode} |
| 1847 |
\newcommand\;scdashes{\;pbs\;rtc \divide\;pbs\;sc \;ccss \;scp |
| 1848 |
\if;csym \;pl \multiply\;scp\;np \divide\;scp\;sc \advance\;pbs-\;tc |
| 1849 |
\else \;pbs \multiply\;scp\;rc \fi \;np\;overhang \;overhang\z@ |
| 1850 |
\divide\;scp\;pbs \;tcb\z@ \;pns\;t \;dash \;overhang\;np |
| 1851 |
\if;csym\else \advance\;overhang-\;tcb \advance\;rtc-\;tcb |
| 1852 |
\advance\;pbs-\;tc \fi |
| 1853 |
\;pns\;pbs \advance\;pns-\;np \if;csym\else\advance\;pns\;tcb\fi |
| 1854 |
\@whilenum\;rtc>\z@\do{\;pdashes \;ptfalse \;t\;tc \;pns\;t \;dash |
| 1855 |
\;pns\;pbs \;overhang\if;csym\;np\else-\;overhang\fi |
| 1856 |
\advance\;pns-\;overhang}\;overhang-\if;csym\;np\else\;overhang |
| 1857 |
\;ptfalse \;t\;tc \;tcb\;overhang |
| 1858 |
\divide\;t\tw@ \;rtc\;t \;pns\;t \;dash \fi} |
| 1859 |
|
| 1860 |
% \end{macrocode} |
| 1861 |
% Plots symbols at natural pattern length but shrinks pattern to fit between. |
| 1862 |
% \begin{macrocode} |
| 1863 |
\newcommand\;nscdashes{\advance\;pbs\;pl \divide\;pbs\;rc |
| 1864 |
\if;csym \;bpdashes \fi \;ccss \;pns\;t |
| 1865 |
\;dash \advance\;pbs-\;tc \;scp\;pl \divide\;scp\;pbs \;pns\;pbs |
| 1866 |
\@whilenum\;rtc>\z@\do{\;pdashes \;ptfalse \;t\;tc \;pns\;t \;dash |
| 1867 |
\;pns\;pbs}% |
| 1868 |
\if;csym \else \divide\;tc\tw@ \advance\;overhang\;tc \fi} |
| 1869 |
|
| 1870 |
% \end{macrocode} |
| 1871 |
% If large symbol spaces, blank curve. |
| 1872 |
% \begin{macrocode} |
| 1873 |
\newcommand\;ccss{\ifnum\;pbs>\;tc\else \;bpdashes \fi} |
| 1874 |
|
| 1875 |
% \end{macrocode} |
| 1876 |
% A blank or symbol plotting dash pattern |
| 1877 |
% \begin{macrocode} |
| 1878 |
\newcommand\;bpdashes{\let\;tucd\;pl \let\;ticd\;ricd \;tc\z@ \;t\z@} |
| 1879 |
\newcommand\;ricd{1,0} |
| 1880 |
|
| 1881 |
% \end{macrocode} |
| 1882 |
% Reads dash pattern plotting dashes and spaces up to next symbol space. |
| 1883 |
% \begin{macrocode} |
| 1884 |
\newcommand\;pdashes{\ifnum\;pns>\z@ \;td\z@ \;tcb\z@ \;ptfalse |
| 1885 |
\@for\;ci:=\;ticd \do{\advance\;td\;ci\;tucd \;t\;scp \divide\;t\tw@ |
| 1886 |
\advance\;t\;td \divide\;t\;scp \advance\;t-\;tcb \;dash |
| 1887 |
\if;pt\;ptfalse\else\;pttrue\fi}% |
| 1888 |
\let\n;xt\;pdashes \else \let\n;xt\relax \fi \n;xt} |
| 1889 |
|
| 1890 |
% \end{macrocode} |
| 1891 |
% Checks if dash or space occurs before or after curve, calculates fractions. |
| 1892 |
% \begin{macrocode} |
| 1893 |
\newcommand\;dash{\ifnum\;t=\z@ |
| 1894 |
\if;csym \ifnum\;rtc>\z@ \if;pt\;point\;startline\fi \fi \fi |
| 1895 |
\else \advance\;tcb\;t \advance\;pns-\;t |
| 1896 |
\ifnum\;overhang<\z@ \advance\;overhang\;t |
| 1897 |
\;t \ifnum\;overhang<\z@ \z@ \else \;overhang \;overhang\;tcb \fi |
| 1898 |
\else \;overhang\;tcb \fi |
| 1899 |
\ifnum\;pns<\z@ \advance\;overhang\;pns \advance\;tcb\;pns |
| 1900 |
\advance\;t\;pns \;pns\z@ \fi \advance\;rtc-\;t |
| 1901 |
\ifnum\;rtc<\z@ \advance\;overhang\;rtc \advance\;t\;rtc\fi |
| 1902 |
\ifnum\;t>\z@ \if;pt\;point\;startline\fi |
| 1903 |
\let\n;xt\;points \;points \fi\fi} |
| 1904 |
|
| 1905 |
% \end{macrocode} |
| 1906 |
% Plots a single dash or space depending on |\if;pt|. |
| 1907 |
% \begin{macrocode} |
| 1908 |
\newcommand\;points{\ifnum\;t<\;cnd \;tca\;t \else \;tca\;cnd \fi |
| 1909 |
\advance\;y\;tca\;dy \;ytd\;tca\;dx \advance\;x\;ytd \kern\;ytd |
| 1910 |
\if;pt\;point\;stopline\fi |
| 1911 |
\ifnum\;t<\;cnd \let\n;xt\relax \advance\;cnd-\;t |
| 1912 |
\else |
| 1913 |
\advance\;t-\;cnd \advance\;dx\;ddx \advance\;dy\;ddy \;cnd\;mcnd |
| 1914 |
\fi \n;xt} |
| 1915 |
|
| 1916 |
% \end{macrocode} |
| 1917 |
% Make `;' a punctuation mark again. |
| 1918 |
% \begin{macrocode} |
| 1919 |
\catcode`\;=12 |
| 1920 |
|
| 1921 |
% \end{macrocode} |
| 1922 |
% |
| 1923 |
% \begin{macrocode} |
| 1924 |
%</package> |
| 1925 |
% \end{macrocode} |
| 1926 |
% |
| 1927 |
% \section{\texttt{curvesls.sty}} |
| 1928 |
% |
| 1929 |
% This package file is a \LaTeXe\ compatible replacement for |
| 1930 |
% \texttt{curvesls.sty} |
| 1931 |
% from versions 1.42 and earlier. It may one day be removed. |
| 1932 |
% |
| 1933 |
% \begin{macrocode} |
| 1934 |
%<*ls> |
| 1935 |
% \end{macrocode} |
| 1936 |
% |
| 1937 |
% \begin{macrocode} |
| 1938 |
\ProvidesPackage{curvesls} |
| 1939 |
[2000/08/22 Obsolete! Using option emtex in package curves.] |
| 1940 |
\RequirePackage[emtex]{curves} |
| 1941 |
% \end{macrocode} |
| 1942 |
% |
| 1943 |
% \begin{macrocode} |
| 1944 |
%</ls> |
| 1945 |
% \end{macrocode} |
| 1946 |
% |
| 1947 |
% \Finale |
| 1948 |
% |
| 1949 |
% \typeout{} |
| 1950 |
% \typeout{Please uncomment the line containing |
| 1951 |
% just \string\OnlyDescription\space } |
| 1952 |
% \typeout{near the start of curves.dtx to prevent the curves.sty} |
| 1953 |
% \typeout{and curvesls.sty listings printing out.} |
| 1954 |
% \typeout{} |
| 1955 |
% |
| 1956 |
% \end{document} |
| 1957 |
\endinput |
| 1958 |
|
| 1959 |
MODIFICATION HISTORY |
| 1960 |
-------------------- |
| 1961 |
curves.sty 1.0 26 June 1991 |
| 1962 |
curves.sty 1.1 8 Jan 1992 large \diskpitchstretch and maximum integer=2^30 - 1. |
| 1963 |
curvesls.sty 1.0 21 Mar 1993 draw lines using emTeX dvidriver \special's. |
| 1964 |
1.1 23 April, 1993 corrected for large \curves and 2nd differences. |
| 1965 |
1.14 29 April, 1993 Alignment of spaces improved in \@nscdashes, \overhang |
| 1966 |
normalized. |
| 1967 |
1.15 1 May, 1993 Rounding errors in \nscdashes and \pdashes improved. |
| 1968 |
1.16 8 May, 1993 Reduced .dvi size and dots corrected. |
| 1969 |
1.2 23 May, 1993 Variable curve symbol introduced. |
| 1970 |
1.21 8 June, 1993 \unitlength corrected in \bigcircle. |
| 1971 |
1.22 15 June, 1993 \csb@x saves curve symbol, dash pattern selection rounded. |
| 1972 |
1.23 18 June, 1993 extra \@killglue and curve smoothing, test for |
| 1973 |
bad point order tightened. 1st network release. |
| 1974 |
2517 words of TeX main memory. |
| 1975 |
1.30 9 July 1993 2nd network release. |
| 1976 |
Bugs Fixed: |
| 1977 |
Blank curve if \csdiameter too large; |
| 1978 |
Transfer of \@y and \@overhang from inner loop of \@drwarc; |
| 1979 |
Missing \pt@false in \@ncsdashes and \@pdashes; |
| 1980 |
Check for zero \@np in \@bezier. |
| 1981 |
Improvements (?): |
| 1982 |
New internal macros to save tokens; |
| 1983 |
Uses LaTeX error messages and warnings; |
| 1984 |
Checks \curvedashes signs; |
| 1985 |
Potential conflicts with other macros reduced with new \@y, \@tc; |
| 1986 |
Warns more readily and replaces possible inflexions with straight line; |
| 1987 |
Some internal variable names rationalized. |
| 1988 |
2489 words of TeX main memory. |
| 1989 |
1.32 14 June 1994 3rd network release tested with LaTeX 2e of February 1994. |
| 1990 |
1.33 28 June 1994 4th network release tested with LaTeX 2e of 1 June 1994. |
| 1991 |
Redefines \bezier from June LaTeX 2e. |
| 1992 |
\@bezier renamed to \@Vbezier to avoid conflict with June LaTeX 2e. |
| 1993 |
1.40 20 August 1995 5th network release tested with LaTeX 2e of 1 June 1995. |
| 1994 |
Bug Fixed: Dashed curves use straight segments to reduce rounding error. |
| 1995 |
Improvements: |
| 1996 |
\curvewarnfalse stops warning of straight line use between points; |
| 1997 |
; catcoded to character to protect internal names; |
| 1998 |
New internal macros save tokens and increase speed; |
| 1999 |
1772 nett extra words of TeX main memory (LaTeX 2e 1995/6/1 pl1). |
| 2000 |
1.41 28 November 1996 \;points for wrong \;dy in dash. |
| 2001 |
1.42 12 August 2000 6th Internet release |
| 2002 |
last tested and working with LaTeX 2.09. |
| 2003 |
1.50 22 August 2000 6th Internet release tested with |
| 2004 |
LaTeX2e <1998/12/01> patch level 1. |
| 2005 |
Copyright licence now LPPL. |
| 2006 |
Improvements: |
| 2007 |
Curvesls.sty merged into curves.sty with options |
| 2008 |
for dvips, emtex, xdvi and WML \specials; |
| 2009 |
More documentation on scaling; |
| 2010 |
LaTeX 2e style warnings and errors; |
| 2011 |
Comments stripped from curves.sty; |
| 2012 |
Tested with color package; |
| 2013 |
All curves consist of short straight lines; |
| 2014 |
Fewer disks per curve by constant pitch on straight lines; |
| 2015 |
Greater accuracy and speed and less memory in use. |
| 2016 |
2047 nett extra words of TeX main memory to load with no option |
| 2017 |
down to 1913 with WML option. |
| 2018 |
1.51 24 April 2008 7th Internet release |
| 2019 |
Email address now <[email protected]> |
| 2020 |
1.52 29 August 2008 8th Internet release |
| 2021 |
Copyright licence now LPPL version 1.3. |
| 2022 |
Correction: |
| 2023 |
new upstream website |
| 2024 |
http://patch.bpa.nu/pub/archive/latex/macros/curves/. |
| 2025 |
Improvements: |
| 2026 |
straight lines for parabolic arcs switch; |
| 2027 |
more macro documentation; |
| 2028 |
reworded instructions and README. |
| 2029 |
1.53 29 September 2008 |
| 2030 |
Improvements: |
| 2031 |
hyperref in curves.pdf. |