I tried to introduce an decay to the rotation of an object in mathematica by tying the animation rate to the degree of rotation as in the picture below and it goes quite smoothly until it reaches a little more than half then it starts spinning uncontrollably the animation rate becomes random. Does anyone know the cause of this bug and how to fix it? And if you know a way to make the animation rate decays please tell me how to do it too thanks.
EDIT: My code is
Animate[Graphics[Rotate[Rectangle[], x Degree]], {x, 0, 360},DefaultDuration -> 360/(360 - x)]
Animate[Graphics[Rotate[Rectangle[], x Degree]], {x, 0, 360}, AnimationRate -> 360 - x]
AnimationRate
? $\endgroup$Animate[Plot[{Sin[x], Cos[x], t Sin[x] + (1 - t) Cos[x]}, {x, 0, 10}], {t, 0, 1}, AnimationRate -> 360, AnimationRunning -> True]
works well. $\endgroup$DefaultDuration
within the animation. AddingDefaultDuration -> 1/(1 - t)
to the final example in theAnimate
documentation produces the same problem. Because the documentation does not warn about this, I view the problem as a bug. $\endgroup$Animate[Graphics[Rotate[Rectangle[], x Degree]], {x, 0, 90}, DefaultDuration -> 360/(360 - x)]
also produces the same problem. $\endgroup$