summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/asymptote/examples/animations/inlinemovie.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/asymptote/examples/animations/inlinemovie.tex')
-rw-r--r--Master/texmf-dist/doc/asymptote/examples/animations/inlinemovie.tex55
1 files changed, 55 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/asymptote/examples/animations/inlinemovie.tex b/Master/texmf-dist/doc/asymptote/examples/animations/inlinemovie.tex
new file mode 100644
index 00000000000..5f1eff9d4bb
--- /dev/null
+++ b/Master/texmf-dist/doc/asymptote/examples/animations/inlinemovie.tex
@@ -0,0 +1,55 @@
+\documentclass{article}
+\usepackage[inline]{asymptote}
+%\usepackage{asymptote}
+\usepackage{animate}
+\begin{document}
+
+Here is an inline PDF movie, generated with the commands
+\begin{verbatim}
+pdflatex inlinemovie
+asy inlinemovie-*.asy
+pdflatex inlinemovie
+\end{verbatim}
+or equivalently,
+\begin{verbatim}
+latexmk -pdf inlinemovie
+\end{verbatim}
+
+\begin{center}
+\begin{asy}
+import animate;
+animation A=animation("movie1");
+real h=2pi/10;
+
+picture pic;
+unitsize(pic,2cm);
+for(int i=0; i < 10; ++i) {
+ draw(pic,expi(i*h)--expi((i+1)*h));
+ A.add(pic);
+}
+label(A.pdf("controls",delay=50,keep=!settings.inlinetex));
+\end{asy}
+%Uncomment the following line when not using the [inline] package option:
+%\ASYanimategraphics[controls]{50}{movie1}{}{}
+\end{center}
+
+And here is another one, clickable but without the control panel:
+\begin{center}
+\begin{asy}
+import animate;
+animation A=animation("movie2");
+real h=2pi/10;
+
+picture pic;
+unitsize(pic,2cm);
+for(int i=0; i < 10; ++i) {
+ draw(pic,expi(-i*h)--expi(-(i+1)*h),red);
+ A.add(pic);
+}
+label(A.pdf(keep=!settings.inlinetex));
+\end{asy}
+%Uncomment the following line when not using the [inline] package option:
+%\ASYanimategraphics[controls]{10}{movie2}{}{}
+\end{center}
+
+\end{document}