开发者

How to generate animated GIF of a Manipulate? 8.0.1

Exporting to animated gif seems to have changed in Mathematica 8.0.1?

I normally make animated GIFs of a manipulate by simply writing:

v=Manipulate[....]

then Export["foo.gif",v];

But now it does not work. I just get one static image.

Here is an example:

v=Manipulate[
Text[t],
{{t,4,"start"},0,10,1,ControlType->Trigger,AnimationRate->1,AnimationRepetitions->10}
]

Now Export["foo.gif",v] just generate static image, as nothing was running.

But Export["foo.avi",v] works, and it does generate a running avi movie.

Also, there used to be animated GIF options I used before, but now there are not supported:

Export["foo.gif",v,ConversionOptions->{"AnimationDisplayTime"->0.5,"Loop"->True},ImageSize->{500,500}]

Export::convoptobs: ConversionOptions is obsolete. 

When I go to help, I do not see options for GIF there. How does one control anima开发者_如何转开发tion delay and such?

I thought someone here might have an idea.

thanks --Nasser


You can export a Table to an animated GIF.

v = Table[Panel[Text[t]], {t, 0, 10, 1}];
Export["anim.gif", v, "DisplayDurations" -> 0.5]

If you absolutely want the animation to look like a Manipulate, you could do something like so.

v = Table[Manipulate[Text[t], 
    {{t, Mod[k, 10], "start"}, 0, 10, 1, ControlType -> Trigger}],
  {k, 4, 14}];
Export["Manip.gif", v, "DisplayDurations" -> 0.5]


You can use v = Animate[ Text[t], {{t, 4, "start"}, 0, 10, 1, ControlType -> Trigger, AnimationRate -> 1, AnimationRepetitions -> 10}]

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜