For those who need non Beamer version, see the following.
LaTeX Input File:
In this illustration I use PSTricks.
% travelingwave.tex
\documentclass{minimal}
\usepackage{pstricks-add,multido}
\newcommand\Left{0}
\newcommand\Bottom{-0.9}
\newcommand\Right{3.14}
\newcommand\Top{0.9}
\parindent=0pt
\paperwidth=\dimexpr\Right cm\relax
\paperheight=\dimexpr\Top cm - \Bottom cm\relax
\special{papersize=\the\paperwidth,\the\paperheight}
\topmargin=-72.27pt
\oddsidemargin=-72.27pt
\pagecolor{black}
\begin{document}
\multido{\r=0+7.5}{48}
{
\begin{pspicture*}(\Left,\Bottom)(\Right,\Top)
\psplot[plotpoints=300,algebraic,linecolor=yellow]{\Left}{\Right}{0.9*sin(2*(x-\r*Pi/360))}
\end{pspicture*}\newpage
}
\end{document}
Batch File:
rem compile.bat takes a LaTeX input file without extension.
echo off
latex %1
dvips -t unknown %1
gswin32c -dAutoRotatePages=/None -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=%1.pdf %1.ps
convert -verbose -delay 25 -loop 0 -density 300 %1.pdf %1.gif
rem acrord32 %1.pdf
del %1.log
del %1.aux
del %1.dvi
del %1.ps
For the sake of simplicity, save both travelingwave.tex
and compile.bat
in the same directory. To compile, type compile travelingwave
in DOS-command, and hit enter. Done!
Result:
Notes:
- See ImageMagick v6 Examples -- Animation Basics for the detailed description about
convert
's switches.
- If
\pagecolor{<any-color-including-white>}
is disabled, we will get an effect as follows.
- ImageMagick's
convert
invokes GhostScript gswin32c.exe
behind the scene as follows.