Python – How to create a picture with animated aspects programmatically

animation, drawing, graphics, image, python


I have been asked by a client to create a picture of the world which has animated arrows/rays that come from one part of the world to another.

The rays will be randomized, will represent a transaction, will fade out after they happen and will increase in frequency as time goes on. The rays will start in one country's boundary and end in another's. As each animated transaction happens a continuously updating sum of the amounts of all the transactions will be shown at the bottom of the image. The amounts of the individual transactions will be randomized. There will also be a year showing on the image that will increment every n seconds.

The randomization, summation and incrementing are not a problem for me, but I am at a loss as to how to approach the animation of the arrows/rays.

My question is what is the best way to do this? What frameworks/libraries are best suited for this job?

I am most fluent in python so python suggestions are most easy for me, but I am open to any elegant way to do this.
The client will present this as a slide in a presentation in a windows machine.

Best Solution

If you are adventurous use OpenGL :)

You can draw bezier curves in 3d space on top of a textured plane (earth map), you can specify a thickness for them and you can draw a point (small cone) at the end. It's easy and it looks nice, problem is learning the basics of OpenGL if you haven't used it before but that would be fun and probably useful if your in to programing graphics.

You can use OpenGL from python either with pyopengl or pyglet.

If you make the animation this way you can capture it to an avi file (using camtasia or something similar) that can be put onto a presentation slide.