Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Nobody knows why birds bob their heads up and down when they walk, but one popular theory is that it gives them stereo vision. The rapid vertical movement may give them two slightly different perspectives nearly simultaneously, producing something known as motion parallax, letting them perceive depth.
Luckily for us, our eyes have overlapping vision, so we get parallax, and depth perception, without looking ridiculous. Parallax is the perceived difference in position of an object, when that object is viewed from a different line of sight, and is the reason that things far away appear to move more slowly than things that are close by.
Animators implement parallax effects by scrolling multiple layers of an animation at different speeds. For example, the application shown in Figure 5.10 has four layers, as you can see in Figure 5.11. In that animation, the sky and clouds are much further away from the observer than anything else, so the sky scrolls very slowly from right to left. The next closest objects in the animation are the small trees in the background. Those trees move considerably faster than the sky, but not quite as fast as the larger trees, which are even closer to the observer. Finally, the grass in the forefront of the animation scrolls more rapidly than any other objects in the animation.