# How to Export this animation as a gif file for powerpoint presentation

Animate[
Manipulate[
ParametricPlot[
Evaluate[{x[t], v[t]} /.
Quiet@NDSolve[
{x'[t] == v[t],
v'[t] == μ (1 - x[t]^2) v[t] - x[t] + A*Cos[ω*t],
x[0] == xv0[[1]],
v[0] == xv0[[2]]},
{x[t], v[t]},
{t, 0, tt}]],
{t, 0, tt},
ImageSize -> {450, 450}, PlotRange -> 4,
PlotStyle -> PointSize[.5]],
{{μ, 0.75, "parameter μ"}, 0, 3, 0.01,
Appearance -> "Labeled"},
{{ω, 0.75, "parameter ω"}, 0, 3, 0.01,
Appearance -> "Labeled"},
{{A, 0.75, "parameter A"}, 0, 3, 0.01, Appearance -> "Labeled"},
{{xv0, {1, 1}}, {-4, -4}, {4, 4}, Locator}], {tt, 0, 200},
AnimationRate -> 3, AnimationRepetitions -> 3,
AnimationRunning -> True]

-
Not to answer your question (which you yourself should be able to work out with the online help of Export etc.), but I moved from GIF to MOV which works nicely as described here: mathematica.stackexchange.com/a/4236/131. The quicktime movies have true color and integrate nicely into Powerpoint. –  Yves Klett Jun 18 '13 at 14:32
Yves Klett The thing is, is that I have been working on this for awhile but the only thing it produces is a picture. Nothing moves. –  Slightly Jun 18 '13 at 14:35
Second argument of Export should be list of pictures. It is written in help. –  Kuba Jun 18 '13 at 14:46
Nothing is working. I don't know what I'm doing wrong! –  Slightly Jun 18 '13 at 14:56
This seems not a duplicate but there is an answer: mathematica.stackexchange.com/q/4727/5478 –  Kuba Jun 18 '13 at 15:46

You have to set values which are dynamic in Manipulate.

μ = .75; ω = .75; A = .075; xv0 = {1, 1};


Table pictures for different tt:

sol = Quiet@NDSolve[{x'[t] == v[t], v'[t] == μ (1 - x[t]^2) v[t] - x[t] + A*Cos[ω*t],
x[0] == xv0[[1]], v[0] == xv0[[2]]
}, {x[t], v[t]}, {t, 0, 20}];

dat = Table[
ParametricPlot[Evaluate[{x[t], v[t]} /. sol, {t, 0, tt},
PlotRange -> 4, AxesLabel -> {x[t], v[t]}]
, {tt, .1, 20, .2}];


Create gif.

SetDirectory@NotebookDirectory[]
Export["gif.gif", dat]


-

You can adjust the step size by changing the increment in the Table and you can adjust the animation rate using "DisplayDurations", e.g. for the Table above.

Export["dat.gif",dat, "DisplayDurations"->Table[t,{Length[dat]}]]


where t is display duration in seconds (frame rate: 1/t). Other options for exporting are in the GIF documentation

-

I did not take a deep look at your code,but since you are using animate command,I suppose that your code is producing an animation which you can export it as movie into your powerpoint slides.

Export["test.avi",%]


which produces an .avi movie in your document folder.

-