diff options
Diffstat (limited to 'Master/texmf/doc/asymptote/examples/animations/inlinemovie.tex')
-rw-r--r-- | Master/texmf/doc/asymptote/examples/animations/inlinemovie.tex | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/Master/texmf/doc/asymptote/examples/animations/inlinemovie.tex b/Master/texmf/doc/asymptote/examples/animations/inlinemovie.tex new file mode 100644 index 00000000000..3fa61b6673b --- /dev/null +++ b/Master/texmf/doc/asymptote/examples/animations/inlinemovie.tex @@ -0,0 +1,51 @@ +\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 +pdflatex 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,loop]{20}{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,loop]{10}{movie2}{}{} +\end{center} + +\end{document} |