Animates a square moving sinusoidally across the screen, with its size being contingent on its screen position.