summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/animate/animate.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/animate/animate.tex')
-rw-r--r--Master/texmf-dist/doc/latex/animate/animate.tex19
1 files changed, 8 insertions, 11 deletions
diff --git a/Master/texmf-dist/doc/latex/animate/animate.tex b/Master/texmf-dist/doc/latex/animate/animate.tex
index c54be2180b6..15e149c9e94 100644
--- a/Master/texmf-dist/doc/latex/animate/animate.tex
+++ b/Master/texmf-dist/doc/latex/animate/animate.tex
@@ -336,7 +336,7 @@ Figures~\ref{fig:taylor} and \ref{fig:lorenz} in Section~\ref{sect:examples} are
\myparagraph*{Grouping objects into layers (= sub-stacks) using `{\tt;}'}
Due to the stack-like nature of the animation, the position of a transparency specification in the timeline file determines its \emph{depth} level in relation to other transparencies. The timeline file is processed line by line and from left to right. In a single-stack animation, the stack is strictly built from the bottom up, such that earlier transparencies are overprinted by more recent ones. This may turn out to be inconvenient in certain situations. For example, it might be desirable to allow for changing the background image in the middle of an animation without affecting objects that are located in the foreground. For this purpose, transparency specifications can be grouped into layers or sub-stacks using the semicolon (\verb+;+) as a separator. New transparencies can now be put on top of the individual sub-stacks. After a line of the timeline file has been processed, the global stack is built by placing the sub-stacks one on top of the other. Again, the left-to-right rule applies when determining the height of the sub-stacks in relation to each other within the global stack.
-The layer concept is best illustrated by an example. In the timeline of Table~\ref{tab:multi}, transparencies are grouped into two sub-stacks only. One is reserved for the background images, transparencies No. 0 \& 1, to be exchanged in frame No. 3, as well as for two other transparencies, No. 7 \& 8, to be interspersed in frame No. 1. Another sub-stack takes the foreground objects that are successively added to the scene. The dotted lines in the table just mark the border between the two sub-stacks. In frame No. 3, `\verb+c+' first clears the bottom sub-stack before the new background image is inserted. (Instead, `\verb+x3+' could have been used with transparency No. 0 in frame No. 0.) As can be seen in the specifications of frames No. 2 \& 4, sub-stacks need not be explicitly populated; the leading semicolons just ensure the proper assignment of transparencies to animation sub-stacks.
+The layer concept is best illustrated by an example. In the timeline of Table~\ref{tab:multi}, transparencies are grouped into two sub-stacks only. One is reserved for the background images, transparencies No. 0 \& 1, to be exchanged in frame No. 3, as well as for two other transparencies, No. 7 \& 8, to be interspersed in frame No. 1. Another sub-stack takes the foreground objects that are successively added to the scene. The dotted lines in the third column of the table just mark the border between the two sub-stacks. In frame No. 3, `\verb+c+' first clears the bottom sub-stack before the new background image is inserted. (Instead, `\verb+x3+' could have been used with transparency No. 0 in frame No. 0.) As can be seen in the specifications of frames No. 2 \& 4, sub-stacks need not be explicitly populated; the leading semicolons just ensure the proper assignment of transparencies to animation sub-stacks.
\begin{table}[ht]\centering
\caption{Timeline example with two sub-stacks}\label{tab:multi}
@@ -387,7 +387,7 @@ Also, `animate' finds and warns about transparencies that have never been used i
\section{Examples}
\subsection[Animations from sets of files, using `animategraphics' command]{Animations from sets of files, using {\tt \string\animategraphics} command}\label{sect:examples}
-Animations in this section are made from graphics files that were prepared with \MP. Run `\verb+mpost --tex=latex+' on the files ending in `.mp' in the `doc/files' directory to generate the graphics files. Both examples make use of the `\verb+timeline+' option to reduce the resulting PDF file size.
+Animations in this section are made from graphics files that were prepared with \MP. Run `\verb+mpost --tex=latex+' on the files ending in `.mp' in the `files' directory to generate the graphics files. Both examples make use of the `\verb+timeline+' option to reduce the resulting PDF file size.
The first example, Fig.~\ref{fig:taylor}, originally written by Jan Hole\v{c}ek~\cite{hol}, shows the exponential function $y=e^x$ and its approximation by Taylor polynomials of different degree.
@@ -625,8 +625,7 @@ A timeline file, written on-the-fly, is used to assemble the curve segments fram
/xlength1 xlength 1 add def % number of equations plus 1
/ODESET { cvx exec #8 xlength array astore } def %system of ODEs
/addvect { % [1 2 3] [4 5 6] addvect => [5 7 9]
- cvx exec xlength1 -1 roll
- {xlength1 -1 roll add} forall
+ cvx exec xlength1 -1 roll {xlength1 -1 roll add} forall
xlength array astore
} def
/mulvect { % [1 2 3] 4 mulvect => [4 8 12]
@@ -679,8 +678,7 @@ A timeline file, written on-the-fly, is used to assemble the curve segments fram
%write timeline file
\newwrite\OutFile%
\immediate\openout\OutFile=lorenz.tln%
-\immediate\write\OutFile{::0x0}%
-\multido{\iLorenz=1+1}{100}{%
+\multido{\iLorenz=0+1}{101}{%
\immediate\write\OutFile{::\iLorenz x0}%
}%
\immediate\write\OutFile{::c,101}%
@@ -780,8 +778,7 @@ A timeline file, written on-the-fly, is used to assemble the curve segments fram
/xlength1 xlength 1 add def % number of equations plus 1
/ODESET { cvx exec #8 xlength array astore } def %system of ODEs
/addvect { % [1 2 3] [4 5 6] addvect => [5 7 9]
- cvx exec xlength1 -1 roll
- {xlength1 -1 roll add} forall
+ cvx exec xlength1 -1 roll {xlength1 -1 roll add} forall
xlength array astore
} def
/mulvect { % [1 2 3] 4 mulvect => [4 8 12]
@@ -837,8 +834,7 @@ A timeline file, written on-the-fly, is used to assemble the curve segments fram
%write timeline file
\newwrite\OutFile%
\immediate\openout\OutFile=lorenz.tln%
-\immediate\write\OutFile{::0x0}%
-\multido{\iLorenz=1+1}{100}{%
+\multido{\iLorenz=0+1}{101}{%
\immediate\write\OutFile{::\iLorenz x0}%
}%
\immediate\write\OutFile{::c,101}%
@@ -847,8 +843,8 @@ A timeline file, written on-the-fly, is used to assemble the curve segments fram
}%
\immediate\closeout\OutFile%
%
+\begin{center}
\psset{unit=0.155,linewidth=0.5pt}%
-\noindent%
\begin{animateinline}[
timeline=lorenz.tln,
controls,poster=last,
@@ -875,6 +871,7 @@ A timeline file, written on-the-fly, is used to assemble the curve segments fram
plotstyle=line,xPlotpoints=2501](0,0){infile 80 string readline pop cvx exec}%
}%
\end{animateinline}
+\end{center}
\end{document}
\end{verbatim}