3
$\begingroup$

I would like to export in .swf a "Manipulation" output. I am using

 Export["Pi.swf", Manipulate[SeedRandom[n];
  data = RandomReal[{-1, 1}, {m, 2}];
  insidepts = Cases[data, {x_, y_} /; x^2 + y^2 < 1];
  inside = Length[insidepts];
  Text@Style[
    Column[{Graphics[{PointSize[0.0001], Red, Disk[{0, 0}, 1], Blue, 
        GeometricTransformation[
         Line[{{Offset[{-2, 2}, {0, 0}], 
            Offset[{2, -2}, {0, 0}]}, {Offset[{-2, -2}, {0, 0}], 
            Offset[{2, 2}, {0, 0}]}}], Dynamic[data]]}, 
       ImageSize -> If[format, 500, 350]], 
      Row[{"inside: ", inside, "\toutside: ", m - inside, "\ttotal: ",
         m}], Row[{"π=4 x ", inside, "/", m, " = ", 4. inside/m}]}], 
    "Label"], {{n, 1, "random seed"}, 1, 1000, 1, 
   Appearance -> "Labeled"}, {{m, 1, "sample size"}, 1, 5000, 1, 
   Appearance -> "Labeled"}, {{format, False, "large format"}, {True, 
    False}}, AutorunSequencing -> {1, 2}]]   

I think it is too fast... Is there a way to modify speed?

$\endgroup$
0

2 Answers 2

2
$\begingroup$

As stated in the Mathematica help on AutorunSequencing, a solution would be to set AutorunSequencing -> {{1, x1}, {2, x2}} as an option in your Manipulate, where x1 and x2 are numbers indicating how long in seconds the sequence is to run.

$\endgroup$
6
$\begingroup$

The reference page for "SWF" indicates that there is a "FrameRate" option. Larger values of "FrameRate" takes longer to generate and creates a larger file, but should make the animation run more slowly.

$\endgroup$
1
  • 1
    $\begingroup$ Thank you very much for your answer. The thing is that I tried that, first thing but I cannot see any difference no matter what speed I choose. The syntax I am using is Export["Pi.swf",Manipulate[...],"FrameRate"->5]. $\endgroup$
    – Thanos
    Dec 12, 2012 at 8:53

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