How to create an image with animated aspects programmatically
Background
I was asked by a client to create a picture of the world in which animated arrows / rays that come from one part of the world to another.
The beams will be randomized, represent a transaction, disappear after they happen, and increase in frequency over time. The rays will start on one border of the country and end in strangers. As each animated transaction takes place, a constantly updated sum of all transaction amounts will be displayed at the bottom of the image. Individual transaction amounts will be randomized. The image will also display the year, which will increase every n seconds.
Randomizing, summing and incrementing is not a problem for me, but I don't understand how to approach animation of arrows / rays.
My question is the best way to do this? What framework / libraries are best for this job?
I am the best at python, so python suggestions are the easiest for me, but I am open to any neat way of doing this. The client will present this as a slide in a presentation on a Windows machine.
source to share
If you are adventurous using OpenGL :)
You can draw bezier curves in 3d space on top of the 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 good, the problem is learning the basics of OpenGL if you haven't used it before, but it would be fun and probably useful if you were graphics programming.
You can use OpenGL from python with either pyopengl or pyglet .
If you create your animation this way, you can record it to an AVI file (using camtasia or something similar) that can be put on a presentation slide.
source to share
The client will present this as a slide in a presentation on a Windows computer
I think this is the key to your answer. Before you jump into the 3D implementation and write all the code in the world to create this feature, you need to look at presentation software. Chances are, your options boil down to two things:
- Animated Gif
- Custom presentation scripts
Obviously an animated gif is not perfect due to the fact that it repeats itself as it is rendered, and in order for it to last a long time would be a large gif.
Custom presentation scripts would probably be another way to allow it to display it in the presentation without any side programs or doing something weird. I'm not sure which presentation application is the target, but it could be valuable information.
He sounds like he's more non-technical and asking for something he doesn't understand will be difficult. I think you should come up with some options, explain the difficulties in implementing them, and come up with another solution that falls within the "hitting your dollar" range.
source to share
It depends largely on the effort you want to put into it, but on the basic diagrams of the easy way. It would load an arrow image and use a drawing library to color the image and rotate in the direction you want to point (or draw with shapes / curves).
Finally, to actually animate the interpolation between coordinates in time.
If it's just for presentation, I would use Macromedia Flash or a similar animation program (will do the same as above, but you don't need to program anything)
source to share