Java 7 for Absolute Beginners

(nextflipdebug5) #1

C H A P T E R 1 0


185

Animation


Animation involves an image that changes over time. It's interesting (to us, anyway, but we love
etymology) that animation outside of computer science means “bestowing of life.” Animated images
certainly seem to have more life than still images.


Timing Is Everything


The essence of animation is timing. An animated image changes every so often. Usually, that's very often
(many times a second), but an image that changes once a minute (such as a clock) is still animated,
though it might not be much fun to watch. To give you an idea of how often an animated image can
change, let's look at some common animation speeds that most of us see every day, usually without even
thinking of them as being animated images.
A standard TV signal (STV, the predecessor to HDTV) shows a new image (approximately) 30 times a
second. That is, an STV signal has a frame rate of 30 per second. Frame rate is a key term in animation, in
computing in general, and in other industries. You've seen what it means in animation. For computing
in general, “frame rate” refers to how often a program processes all of its inputs and produces all of its
outputs. The classic example is software that steers a vehicle. If the vehicle is a freighter at sea, a low
frame rate (such as once a minute) might suffice. For an automated lander (for the moon or Mars), a
frame rate approaching 100 times per second might be necessary. Such a system is said to work at a
certain hertz, which is the technical term for how many times a second a process repeats. Hertz is used
in many industries, including the electronics industry. Finally, for video games, animation is generally
measured in frames per second (FPS), which is the same as hertz but is an industry-specific term.
To get back to common frame rates (or FPS), a standard TV shows 30 frames per second. Most
movies are filmed at 24 FPS (though this is rapidly changing to 60 FPS). NTSC (the standard television
signal format in the United States and the predecessor to HDTV) works at 60 FPS (but it's interlaced,
meaning the screen is divided into lines and alternating sets of lines are shown 30 times per second
each). Many other countries (including most of Europe) use 50 FPS (interlaced) for standard television.
The ATSC standard (essentially the HDTV standard used in the United States) shows between 24 and 60
frames per second, depending on several factors. More recent HDTV devices claim frame rates as high as



  1. Finally, most computer monitors operate between 75 and 85 hertz, meaning 75 to 85 frames per
    second.
    That last rate is generally the one most important to programmers (though game console
    programmers have to concern themselves with TV frame rates, too). We can make animation systems
    that can show hundreds of frames per second, but there's no point in doing so. No monitor can show
    that many frames per second. Consequently, a monitor's hertz is the practical limit on computer-
    generated animation. In fact, not only is trying for a frame rate higher than the monitor's hertz pointless,


Java 7 for Absolute Beginners

© Jay Bryant 2012


J. Bryant,

Free download pdf