1
我正在對八個行星的重力場進行建模並嘗試將生成的ContourPlot導出爲.avi文件。問題在於.avi會向前和向後播放動畫,即使我明確告訴Animate即AnimationDirection-> Forward。任何人都知道解決方案這裏是有問題的代碼片段:Mathematica導出爲avi向前播放,然後向後
gfield = Animate[
ContourPlot[
Sqrt[Fgravplanets[x, y, t][[1]]^2 + Fgravplanets[x, y, t][[2]]^2],
{x, -1.5 rp["Neptune"], 1.5 rp["Neptune"]}, {y, -1.5 rp["Neptune"],
1.5 rp["Neptune"]},
PlotRange -> {0, 10},
Mesh -> None,
ImageSize -> Medium,
AxesLabel -> {"x", "y", "Fgrav"},
ColorFunction -> Hue,
PlotPoints -> 20,
Contours -> 20
],
{t, 0, 365*24*3600*10, 365*24*3600/10},
AnimationDirection -> Forward,
AnimationRate -> 365*24*3600/5
]
Export["gfield.avi", gfield]
完美的作品......非常感謝! – user1748343