I am trying to introduce a decay into the rate of animation of a graphics object by setting the AnimationRate in the Animator to a dynamic variable which is itself continually updated through a self-triggering dynamic until it reaches a threshold value. While this variable behaves as expected, the animator does not: as you can see by the behavior of the animator's slider, it jumps all over the place and does not exhibit the gradual slowdown in the rate of scrolling that I was expecting.

Dynamic[spinspeed = Max[0.5, spinspeed - 0.005]]
Slider[Dynamic[spinspeed], {0, 6}]
Animator[u, {0, \[Pi]}, AnimationRate -> Dynamic[spinspeed]]

Any suggestions on how to achieve the desired smooth autodecay?



Your Answer

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

Browse other questions tagged or ask your own question.