I'm trying to make an animation of a rotating wheel to show the effect of aliasing in sampled systems. Here is my code, where I use Manipulate
to adjust independently both AnimationRate
and RefreshRate
:
wheel = GraphicsGroup[{{Red, Thickness[0.01],
Line[{{0, 0}, {1, 0}}]}, {Thickness[0.01],
Circle[{0, 0}, 1], {Red, Disk[{0, 0}, 0.05]}}}];
Manipulate[
Animate[Graphics[Rotate[wheel, angle]], {angle, 0, 2 Pi},
AnimationRate -> f, RefreshRate -> fs,
AnimationRunning -> False], {f, 0.1, 100}, {{fs, 10}, 0.01, 10}]
The issue is that the two frequencies are out of sync, even at very low refresh and animation frequencies, and where I expect, e.g., a fixed wheel because I set f=fs
, I get instead a slowly rotating wheel.
Probably and understandably, the real refresh rate is internally quantized to a certain set of values which rarely coincide with the arbitrary settings obtained through Manipulate
.
My question is therefore the following: Are there any preferred values for RefreshRate
that I can use to obtain a nice animation? Or is there any other workaround?
Update
I've thought a bit more about the issue and if I understand correctly the operation of Animate
, the image should be ideally stationary whenever I set f=fs
, even if they're different from 1.
I've done a few tests with two different computers, and it appears that the issue is computer dependent even at very low animation and refresh rates, below 1. The original test was carried out on a laptop with an i3 processor (4 cores, Windows OS); then, I've done another test with an i7 processor (8 cores, Linux OS) and it gives better results.
I wouldn't have expected such large differences between the two computers at such low refresh rates as a few frame per second or less, but that's it. I suspect that there's no solution.