4
$\begingroup$

I find that the Export of Manipuate contains backforward play, see a simplified example:

Export["try.swf", 
 Manipulate[
  Plot[Sin[2 x + φ], {x, 0, 10}], {φ, 0, 2 π}]]

You can see the problem in the SWF file.

Is there any simple way to get a animation with only forward play?

Note that the problem in the the Export command. Indeed, Manipulate does the job (no need to specify AnimationDirection -> Forward).

$\endgroup$
3
  • $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$
    – Michael E2
    Commented Apr 29, 2015 at 19:26
  • $\begingroup$ You can format inline code and code blocks by selecting it and clicking the {} button above the edit window. The edit window help button ? is also useful for learning how to format your questions and answers. $\endgroup$
    – Michael E2
    Commented Apr 29, 2015 at 19:26
  • $\begingroup$ My answer here can be adapted, too: mathematica.stackexchange.com/a/71761 (Just replace the DeleteDuplicate[..] in autolist for the Manipulator with {min, max}. $\endgroup$
    – Michael E2
    Commented Apr 29, 2015 at 20:58

1 Answer 1

8
$\begingroup$

The easiest way (I think) is to set bookmarks. Then Export will interpolate between them.

Export["try.swf",
 Manipulate[
  Plot[Sin[2*x + φ], {x, 0, 10}],
  {{φ, 5.2308285471612335}, 0, 2*Pi},
   Bookmarks -> 
   {"start" :> {φ = 0.}, 
    "stop" :> {φ = 2. Pi}}]]

enter image description here

$\endgroup$
2
  • $\begingroup$ Tanks a lot @Michael E2! That's amazing ;-) $\endgroup$
    – Tatayoyo
    Commented Apr 29, 2015 at 21:14
  • 1
    $\begingroup$ I'm sure many people would like this answer, but they can't necessarily retrieve it here $\endgroup$
    – yode
    Commented Feb 15, 2022 at 5:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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