我正在对八颗行星的重力场进行建模,并尝试将生成的 ContourPlot 导出为 .avi 文件。问题是 .avi 会向前和向后播放动画,即使我明确告诉 Animate AnimationDirection->Forward。有人知道任何解决方案吗?这是有问题的代码:
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]