MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Creating animated 3d graphic in Mathematica for export

  • To: mathgroup at smc.vnet.net
  • Subject: [mg93415] Re: Creating animated 3d graphic in Mathematica for export
  • From: Nikolaus Rath <Nikolaus at rath.org>
  • Date: Fri, 7 Nov 2008 05:59:42 -0500 (EST)
  • References: <geuc05$fdj$1@smc.vnet.net>

"Coleman, Mark" <Mark.Coleman at LibertyMutual.com> writes:
> 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?

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


  • Prev by Date: Re: Creating animated 3d graphic in Mathematica for export
  • Next by Date: RE: Re: using the output from a notebook in another notebook
  • Previous by thread: Re: Creating animated 3d graphic in Mathematica for export
  • Next by thread: Re: Creating animated 3d graphic in Mathematica for export