summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/generic/mfpic/mfpic-doc.tex')
-rw-r--r--Master/texmf-dist/doc/generic/mfpic/mfpic-doc.tex777
1 files changed, 568 insertions, 209 deletions
diff --git a/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.tex b/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.tex
index f4aeb3a2ff4..603a98e59d0 100644
--- a/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.tex
+++ b/Master/texmf-dist/doc/generic/mfpic/mfpic-doc.tex
@@ -1,5 +1,5 @@
% File: mfpic-doc.tex
-% A part of mfpic 1.06 2011/03/08
+% A part of mfpic 1.10 2012/12/03
%
% Documentation of mfpic macros
\documentclass[letterpaper]{article}
@@ -12,11 +12,12 @@
\usepackage{mathptmx}
\usepackage[scaled]{luximono}
\renewcommand\sfdefault{cmss}
-\newcommand\sgn{\mathop{\mathrm{sgn}}\nolimits}
% Fake chapters (really sections):
\usepackage[chapters]{mfpdoc}
\pagestyle{mfpdoc}
+\newcommand\sgn{\mathop{\mathrm{sgn}}\nolimits}
+
\usepackage{makeidx}
\makeindex
@@ -32,7 +33,8 @@
\stepcounter{secnumdepth}
\title{\Mfp{}: Pictures in \TeX{}\\ with Metafont and
-MetaPost\thanks{Copyright 2002--2011, Daniel H. Luecking}}
+MetaPost\thanks{Copywrite 2002--2012, Daniel H. Luecking}}
+
\author{%
Daniel H. Luecking%
@@ -56,6 +58,7 @@ Daniel H. Luecking%
\chapter{Introduction}\label{introduction}
\thispagestyle{plain}
+
\section{Why?}\label{why}
Tom got the idea for \mfp{}%
@@ -99,6 +102,7 @@ access them. Consequently, switches (options) have been added to access
some of them. When these are used, output files may no longer be
compatible with \MF{}.
+
\section{Who?}\label{author}
The original \mfp{} (and still the core of the current version) was written
@@ -118,6 +122,7 @@ The addition of \MP{} support was carried out by Dan Luecking around
since then, with help from Geoffrey and a few others mentioned in the
Acknowledgements.
+
\section{What?}\label{manifest}
See the \file{README} file for a list of files in the distribution and a
@@ -130,12 +135,13 @@ to \mfp{}'s capabilities: \file{mfpic.dtx}, \file{mfpic.ins} and
\LaTeX{}.\\
\file{grafbase.mf}, required only if \MF{} will be processing
figures.\\
- \file{grafbase.mp} and \file{dvipsnam.mp}, needed only if \MP{} will
- be the processor.
+ \file{grafbase.mp}, \file{dvipsnam.mp} and \file{mfpicdef.tex}, needed
+ only if \MP{} will be the processor.
\end{display}
-The file \file{install.txt} gives some guidance on the proper location for the
+The README file also gives some guidence on the proper location for the
installation of these files.
+
\section{How?}\label{process}
Some guidance on writing files that contain \mfp{} figures can be found
@@ -159,8 +165,8 @@ this.%
\footnote{The document \textit{Some experiences on running Metafont
and MetaPost}, by Peter Wilson, can be useful for beginners. Fetch
\file{CTAN/info/metafp.pdf}. `\file{CTAN}' means the Comprehensive
- \TeX{} Archive Network. You can access \file{CTAN} by pointing your
- web browser at \url{http://mirror.ctan.org/}\,.}) %
+ \TeX{} Archive Network. You can find the mirror nearest you by
+ pointing your browser at \url{http://www.ctan.org/}\,.}) %
Typically, you just type
\begin{verbatim}
mpost pics.mp
@@ -284,7 +290,7 @@ handled by \MP{}).
\smallskip
\emph{Note}: In this manual, when describing \mfp{} operations, we will
-often refer to ``\MF{}'' when we really mean ``\MF{} or \MP{}''. This
+often refer to `\MF{}' when we really mean ``\MF{} or \MP{}''. This
will especially be the case whenever we need to refer to commands in the
two languages which are substantially the same, but occasionally we will
even talk about ``running \MF{}'' when we mean running one or the other
@@ -292,7 +298,7 @@ program \texttt{mf} or \texttt{mpost} to process the figures. If we need
to discriminate between the two processors, (for example when they have
different behavior) we will make the difference explicit.
-A similar shorthand is used when referring to ``\TeX{}''. It should not be
+A similar shorthand is used when referring to `\TeX{}'. It should not be
taken to mean ``plain \TeX{}'', but rather whatever version of \TeX{} is used
to process the source file: plain \TeX{}, \LaTeX{}, \pdfTeX{}, or
\pdfLaTeX{}. Also \AmSTeX{}, \prog{eplain} and some other variants. When
@@ -319,10 +325,10 @@ options are processed. You can create such a file containing an
have as default. Actual options to \cs{usepackage} will override these
defaults, of course. And so will any of the commands below.
-Finally, if a file named \file{mfpic.usr} can be found, it will be input at the
-end of the loading of \mfp{}. The user can create such a file containing
-any of the commands of this section that he would like to have as
-default, plus any other \TeX{} code.
+Finally, if a file named \file{mfpic.usr} can be found, it will be input
+at the end of the loading of \mfp{}. The user can create such a file
+containing any of the commands of this section that he would like to
+have as default, plus any other \TeX{} code.
\section{\opt{metapost}, \opt{metafont}, \cs{usemetapost}, \cs{usemetafont}.}%
@@ -381,6 +387,7 @@ preamble of \LaTeX{} code take care to make sure \MP{} calls \LaTeX{}
purpose, or an environmental variable named \texttt{TEX} may be set
equal to \texttt{latex} in the command shell of your operating system.).
+
\section{\opt{overlaylabels}, \cs{overlaylabels}, \cs{nooverlaylabels}.}
\label{overlaylabels}
\index{overlaylabels@\opt{overlaylabels}}%
@@ -413,6 +420,7 @@ subsequent figures, inside a figure they affect all subsequent text in
that figure. The commands and option are ignored under the metafont
option.
+
\section{\opt{truebbox}, \cs{usetruebbox}, \cs{notruebbox}.}%
\label{truebbox}%
\index{truebbox@\opt{truebbox}}%
@@ -474,6 +482,7 @@ environment they should come before the \cs{tcaption} command and affect
only it, otherwise they affect all subsequent figures. They should not
be used in the argument of a \cs{tcaption} command.
+
\section{\opt{raggedcaptions}, \cs{useraggedcaptions},
\cs{noraggedcaptions}.}\label{raggedcaptions}
\index{raggedcaptions@\opt{raggedcaptions}}%
@@ -481,17 +490,18 @@ be used in the argument of a \cs{tcaption} command.
\index{noraggedcaptions@\cs{noraggedcaptions}}
The \opt{raggedcaptions} option causes multiline captions created by
-\cs{tcaption} to have raggedright lines. If \opt{centeredcaptions}
-is on, both sides will be ragged. The command \cs{noraggedcaptions}
-restores the default: all lines except the last justified. The last is
-either centered or flush left according to whether
-\opt{centeredcaptions} is on or off.
+\cs{tcaption} to have all lines ragged\-right. If \opt{centeredcaptions}
+is on, both sides will be ragged. This option can be turned off with the
+command \cs{noraggedcaptions}. This is the default: to have all lines
+except the last justified. The last line is either centered or flush
+left according to whether \opt{centeredcaptions} is on or off.
The commands can be issued anywhere. If inside an \env{mfpic}
environment they should come before the \cs{tcaption} command and affect
only it, otherwise they affect all subsequent figures. They should not
be used in the argument of a \cs{tcaption} command.
+
\section{\opt{debug}, \cs{mfpicdebugtrue},
\cs{mfpicdebugfalse}.}\label{debug}
\index{debug@\opt{debug}}%
@@ -506,6 +516,7 @@ a definition to the command \cs{mfpicdebug} prior to loading. Any
definition will work because \prog{mfpic} only checks whether it is
defined.
+
\section{\opt{clearsymbols}, \cs{clearsymbols}, \cs{noclearsymbols}.}
\index{clearsymbols@\opt{clearsymbols}}%
\index{clearsymbols@\cs{clearsymbols}}%
@@ -568,6 +579,7 @@ debugged, some time might be saved (with either \opt{metafont} or
\opt{metapost}) by not writing the output file again, then \opt{nowrite}
can be used.
+
\section{\opt{mfpreadlog}, \cs{mfpreadlog}.}\label{readlog}
\index{mfpreadlog@\opt{mfpreadlog}}%
\index{mfpreadlog@\cs{mfpreadlog}}
@@ -644,8 +656,8 @@ only), \kw{path}, \kw{picture} and \kw{boolean}.%
is sometimes called the vacuous type, but doesn't allow (or need)
variables of this type.}
In \MP{} version 1.000, a tenth data type was added, \kw{cmykcolor}, and
-the \kw{color} data type can be referred to as `\kw{rgbcolor}' when a
-distinction is necessary.
+the \kw{color} data type can be referred to as `\kw{rgbcolor}' if one
+wants to emphasize the distinction.
A \emph{variable} is a symbolic name, which can be a single letter such
as \mfc{A}, or a descriptive name like \mfc{origin}. Any sequence of
@@ -889,17 +901,17 @@ environment, after which the number is increased by one for each new
\env{mfpic} environment. This number is used internally to include the
picture. It is also transmitted to the output file where it is used as
the argument to a \gbc{beginmfpic} command. In \MF{} this number becomes
-the position of the character in the font file, while in \MP{} it is the
-extension on the graphic file that is output. The above command tells
-\mfp{} to ignore this sequence and number the next \env{mfpic}
+the position of the character in the font file, while in \MP{} it is
+part of the name of the graphic file that is output. The above command
+tells \mfp{} to ignore this sequence and number the next \env{mfpic}
figure with \meta{num} (and the one after that $\meta{num}+1$, etc.). It
is up to the user to make sure no number is repeated, as no checking is
done. Numbers greater than 255 may cause errors, as \TeX{} assumes that
-characters are represented by 8-bit numbers. If the first figure is to
-be numbered something other than $1$, then, under the \opt{metapost}
-option, this command should come before \cs{opengraphsfile}, as that
-command checks for the existence of the first numbered figure to
-determine if there are figures to be included.
+characters are represented by numbers no larger than that. If the first
+figure is to be numbered something other than $1$, then, under the
+\opt{metapost} option, this command should come before
+\cs{opengraphsfile}, as that command checks for the existence of the
+first numbered figure to determine if there are figures to be included.
\begin{cd}\pagelabel{everymfpic}
\cs{everymfpic}\marg{\meta{commands}}\\
@@ -909,11 +921,11 @@ determine if there are figures to be included.
\end{cd}
These commands store the \meta{commands}. The first arranges for these
-commands to be issued first thing in every \env{mfpic} environment and
-the second arranges for its commands to be issued as the last thing in
-every such environment. These could be any commands that make sense
-inside that environment. Their purpose is mainly to save typing if there
-is identical setup being performed in every picture.
+commands to be issued at the start of every \env{mfpic} environment and
+the second arranges for its commands to be issued at the end of every
+such environment. These could be any commands that make sense inside
+that environment. The purpose of these commands is to save typing if
+there is identical setup being performed in every picture.
\begin{cd}\pagelabel{envusage}
\cs{begin}\marg{mfpic}\texttt{...}\cs{end}\marg{mfpic}%
@@ -927,19 +939,21 @@ with \mfp{} illustrates this use of an \env{mfpic} environment in
\LaTeX{}.
\medskip
-A word about \TeX{} groups inside \env{mfpic} environments. These can be
-useful to limit the scope of declarations or of changes to some
-variables. However, they do not limit the scope of changes to the figure
-file that is being written, so there is a danger that \TeX{} and \MF{}
-will have different values. There are also some \mfp{} command that need
-to be at the outermost level. Thus, grouping should generaly be avoided
-except for those groups provided by \mfp{} commands.
+One should be careful using \TeX{} groups inside \env{mfpic}
+environments. These can be useful to limit the scope of declarations or
+of changes to some variables. However, they do not limit the scope of
+changes to the figure file that is being written, so there is a danger
+that \TeX{} and \MF{} will have different values. There are also some
+\mfp{} commands that need to be at the outermost level. Thus, grouping
+should generally be avoided except for those groups provided by \mfp{}
+commands.
\medskip
For the remainder of the macros, the numerical parameters are expressed
in graph units, the units of the local coordinate system specified by
\cs{mfpic}, unless otherwise indicated.
+
\section{Common objects.}\label{figures}
The \mfp{} macros that draw things can be roughly divided into two
@@ -1028,7 +1042,7 @@ are:
\gbc{SolidSquare}\index{SolidSquare@\gbc{SolidSquare}},
\gbc{SolidTriangle}\index{SolidTriangle@\gbc{SolidTriangle}},
\gbc{SolidStar}\index{SolidStar@\gbc{SolidStar}},
- \gbc{Cross}\index{Cross@\gbc{Cross}} and
+ \gbc{Cross}\index{Cross@\gbc{Cross}}, and
\gbc{Plus}\index{Plus@\gbc{Plus}}.
\end{display}
The names should be self-explanatory, the `\gbc{Solid}' ones are filled
@@ -1093,7 +1107,7 @@ example, after the command \cs{pointdef}\marg{A}\texttt{(1,3)}, \cs{A}
expands to \texttt{(1,3)}, while \cs{Ax} and \cs{Ay} expand to
\texttt{1} and \texttt{3}, respectively. If \opt{mplabels} is in effect
one can use \cs{A} to specify where to place a text label, but if \TeX{}
-is placing labels one must use \texttt{ (\cs{Ax},\cs{Ay})}. In most
+is placing labels one must use \texttt{(\cs{Ax},\cs{Ay})}. In most
other cases, one can use \cs{A} where a pair or point is required.
\begin{cd}\pagelabel{polyline}
@@ -1131,15 +1145,15 @@ diagonally opposite corners. The same rectangle can be specified in four
different ways: either pair of opposite corners in either order.
It is occasionally helpful to know that connected paths like those
-produced by \cs{polyline} or \cs{rect} have a \emph{start} and an
-\emph{end} as well as \emph{sense} (or direction). The path produced by
-\cs{polyline} starts at the first listed point and ends at last, having
-the direction determined by the order of the points. For \cs{rect} the
-sense may be clockwise or anticlockwise depending on the corners used:
-it starts by moving horizontally from the first listed point.
-Several \mfp{} macros (such as those that add arrowheads) treat the
-beginning and the end of a path differently, or adjust their behavior
-according to the sense of the curve.
+produced by \cs{polyline} or \cs{rect} have a \emph{start} and a
+\emph{finish} as well as \emph{sense} (or direction). The path produced
+by \cs{polyline} starts at the first listed point and ends at last,
+having the direction determined by the order of the points. For
+\cs{rect} the sense may be clockwise or anticlockwise depending on the
+corners used: it starts by moving horizontally from the first listed
+point. Several \mfp{} macros (such as those that add arrowheads) treat
+the beginning and the end of a path differently, or adjust their
+behavior according to the sense of the curve.
\begin{cd}\pagelabel{regpolygon}
\cs{regpolygon}\marg{\meta{num}}\marg{\meta{name}}%
@@ -1400,14 +1414,15 @@ value. The last two commands are abbreviations for
\cs{setaxismarks}\marg{x}\marg{\meta{pos}} and
\cs{setaxismarks}\marg{y}\marg{\meta{pos}}, respectively.
-Not all combinations make sense (for example, \texttt{ontop} for the
-right side axis). In these cases, no error message is produced:
-\gbc{ontop} and \gbc{onleft} give the same results, as do \gbc{onbottom}
-and \gbc{onright}. The parameters \gbc{inside} and \gbc{outside} make no
-sense for the $x$- and $y$-axes, but if they are used then \gbc{inside}
-means \gbc{ontop} for the $x$-axis and \gbc{onright} for the $y$-axis.
-These words are actually \MF{} numeric variables and the variables
-\gbc{ontop} and \gbc{onleft}, for example, have the same value.
+Not all combinations make sense (for example, \gbc{ontop} for the right
+side axis). In these cases, no error message is produced. These words
+are actually \MF{} numeric variables and the variables \gbc{ontop} and
+\gbc{onleft}, for example, have the same value. Thus, using \gbc{ontop}
+for the right axis will have the same effect as \gbc{onleft}. Similarly,
+\gbc{onright} and \gbc{onbottom} are the same. The parameters
+\gbc{inside} and \gbc{outside} usually make no sense for the $x$- and
+$y$-axes, but if they are used then \gbc{inside} means \gbc{ontop} for
+the $x$-axis and \gbc{onright} for the $y$-axis.
\begin{cd}\pagelabel{grid}
\cs{grid}\oarg{\meta{size}}\marg{\meta{xsep},\meta{ysep}}\\
@@ -1535,7 +1550,7 @@ The following draws a rotational field, omitting the inside of the
circle of radius $1$, where the arrows would be excessively long, and
especially avoiding $(0,0)$ where the vector field is undefined.
\begin{verbatim}
-\vectorfield[2.5pt]{.25,.25}{.5*(-y,x)/(x**2 + y**2)}{x**2 + y**2 >= 1}
+\vectorfield[2.5pt]{.25,.25}{.5*(-y,x)/(x**2+y**2)}{x**2+y**2 >= 1}
\end{verbatim}
The following is the same field, represented by arrows whose locations
are regularly spaced in polar coordinates.
@@ -1665,7 +1680,7 @@ increased by $180$ degrees
\item[\oarg{a}] The alternative polar form differs from the polar form
above only in the order of the arguments. This seems (to me) a more
reasonable order, and matches the order \cs{sector} requires (see below).
-The p option is retained for backward compatibility.
+The \texttt{[p]} option is retained for backward compatibility.
\item[\oarg{c}] The \textit{center-point-angle form} draws the circular
arc with center \meta{$c$}, starting at the point \meta{$p_1$}, and
@@ -1682,16 +1697,16 @@ form.
\item[\oarg{r}] The \textit{point-radius form} draws an arc on the
circle that \cs{circle}\oarg{r} would produce. The arc starts at the
point \meta{$p_0$} and ends at \meta{$p_1$}. Of the two possible arcs on
-that circle, it produces the shorter one that covers an angle $\theta$
-from $0$ to $180$ degrees measured anticlockwise around the center
-of the circle. A negative radius is a mathematical error, but the result
-is the short arc on the other circle with a clockwise sense.
-
-\item[\oarg{q}] The \textit{alternative point-radius form} is the same as
-\oarg{r} except it produces the longer arc, that covers an angle
-$\theta$ between $180$ and $360$ degrees measured anticlockwise around
-the center of the circle. A negative radius is a mathematical error, but
-the result is the longer arc on the other circle with a clockwise sense.
+that circle, it produces the shorter one: the one with an angle $\theta$
+less than $180$ degrees measured anticlockwise around the center of the
+circle. A negative radius is a mathematical error, but the result is the
+short arc on the other circle with a clockwise sense.
+
+\item[\oarg{q}] The \textit{alternative point-radius form} is the same
+as \oarg{r} except it produces the longer arc: the one with angle
+$\theta$ larger than $180$ degrees measured anticlockwise around the
+center of the circle. A negative radius is a mathematical error, but the
+result is the longer arc on the other circle with a clockwise sense.
\end{description}
For both options \oarg{r} and \oarg{q} the angle is computed and then
@@ -1727,9 +1742,33 @@ ellipse by \meta{$\theta$} degrees anticlockwise around its center.
Ellipses may also be created by differentially scaling a circle and
perhaps rotating the result. See subsection~\ref{transformation}.
-
-When dealing with arcs and circles, it is useful to work in polar
-coordinates:
+\begin{cd}\pagelabel{fullellipse}
+\cs{fullellipse}\marg{\meta{$C$},\meta{$M_1$},\meta{$M_2$}}\\%
+\cs{halfellipse}\marg{\meta{$M_1$},\meta{$M_2$},\meta{$M_3$}}\\%
+\cs{quarterellipse}\marg{\meta{$M_1$},\meta{$A$},\meta{$M_2$}}%
+\index{fullellipse@\cs{fullellipse}}%
+\index{halfellipse@\cs{halfellipse}}%
+\index{quarterellipse@\cs{quarterellipse}}%
+\end{cd}
+
+For any parallelogram there is a unique ellipse incribed in it which is
+tangent to the sides at their midpoints. The above allows one to obtain
+that ellipse and parts of it. The input to \cs{fullellipse} is the
+center \meta{$C$} of that parallelogram and the midpoints \meta{$M_1$}
+and \meta{$M_2$} of two adjacent sides. For $\cs{halfellipse}$, one
+supplies the midpoints \meta{$M_1$}, \meta{$M_2$}, and \meta{$M_3$} of
+three successive sides. Lastly, \cs{quarterellipse} requires the
+midpoints of two adjacents sides and the corner \meta{$A$} between them.
+Internally, a quarter-circle is transformed to produce the
+quarter-ellipse and the other two are built up out of two or four such
+quarter-ellipses.
+
+The reasoning behind my choice of parameters is based on the anticipated
+use of these commands. For example, I wanted \cs{quarterellipse} to be
+used to round a corner represented by the three points $M_1$,
+$A$ and $M_2$. In order for the quarter-ellipse to have
+the same direction at $M_1$ and $M_2$ as the polygon $M_1AM_2$, the
+associated parallelogram has to have midpoints at $M_1$ and $M_2$.
\begin{cd}\pagelabel{plr}
\cs{plr}\marg{(\meta{$r_0$},\meta{$\theta_0$}),%
@@ -1737,13 +1776,14 @@ coordinates:
\index{plr@\cs{plr}}%
\end{cd}
-The macro \cs{plr} causes \MF{} to replace the specified list of polar
-coordinate pairs by the equivalent list of rectangular (cartesian)
-coordinate pairs. Through \cs{plr}, commands designed for rectangular
-coordinates can be applied to data represented in polar coordinates. It
-must be cautioned that this wholesale conversion of a list applies only
-to commands that take a list consisting of an arbitrary number of
-points, such as \cs{polyline}.
+When dealing with arcs and circles, it is useful to work in polar
+coordinates. The macro \cs{plr} causes \MF{} to replace the specified
+list of polar coordinate pairs by the equivalent list of rectangular
+(cartesian) coordinate pairs. Through \cs{plr}, commands designed for
+rectangular coordinates can be applied to data represented in polar
+coordinates. It must be cautioned that this wholesale conversion of a
+list applies only to commands that take a list consisting of an
+arbitrary number of points, such as \cs{polyline}.
The effect of \cs{plr} is to apply a \MF{} command, \gbc{polar}, to each
point in the list, producing a new list. This \MF{} command can also be
@@ -1775,8 +1815,34 @@ points with positive $y$-coordinate In this case, the \meta{center} must
be in the upper half-plane and the \meta{radius} must still be less than
$1$. If you are not versed in hyperbolic geometry, be warned that the
actual diameter of the resulting circle is on the order of $2y/(1-R)$,
-where $R$ is the \meta{radius}. This can be quite large even for modest
-values of $R$ and $y$.
+where $R$ is the \meta{radius} and $y$ is the $y$-coordinate of
+\meta{center}. This can be quite large even for modest values of $R$ and
+$y$.
+
+Finally, an arc-producing macro. This is also related to the hyperbolic
+geometry of a disk or a half-plane. The hyperbolic geometry includes a
+notion of distance that allow one to determine `shortest' path between
+two points. This shortest path is called a `geodesic' and it turns out
+(in the case of the upper half-plane or a disk) to be an arc of a
+circle: the unique circle that passes through both points and meets the
+boundary (of the half-plane or disk) at right angles.
+
+\begin{cd}\pagelabel{hypergeodesic}
+\cs{hypergeodesic}\marg{$z_1$,$z_2$}\\
+\cs{hypergeodesic}*\marg{$z_1$,$z_2$}%
+\index{hypergeodesic@\cs{hypergeodesic}}%
+\end{cd}
+
+This produces the hyperbolic geodesic from $z_1=(x_1,y_1)$ to
+$z_2=(x_2,y_2)$. For guaranteed results both points should be in the
+unit disk (i.e., $|z_1| < 1$ and $|z_2| < 1$) or, for the star form,
+both in the upper half-plane (i.e., $y_1 > 0$ and $y_2 > 0$). However,
+if these are not satisfied an arc of the circle described above will be
+drawn whenever not prevented by a numeric overflow. The star form
+produces the geodesic for points in the upper half-plane. The normal
+form produces the geodesic for points in the unit disk (inside of the
+circle of radius $1$ and center $(0,0)$). One can use transforms of
+these to get geodesics suitable for other disks and other half-planes.
\subsection{Curves}\label{curves}
@@ -1816,6 +1882,7 @@ loaded, but that can be changed with the following command.
This sets the default tension for all commands that take an optional
tension parameter.
+\medskip
Sometimes one would like a convex set of points to produce a convex
curve. This will not always be the case with \cs{curve} or \cs{cyclic}.
You can verify this with the following example, where the list of points
@@ -1906,7 +1973,7 @@ it needs to be inside an \env{mfpic} environment. Starting with version
0.9 of \mfp{} this is no longer required, but the command name
\cs{mfpbarchart} must be used outside (in case some other package also
defines \cs{barchart}). One can use any of the four synonyms listed that
-start with `\cs{mfp}'. The command to draw the bars is still required to
+start with `\cs{mfp}'. The commands to draw the bars are still required to
be inside an \env{mfpic} environment.
\meta{h-or-v} should be \texttt{v} if you want the ends of the bars to
@@ -1933,7 +2000,7 @@ reverse them by making \meta{sep} negative, and making \meta{start} the
top edge of the first bar.
The fraction \meta{r} should be between $-1$ and $1$. A negative value
-reverses the direction from the `leading edge' of the bar to the
+reverses the direction from the ``leading edge'' of the bar to the
`trailing edge'. For example, if one bar chart is created with
\begin{ex}
\cs{barchart}\oarg{1,1,-.4}\marg{h}\marg{$\ldots$}
@@ -2018,6 +2085,27 @@ then the absolute coordinates \texttt{(\meta{x},\meta{y})} in the graph
where the point of the wedge should be placed.
+\subsection{Braces}
+
+This figure is intended to group some graphical objects and label them.
+
+\begin{cd}\pagelabel{gbrace}
+\cs{gbrace}\marg{\meta{$z_1$},\meta{C},\meta{$z_2$}}%
+\index{grbace@\cs{gbrace}}%
+\end{cd}
+
+This figure macro creates the shape of a brace (i.e., a `$\}$') with its
+ends at \meta{$z_1$} and \meta{$z_2$} and its `center' cusp at
+\meta{C}. The three points must be expressed as ordered pairs or as
+\MF{} pair expressions, and must be separated by commas. The `width' of
+the brace (the distance from \meta{C} to the line through the other
+two points) is computed automatically and should not be $0$. The cusp of
+the brace will not necessarily be in the center of the brace. Users
+position it with their choice of \meta{C}. The cusp should not be
+positioned too close to one of the endpoints as this can distort the
+brace.
+
+
\section{Colors in \mfp{}.}\label{colors}
\subsection{\CMP{} color functions}\label{mpcolors}
@@ -2053,9 +2141,9 @@ numeric: $0$ for black, $1$ for white).
All the names in the \LaTeX{} \prog{color} package's \file{dvipsnam.def}
have also been predefined by \mfp{} as color variable names. Since \MP{}
-allows color expressions, colors may be added (as long as they are the
-same type) and multiplied by numerics. Multiplication by a number
-between $0$ and $1$ darkens a \kw{rgbcolor}, but lightens a
+allows color expressions, colors may be added together (as long as they
+are the same type) and multiplied by numerics. Multiplication by a
+number between $0$ and $1$ darkens a \kw{rgbcolor}, but lightens a
\kw{cmykcolor}.
Moreover, several \MP{} color functions have been defined in
@@ -2162,8 +2250,8 @@ returns either that number (recent \MP) or that multiple of \mfc{white}
(early \MP). In \MF{}, all three pass the (presumably numeric) argument
\meta{clr} unchanged.
-All three functions return some kind of black if \meta{clr} is not some
-kind of color, or has an unknown value.
+All three functions return some version of black if \meta{clr} is not a
+color of some type, or has an unknown value.
\subsection{Establishing \mfp{} default colors}\label{defaultcolors}
@@ -2185,6 +2273,7 @@ kind of color, or has an unknown value.
\index{backgroundcolor@\cs{backgroundcolor}}%
\end{cd}
+
These macros set the default color for various drawing elements. Any
curve (with one exception, those drawn by \cs{plotdata}), whether solid,
dashed, dotted, or plotted in symbols, will be in the color set by
@@ -2264,10 +2353,10 @@ The mandatory \meta{model} and \meta{colorspec} are as above.
\medskip
A final caution, the colors of an \mfp{} figure are stored in the
\file{.mp} output file, and are not related to colors used or defined by
-the \LaTeX{} \prog{color} package. In particular a color defined only by
-\LaTeX{}'s \cs{definecolor} command will remain unknown to \mfp{}.
-Conversely, \LaTeX{} commands will not recognize any color defined only
-by \cs{mfpdefinecolor}.
+any \LaTeX{} package (such as \prog{color} or \prog{xcolor}). In
+particular a color defined only by \LaTeX{}'s \cs{definecolor} command
+will remain unknown to \mfp{}. Conversely, \LaTeX{} commands will not
+recognize any color defined only by \cs{mfpdefinecolor}.
\subsection{\CMF{} colors}\label{MFcolor}
@@ -2343,7 +2432,7 @@ useful for understanding the \mfp{} system.
appending macros (see next), they invoke a default rendering of the
path (usually a drawing as a solid stroke) as the side effect.
-\item[Apending macros] These\index{prefix macro} pass their input
+\item[Appending macros] These\index{prefix macro} pass their input
unchanged as their output. Their side effect is the appending of
some object such as an arrow head or tail. Currently only the
various prefix macros whose names begin with \texttt{arrow} are
@@ -2368,6 +2457,7 @@ useful for understanding the \mfp{} system.
\end{description}
+
\subsection{Closure of paths}\label{closure}
It should be pointed out that the closure macros will leave already
@@ -2437,16 +2527,20 @@ circle through those three points.
\label{reversal}
\begin{cd}\pagelabel{reverse}
-\cs{reverse}$\ldots$%
+\cs{reverse}$\ldots$\\
+\cs{reversepath}\ldots%
\index{reverse@\cs{reverse}}
+\index{reversepath@\cs{reversepath}}
\end{cd}
This modifies the following path by reversing its sense. This will
affect the direction of arrows: bi-directional arrows can be coded with
\cs{arrow}\cs{reverse}\cs{arrow}$\ldots$, where the leftmost \cs{arrow}
prefix applies to the \emph{reversed} path. The order of endpoints for
-the following \env{connect} environment will also be affected.
-
+a \env{connect} environment will also be affected. The command
+\cs{reversepath} is exactly the same. It has been added (in vresion 1.10) to
+more closely match the names of other modification macros (see
+subsection~\ref{transformation}).
\begin{cd}\pagelabel{connect}
\cs{connect} $\ldots$ \cs{endconnect}%
@@ -2545,7 +2639,7 @@ produced by \cs{arc}, as in the following example:
\ \cs{draw}\oarg{red}\cs{partpath}\marg{0,.333}\\
\ \cs{circle}\marg{(0,0),1}
\end{ex}
-This will draw 1/3 of the circle in red and the rest in blue.
+This will draw 1/3 of this circle in red and the rest of it in blue.
\CMF{} cannot check if a path is really a circular arc. The \MF{} code,
like that of \cs{makesector} (see subsection~\ref{closure}), selects
@@ -2556,6 +2650,39 @@ the end of any following path to its beginning (or a straight line if
the three chosen points happen to lie in a straight line). However, the
result needn't bear any significant relation to the original path.
+\begin{cd}\pagelabel{interpolatepath}
+\cs{interpolatepath}\marg{\meta{frac},\meta{path1}}\dots
+\index{interpolatepath@\cs{interpolatepath}}
+\end{cd}
+
+This modifying macro takes the following path (call it \meta{path0}) and
+computes a new path that is \meta{frac} of the way ``between'' it and
+the argument \meta{path1}. The argument \meta{path1} would usually be
+the name of a \MF{} path variable used to store a figure (see \cs{store}
+from subsection~\ref{transformation}). However it can actually be any
+legal \MF{} path expression. The argument \meta{frac} is a number. If
+\meta{frac} is $0$, nothing is done and the following path \meta{path0}
+is produced; if \meta{frac} is $1$, then the argument \meta{path1} is
+produced. For values of \meta{frac} between $0$ and $1$ the resulting
+path is somewhere between the two. Numbers larger than $1$ or less than
+$0$ produce an extrapolated path. An ordered pair can be supplied
+instead of the argumant \meta{path1}: it will be interpreted as a
+trivial path. If \meta{path0} (the following figure) is closed and if
+\meta{path1} is an ordered pair or a closed path, then the resulting
+path will also be closed. Otherwise it will not be.
+
+What this command actually interpolates are the key points of the paths
+and the directions of travel at those key points. Therefore, if the two
+paths are visually very similar but have very different node structure,
+then the interpolated path can be quite unexpectedly different from both
+of them. For example
+\begin{verbatim}
+ \store{ABC}\circle{(0,0),1}
+ \interpolatepath{.5,ABC}\reverse\circle{(0,0),1}
+\end{verbatim}
+produces a straight line from $(1,0)$ to $(-1,0)$ (and back again).
+
+
\subsection{Arrows}\label{arrows}
@@ -2574,7 +2701,7 @@ the value of the \TeX{} dimension \cs{headlen}, initially \dim{3pt}. The
optional parameter \meta{rotate} allows the arrowhead to be rotated
anticlockwise around its point an angle of \meta{rotate} degrees. The
default is 0. The optional parameter \meta{backset} allows the arrowhead
-to be `set back' from its original point, thus allowing (for example)
+to be ``set back'' from its original point, thus allowing (for example)
double arrowheads. This parameter is in the form of a \TeX{}
dimension---its default value is \dim{0pt}. If an arrowhead is both
rotated and set back, it is set back in the direction after the
@@ -2739,6 +2866,7 @@ used to override \mfp{}'s automatic rendering rules. See
section~\ref{transformation}, page~\pageref{norenderexample} for an
example where one might need to do this.
+
\subsection{Drawing}\label{drawing}
\begin{cd}\pagelabel{draw}
@@ -2765,11 +2893,11 @@ separation (distance between centers of the two penstrokes) is twice the
pen diameter. This normally leaves one line thickness of white space
between. You can change this with the \oarg{\meta{sep}} argument. In
order to make the space between the lines transparent, this command is
-implemented by calculating two curves that parallel the given curve and
-drawing those. For technical reasons, that calculation is rather lengthy
-so this is somewhat inefficient and users of slow machines might want to
-avoid it. See also comments at \cs{parallelpath} in
-subsection~\ref{reversal}.
+implemented by calculating two curves that are parallel to the given
+curve and drawing those. For technical reasons, that calculation is
+rather lengthy so this is somewhat inefficient and users of slow
+machines might want to avoid it. See also comments at \cs{parallelpath}
+in subsection~\ref{reversal}.
\begin{cd}\pagelabel{dashed}
\cs{dashed}\oarg{\meta{length},\meta{space}}$\ldots$%
@@ -2956,8 +3084,8 @@ path might be open and may need to be explicitly closed, for example by
\begin{display}
\cs{belowfcn}, \cs{border}, \cs{btwnfcn}, \cs{btwnplrfcn},
\cs{chartbar} (and its aliases),\\
- \cs{circle}, \cs{ellipse}, \cs{levelcurve}, \cs{makesector},
- \cs{piewedge}, \cs{plrregion},\\
+ \cs{circle}, \cs{ellipse}, \cs{fullellipse}, \cs{levelcurve},
+ \cs{makesector},\cs{piewedge},\\ \cs{plrregion},
\cs{polygon}, \cs{pshcircle}. \cs{rect}, \cs{regpolygon},
\cs{sector}, \cs{tlabelcircle},\\
\cs{tlabelellipse}, \cs{tlabeloval}, and \cs{tlabelrect}.
@@ -3075,6 +3203,10 @@ present. However, if one wishes only to override the default color one
can use an empty first optional argument (completely empty, no spaces or
comma).
+An angle of $0$ yields horizontal lines, nonzero angles indicate
+rotations from horizontal where, as usual, positive angles indicate
+anticlockwise rotation.
+
\begin{cd}\pagelabel{hatch}
\cs{lhatch}\oarg{\meta{hatchsp}}\oarg{\meta{color}}$\ldots$\\
\cs{rhatch}\oarg{\meta{hatchsp}}\oarg{\meta{color}}$\ldots$\\
@@ -3104,10 +3236,112 @@ pattern. It is exactly the same as \cs{rhatch} followed by \cs{lhatch}
using the same \meta{hatchsp} and \meta{color}.
Hatching should normally be used very sparingly, or never if
-alternatives are available (color, shading). However, hatching or
-polkadotting on top of another filling macro is almost the only way to
-fill in two regions that \emph{automatically} shows the overlap area.
-Hatching is at least less garish than polkadots.
+alternatives are available (color, shading). However, hatching on top of
+another filling macro is a common way to fill in \emph{two} regions in
+such a way that the overlap area is clearly evident. Hatching is at
+least less garish than polkadots.
+
+\begin{cd}\pagelabel{gradient}
+\cs{gradient}\marg{\meta{clrfcn},\meta{width},\meta{angle}}$\ldots$%
+\index{gradient@\cs{gradient}}%
+\end{cd}
+
+Neither \MP{} nor \MF{} can do true gradients, but this rendering macro
+obtains a good approximation by filling adjacent narrow strips in a
+range of colors. The argument \meta{width} is the width of those strips,
+and it should be specified in absolute units, \meta{angle} is the angle
+of these strips (horizontal being $0$ degrees). The first argument
+takes a little explanation.
+
+The \meta{clrfcn} should be the name of a function, say \mfc{gr},
+such that \mfc{gr(t)} returns a color\footnote{It can also return a
+number between $0$ and $1$, which will result in shades of gray.} for
+any value of $t$ from $0$ to $1$ (inclusive). Such a function can be
+defined with \cs{fdef} (see subsection~\ref{defining}). The first strip
+will have the color returned for \mfc{t}${}=0$ and the last will have
+the color returned for \mfc{t}${}=1$. One kind of gradient fill is
+obtained by a simple interpolation between two colors in the same model:
+\begin{verbatim}
+\fdef{gr}{t}{(1-t)*red + t*blue}
+\gradient{gr,3pt,45}\circle{(0,0),1}
+\end{verbatim}
+This example will start the gradient with red and end it with blue. For
+an angle of $0$ the starting color is at the bottom and the ending color
+at the top, for other angles simply rotate that description. The above
+circle will be red at the lower right and blue at the upper left.
+
+This type of gradient is called an \emph{axial} gradient. The following
+is another kind, based on a color function of \emph{two} variables over
+an area.
+
+\begin{cd}\pagelabel{areagradient}
+\cs{areagradient}\marg{\meta{clrfcn},\meta{h-dim},\meta{v-dim}}$\ldots$%
+\index{areagradient@\cs{areagradient}}%
+\end{cd}
+
+Instead of filling with strips of different colors, \cs{areagradient}
+fills with ``pixels'' of different colors. These are rectangles that
+have size \meta{h-dim} by \meta{v-dim}, which values must be specified
+in absolute units. These rectangles are filled with the color determined
+by \meta{clrfcn}. This must be a function of \emph{two} parameters that
+returns a color for values of these parameters from $0$ to $1$
+(inclusive). For example,
+\begin{verbatim}
+\fdef{agr}{t,u}%
+ {(1-t)(1-u)*white + (1-t)*u*red + t*(1-u)*green + t*u*blue}
+\gradient{agr,3pt,4pt}\rect{(0,0),(1,2)}
+\end{verbatim}
+The color returned for $(0,0)$ is at the lower left and the color
+returned for $(1,1)$ is at the upper right. In the above example, the
+rectangle will be white at the lower left, red at the upper left, green
+at the lower right and blue at the upper right.
+
+Our last gradient is something like the first, but in polar coordinates.
+The colors vary with the distance from a center point.
+
+\begin{cd}\pagelabel{radialgradient}
+\cs{radialgradient}\marg{\meta{clrfcn},\meta{width},\meta{center}}$\ldots$%
+\index{radialgradient@\cs{radialgradient}}%
+\end{cd}
+
+This gradient fills with concentric circular strips whose center is
+\meta{center} and whose thickness is \meta{width}. The \meta{clrfcn} is
+as in \cs{gradient}. The circle of radius \meta{width} and center
+\meta{center} is filled with the color returned for parameter value $0$.
+The largest concentric circular strip is filled with the color returned
+for parameter value $1$.
+
+These commands all initially compute a bounding figure for the curve. In
+the first case it is a rotated rectangle, in the second case an upright
+rectangle, and in the third case a circle centered at the given point.
+The interiors of the rectangles are considered to have coordinates
+$(t,u)$ that vary from $(0,0)$ at the lower left to $(1,1)$ at the upper
+right. The inside of the circle is considered to have the polar
+coordinate $r$ ranging from $0$ at the center to $1$ at the boundary.
+The relevant coordinate(s) are fed to the specified \meta{clrfcn} and
+the returned color is used to fill the relevant portion of the rectangle
+or circle. The whole picture is then clipped to the boundaries of the
+given closed curve and the result added to the picture.
+
+The process is somewhat wasteful of memory in \MP{}, as each strip or
+pixel's path is kept in memory and written to the output file. This can
+be quite large for \cs{areagradient} if the pixel dimensions are too
+small. For example, covering a one inch square with pixels 1 point on
+each side takes over 5000 paths and the resulting EPS is over 100,000
+bytes in size. I would recommend dimensions on the order of 2 to 3
+points. Larger dimensions are not as visually appealing, and smaller
+dimensions waste memory with little improvement in appearence.
+
+This command works in \MF{} using a \meta{clrfcn} that returns numeric
+values in the range $0$ to $1$. The result is much like
+\cs{gfill}\oarg{\meta{clr}} (see the beginning of this section) except
+the dots simulating a gray fill will vary in size corresponding to the
+\meta{clrfcn}. The result will be disappointing unless there is
+considerable contrast between the lightest and darkest grays of the
+gradient. Therefore, it is recommended that the color function cover the
+entire range from $0$ to $1$ (black to white). There are no particular
+memory problems with gradients in \MF{}, at least no more so than gray
+fills.
\subsection{Changing the default rendering}\label{default}
@@ -3128,15 +3362,15 @@ Initially, \mfp{} uses the \cs{draw} command (stroking) as the default
operation when a figure is to be rendered. However, this can be changed
to any combination of \mfp{} rendering commands or indeed any \TeX{}
commands, by using the \cs{setrender} command. This redefinition is
-local inside an \env{mfpic} environment, so it can be enclosed in braces
-to restrict its range. Outside an \env{mfpic} environment it is a global
-redefinition.
+local when it occurs inside an \env{mfpic} environment, so there it can
+be enclosed in braces to restrict its range. Outside an \env{mfpic}
+environment it is a global redefinition.
For example, suppose one uses \cs{setrender}\marg{\cs{dashed}\cs{shade}}
in a \env{mfpic} environment. If the command \cs{circle}\marg{(0,0),1}
-occurs later, it will produce a shaded circle with a dashed outline. If
-an explicit rendering prefix is given in a drawing command, it will
-override this default.
+occurs later in that environment, it will produce a shaded circle with a
+dashed outline. If an explicit rendering prefix is given in a drawing
+command, it will override this default.
\subsection{Examples}\label{examples}
@@ -3167,6 +3401,7 @@ stand for any legal \MF{} expression, in which the only unknown
variables are those indicated (\texttt{x} in the first case, and \texttt{t} in
the second).
+
\subsection{Defining functions}\label{defining}
\begin{cd}\pagelabel{fdef}
@@ -3181,7 +3416,7 @@ the only free parameters are those named. The return type of the
function is the same as the type of the expression. What is allowed for
the function name \meta{fcn} is more restrictive than \MF{}'s rule for
variable names. Roughly speaking, it should consist of letters and
-underscore characters only. (In particular, for those that know what
+underscore characters only. (In particular, for those who know what
this means, the name should have no suffixes.) Try to make the name
distinctive to avoid redefining internal \MF{} commands.
@@ -3283,9 +3518,10 @@ macros, defining a path to which prefixes may be applied.
\index{function@\cs{function}}
\end{cd}
-This figure macro produces the graph of $y = f(x)$, where $f$ is a \MF{} numeric
-function or expression of one numeric argument, which must be denoted by
-a literal \texttt{x}. The default \meta{spec} is \texttt{s}. For example
+This figure macro produces an approximation to the graph of $y = f(x)$,
+where $f$ is a \MF{} numeric function or expression of one numeric
+argument, which must be denoted by a literal \texttt{x}. The default
+\meta{spec} is \texttt{s}. For example
\begin{verbatim}
\function{0,pi,pi/10}{sin x}
\end{verbatim}
@@ -3306,9 +3542,10 @@ argument. This can be a pair of expressions $x(\mathtt{t})$ and
$y(\mathtt{t})$ enclosed in parentheses and separated by a comma, with
the literal variable \texttt{t}. Alternatively, the last argument can be
a \MF{} function or expression in \texttt{t} that returns a pair.%
- \footnote{There are very few of these. \CMF{} provides \mfc{dir t},
- which is essentially \mfc{(cosd t, sind t)}. \Mfp{} adds \gbc{cis t}
- which is \gbc{(cos t, sin t)}.}
+ \footnote{There are very few of these. \CMF{} provides
+ \codebox{dir t}, which is essentially
+ \codebox{(cosd t, sind t)}. \Mfp{} adds \codebox{cis t} which
+ is \codebox{(cos t, sin t)}.}
The default \meta{spec} is \texttt{s}. For example
\begin{verbatim}
\parafcn{0,1,.1}{(2t, t+t*t)}
@@ -3503,7 +3740,7 @@ but much further apart when measured along the curve.
The first of these plots the graph of the solution of the differential
equation
$$
- \frac{dy}{dx} = f(x,y)\,,\quad y(x_0) = y_0\,.
+ \frac{dy}{dx} = f(x,y)\,,\quad y(x_0) = y_0\,.
$$
The \meta{$\Delta s$} parameter is a step size and the \meta{$N$}
parameter is the number of steps. The step size is \emph{not} an
@@ -3542,7 +3779,7 @@ $\mathbf{F}(x,y,t)$ by its negative.
The purpose of making \meta{$\Delta s$} a distance rather than an
$x$-increment or a $t$-increment (as the Runge-Kutta method is taught in
-the usual numerical analysis course) is stability: even very simple
+the usual mathematics courses) is stability: even very simple
differential equations can have graphs the tend to $\infty$ in finite
time. These macros, however, never travel more than a distance $N\Delta
s$ from the starting point.
@@ -3780,6 +4017,12 @@ The command \cs{coloredlines} will produce a warning under the
that all curves are drawn in \gbc{drawcolor} by default: the
\cs{plotdata} command after \cs{coloredlines} has been issued.
+Note that \mfp{} always creates a path internally. It is possible that
+your data is not path-like and what you want is a scatter-plot. Simply
+use \cs{datapointsonly} and the effect is the same: \MP{} builds a
+polygonal path connecting all the points in your file, but when it plots
+the path, it only places a dot (or other symbol) at each data point.
+
If, for some reason, you do not like the default starting line style
(say you want to start with a color other than black), you can use one
of the following commands.
@@ -3815,11 +4058,11 @@ changed: \texttt{dashes}, \texttt{colors} or \texttt{symbols}. The
second argument is a list of dash patterns, colors, or symbols. The dash
patterns should be names of patterns defined through the use of
\cs{dashpattern}. The colors can be any color names already known to
-\MP{}, or defined through \cs{mfpdefinecolor}. The symbols can be any of
-those listed with the \cs{plotsymbol} command (see
-subsection~\ref{points}), or any known \MF{} path variable. The colors
-can also be \MP{} color constants or expressions, and the symbols can be
-expressions of type path. In recent \MP{} these `colors' can be
+\MP{}, or color names defined using \cs{mfpdefinecolor}.
+The symbols can be any of those listed with the \cs{plotsymbol} command
+(see subsection~\ref{points}), or any known \MF{} path variable. The
+colors can also be \MP{} color constants or expressions, and the symbols
+can be expressions of type path. In recent \MP{} these `colors' can be
\kw{numeric} (selecting gray), \kw{rgbcolor} or \kw{cmykcolor}. Within a
\env{mfpic} environment, the changes made are local to that environment.
Outside, they affect all subsequent environments.
@@ -3844,6 +4087,7 @@ same meaning here (for \cs{plotdata}) as they do for \cs{datafile}
(above). The sequence numbering for \cs{sequence} starts over with each
new curve.
+
\section{Labels and Captions.}\label{labels}
\subsection{Setting text}\label{text}
@@ -4732,6 +4976,7 @@ shifted path:
\arrow\norender\shiftpath{(0,1)}\arrow\draw\lines{(0,0),(8,8)}
\end{verbatim}
+
\section{Parameters.}\label{parameters}
There are many parameters in \mfp{} which the user can modify to
@@ -4961,8 +5206,8 @@ are \dim{0.5pt} and \dim{3pt}.
\index{griddotsize@\cs{griddotsize}}%
\end{cd}
-This dimension gives the default for the sizes of dots in the \cs{grid}
-and \cs{plrgridpoints} commands. The initial value is \dim{0.5pt}.
+This dimension gives the default sizes of dots in the \cs{grid} and
+\cs{plrgridpoints} commands. The initial value is \dim{0.5pt}
\begin{cd}\pagelabel{symbolspace}
\cs{symbolspace}%
@@ -5100,7 +5345,7 @@ required. For the first version, the extra equations give the path zero
curvature at the endpoints (a \emph{relaxed} spline). For the closed
version, the extra equations are those that close the curve smoothly.
The portions of the spline that connect one node to the next are
-parametrized cubic B/'eziers, they are computed so that the first and
+parametrized cubic B\'eziers, they are computed so that the first and
second derivatives (with respect to the parameter) of adjacent curves
match at the common node.
@@ -5138,6 +5383,7 @@ argument. The corresponding statements are true of \cs{qbclosed}: it is
meant to close a quadratic B-spline and \cs{qbclosed}\cs{qspline} should
produce the same result as \cs{closedqspline} with the same argument.
+
\subsection{B\'eziers}
The power user, having noticed that \cs{curve} and \cs{cyclic} insert
@@ -5213,6 +5459,7 @@ of the control points. Cubic B\'eziers are how curves are represented in
PostScript files, and how a number of vector drawing programs represent
curves.
+
\subsection{Raw \MF{} code}\label{mfcode}
\begin{cd}\pagelabel{mfsrc}
@@ -5256,6 +5503,7 @@ Check out the sample \file{forfun.tex} for a more extensive example. It
should produce the word `\textsf{mfpic}' in blue, outlined in green in a
box with yellow background.
+
\subsection{Creating \MF{} variables}\label{variables}
\begin{cd}\pagelabel{setmfvariable}
@@ -5425,16 +5673,16 @@ the given points in that order. And then
\end{verbatim}
will draw the lines connecting these four points. The index may
optionally be put in square brackets and may be separated from the name
-by any number of spaces. That is, \verb$\polyline{X[1],X[2]}$
-and \verb$\polyline{X 1,X 2}$ are the same as \verb$\polyline{X1,X2}$
-to \MF{}. If a numeric \emph{expression} is used instead of an explicit
+by any number of spaces. That is, \verb$\polyline{X[1],X[2]}$ and
+\verb$\polyline{X 1,X 2}$ are the same as \verb$\polyline{X1,X2}$ to
+\MF{}. If a numeric \emph{expression} is used instead of an explicit
number, square brackets \emph{must} surround it: \gbc{X[1+1]},
-\gbc{X[2]}, \gbc{X2} and \gbc{X 2} are all the same. For all these array
-commands, the variable \gbc{X} by itself (not followed by any digit or
-brackets) becomes a numeric variable equal to the number of elements in
-the array. Except for \cs{globalsetarray}, the arrays are defined
-locally if these commands occur in an \env{mfpic} environment, global
-otherwise.
+\gbc{X[2]}, \gbc{X2} and \codebox{X 2} are all the same. For all these
+array commands, the variable \gbc{X} by itself (not followed by any
+digit or brackets) becomes a numeric variable equal to the number of
+elements in the array. Except for \cs{globalsetarray}, the arrays are
+defined locally if these commands occur in an \env{mfpic} environment,
+global otherwise.
Array variables may be used only where the values are processed only by
\MF{} or \MP{}, they are unknown to \TeX{}. In particular, they cannot be
@@ -5497,6 +5745,7 @@ vertical (also change `right' to `top', etc.):
had one side on an axis.
\end{itemize}
+
\subsection{Miscelaneous pair expressions}\label{pairexpressions}
A useful \MF{} operator that produces points is the intermediation
@@ -5505,18 +5754,18 @@ operator, whose syntax is
\texttt{(\meta{num})[\meta{$p_1$},\meta{$p_2$}]}
\end{cd}
That is, a number or numeric expression in parentheses followed by
-literal brackets (this is \emph{not} an optional argument) containing two points
-or pair expressions separated by a comma. It returns an intermediate point on
-the line through \meta{$p_1$} and \meta{$p_2$}. The formula for the
-returned value is $p_1 + \mbox{\meta{num}}(p_2 - p_1)$. The midpoint is
-obtained with $\mbox{\meta{num}} = .5$. If the \meta{num} is a pure
-number, the parentheses can be omitted, but they are required if it is
-any other numeric expression. Values of \meta{num} larger than 1 or
-less than zero produce points on the line that lie outside the segment
-from $p_1$ to $p_2$. This operator can also be applied to numbers or (in
-\MP{}) to colors (of the same type). So that \mfc{(2/3)[3,6] = 5} and
-\mfc{.7[green,blue] = (0,.3,.7)}. See section~\ref{colors} for a
-description of colors in \MP{} and \MF{}.
+literal brackets (this is \emph{not} an optional argument) containing
+two points or pair expressions separated by a comma. It returns an
+intermediate point on the line through \meta{$p_1$} and \meta{$p_2$}.
+The formula for the returned value is $p_1 + \mbox{\meta{num}}(p_2 -
+p_1)$. The midpoint is obtained with $\mbox{\meta{num}} = .5$. If the
+\meta{num} is a pure number, the parentheses can be omitted, but they
+are required if it is any other numeric expression. Values of \meta{num}
+larger than 1 or less than zero produce points on the line that lie
+outside the segment from $p_1$ to $p_2$. This operator can also be
+applied to numbers or (in \MP{}) to colors (of the same type). So that
+\codebox{(2/3)[3,6] = 5} and \codebox{.7[green,blue] = (0,.3,.7)}. See
+section~\ref{colors} for a description of colors in \MP{} and \MF{}.
\begin{cd}
\gbc{pathpoint(\meta{frac},\meta{name})}
@@ -5553,19 +5802,30 @@ complex numbers. Also \gbc{t} denotes an angle in radians. There are
both numeric and pair valued functions, the type of each is noted after
the description:
+\def\Arg{\mathop{\mathrm{Arg}}}
+
\noindent
\begin{tabular}{@{}lp{4.2in}}
\gbc{Arg z} & The principle argument of $z$ in radians (numeric).\\
\gbc{Log z} & The principle logarithm of $z$ (pair).\\
\gbc{cis t} & $(\cos t, \sin t)$, same as \gbc{dir degrees(t)} (pair).\\
\gbc{zexp w} & The complex exponential, $e^w$ (pair).\\
-\gbc{sgn z} & The signum, $\sgn (0,0) = (0,0)$ otherwise $\sgn z = z/|z|$ (pair).\\
+\gbc{zsqrt w} & The (principal) complex square root: that $z$ with
+ $-\pi/2 \le \Arg z \le \pi/2$ and $z^2 = w$ (pair).\\
+\gbc{sgn z} & The signum, $\sgn (0,0) = (0,0)$ otherwise
+ $\sgn z = z/|z|$ (pair).\\
\gbc{conj z} & The complex conjugate, $\bar z$ (pair).\\
\gbc{Moebius(a) z} & The M\"obius transformation $(z+a)/(1+\bar{a}z)$ (pair)\\
\gbc{pshdist(z,w)} & The pseudohyperbolic distance between $z$ and
- $w$: $|z-w| / |1-\bar{w}z|$ (numeric).
+ $w$: $|z-w| / |1-\bar{w}z|$ (numeric).\\
+\gbc{kelvin(z)} & The Kelvin transform $1/\bar z$ (pair)
\end{tabular}
+\CMF{} will happily add and subtract pairs but to multiply and divide
+complex numbers requires new operations. These are given by \codebox{(z
+zmul w)} and \codebox{(z zdiv w)}. They operate on pairs and produce
+pairs.
+
\subsection{Manipulating \MF{} picture variables}
@@ -5701,6 +5961,7 @@ One can use the \LaTeX{} environment construct \cs{begin}\marg{mfpimage}
$\ldots$ \cs{end}\marg{mfpimage} in a LaTeX document instead of
\cs{mfpimage} $\ldots$ \cs{endmfpimage}.
+
\subsection{\CMF{} loops}\label{loops}
All the \mfp{} loop commands create a loop (in the \MF{} language) in
@@ -5775,11 +6036,11 @@ reverts to its previous state outside the loop. That is, if it existed
before the loop, it regains its previous value after the loop, and if it
was undefined before the loop, it is again undefined after.
-The single word ``\mfc{upto}'' can be used as an abbreviation for
-``\mfc{step 1 until}'' and ``\mfc{downto}'' for ``\mfc{step -1 until}''
+The single word `\mfc{upto}' can be used as an abbreviation for
+``\codebox{step 1 until}'' and `\mfc{downto}' for ``\codebox{step -1 until}''
in for-loop headers. Spaces are not significant in for-loop headers,
except to distinguish the keywords (e.g. \mfc{step}) from variable names
-that might be use (e.g., for \meta{start}).
+that might be used (e.g., for \meta{start}).
\begin{cd}\pagelabel{mfpwhile}
\cs{mfpwhile}\marg{\meta{condition}}\\
@@ -5873,6 +6134,7 @@ by code that causes \MF{} to execute it several times with different
values for the variable. From \TeX{}'s point of view, there is only one
\mfp{} drawing command.
+
\subsection{Miscellaneous}\label{misc}
\begin{cd}\pagelabel{mfmode}
@@ -5925,8 +6187,8 @@ locally, one can globally copy it to another variable with
\index{globalassignmpvalue@\cs{globalassignmpvalue}}%
\end{cd}
-The command names spelled with ``\texttt{mp}'' are no different than the
-ones spelled with ``\texttt{mf}''. You can use either spelling with
+The command names spelled with `\texttt{mp}' are no different than the
+ones spelled with `\texttt{mf}'. You can use either spelling with
either the \opt{metafont} or \opt{metapost} option.
These commands causes the \meta{MF-expr} to be written to the output
@@ -5961,9 +6223,9 @@ The `\texttt{global}' version makes the definition of the
it can be used in other pictures. The plain versions create commands
that are only locally defined. Past versions of this manual stated that
you can say
-\begin{ex}
+\begin{display}
\cs{global}\cs{assignmfvalue}
-\end{ex}
+\end{display}
to define the macro globally. This turns out not to be true in all
cases. If a global definition is needed, use the global versions above.
@@ -6008,7 +6270,7 @@ object and the path intersect in more than one point, as little as
possible (usually%
\footnote{\MF{}'s methods for finding the `first' point of
intersection do not always find the actual first one.}) %
-is cut off. This is reliable only when there is only one point of
+is cut off. This is reliable only when there is a unique point of
intersection.
These macros can be used to create a curve that starts or ends
@@ -6036,32 +6298,67 @@ For \cs{randomizepath} the \meta{weirdness} parameter controls how the
control vectors are modified. Roughly speaking the control vectors are
randomly rotated up to $30\langle\mathit{weirdness}\rangle$ degrees and
randomly scaled up or down by a factor of
-$2^{\langle\mathit{weirdness}\rangle}$. (A `control vector' is a vector
-pointing from a node to one of its control points.) However, this is
-done in a way that preserves smoothness at each node where the path is
-smooth. Values of \meta{weirdness} greater than 1 are probably too
-weird.
+$2^{\langle\mathit{weirdness}\rangle}$. (A ``control vector'' is a
+vector pointing from a node to one of its control points.) However, this
+is done in a way that preserves smoothness at each node where the path
+is smooth. Values of \meta{weirdness} greater than 1 are probably much
+too weird.
\begin{cd}\pagelabel{brownianmotion}
-\cs{brownianmotion}\marg{\meta{start},\meta{num},\meta{scale}}%
-\index{brownianmotion@\cs{brownianmotion}}
-\end{cd}
-
-This figure macro uses another kind of randomness. The path starts at
-the point \meta{start}, then proceeds in a straight line in a random
-direction a random distance. The random process used is a normaldeviate
-in each coordinate, scaled by \meta{scale}. This is repeated \meta{num}
-times. Thus, \meta{start} is a coordinate pair in graph coordinates,
-\meta{num} is a positive whole number and \meta{scale} is a positive
-real number. In rare cases, the random distance can be quite large, but
-on average it will be about $0.56\times{}$\meta{scale}. The size
-(bounding box) of the resultant path can also be, in rare cases,
-quite large, but it is usually on the order of $\sqrt{\meta{num}}$ times
-\meta{scale}.
-
-The path produced is technically not Brownian motion, but rather a
-`random walk'. However, for small \meta{scale} and large \meta{num} it
-approximates Brownian motion.
+\cs{brownianmotion}\marg{\meta{start},\meta{num},\meta{scale}}\\%
+\cs{browniangraph}\marg{\meta{num},\meta{scale}}\\%
+\cs{randomwalk}\marg{\meta{start},\meta{num},\meta{scale}}%
+\index{brownianmotion@\cs{brownianmotion}}%
+\index{browniangraph@\cs{browniangraph}}%
+\index{randomwalk@\cs{randomwalk}}
+\end{cd}
+
+These figure macros build a few standard kinds of random paths. The
+\cs{brownianmotion} path starts at the point \meta{start}, then proceeds
+in a straight line in a random direction a random distance. This is
+repeated \meta{num} times to form a polyline. The random process used is
+a Gaussian in each coordinate, scaled so that the random distance has a
+standard deviation equal to \meta{scale}. Thus, \meta{start} is a
+coordinate pair in graph coordinates, \meta{num} is a positive whole
+number and \meta{scale} is a positive real number (in graph units). In
+rare cases, the random distance can become quite large, but on average
+it will be about $0.56\times{}$\meta{scale}. The size of the resultant
+path (its bounding box) can also be, in rare cases, quite large, but it
+is usually on the order of $\sqrt{\meta{num}}$ times \meta{scale}.
+
+The second path, \cs{browniangraph}, represents the graph of a
+one-dimensional Brownian motion. It is random only in the vertical
+direction as the rightward motion represents the uniform passage of
+time. It starts at $(0,0)$ and the \meta{scale} is both the constant
+rightward step as well as the standard deviation for the $y$-coordinate.
+Users will need to apply a shift if they want to change the starting
+point, and a vertical scaling if they want a scale factor different from
+the step size.
+
+Despite their names, the paths produced are technically not Brownian
+motion, but rather `Gaussian random walks'. However, for small
+\meta{scale} and large \meta{num} they can be used to approximate
+Brownian motion.
+
+Finally, \cs{randomwalk} is just like \cs{brownianmotion} except that
+only the direction is random. The distance is always equal to
+\meta{scale}.%
+ \footnote{This is only one kind of an infinite variety of possible
+ random walks. See \url{http://en.wikipedia.org/wiki/Random_walk} for a
+ discussion. \Mfp{} implementation of other kinds is left to the
+ interested user (for example, using \cs{turtle} with random
+ displacements).}
+
+There can be a problem with the size of \meta{num} in these three
+macros. Numbers greater than a certain \MF/\MP{} parameter called
+\verb$max_points$ (see the discussing at \cs{levelcurve} in
+section~\ref{plotting}) will produce an error from \MF{} or \MP{}. But
+also sharp turns will take up space in something called the
+\emph{rounding table}. This has no bearing on \MP{}, and in \MF{} it
+only matters if the parameter \mfc{autorounding} is positive. \Mfp{}
+leaves \mfc{autorounding} at the default of $2$, since this value makes
+drawings in \MF{} look best. In this case, the value of \meta{num}
+should be less than about $500$.
\begin{cd}\pagelabel{mftitle}
\cs{mftitle}\marg{\meta{title}}%
@@ -6173,6 +6470,15 @@ enough to have this capability. Under the \opt{metafont} option, this
command is simply ignored, but \mfp{} has no way of checking the \MP{}
version on its own.
+If you are using \LaTeX{}, the \verb$\includegraphics$ command requires
+that the included figure file be recognized as \MP{} output. In practice,
+this usually means its extension \emph{must} be \texttt{.mps}. As an
+exception, it may also be the current figure number (the default if
+\verb$\setfilenametemplate$ is not used), because \mfp{} has always
+arranged for that to be recognized. The user may also issue a
+\verb$\DeclareGraphicsRule$ command to get other extensions recognized.
+See the documentation of the \prog{graphics} package.
+
\begin{cd}\pagelabel{preparemfpicgraphic}
\cs{preparemfpicgraphic}\marg{\meta{filename}}%
@@ -6244,7 +6550,7 @@ get written to the \file{.mf} (or \file{.mp}) output and cause a \MF{}
\end{verbatim}
The braces prevent \TeX{}'s argument parsing from seeing the first comma
-as a delimiter, but upon writing to the \file{.mf}, the \cs{identity}
+as a delimiter, but upon writing to the \file{.mf}, any \cs{identity}
commands are expanded and only the contents appear in the output. (\TeX{}
parses the argument to assign meanings to \cs{Ax} and \cs{Ay}.)
@@ -6264,6 +6570,7 @@ for the commands to do these things.
\thispagestyle{plain}
\chapter{Appendices}\label{appendices}
+
\section{Acknowledgements.}\label{acknowledgements}
Tom would like to thank all of the people at Dartmouth as well as out in
@@ -6305,12 +6612,14 @@ for the \cs{assignmfvalue} command, and Zaimi Sami~Alex for suggestions.
But mostly, he'd like to thank Tom Leathrum for starting it all.
+
\section{Changes History.}\label{changes}
See the file \file{changes.txt} for a somewhat sporadic history of
changes to \mfp{}. See the file \file{README} for changes added since
the previous version, and for any known problems.
+
%\clearpage
\section{Summary of Options.}\label{summary}
@@ -6377,6 +6686,7 @@ all later environments.
\cs{opengraphsfile}. \cr
}}
+
%\clearpage
\section{Plotting Styles for \cs{plotdata}.}\label{styles}
@@ -6451,6 +6761,7 @@ path variables. (The order changed between versions 0.6 and 0.7.)
\mfc{pointtype8}& \mfc{SolidTriangle}
\end{tabular}
+
\section{Special Considerations When Using \CMF{}.}\label{mfconsiderations}
The most important restriction in \MF{} is on the size of a picture.
@@ -6461,7 +6772,7 @@ fonts prepared for a LaserJet4 (600 DPI), this means 6.825 inches
(17.3355cm). For a 1200 DPI pronter, the limit is 3.4125 inches.
A similar limit holds for numbers input, and the values of variables:
-\MF{} will return an error for ``\mfc{sin 4096}''. Intermediate values
+\MF{} will return an error for `\mfc{sin 4096}'. Intermediate values
can be greater (\mfc{sin (2*2048)} will cause no error), but final,
stored results are subject to the limit. An \mfp{} example that
generated an error recently was:
@@ -6494,6 +6805,8 @@ working \MP{} installation):
\medskip\noindent
\begin{tabular}{@{}lp{4.2in}}
+\TeX{} format &support needed\\
+\hline
plain \TeX{} &The file \file{epsf.tex} or \file{epsf.sty}\\
\LaTeX{}209 &(No longer supported, but plain \TeX{} methods
might work)\\
@@ -6503,26 +6816,34 @@ plain \TeX{} &The file \file{epsf.tex} or \file{epsf.sty}\\
plain \pdfTeX{} &\raggedright The files \file{supp-pdf.mkii} or
\file{supp-pdf.tex} and (possibly)
\file{supp-mis.tex}\tabularnewline
-In all cases &\raggedright The files \file{grafbase.mp} and
- \file{dvipsnam.mp} plus, of course,
- \file{mfpic.tex} (and \file{mfpic.sty} for
- \LaTeX{})
+In all cases &\raggedright The files \file{grafbase.mp},
+ \file{dvipsnam.mp} and \file{mfpicdef.tex} plus,
+ of course, \file{mfpic.tex} (and \file{mfpic.sty}
+ for \LaTeX{})
\end{tabular}
\medskip
The files \file{grafbase.mp} and \file{dvipsnam.mp} should be in a
-directory searched by \MP{}. The remaining files should be in directories
-searched by the appropriate \TeX{} variant. If \MP{} cannot find the
+directory searched by \MP{}. If \MP{} cannot find the
file \file{grafbase.mp}, then by default it will try to input
-\file{grafbase.mf}, which is generally futile (or fatal).
+\file{grafbase.mf}, which is generally fatal (and always futile).
+
+The remaining files should be in directories searched by the appropriate
+\TeX{} variant. The file \file{mfpicdef.tex} is input by \TeX{} when
+\MP{} is processing labels in \file{.mp} files created by \mfp{}. The
+user is free to add commands of his own to that file, but be warned that
+updates to \mfp{} will overwrite it. Better to create ones own file (say
+\file{mydefs.tex}) and arrange its input via
+\verb$\mfpverbtex{\input mydefs.tex}$
In case \pdfLaTeX{} is used, the \prog{graphics} package is given the
\opt{pdftex} option. This option requires the file \file{pdftex.def}
which currently inputs one of the \file{supp-pdf} files. Early versions
of \file{supp-pdf.tex} will input \file{supp-mis.tex}. These three files
should be supplied with most \TeX{} installations.%
- \footnote{At this writing, these files, plus a few others,
- can found at \file{CTAN/macros/pdftex/graphics/}.} %
+ \footnote{They are part of the Con\TeX{}t distribuition. At this writing,
+ these files, plus a few others, can also be found at\\
+ \file{CTAN/graphics/metapost/contrib/tools/mptopdf/tex/context/base/}.} %
Older versions had some bugs in connection with the \prog{babel}
package. One workaround was to load the \prog{graphics} package and
\mfp{} before \prog{babel}.
@@ -6533,6 +6854,7 @@ load whichever one it decides is required. In the \LaTeXe{} case, \mfp{}
will load the \prog{graphics} package. If the user wishes
\prog{graphicx}, then that package must be loaded before \mfp{}.
+
\subsection{\CMP{} is not \MF{}}
\PS{} is not a pixel oriented language and so neither is \MP{}. The model
@@ -6574,6 +6896,7 @@ rectangle. On the other hand, filling is done right up to the boundary.
In this example, the dashed lines are drawn on top of part of the fill.
In the reverse order, the fill would cover part of the dashed outline.
+
\subsection{Graphic inclusion}\label{graphics}
It may be impossible to completely cater to all possible methods of
@@ -6617,9 +6940,10 @@ we add code to each figure, so that these graphics are correctly
recognized as \EPS{} or \prog{MPS}. For example, to the figure with
extension \file{.1}, we add the equivalent of one of the following
\begin{itemize}
-\item[] \cs{DeclareGraphicsRule}\marg{.1}\marg{eps}\marg{.1}\marg{} in \LaTeXe{}.
-\item[] \cs{DeclareGraphicsRule}\marg{.1}\marg{mps}\marg{.1}\marg{} in
-\pdfLaTeX{}.
+ \item[] \cs{DeclareGraphicsRule}\marg{.1}\marg{eps}\marg{.1}\marg{} in
+ \LaTeXe{}.
+ \item[] \cs{DeclareGraphicsRule}\marg{.1}\marg{mps}\marg{.1}\marg{} in
+ \pdfLaTeX{}.
\end{itemize}
After running the command \cs{setmfpicgraphic}, \mfp{} runs
@@ -6650,8 +6974,8 @@ independent of the size of a picture. To rescale all pictures, one need
only change \cs{mfpicunit} and rerun \TeX{} and \MP{}.
A better reason might be to allow the conversion of your \MP{} figures
-to some other format. Then redefining \cs{setmfpicgraphic}
-could enable including the appropriate file in the appropriate format.
+to some other format. Then redefining \cs{setmfpicgraphic} could enable
+including the appropriate file in the appropriate format.
The filename argument mentioned above is actually the result obtained by
running the macro \cs{setfilename}\index{setfilename@\cs{setfilename}}.
@@ -6689,13 +7013,18 @@ filename between the asterisks.
\subsection{The literature}
-This author has personal knowledge of only one mathematical article
+This author has personal knowledge of one mathematical article
which definitely uses \mfp{} to create diagrams, and that is this
author's joint paper with J.~Duncan and C.~M.~McGregor: \textit{On the
value of pi for norms in $\mathbf{R}^2$} in the College Mathematics
Journal, vol.~35, pages 84--92. Oddly enough, it was McGregor and not I
who chose to use \mfp{} for the illustrations.
+There also exists a book that makes use of \mfp{}: \textit{Introduction
+to functional equations: theory and problem solving strategies for
+mathematical competitions and beyond} by Costas Efthimiou,
+MSRI/Mathematical Circles Library, vol. 6, 2011.
+
There are at least two major publications where \mfp{} has garnered more
than a cursory mention. The most up-to-date is a section in \textit{The
\LaTeX{} Graphics Companion} by Michel Goossens, Sebastian Rahtz and
@@ -6727,8 +7056,8 @@ given for \cs{wedge}:
\end{ex}
The macro \cs{plr}\marg{(\meta{$r_0$},\meta{$\theta_0$}),%
-(\meta{$r_1$},\meta{$\theta_1$}),$\ldots$} is used to convert polar
-coordinate pairs to rectangular coordinates, so the commands
+(\meta{$r_1$},\meta{$\theta_1$}),$\ldots$} is now used to convert polar
+coordinate pairs to rectangular coordinates and the commands
\cs{plrcurve}, \cs{plrcyclic}, \cs{plrlines} and \cs{plrpoint} were
dropped from \mfp{}. Now use
\begin{ex}
@@ -6789,6 +7118,7 @@ There is a misprint: \cs{axisheadlin} should be \cs{axisheadlen}.
Finally, the \LaTeX{} template on page 496 is no longer the only
possiblity: recent \mfp{} may be loaded with \cs{usepackage}.
+
\subsection{Other programs}
There exists a program, \prog{fig2mfpic} that produces \mfp{} code as
@@ -6810,6 +7140,7 @@ file (don't ask me what it consists of) and apparently processes it with
\renewcommand\mfpindexheading{%
\section{Index of commands, options and parameters.}}
+
\let\oldcs\cs
\renewcommand{\cs}[1]{\leavevmode\mytt{\llap{\char`\\}#1}}
@@ -6828,6 +7159,7 @@ file (don't ask me what it consists of) and apparently processes it with
\let\item\@idxitem
\makeatother
+
\subsection{Figures}
\item \cs{arc}, \pageref{arc}
@@ -6836,6 +7168,7 @@ file (don't ask me what it consists of) and apparently processes it with
\item \cs{belowfcn}, \pageref{belowfcn}
\item \cs{border}, \pageref{axisline}
\item \cs{brownianmotion}, \pageref{brownianmotion}
+ \item \cs{browniangraph}, \pageref{brownianmotion}
\item \cs{btwnfcn}, \pageref{btwnfcn}
\item \cs{btwnplrfcn}, \pageref{btwnfcn}
\item \cs{cbeziers}, \cs{closedcbeziers}, \pageref{cbeziers}
@@ -6854,10 +7187,14 @@ file (don't ask me what it consists of) and apparently processes it with
\item \cs{ellipse}, \pageref{ellipse}
\item \cs{fcncurve}, \pageref{fcncurve}
\item \cs{fcnspline}, \pageref{fcnspline}
+ \item \cs{fullellipse}, \pageref{fullellipse}
\item \cs{function}, \pageref{function}
\item \cs{ganttbar}, \pageref{chartbar}
+ \item \cs{gbrace}, \pageref{gbrace}
\item \cs{graphbar}, \pageref{chartbar}
+ \item \cs{halfellipse}, \pageref{fullellipse}
\item \cs{histobar}, \pageref{chartbar}
+ \item \cs{hypergeodesic}, \pageref{hypergeodesic}
\item \cs{levelcurve}, \pageref{levelcurve}
\item \cs{lines}, \pageref{polyline}
\item \cs{mfbezier}, \cs{closedmfbezier}, \pageref{mfbezier}
@@ -6871,7 +7208,9 @@ file (don't ask me what it consists of) and apparently processes it with
\item \cs{polyline}, \pageref{polyline}
\item \cs{pshcircle}, \pageref{pshcircle}
\item \cs{qbeziers}, \cs{closedqbeziers}, \pageref{qbeziers}
+ \item \cs{quarterellipse}, \pageref{fullellipse}
\item \cs{qspline}, \cs{closedqspline}, \pageref{qspline}
+ \item \cs{randomwalk}, \pageref{brownianmotion}
\item \cs{rect}, \pageref{rect}
\item \cs{regpolygon}, \pageref{regpolygon}
\item \cs{sector}, \pageref{sector}
@@ -6881,8 +7220,10 @@ file (don't ask me what it consists of) and apparently processes it with
\item \cs{tlabelrect}, \pageref{tlabelrect}
\item \cs{turtle}, \pageref{turtle}
+
\subsection{Renderings}
+ \item \cs{areagradient}, \pageref{areagradient}
\item \cs{corkscrew}, \pageref{corkscrew}
\item \cs{dashed}, \pageref{dashed}
\item \cs{dotted}, \pageref{dotted}
@@ -6892,12 +7233,14 @@ file (don't ask me what it consists of) and apparently processes it with
\item \cs{gclip}, \pageref{gclip}
\item \cs{gendashed}, \pageref{gendashed}
\item \cs{gfill}, \pageref{gfill}
+ \item \cs{gradient}, \pageref{gradient}
\item \cs{hatch}, \pageref{hatch}
\item \cs{lhatch}, \pageref{hatch}
\item \cs{plot}, \pageref{plot}
\item \cs{plotdata}, \pageref{plotdata}
\item \cs{plotnodes}, \pageref{plotnodes}
\item \cs{polkadot}, \pageref{polkadot}
+ \item \cs{radialgradient}, \pageref{radialgradient}
\item \cs{rhatch}, \pageref{hatch}
\item \cs{sinewave}, \pageref{zigzag}
\item \cs{shade}, \pageref{shade}
@@ -6906,6 +7249,7 @@ file (don't ask me what it consists of) and apparently processes it with
\item \cs{xhatch}, \pageref{hatch}
\item \cs{zigzag}, \pageref{zigzag}
+
\subsection{Arrows}
\item \cs{arrow}, \pageref{arrow}
@@ -6913,6 +7257,7 @@ file (don't ask me what it consists of) and apparently processes it with
\item \cs{arrowmid}, \pageref{arrowhead}
\item \cs{arrowtail}, \pageref{arrowhead}
+
\subsection{Modifying figures}
\item \cs{bclosed}, \pageref{lclosed}
@@ -6920,6 +7265,7 @@ file (don't ask me what it consists of) and apparently processes it with
\item \cs{connect}, \cs{endconnect}, \pageref{connect}
\item \cs{cutoffafter}, \pageref{cutoffafter}
\item \cs{cutoffbefore}, \pageref{cutoffafter}
+ \item \cs{interpolatepath}, \pageref{interpolatepath}
\item \cs{lclosed}, \pageref{lclosed}
\item \cs{makesector}, \pageref{makesector}
\item \cs{parallelpath}, \pageref{parallelpath}
@@ -6929,6 +7275,7 @@ file (don't ask me what it consists of) and apparently processes it with
\item \cs{randomlines}, \pageref{random}
\item \cs{reflectpath}, \pageref{shiftpath}
\item \cs{reverse}, \pageref{reverse}
+ \item \cs{reversepath}, \pageref{reverse}
\item \cs{rotatepath}, \pageref{shiftpath}
\item \cs{scalepath}, \pageref{shiftpath}
\item \cs{sclosed}, \pageref{lclosed}
@@ -6943,6 +7290,7 @@ file (don't ask me what it consists of) and apparently processes it with
\item \cs{yscalepath}, \pageref{shiftpath}
\item \cs{yslantpath}, \pageref{shiftpath}
+
\subsection{Lengths}
\item \cs{axisheadlen}, \pageref{axisheadlen}
@@ -6963,6 +7311,7 @@ file (don't ask me what it consists of) and apparently processes it with
\item \cs{sideheadlen}, \pageref{sideheadlen}
\item \cs{symbolspace}, \pageref{symbolspace}
+
\subsection{Coordinate transformation}
\item \cs{applyT}, \pageref{applyT}
@@ -6983,6 +7332,7 @@ file (don't ask me what it consists of) and apparently processes it with
\item \cs{zscale}, \pageref{applyT}
\item \cs{zslant}, \pageref{applyT}
+
\subsection{Symbols, axes, grids, marks}
\item \cs{axes}, \pageref{axes}
@@ -7014,6 +7364,7 @@ file (don't ask me what it consists of) and apparently processes it with
\item \cs{yaxis}, \pageref{axes}
\item \cs{ymarks}, \pageref{axismarks}
+
\subsection{Symbol names}
\item \gbc{Arrowhead}, \pageref{arrowhead}
@@ -7038,6 +7389,7 @@ file (don't ask me what it consists of) and apparently processes it with
\item \gbc{Star}, \pageref{plotsymbol}
\item \gbc{Triangle}, \pageref{plotsymbol}
+
\subsection{Setting options}
\item \cs{clearsymbols}, \pageref{clearsymbols}
@@ -7063,6 +7415,7 @@ file (don't ask me what it consists of) and apparently processes it with
\item \cs{useraggedcaptions}, \pageref{raggedcaptions}
\item \cs{usetruebbox}, \pageref{truebbox}
+
\subsection{Setting values}
\item \cs{axismargin}, \pageref{axismargin}
@@ -7096,6 +7449,7 @@ file (don't ask me what it consists of) and apparently processes it with
\item \cs{setymarks}, \pageref{setaxismarks}
\item \cs{shadewd}, \pageref{shadewd}
+
\subsection{Setting colors}
\item \cs{backgroundcolor}, \pageref{drawcolor}
@@ -7107,6 +7461,7 @@ file (don't ask me what it consists of) and apparently processes it with
\item \cs{pointcolor}, \pageref{drawcolor}
\item \cs{tlabelcolor}, \pageref{drawcolor}
+
\subsection{Defining arrays}
\item \cs{barchart}, \pageref{barchart}
@@ -7126,6 +7481,7 @@ file (don't ask me what it consists of) and apparently processes it with
\item \cs{piechart}, \pageref{piechart}
\item \cs{setarray}, \pageref{setarray}
+
\subsection{Changing behavior}
\item \cs{coloredlines}, \pageref{coloredlines}
@@ -7158,6 +7514,7 @@ file (don't ask me what it consists of) and apparently processes it with
\item \cs{usingnumericdefault}, \pageref{usingpairdefault}
\item \cs{usingpairdefault}, \pageref{usingpairdefault}
+
\subsection{Files and environments}
\item \cs{closegraphsfile}, \pageref{opengraphsfile}
@@ -7167,6 +7524,7 @@ file (don't ask me what it consists of) and apparently processes it with
\item \cs{setfilename}, \pageref{setfilename}
\item \cs{setfilenametemplate}, \pageref{setfilenametemplate}
+
\subsection{Text}
\item \cs{axislabels}, \pageref{axislabels}
@@ -7177,6 +7535,7 @@ file (don't ask me what it consists of) and apparently processes it with
\item \cs{tlabel}, \pageref{tlabel}
\item \cs{tlabels}, \pageref{tlabel}
+
\subsection{Miscellaneous}
\item \cs{assignmfvalue}, \cs{assignmpvalue}, \pageref{assignmfvalue}