I'm attempting to create a simple animation of a 3D ListPlot. In the
animation I'd like to simply rotate the graphic continuously and
automatically (no user input), and then export this animation into a
common video format (MPEG or Quicktime). Does anyone have an example of
this?
Thanks,
Mark
I usually export pictures and encode them with a separate encoder.
With mencoder, this works like this:
fps = 15;
length = 5;
Export["mathematica-plot-"
<> ToString[NumberForm[#, 3, NumberPadding -> {"0", "0"}] ]
<> ".jpg",
Plot[f[t/fps, x], {x, 0, 10}],
ImageResolution -> 100] & /@ Range[0, length fps];
Run["mencoder \"mf://mathematica-plot-*.jpg\" -mf fps=" <> ToString[fps=
] <>
" -o mathematica.avi -ovc lavc -lavcopts vcodec=mpeg4"];
This generates a movie of the time evolution of f[t,x] from t=0 to t==
5
with a framerate of 15 frames per second. You should be able to adapt
this for a 3D ListPlot easily.
HTH,
-Nikolaus
--
=C2=BBIt is not worth an intelligent man's time to be in the majority.
By definition, there are already enough people to do that.=C2=AB
-J.H. Hardy
PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
> I'm attempting to create a simple animation of a 3D ListPlot. In the
> animation I'd like to simply rotate the graphic continuously and
> automatically (no user input), and then export this animation into a
> common video format (MPEG or Quicktime). Does anyone have an
> example of
> this?
See <http://clem.mscd.edu/~talmanl/MathAnim.html>.
In past versions of Mathematica, I've found that the QT export
facility was unsatisfactory. I construct animations by writing
serially named .gifs or .pngs to a convenient directory and then
using either QuickTime itself, or, better, Thorsten Lemke's Graphic
Converter (Macintosh software) to paste those graphics files together
into a QuickTime movie.
--Lou Talman
Department of Mathematical and Computer Sciences
Metropolitan State College of Denver
Going to 3D ListPlot should be straightforward.
(* This is a z=z(x,y) function to show *)
z[x_, y_] :=
Exp[-(Sqrt[x^2 + y^2]/Power[4, (3)^-1]) +
Power[4, (3)^-1]*Sqrt[1/2*(Sqrt[x^2 + y^2] + x)]];
(*and its graph*)
pl1 = Plot3D[2*z[x, y], {x, -5, 5}, {y, -5, 5},
PlotStyle -> {Opacity[0.8]}, ColorFunction -> "Rainbow",
Mesh -> None, Boxed -> False, ImageSize -> 500];
(* here a graphics array is made. In this place one may play with the
rotation angle (here it is 4 degrees) and choose the axis of rotation in
the expression Rotate[pl1[[1]], 4*i*Degree, {0, 0, 1}] *)
Do[gr[i_] :=
Graphics3D[
Rotate[pl1[[1]], 4*i*Degree, {0, 0, 1}],
PlotRange -> {{-5, 5}, {-5, 5}, {0, 6}}, Boxed -> False ],
{i, 0, 1440, 1}
];
(* and a table entitled "v" out of it (of coarse may be also done in one
step), the parameter to play in this place is the number of steps, which
is 90=360/4 here *)
v = Table[gr[i], {i, 0, 90, 1}];
(*Here it is exported into an avi file. The parameter to play with is
the frame rate*)
Export[""Full_trajectory_to_the_file\v.avi", v, "FrameRate" -> 5]
Have fun :-) , Alexei
Greetings,
I'm attempting to create a simple animation of a 3D ListPlot. In the
animation I'd like to simply rotate the graphic continuously and
automatically (no user input), and then export this animation into a
common video format (MPEG or Quicktime). Does anyone have an example of
this?
Thanks,
Mark
--
Alexei Boulbitch, Dr., Habil.
Senior Scientist
IEE S.A.
ZAE Weiergewan
11, rue Edmond Reuter
L-5326 Contern
Luxembourg
Phone: +352 2454 2566
Fax: +352 2454 3566
Website: www.iee.lu
This e-mail may contain trade secrets or privileged, undisclosed or otherwise confidential information. If you are not the intended recipient and have received this e-mail in error, you are hereby notified that any review, copying or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal from your system. Thank you for your co-operation.