O'Reilly logo

Python Multimedia Beginner's Guide by Ninad Sathaye

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - animation using a sequence of images

Let's develop a tool that can create an animation and display it on the screen. This tool will create and display the animation using the given image files. Each of the image files will be displayed as a frame in the animation for a specified amount of time. This is going to be a fun little animation that shows a grandfather clock with a pendulum. We will animate the pendulum oscillations with other things, including making the dial remaining still. This animation has only three image frames; two of them show the pendulum at opposite extremes. These images are sequenced as shown in the next illustration.

Clock image frames to be animated appear in the preceding image.

  1. Download the file ImageSequenceAnimation.py ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required