views:

466

answers:

3

Background

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.

+1  A: 

It depends largely on the effort you want to expend on this, but the basic outline of an easy way. Would be to load an image of an arrow, and use a drawing library to color and rotate it in the direction you want to point(or draw it using shapes/curves).

Finally to actually animate it interpolate between the coordinates based on time.

If its just for a presentation though, I would use Macromedia Flash, or a similar animation program.(would do the same as above but you don't need to program anything)

argonide
+2  A: 

The client will present this as a slide in a presentation in a windows machine

I think this is the key to your answer. Before going to a 3d implementation and writing all the code in the world to create this feature, you need to look at the presentation software. Chances are, your options will boil down to two things:

  1. Animated Gif
  2. Custom Presentation Scripts

Obviously, an animated gif is not ideal due to the fact that it repeats when it is done rendering, and to make it last a long time would make a large gif.

Custom Presentation Scripts would probably be the other way to allow him to bring it up in a presentation without running any side-programs, or doing anything strange. I'm not sure which presentation application is the target, but this could be valuable information.

He sounds like he's more non-technical and requesting something he doesn't realize will be difficult. I think you should come up with some options, explain the difficulty in implementing them, and suggest another solution that falls into the 'bang for your buck' range.

Kieveli
+1  A: 

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.

Toni Ruža