summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/metapost/featpost/doc/featpostdocsource.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/metapost/featpost/doc/featpostdocsource.tex')
-rw-r--r--Master/texmf-dist/doc/metapost/featpost/doc/featpostdocsource.tex856
1 files changed, 472 insertions, 384 deletions
diff --git a/Master/texmf-dist/doc/metapost/featpost/doc/featpostdocsource.tex b/Master/texmf-dist/doc/metapost/featpost/doc/featpostdocsource.tex
index 6098efcd2eb..068ce54095d 100644
--- a/Master/texmf-dist/doc/metapost/featpost/doc/featpostdocsource.tex
+++ b/Master/texmf-dist/doc/metapost/featpost/doc/featpostdocsource.tex
@@ -1,6 +1,6 @@
\usepackage{amsmath,amssymb,graphicx}
\DeclareGraphicsRule{*}{mps}{*}{}
-\graphicspath{{../allps/}}
+\graphicspath{{../mps/}}
\newfont{\normald}{logod10 scaled 1024}
\newcommand{\MF}{{\normald METAFONT}}
\newcommand{\MP}{{\normald METAPOST}}
@@ -9,7 +9,7 @@
\newcommand{\myem}[1]{\texttt{#1}}
\title{\FP\ manual}
\author{\href{mailto:lnobreg@gmail.com}{L. Nobre G.}}
-\date{0.8.6}
+\date{0.8.7}
\begin{document}
\mode<article>{\maketitle}
\frame{\titlepage}
@@ -36,22 +36,22 @@
\frame{
\changeableframetitle{First taste of \FP}
-Each perspective depends on the point of view. \FP\ uses the global
-variable \myem{f}, of \myem{color} type, to store the $(X,Y,Z)$
-space coordinates of the point of view. Also important is the aim of view
-(global variable \myem{viewcentr}). Both define the line of
-view.
+ Each perspective depends on the point of view. \FP\ uses the global
+ variable \myem{f}, of \myem{color} type, to store the $(X,Y,Z)$
+ space coordinates of the point of view. Also important is the aim of view
+ (global variable \myem{viewcentr}). Both define the line of
+ view.
}
\frame{
-The perspective
-consists of a projection from space coordinates into planar $(u,v)$
-coordinates on the projection plane. \FP\ uses a projection plane that
-is perpendicular to the line of view and contains the
-\myem{viewcentr}. Furthermore, one of the projection plane axes is
-horizontal and the other is on the intersection of a vertical plane
-with the projection plane. ``Horizontal'' means parallel to the
-$XY$ plane. The projection plane axes are perpendicular to each other.
+ The perspective
+ consists of a projection from space coordinates into planar $(u,v)$
+ coordinates on the projection plane. \FP\ uses a projection plane that
+ is perpendicular to the line of view and contains the
+ \myem{viewcentr}. Furthermore, one of the projection plane axes is
+ horizontal and the other is on the intersection of a vertical plane
+ with the projection plane. ``Horizontal'' means parallel to the
+ $XY$ plane. The projection plane axes are perpendicular to each other.
}
@@ -63,226 +63,226 @@ to \FP\ are schematized in figures \ref{paraproj}, \ref{coniproj} and
cases, \myem{rp}.
\frame{
-\begin{figure}[hbtp]
- \begin{center}
- \includegraphics[width=0.65\columnwidth]{thethreekindsofperspec.1}
- \end{center}
- \caption{Parallel projection.}
- \label{paraproj}
-\end{figure}
+ \begin{figure}[hbtp]
+ \begin{center}
+ \includegraphics[width=65mm]{thethreekindsofperspec.1}
+ \end{center}
+ \caption{Parallel projection.}
+ \label{paraproj}
+ \end{figure}
}
\frame{
-\begin{figure}[hbtp]
- \begin{center}
- \includegraphics[width=0.65\columnwidth]{thethreekindsofperspec.2}
- \end{center}
- \caption{Central projection.}
- \label{coniproj}
-\end{figure}
+ \begin{figure}[hbtp]
+ \begin{center}
+ \includegraphics[width=65mm]{thethreekindsofperspec.2}
+ \end{center}
+ \caption{Central projection.}
+ \label{coniproj}
+ \end{figure}
}
\frame{
-\begin{figure}[hbtp]
- \begin{center}
- \includegraphics[width=0.65\columnwidth]{thethreekindsofperspec.3}
- \end{center}
- \caption{Spherical projection. The
- spherical projection is the composition of two operations: (i)~there
- is a projection onto a sphere and (ii)~the sphere is plaited
- onto the projection plane.}
- \label{spheproj}
-\end{figure}
+ \begin{figure}[hbtp]
+ \begin{center}
+ \includegraphics[width=65mm]{thethreekindsofperspec.3}
+ \end{center}
+ \caption{Spherical projection. The
+ spherical projection is the composition of two operations: (i)~there
+ is a projection onto a sphere and (ii)~the sphere is plaited
+ onto the projection plane.}
+ \label{spheproj}
+ \end{figure}
}
\frame{
-Some problems often require defining angles, and diagrams are
-needed to visualize their meanings. The \myem{angline} and
-\myem{squareangline} macros support this (see figure \ref{figcartaxes2}).
+ Some problems often require defining angles, and diagrams are
+ needed to visualize their meanings. The \myem{angline} and
+ \myem{squareangline} macros support this (see figure \ref{figcartaxes2}).
}
\frame{
-\begin{figure}[hbtp]
- \begin{center}
- \includegraphics[width=0.65\columnwidth]{cartaxes.2}
- \end{center}
- \caption{Example that uses \myem{cartaxes}, \myem{squareangline},
- \myem{angline} and \myem{getangle}.}
- \label{figcartaxes2}
-\end{figure}
+ \begin{figure}[hbtp]
+ \begin{center}
+ \includegraphics[width=65mm]{cartaxes.2}
+ \end{center}
+ \caption{Example that uses \myem{cartaxes}, \myem{squareangline},
+ \myem{angline} and \myem{getangle}.}
+ \label{figcartaxes2}
+ \end{figure}
}
\frame{
-Visualizing parametric lines is another need. When two
-lines cross, one should be able to see which line is in front of the
-other. The macro \myem{emptyline} can help here (see figure
-\ref{induction}).
+ Visualizing parametric lines is another need. When two
+ lines cross, one should be able to see which line is in front of the
+ other. The macro \myem{emptyline} can help here (see figure
+ \ref{induction}).
}
\frame{
-\begin{figure}[hbtp]
- \begin{center}
- \includegraphics[width=0.65\columnwidth]{parafuso.1}
- \end{center}
- \caption{\FP\ diagram using \myem{emptyline}.}
- \label{induction}
-\end{figure}
+ \begin{figure}[hbtp]
+ \begin{center}
+ \includegraphics[width=65mm]{parafuso.1}
+ \end{center}
+ \caption{\FP\ diagram using \myem{emptyline}.}
+ \label{induction}
+ \end{figure}
}
\frame{
-Cuboids and labels are always needed. The macros \myem{kindofcube}
-and \myem{labelinspace} fulfill this need (see figure
-\ref{cublab}). The macro \myem{labelinspace} does
-not project labels from 3D into 2D. It only \myem{Transform}s the
-label in the same
-way as its bounding box, that is, the same way as two perpendicular sides
-of its bounding box. This is only exact for parallel perspectives.
+ Cuboids and labels are always needed. The macros \myem{kindofcube}
+ and \myem{labelinspace} fulfill this need (see figure
+ \ref{cublab}). The macro \myem{labelinspace} does
+ not project labels from 3D into 2D. It only \myem{Transform}s the
+ label in the same
+ way as its bounding box, that is, the same way as two perpendicular sides
+ of its bounding box. This is only exact for parallel perspectives.
}
\frame{
-\begin{figure}[hbtp]
- \begin{center}
- \includegraphics[width=0.65\columnwidth]{labelconstruct.1}
- \end{center}
- \caption{\FP\ diagram using the macros \myem{kindofcube}
- and \myem{labelinspace}.}
- \label{cublab}
-\end{figure}
+ \begin{figure}[hbtp]
+ \begin{center}
+ \includegraphics[width=65mm]{labelconstruct.1}
+ \end{center}
+ \caption{\FP\ diagram using the macros \myem{kindofcube}
+ and \myem{labelinspace}.}
+ \label{cublab}
+ \end{figure}
}
\frame{
-\begin{sloppypar}
-Some curved surface solid objects can be drawn with \FP. Among them
-are cones (\myem{very\-good\-cone}), cylinders (\myem{rigorous\-disc})
-and globes (\myem{trop\-ical\-globe}). These can also cast their shadows
-on a horizontal plane (see figure
-\ref{anddisc}). The production of shadows
-involves the global variables \myem{LightSource}, \myem{ShadowOn}
-and \myem{HoriZon}.
-\end{sloppypar}
+ \begin{sloppypar}
+ Some curved surface solid objects can be drawn with \FP. Among them
+ are cones (\myem{very\-good\-cone}), cylinders (\myem{rigorous\-disc})
+ and globes (\myem{trop\-ical\-globe}). These can also cast their shadows
+ on a horizontal plane (see figure
+ \ref{anddisc}). The production of shadows
+ involves the global variables \myem{LightSource}, \myem{ShadowOn}
+ and \myem{HoriZon}.
+ \end{sloppypar}
}
\frame{
-\begin{figure}[hbtp]
- \begin{center}
- \includegraphics[width=0.65\columnwidth]{stageforthree.3}
- \end{center}
- \caption{\FP\ diagram using
- the macros \myem{rigorousdisc}, \myem{verygoodcone},
- \myem{tropicalglobe} and \myem{setthestage}.}
- \label{anddisc}
-\end{figure}
+ \begin{figure}[hbtp]
+ \begin{center}
+ \includegraphics[width=65mm]{stageforthree.3}
+ \end{center}
+ \caption{\FP\ diagram using
+ the macros \myem{rigorousdisc}, \myem{verygoodcone},
+ \myem{tropicalglobe} and \myem{setthestage}.}
+ \label{anddisc}
+ \end{figure}
}
\frame{
-Another very common need is the plotting of functions, usually satisfied
-by software such as Gnuplot (\url{http://www.gnuplot.info/}) or Gri
-(\url{http://gri.sourceforge.net/}).
-Nevertheless, there are always new plots to draw. One specific \FP\
-kind of plot is the ``triangular grid triangular domain
-surface'' (see figure \ref{triangulartrimesh}).
+ Another very common need is the plotting of functions, usually satisfied
+ by software such as Gnuplot (\url{http://www.gnuplot.info/}) or Gri
+ (\url{http://gri.sourceforge.net/}).
+ Nevertheless, there are always new plots to draw. One specific \FP\
+ kind of plot is the ``triangular grid triangular domain
+ surface'' (see figure \ref{triangulartrimesh}).
}
\frame{
-\begin{figure}[hbtp]
- \begin{center}
- \includegraphics[width=0.65\columnwidth]{triangulartrimesh.1}
- \end{center}
- \caption{\FP\ surface plot using
- the macro \myem{hexagonaltrimesh}.}
- \label{triangulartrimesh}
-\end{figure}
+ \begin{figure}[hbtp]
+ \begin{center}
+ \includegraphics[width=65mm]{triangulartrimesh.1}
+ \end{center}
+ \caption{\FP\ surface plot using
+ the macro \myem{hexagonaltrimesh}.}
+ \label{triangulartrimesh}
+ \end{figure}
}
\frame{
-One feature that merges 2D and 3D involves what might be called
-``fat sticks''. A fat stick resembles the Teflon magnets used to mix
-chemicals. They have volume but can be drawn like a small straight
-line segment stroked with a \myem{pencircle}. Fat sticks may be used
-to represent direction fields (unitary vector fields without arrows).
-See figure \ref{nsmetica}.
+ One feature that merges 2D and 3D involves what might be called
+ ``fat sticks''. A fat stick resembles the Teflon magnets used to mix
+ chemicals. They have volume but can be drawn like a small straight
+ line segment stroked with a \myem{pencircle}. Fat sticks may be used
+ to represent direction fields (unitary vector fields without arrows).
+ See figure \ref{nsmetica}.
}
\frame{
-\begin{figure}[hbtp]
- \begin{center}
- \includegraphics[width=0.65\columnwidth]{nsmetica.1}
- \end{center}
- \caption{\FP\ direction field macro \myem{director\_invisible} was
- used to produce this representation of the molecular structure of
- a Smectic A liquid crystal.}
- \label{nsmetica}
-\end{figure}
+ \begin{figure}[hbtp]
+ \begin{center}
+ \includegraphics[width=65mm]{nsmetica.1}
+ \end{center}
+ \caption{\FP\ direction field macro \myem{director\_invisible} was
+ used to produce this representation of the molecular structure of
+ a Smectic A liquid crystal.}
+ \label{nsmetica}
+ \end{figure}
}
\frame{
-Finaly, it is important to remember that some capabilities of \FP,
-although usable, may be considered ``buggy'' or only partially
-implemented. These include the
-calculation of intersections between polygons, as in figure
-\ref{figsharpraytrace}, and the drawing of cylinders with axial holes, as
-in figure \ref{smoothtorus}.
+ Finaly, it is important to remember that some capabilities of \FP,
+ although usable, may be considered ``buggy'' or only partially
+ implemented. These include the
+ calculation of intersections between polygons, as in figure
+ \ref{figsharpraytrace}, and the drawing of cylinders with holes, as
+ in figure \ref{buggydisc}.
}
\frame{
-\begin{figure}[hbtp]
- \begin{center}
- \includegraphics[width=0.65\columnwidth]{twoholes.1}
- \end{center}
- \caption{\FP\ example containing a \myem{smoothtorus} and a
- \myem{rigorousdisc} with a hole.}
- \label{smoothtorus}
-\end{figure}
+ \begin{figure}[hbtp]
+ \begin{center}
+ \includegraphics[width=65mm]{fakehole.1}
+ \end{center}
+ \caption{\FP\ example containing a
+ \myem{rigorousdisc} with several holes.}
+ \label{buggydisc}
+ \end{figure}
}
\subsection{Moving on, slowly}
\frame{
-It is highly beneficial to
-be able to understand and cope with \MP\ error messages as
-\FP\ has no protection against mistaken inputs. One
-probable cause of errors is the use of variables with the name of
-procedures (macros), like
-\begin{quote}
+ It is highly beneficial to
+ be able to understand and cope with \MP\ error messages as
+ \FP\ has no protection against mistaken inputs. One
+ probable cause of errors is the use of variables with the name of
+ procedures (macros), like
+ \begin{quote}
\begin{verbatim}
X, Y, Z, W, N, rp, cb, ps
\end{verbatim}
-\end{quote}
-All other procedure names have six or more characters.
+ \end{quote}
+ All other procedure names have six or more characters.
}
\frame{
-The user must be aware that \MP\ has a limited arithmetic power
-and that the author has limited programming skills,
-which may lead to unperfect 3D figures, very long processing
-time or shear bugs.
-It's advisable not to try very complex diagrams at first
-and it's recommended to
-keep 3D coordinates near order 1 (default \MP\ units).
+ The user must be aware that \MP\ has a limited arithmetic power
+ and that the author has limited programming skills,
+ which may lead to unperfect 3D figures, very long processing
+ time or shear bugs.
+ It's advisable not to try very complex diagrams at first
+ and it's recommended to
+ keep 3D coordinates near order 1 (default \MP\ units).
}
\frame{
-All three-dimensional \FP\ macros are build apon
-the \MP\
-\myem{color} variable type. It looks like this:
-\begin{quote}
+ All three-dimensional \FP\ macros are build apon
+ the \MP\
+ \myem{color} variable type. It looks like this:
+ \begin{quote}
\begin{verbatim}
(red,green,blue)
\end{verbatim}
-\end{quote}
-Its components may, nevertheless,
-be arbtitrary numbers, like:
-\begin{quote}
+ \end{quote}
+ Its components may, nevertheless,
+ be arbtitrary numbers, like:
+ \begin{quote}
\begin{verbatim}
(X,Y,Z)
\end{verbatim}
-\end{quote}
-So, the
-\myem{color} type is adequate to define not only colors but
-also 3D points and vectors.
+ \end{quote}
+ So, the
+ \myem{color} type is adequate to define not only colors but
+ also 3D points and vectors.
}
\frame{
-One very minimalistic example program could be:
-\begin{quote}
+ One very minimalistic example program could be:
+ \begin{quote}
\begin{verbatim}
input featpost3Dplus2D;
beginfig(1);
@@ -290,10 +290,10 @@ beginfig(1);
endfig;
end;
\end{verbatim}
-\end{quote}
-where \myem{cartaxes} is a
-\FP\ macro that produces
-the Cartesian referential.
+ \end{quote}
+ where \myem{cartaxes} is a
+ \FP\ macro that produces
+ the Cartesian referential.
}
One small example program may be:
@@ -325,19 +325,21 @@ where \myem{kindofcube}
is a \FP\ macro that produces
a rectangular prism (cuboid). See figure \ref{figkindofcube1}.
-\frame{\begin{figure}[bpt]
-\begin{center}
- \includegraphics[width=0.65\columnwidth]{kindofcube.1}
-\end{center}
- \caption{Example that uses \myem{kindofcube}.}
-\label{figkindofcube1}
-\end{figure}}
+\frame{
+ \begin{figure}[bpt]
+ \begin{center}
+ \includegraphics[width=65mm]{kindofcube.1}
+ \end{center}
+ \caption{Example that uses \myem{kindofcube}.}
+ \label{figkindofcube1}
+ \end{figure}
+}
\frame{
-The main variable of any three-dimensional figure is the
-point of view. \FP\ uses the variable \myem{f}
-as the point of view. \myem{Spread} is another global
-variable that controls the size of the projection.
+ The main variable of any three-dimensional figure is the
+ point of view. \FP\ uses the variable \myem{f}
+ as the point of view. \myem{Spread} is another global
+ variable that controls the size of the projection.
}
Another example may be:
@@ -399,31 +401,33 @@ in addition to
\myem{twocyclestogether} and
\myem{kindofcube}. See figure \ref{figstageforthree}.
-\frame{\begin{figure}[bpt]
-\begin{center}
- \includegraphics[width=0.65\columnwidth]{stageforthree.1}
-\end{center}
- \caption{Example that uses \myem{rigorousdisc} and
- \myem{verygoodcone}.}
-\label{figstageforthree}
-\end{figure}}
+\frame{
+ \begin{figure}[bpt]
+ \begin{center}
+ \includegraphics[width=65mm]{stageforthree.1}
+ \end{center}
+ \caption{Example that uses \myem{rigorousdisc} and
+ \myem{verygoodcone}.}
+ \label{figstageforthree}
+ \end{figure}
+}
\subsection{Main reason}
\frame{
\changeableframetitle{Use \FP\ because}
-\FP\ has already been used in scientific publications:
-\begin{itemize}
-\item Figure 1 of
- \href{http://pre.aps.org/abstract/PRE/v60/i3/p2985_1}{\textit{Phys. Rev. E},
- \textbf{60}, 2985-2989 (1999)}.
-\item Figures 4, 6 and 8 of
- \href{http://www.springerlink.com/content/pmwu8a2y9pkxr5rq/}{\textit{Eur.
- Phys. J. E}, \textbf{2}, 351-358 (2000)}.
-\item Figures 8 and 12 of
- \href{http://www.springerlink.com/content/w41308176vnk7408/}{\textit{Eur.
- Phys. J. E}, \textbf{20}, 55-61 (2006)}.
-\end{itemize}
+ \FP\ has already been used in scientific publications:
+ \begin{itemize}
+ \item Figure 1 of
+ \href{http://pre.aps.org/abstract/PRE/v60/i3/p2985_1}{\textit{Phys. Rev. E},
+ \textbf{60}, 2985-2989 (1999)}.
+ \item Figures 4, 6 and 8 of
+ \href{http://www.springerlink.com/content/pmwu8a2y9pkxr5rq/}{\textit{Eur.
+ Phys. J. E}, \textbf{2}, 351-358 (2000)}.
+ \item Figures 8 and 12 of
+ \href{http://www.springerlink.com/content/w41308176vnk7408/}{\textit{Eur.
+ Phys. J. E}, \textbf{20}, 55-61 (2006)}.
+ \end{itemize}
}
\section{\FP\ in detail}
@@ -495,63 +499,69 @@ end;
\end{quote}
-\frame{\begin{figure}[bpt]
-\begin{center}
- \includegraphics[width=0.45\columnwidth]{cubicfigures.1}
-\end{center}
- \caption{Orthogonal perspective.}
-\label{figcubicfigures1}
-\end{figure}}
-
-\frame{\begin{figure}[bpt]
-\begin{center}
- \includegraphics[width=0.45\columnwidth]{cubicfigures.2}
-\end{center}
- \caption{Rigorous perspective.}
-\label{figcubicfigures2}
-\end{figure}}
-
-\frame{\begin{figure}[bpt]
-\begin{center}
- \includegraphics[width=0.45\columnwidth]{cubicfigures.3}
-\end{center}
- \caption{Fish-eye perspective.}
-\label{figcubicfigures3}
-\end{figure}}
+\frame{
+ \begin{figure}[bpt]
+ \begin{center}
+ \includegraphics[width=0.45\columnwidth]{cubicfigures.1}
+ \end{center}
+ \caption{Orthogonal perspective.}
+ \label{figcubicfigures1}
+ \end{figure}
+}
+
+\frame{
+ \begin{figure}[bpt]
+ \begin{center}
+ \includegraphics[width=0.45\columnwidth]{cubicfigures.2}
+ \end{center}
+ \caption{Rigorous perspective.}
+ \label{figcubicfigures2}
+ \end{figure}
+}
+
+\frame{
+ \begin{figure}[bpt]
+ \begin{center}
+ \includegraphics[width=0.45\columnwidth]{cubicfigures.3}
+ \end{center}
+ \caption{Fish-eye perspective.}
+ \label{figcubicfigures3}
+ \end{figure}
+}
\subsubsection{From 3D to 2D}
\frame{
\changeableframetitle{From 3D to 2D}
-The most important macro is \myem{rp} that converts 3D points
-to two-dimensional (2D) rigorous, orthogonal
-or fish-eye projections. To draw a line in
-3D-space try
-\begin{quote}
+ The most important macro is \myem{rp} that converts 3D points
+ to two-dimensional (2D) rigorous, orthogonal
+ or fish-eye projections. To draw a line in
+ 3D-space try
+ \begin{quote}
\begin{verbatim}
draw rp(a)--rp(b);
\end{verbatim}
-\end{quote}
-where
-\myem{a} and \myem{b} are points in space
-(of \myem{color} type).
+ \end{quote}
+ where
+ \myem{a} and \myem{b} are points in space
+ (of \myem{color} type).
}
\frame{
\changeableframetitle{``straight lines''}
-But if you're going for fish-eye it's better to
-\begin{quote}
+ But if you're going for fish-eye it's better to
+ \begin{quote}
\begin{verbatim}
draw pathofstraightline(a,b);
\end{verbatim}
-\end{quote}
-If
-you don't know, leave it as
-\begin{quote}
+ \end{quote}
+ If
+ you don't know, leave it as
+ \begin{quote}
\begin{verbatim}
drawsegment(a,b);
\end{verbatim}
-\end{quote}
+ \end{quote}
}
\subsection{Angles}
@@ -610,35 +620,39 @@ end
\end{quote}
See figure \ref{figsharpraytrace}.
-\frame{\begin{figure}[bpt]
-\begin{center}
- \includegraphics[width=0.65\columnwidth]{sharpraytrace.1}
-\end{center}
- \caption{Intersecting polygons drawn with the macro \myem{sharpraytrace}.}
-\label{figsharpraytrace}
-\end{figure}}
+\frame{
+ \begin{figure}[bpt]
+ \begin{center}
+ \includegraphics[width=65mm]{sharpraytrace.1}
+ \end{center}
+ \caption{Intersecting polygons drawn with the macro \myem{sharpraytrace}.}
+ \label{figsharpraytrace}
+ \end{figure}
+}
\subsection{Coming back to 3D from 2D}
\frame{
\changeableframetitle{Coming back to 3D from 2D}
-It is possible to do an "automatic perspective tuning"
-with the aid of macro \myem{photoreverse}. Please, refer both to example
-\myem{photoreverse.mp} (see figure \ref{figphotoreverse}) and to the
-following web page:
-\href{http://matagalatlante.org/nobre/hyt/technicaldrawfromphoto.html}{FeatPost
- Deeper Technicalities}.
-}
-
-\frame{\begin{figure}[bpt]
-\begin{center}
- \includegraphics[width=0.45\columnwidth]{photoreverse.1}
-\end{center}
- \caption{Example that uses \myem{photoreverse}. It may
- not work when vertical lines are not vertical in
- average on the photo.}
-\label{figphotoreverse}
-\end{figure}}
+ It is possible to do an "automatic perspective tuning"
+ with the aid of macro \myem{photoreverse}. Please, refer both to example
+ \myem{photoreverse.mp} (see figure \ref{figphotoreverse}) and to the
+ following web page:
+ \href{http://matagalatlante.org/nobre/hyt/technicaldrawfromphoto.html}{FeatPost
+ Deeper Technicalities}.
+}
+
+\frame{
+ \begin{figure}[bpt]
+ \begin{center}
+ \includegraphics[width=0.45\columnwidth]{photoreverse.1}
+ \end{center}
+ \caption{Example that uses \myem{photoreverse}. It may
+ not work when vertical lines are not vertical in
+ average on the photo.}
+ \label{figphotoreverse}
+ \end{figure}
+}
The idea here is to: (i) have a \MP-coded vectorized image; (ii) associate 3D
coordinates to a few specific points of the vectorized image; (iii)
@@ -650,14 +664,14 @@ draw 3D matching schematic diagrams on the image.
\frame{
\changeableframetitle{Coming back to 3D from 1D}
-Using almost the same algorithm as \myem{photoreverse}, the
-macro \myem{improvertex} allows one to approximate a
-point in 3D-space with given distances $d$ from three other
-points (an initial guess $\vec{i}$ is required).
-\begin{center}
- \myem{point := improvertex}( $\vec{a}$, $d_a$, $\vec{b}$, $d_b$,
- $\vec{c}$, $d_c$, $\vec{i}$ );
-\end{center}
+ Using almost the same algorithm as \myem{photoreverse}, the
+ macro \myem{improvertex} allows one to approximate a
+ point in 3D-space with given distances $d$ from three other
+ points (an initial guess $\vec{i}$ is required).
+ \begin{center}
+ \myem{point := improvertex}( $\vec{a}$, $d_a$, $\vec{b}$, $d_b$,
+ $\vec{c}$, $d_c$, $\vec{i}$ );
+ \end{center}
}
\frame{
@@ -665,7 +679,7 @@ points (an initial guess $\vec{i}$ is required).
Approximating a
point in 3D-space with given distances from three other
points is the same as calculating the intersection of three spheres.
- And method to do that is the same as the method to calculate the
+ And the method to do that is the same as the method to calculate the
intersection of a plane, a cylinder and a spheroid (see figure
\ref{figultraimprove}).
}
@@ -675,7 +689,7 @@ points (an initial guess $\vec{i}$ is required).
\begin{center}
\includegraphics[width=0.45\columnwidth]{ultraimprovertex.1}
\end{center}
- \caption{Example that uses \myem{ultrimprovertex}.}
+ \caption{Example that uses \myem{ultraimprovertex}.}
\label{figultraimprove}
\end{figure}
}
@@ -684,13 +698,13 @@ points (an initial guess $\vec{i}$ is required).
\frame{
\changeableframetitle{Scalar function minimization}
-Macro \myem{minimizestep} is a
-minimization routine for scalar functions like $y=f(x)$ where an initial
-triplet $(x_1,x_2,x_3)$ with $x_1<x_2<x_3$ is given as a parabolic squeleton that
-provides a way to search for the smallest value of $y$ (if iterated).
-\begin{center}
- \myem{point := minimizestep}( $\vec{x}$ )( $f$ );
-\end{center}
+ Macro \myem{minimizestep} is a
+ minimization routine for scalar functions like $y=f(x)$ where an initial
+ triplet $(x_1,x_2,x_3)$ with $x_1<x_2<x_3$ is given as a parabolic squeleton that
+ provides a way to search for the smallest value of $y$ (if iterated).
+ \begin{center}
+ \myem{point := minimizestep}( $\vec{x}$ )( $f$ );
+ \end{center}
}
\section{Reference Manual}
@@ -770,14 +784,16 @@ coordinate. The idea here is to use the fourth coordinate as ``time''
and visualize yz projections of an animation in a single
figure\footnote{To be developed in future versions.}.
-\frame{\begin{figure}[bpt]
-\begin{center}
- \includegraphics[width=0.65\columnwidth]{rigorousdiscSD.1}
-\end{center}
- \caption{Figure that uses \myem{SphericalDistortion:=true}
- and \myem{rigorousdisc}.}
-\label{sphericaldisc}
-\end{figure}}
+\frame{
+ \begin{figure}[bpt]
+ \begin{center}
+ \includegraphics[width=65mm]{rigorousdiscSD.1}
+ \end{center}
+ \caption{Figure that uses \myem{SphericalDistortion:=true}
+ and \myem{rigorousdisc}.}
+ \label{sphericaldisc}
+ \end{figure}
+}
\begin{quote}
\begin{verbatim}
@@ -920,9 +936,11 @@ specific production, are
\item \myem{positivecharge}
\item \myem{whatisthis}
\item \myem{spheroid}
+\item \myem{ellipsoid}
\item \myem{kindofcube}
\item \myem{draw\_all\_test}
\item \myem{fill\_faces}
+\item \myem{smoothtorus}
\end{itemize}
All macros that contain {\bfseries shadow} in their name
calculate the location of shadows using \myem{cb}. These are:
@@ -930,10 +948,11 @@ calculate the location of shadows using \myem{cb}. These are:
\myem{signalshadowvertex};
\myem{ellipticshadowpath};
\myem{circleshadowpath};
+\myem{spheroidshadow};
+\myem{ellipsoidshadow};
+\myem{torushadow};
\myem{rigorousfearshadowpath}; and
\myem{faceshadowpath}.
-
-
\begin{quote}
\begin{verbatim}
path VGAborder
@@ -1169,12 +1188,14 @@ the viewpoint \myem{f}.
\item \myem{colour} Colour of the dot.
\end{enumerate}
-\frame{\begin{figure}[bpt]
-\begin{center}
- \includegraphics[width=0.65\columnwidth]{torus.1}
-\end{center}
- \caption{Figure that uses \myem{signalvertex}.}
-\end{figure}}
+\frame{
+ \begin{figure}[bpt]
+ \begin{center}
+ \includegraphics[width=65mm]{torus.1}
+ \end{center}
+ \caption{Figure that uses \myem{signalvertex}.}
+ \end{figure}
+}
\item path {\bfseries pathofstraightline()} When using
\myem{SphericalDistortion:=true}, straight lines
look like curves. This macro returns the curved path
@@ -1232,15 +1253,17 @@ that returns a 3D point of the line for each value
of a parameter in beetween 0 and 1.
\end{enumerate}
-\frame{\begin{figure}[bpt]
-\begin{center}
- \includegraphics[width=0.65\columnwidth]{joinedemptylines.1}
-\end{center}
- \caption{Figure that uses \myem{emptyline}.
- The junction point of two different lines is indicated
- by an arrow. }
-\label{joinedemptylines}
-\end{figure}}
+\frame{
+ \begin{figure}[bpt]
+ \begin{center}
+ \includegraphics[width=65mm]{joinedemptylines.1}
+ \end{center}
+ \caption{Figure that uses \myem{emptyline}.
+ The junction point of two different lines is indicated
+ by an arrow. }
+ \label{joinedemptylines}
+ \end{figure}
+}
\item draw {\bfseries closedline()} This procedure produces
a tube that can cross over itself. It
facilitates the drawing of, for instance, thick
@@ -1322,18 +1345,47 @@ rotating around the axis in the way of the left-hand-rule.
circle (circle axis).
\item \myem{numeric} Radius of the circle.
\end{enumerate}
-
-\frame{\begin{figure}[bpt]
-\begin{center}
- \includegraphics[width=0.45\columnwidth]{anglinerigorouscircle.1}
-\end{center}
- \caption{Figure that uses \myem{anglinen}
- and \myem{rigorouscircle}.}
-\end{figure}}
+\frame{
+ \begin{figure}[bpt]
+ \begin{center}
+ \includegraphics[width=0.45\columnwidth]{anglinerigorouscircle.1}
+ \end{center}
+ \caption{Figure that uses \myem{anglinen}
+ and \myem{rigorouscircle}.}
+ \end{figure}
+}
\item draw {\bfseries tdarrow()} Draws a flat arrow that
begins at the first argument and ends at the second.
The shape of the arrow is controled by the global
variables \myem{TDAtiplen, TDAhalftipbase, TDAhalfthick}.
+This arrow is drawn on the plane that maximizes the perspective of its
+width. Also, the tip is contracted when \myem{TDAtiplen} is larger
+than the length of the arrow.
+\item draw {\bfseries tdcircarrow()} Draws a flat curving arrow. The
+ curve is a circular arch on a plane.
+The shape of the arrow is controled both by the global
+variables \myem{TDAtiplen, TDAhalftipbase, TDAhalfthick} and by the
+three last arguments.
+\begin{enumerate}
+\item \myem{color} Position of the center ($\vec{c}$).
+\item \myem{color} Vector perpendicular to the plane $P$ that contains the
+ arrow (rotation axis $\vec{A}$).
+\item \myem{numeric} Curve ray.
+\item \myem{numeric} Arrow starting angle. Note that the angle is measured
+ relative to the axis pointing from $\vec{c}$ to \myem{f} and
+ projected onto $P$ ($\vec{B}$). The angle is positive when it
+ approaches $\vec{A}\times\vec{B}$.
+\item \myem{numeric} Angular amplitude of the curve (may be negative).
+\end{enumerate}
+\frame{
+ \begin{figure}[bpt]
+ \begin{center}
+ \includegraphics[width=0.45\columnwidth]{tdcircarrow.1}
+ \end{center}
+ \caption{Figure that uses \myem{tdarrow}
+ and \myem{tdcircarrow}.}
+ \end{figure}
+}
\item path {\bfseries twocyclestogether()} This macro
allows you to draw any solid that has no vertexes
and that has two, exactly two, planar cyclic edges.
@@ -1365,12 +1417,14 @@ letf edge.
\item \myem{text} 2D picture's name.
\end{enumerate}
-\frame{\begin{figure}[bpt]
-\begin{center}
- \includegraphics[width=0.65\columnwidth]{labelinspace.1}
-\end{center}
- \caption{Example that uses \myem{labelinspace}.}
-\end{figure}}
+\frame{
+ \begin{figure}[bpt]
+ \begin{center}
+ \includegraphics[width=65mm]{labelinspace.1}
+ \end{center}
+ \caption{Example that uses \myem{labelinspace}.}
+ \end{figure}
+}
\end{itemize}
@@ -1461,7 +1515,7 @@ minor circles. Can cast a shadow.
\frame{
\begin{figure}[bpt]
\begin{center}
- \includegraphics[width=0.65\columnwidth]{tropicalglobe.1}
+ \includegraphics[width=65mm]{tropicalglobe.1}
\end{center}
\caption{Figure that uses \myem{tropicalglobe}.}
\end{figure}
@@ -1475,7 +1529,7 @@ minor circles. Can cast a shadow.
\frame{
\begin{figure}[bpt]
\begin{center}
- \includegraphics[width=0.65\columnwidth]{revolipsoid.2}
+ \includegraphics[width=65mm]{revolipsoid.2}
\end{center}
\caption{Figure that uses \myem{spheroid}.}
\end{figure}
@@ -1509,15 +1563,17 @@ vertex (\myem{true}) or the center(\myem{false}).
\end{enumerate}
These arguments are represented in figure \ref{kindofcube2}.
-\frame{\begin{figure}[bpt]
-\begin{center}
- \includegraphics[width=0.65\columnwidth]{kindofcube.2}
-\end{center}
- \caption{Figure that uses and explains
- \myem{kindofcube}. Note that the three indicated
- angles may be used as arguments of \myem{eulerrotation}.}
-\label{kindofcube2}
-\end{figure}}
+\frame{
+ \begin{figure}[bpt]
+ \begin{center}
+ \includegraphics[width=65mm]{kindofcube.2}
+ \end{center}
+ \caption{Figure that uses and explains
+ \myem{kindofcube}. Note that the three indicated
+ angles may be used as arguments of \myem{eulerrotation}.}
+ \label{kindofcube2}
+ \end{figure}
+}
\item draw {\bfseries setthestage()} Produces an horizontal
square made of squares. Its \myem{Z} coordinate is defined by
\myem{HoriZon}.
@@ -1537,7 +1593,7 @@ diameter.
\end{enumerate}
\item draw {\bfseries smoothtorus()} Toxic donut (not to be
eaten). Produces an error message when \myem{f} is
-close to the table.
+close to the table. Can cast a shadow.
\begin{enumerate}
\item \myem{color} Center.
\item \myem{color} Direction orthogonal to the
@@ -1565,14 +1621,15 @@ means positive).
\item \myem{numeric} Sphere ray.
\end{enumerate}
-\frame{\begin{figure}[bpt]
-\begin{center}
- \includegraphics[width=0.55\columnwidth]{positivecharge.1}
-\end{center}
- \caption{Figure that uses \myem{positivecharge},
- \myem{getready} and \myem{doitnow}.
- }
-\end{figure}}
+\frame{
+ \begin{figure}[bpt]
+ \begin{center}
+ \includegraphics[width=0.55\columnwidth]{positivecharge.1}
+ \end{center}
+ \caption{Figure that uses \myem{positivecharge},
+ \myem{getready} and \myem{doitnow}.}
+ \end{figure}
+}
\item draw {\bfseries simplecar()} Draws a cuboid and four
discs in a configuration ressembling an automobile. The
first three arguments of \myem{simplecar} are the same
@@ -1591,14 +1648,15 @@ of the cylinders). \myem{bluepart}-wheel ray.
\item \myem{color} Same as above for the rear wheels
\end{enumerate}
-\frame{\begin{figure}[bpt]
-\begin{center}
- \includegraphics[width=0.65\columnwidth]{simplecar.1}
-\end{center}
- \caption{Figure that uses \myem{setthearena} and
- \myem{simplecar}.
- }
-\end{figure}}
+\frame{
+ \begin{figure}[bpt]
+ \begin{center}
+ \includegraphics[width=65mm]{simplecar.1}
+ \end{center}
+ \caption{Figure that uses \myem{setthearena} and
+ \myem{simplecar}.}
+ \end{figure}
+}
\item draw {\bfseries banana()} Draws a cylindrical strip with a mark in
the middle angle.
@@ -1611,12 +1669,14 @@ of the cylinders). \myem{bluepart}-wheel ray.
\item \myem{numeric} Length of the cylindrical strip.
\item \myem{numeric} Angular amplitude of half of the cylindrical strip.
\end{enumerate}
-\frame{\begin{figure}[bpt]
-\begin{center}
- \includegraphics[width=0.65\columnwidth]{bananadimmer.1}
-\end{center}
- \caption{Figure that uses \myem{banana}.}
-\end{figure}}
+\frame{
+ \begin{figure}[bpt]
+ \begin{center}
+ \includegraphics[width=65mm]{bananadimmer.1}
+ \end{center}
+ \caption{Figure that uses \myem{banana}.}
+ \end{figure}
+}
\item draw {\bfseries quartertorus()} Draws a part of a torus.
@@ -1629,12 +1689,14 @@ of the cylinders). \myem{bluepart}-wheel ray.
similar cutting plane (the norm of vector has no meaning).
\item \myem{numeric} Radius of cross-section circles.
\end{enumerate}
-\frame{\begin{figure}[bpt]
-\begin{center}
- \includegraphics[width=0.65\columnwidth]{quartertorus.2}
-\end{center}
- \caption{Figure that uses \myem{quartertorus}.}
-\end{figure}}
+\frame{
+ \begin{figure}[bpt]
+ \begin{center}
+ \includegraphics[width=65mm]{quartertorus.2}
+ \end{center}
+ \caption{Figure that uses \myem{quartertorus}.}
+ \end{figure}
+}
\end{itemize}
@@ -1868,15 +1930,15 @@ direction lines
\end{enumerate}
\end{itemize}
-\frame{\begin{figure}[bpt]
-\begin{center}
- \includegraphics[width=0.65\columnwidth]{twistflat.1}
-\end{center}
- \caption{Figure that uses \myem{director\_invisible}
- and \myem{generatedirline}.}
-\end{figure}}
-
-
+\frame{
+ \begin{figure}[bpt]
+ \begin{center}
+ \includegraphics[width=65mm]{twistflat.1}
+ \end{center}
+ \caption{Figure that uses \myem{director\_invisible}
+ and \myem{generatedirline}.}
+ \end{figure}
+}
\subsubsection{Surface Plots}
@@ -1907,12 +1969,14 @@ side.
returns the \myem{Z} coordinate of a surface
point of coordinates \myem{X} and \myem{Y}.
\end{enumerate}
-\frame{\begin{figure}[bpt]
-\begin{center}
- \includegraphics[width=0.65\columnwidth]{hexagonaltrimesh.1}
-\end{center}
- \caption{Figure that uses \myem{hexagonaltrimesh}.}
-\end{figure}}
+\frame{
+ \begin{figure}[bpt]
+ \begin{center}
+ \includegraphics[width=65mm]{hexagonaltrimesh.1}
+ \end{center}
+ \caption{Figure that uses \myem{hexagonaltrimesh}.}
+ \end{figure}
+}
\item global {\bfseries partrimesh()} Defines a parametric
surface that can be drawn with
\myem{draw\_invisible}. In the following descriptions
@@ -1998,13 +2062,16 @@ for each pair (\myem{S},\myem{T}).
\item \myem{numeric} Width or thickness of the rope.
\item \myem{numeric} Number of windings of each thread.
\end{enumerate}
- \frame{\begin{figure}[bpt]
- \begin{center}
- \includegraphics[width=0.65\columnwidth]{ropepatterns.1}
- \end{center}
- \caption{Figure that uses \myem{ropepattern}.}
- \label{ropes}
- \end{figure}}
+
+\frame{
+ \begin{figure}[bpt]
+ \begin{center}
+ \includegraphics[width=65mm]{ropepatterns.1}
+ \end{center}
+ \caption{Figure that uses \myem{ropepattern}.}
+ \label{ropes}
+ \end{figure}
+}
\item pair {\bfseries firsttangencypoint()} Returns the first point on
a path for which the segment connecting that point and another given
reference point is tangent to the path.
@@ -2039,6 +2106,27 @@ for each pair (\myem{S},\myem{T}).
\end{enumerate}
\end{itemize}
+\section{Missing documentation}
+\begin{verbatim}
+improvertex( expr VerA, DisA, VerB, DisB, VerC, DisC, IniV )
+
+ultraimprovertex( expr PlanPoi, PlanDir, BaseCenter, Radius, LenVec,
+ CentrPoi, NorthPoleVec, Ray, IniV )
+
+necplusimprovertex( expr PlanPoi, PlanDir,
+ CentrPoiA, NorthPoleVecA, RayA,
+ CentrPoiB, NorthPoleVecB, RayB, IniV )
+
+intersectprolatespheroid( expr CentrPoi, NorthPoleVec, Ray,
+ LinePoi, LineDir, IniV )
+
+ellipsoid( expr Centr, AxOne, AxTwo, AxThr )
+
+minimizestep( expr Abcisscolor )( text PlainFunc )
+\end{verbatim}
+
+
+
\mode<article>{\newpage}
\section{Reference-at-a-glance}
@@ -2049,7 +2137,7 @@ for each pair (\myem{S},\myem{T}).
\frametitle{\myem{tropicalglobe}( $N$, $\vec{c}$, $R$, $\vec{A}$ )}
\begin{center}
\includegraphics[width=65mm]{revolvers.1} \\
-
+
\myem{tropicalglobe( 5, black, 1, blue );}
\end{center}
}
@@ -2131,7 +2219,7 @@ for each pair (\myem{S},\myem{T}).
$\vec{B}_1$, $D$, $||\vec{S}_2||/||\vec{S}_1||$ )}
\begin{center}
\includegraphics[width=65mm]{ellipticprism.1} \\
-
+
\myem{whatisthis( black, 0.5red, green, 0.85, 0.8 );}
\end{center}
}