3
$\begingroup$

I had an Animate environment with a continuous variable, but switched to Manipulate because I also wanted some user interaction while keeping the animation. In Animate I could specify AnimationRunning->False, but I can't figure out how to do that with Manipulate. The AnimationRunning option isn't allowed, and other things like AutoAction->False don't seem to work.

Here is my code:

Manipulate[
 Show[ContourPlot[x^2 + y^2 == 4, {x, -2, 2}, {y, -2, 2}, 
   Frame -> False, PerformanceGoal -> "Quality"], Graphics[{
    EdgeForm[Thin], Gray, Opacity[.2], Disk[{Sin[t], Cos[t]}, rad],
    Black, Opacity[1], Disk[{Sin[t], Cos[t]}, 0.01]}]],
 {t, RandomReal[500], Infinity}, {rad, .01, 1}]

In this case, since I have a nice periodic function, I know I don't have to use the Infinity endpoint, but my actual problem involves many functions of many different periods and I would like to keep the t parameter going without repeats. Here's a snapshot:

enter image description here

When I press Shift+Enter the point starts moving immediately, and I would like it to not move until I click the play button. So:

How can I keep a continuous animation in Manipulate from executing when the whole cell is executed?

$\endgroup$
1
$\begingroup$

You need to set this option for the Animator controller used for t:

... {t, RandomReal[500], Infinity, AnimationRunning -> False} ...
$\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.