The code in this screenshot does a reasonable job of rotating it as it moves horizontally. If we had another image of the ball - with white in the center, rotation during vertical movement would look better.