动画包绘图问题

动画包绘图问题

我想使用 animate 包示例中的示例。但我无法成功运行它。我在包管理器中找不到 pst-ode 包。但我安装了它。

\documentclass{article}
\usepackage{multido}
\usepackage{pst-3dplot}
\usepackage{pst-ode}
\usepackage{animate}
\begin{document}
%Lorenz’ set of differential equations
\def\lorenz{%
10*(x[1]-x[0]) | %dx/dt
x[0]*(28-x[2]) - x[1] | %dy/dt
x[0]*x[1] - 8/3*x[2] %dz/dt
}%
%
%write timeline file
\newwrite\OutFile%
\immediate\openout\OutFile=lorenz.tln%
\multido{\iLorenz=0+1}{101}{%
\immediate\write\OutFile{::\iLorenz x0}%
}%
\immediate\write\OutFile{::c,101}%
\multido{\iLorenz=102+1}{89}{%
\immediate\write\OutFile{::\iLorenz}%
}%
\immediate\closeout\OutFile%
%
\psset{unit=0.155,linewidth=0.5pt}%
\begin{animateinline}[
timeline=lorenz.tln,
controls,poster=last,
begin={\begin{pspicture}(-39,-13)(39,60)},
end={\end{pspicture}}
]{10}
%coordinate axes
\psset{Alpha=120,Beta=20}%
\pstThreeDCoor[xMax=33,yMax=33,zMax=55,linecolor=black]%
\newframe
\pstODEsetOrRestoreState{10 10 30} %initial condition
\multiframe{100}{i=0+1,rtZero=0+0.25,rtOne=0.25+0.25}{%
\pstODEsaveState{savedState}%
%compute attractor segments, stored in ‘lorenzXYZseg’
\pstODEsolve[algebraic]{lorenzXYZseg}{0 1 2}{\rtZero}{\rtOne}{26}{savedState}%
{\lorenz}%
%compute the whole attractor, stored in ‘lorenzXYZall’, with the same stepping
\ifnum\i=0\relax%
\pstODEsolve[algebraic]{lorenzXYZall}{0 1 2}{\rtZero}{\rtOne}{26}{savedState}%
{\lorenz}%
\else%
\pstODEsolve[algebraic,append]{lorenzXYZall}{0 1 2}{\rtZero}{\rtOne}{26}%
{savedState}{\lorenz}%
\fi%
\listplotThreeD[plotstyle=line]{lorenzXYZseg}%
}%
\newframe% required between two \multiframe
\multiframe{90}{rAlpha=116+-4}{% fly-around
\psset{Alpha=\rAlpha,Beta=20}%
\pstThreeDCoor[xMax=33,yMax=33,zMax=55,linecolor=black]%
\listplotThreeD[plotstyle=line]{lorenzXYZall}%
}%
\end{animateinline}
\end{document}

代码也附在动画包.pdf中,图如下 洛伦兹
(来源:texwelt.de

如果您熟悉这个包,请给我一些帮助!非常感谢!!!

答案1

我猜你使用的 Debisan 发行版经常过时。下载 http://www.ctan.org/pkg/pst-ode

解压并将文件保存在 中~/texmf/tex/generic/pst-ode/,然后运行texhash(不需要 TEXMFHOME,但不会造成影响),该文件应该通过

kpsewhich pst-ode.tex

相关内容