Making animations with Mathematica [duplicate]

This question already has an answer here:

How to include Mathematica animation in a PowerPoint presentation?

2 answers

I want to export an animation for polar plot r=cos2θr=cos2θr=\cos 2\theta, instead of directly using Animate. But I want a table of snapshots: movie = ParallelTable[…] and a point that produce its animations like to this question. Then export it to my favorite animated graphics format, e.g.: Export[“rose,gif”, movie]. How can I do it?

I want a gif like this, merely with red point and without the circle and blue line of course for r=cos2θr=cos2θr=\cos 2\theta.

=================

=================

1 Answer
1

=================

Using ManToGif by Vitaliy Kaurov

ManToGif[man_, name_String, step_Integer] :=
Export[name <> “.gif”,
Import[Export[name <> Which[$OperatingSystem == “MacOSX”, “.mov”,
$OperatingSystem == “Windows”, “.avi”], man],
“ImageList”][[1 ;; -1 ;; step]]];

Now write

SetDirectory[NotebookDirectory[]];
r = 1;
backgroundAxes = Plot[0, {x, -Pi, 5 Pi},
PlotRange -> {Automatic, {-r/2, 2 r + .5}}, AspectRatio -> Automatic,
Axes -> {True, False}, Ticks -> {Range[0, 4 Pi, Pi], None}];
t = Animate[Show[{backgroundAxes,
ListPlot[Table[{x – Sin[x], 1 – Cos[x]}, {x, 0, t, .1}], Joined -> True],
Graphics[{PointSize[Large], Red, Point[{t – Sin[t], 1 – Cos[t]}]}],
Graphics[Circle[{t, 1}, r]]}], {t, 0, 4 Pi}
];
ManToGif[t, “my_animation”, 1]

Load it into the browser to play:

  

 

Thanks @Nasser. Please look at My new edition of question.
– Nimbigli
Nov 30 ’14 at 20:12

  

 

@bigli Updated for your new version
– Nasser
Nov 30 ’14 at 20:13

  

 

A gif for polar plot r=cos2θr=\cos 2 \theta like your update.
– Nimbigli
Nov 30 ’14 at 20:19