0
$\begingroup$

I am using the CurveGraphics6 NB to try and do some 3D related phase portraits and graphics.

The following works and produces an animation.

pic = NDSolve[( {
   {x'[t] == 2 y[t] (z[t] + 1)},
   {y'[t] == -x[t] (z[t] + 1)},
   {z'[t] == -(z[t])^3},
   {x[0] == z[0] == 0},
   {y[0] == 1}} ), 
   {x, y, z}, {t, -9, 9}, Animate -> True, PlotPoints -> 600, 
 ImageSize -> 300, HeadLength3D -> 1/30, DefaultDuration -> 40] // Last

I then attempt:

  Export["temp.gif", pic]

It exports the gif, but not the animation. What am I doing wrong?

I also welcome if anyone has ideas on how to better show this in 3D.

I do not see how to use the nice 3D Phase Portrait on the system above and maybe someone will be kind enough to provide guidance (as that is what I was really after).

$\endgroup$
  • 1
    $\begingroup$ Is there an animation? I don't see anything moving... In any case, that's probably unrelated to your question. In order to export an animation as gif, you should export a list of frames, not a single dynamic image. $\endgroup$ – rm -rf Mar 8 '14 at 22:17
  • $\begingroup$ But wouldn't it be really nice if Mathematica did allow direct export of a Manipulate or Animate to an animated gif, at least if it had a single control variable that varied discretely? $\endgroup$ – murray Mar 8 '14 at 23:11
  • $\begingroup$ @rm-rf: You should see a point circling around the portrait. Thanks for the input. $\endgroup$ – Amzoti Mar 8 '14 at 23:15
  • $\begingroup$ @murray: Agreed. It would be great to have export what you see. If is has an animation or even variable parameters, and a single export to gif could capture it. Regards $\endgroup$ – Amzoti Mar 8 '14 at 23:16
  • $\begingroup$ Ah yes, you're right. Sorry about that :) $\endgroup$ – rm -rf Mar 8 '14 at 23:33
1
$\begingroup$

You can't export this in the same way you might a Mathematica animation - the "animation" you see is a Dynamic object, updated via Clock. This is why the documentation for the package says you need Mathematica to use the new features, Player to just see them in action.

If you want to generate an animated GIF, you'll need to parse out the various objects in the generated "animation", and turn them into a list of the base plot and the "animated" point, which you can then use to export to a GIF.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.