[vtkusers] Animated 2D graph

Ing. Josue Balandrano Coronel xirdneh at gmail.com
Thu Apr 17 02:33:27 EDT 2014


Hi,
I am playing around with VTK/python and I wanted to create an animated 2D
graph. The basic idea is that I have a data set with values that go through
time e.g. 1870 = 20.5, 1925 = 30.5, etc..
I am actually using the World Bank API to get this values for
socio-economic indicators (
http://data.worldbank.org/data-catalog/world-development-indicators?cid=GPD_WDI
).

What I want to do is to plot this values for different countries but in an
animated way.
I've been able to plot the values in a 2D graph and I've been playing with
animating an object, just simple moving it in a circle motion or from side
to side.

My question is regarding on the best way to tackle this. At first I
thought, maybe, to graph each point for every country involved at a certain
point in time, then after a timer tick graph the next point and re-render
the 2d graph. This might give a sense of animation. The other idea I got is
to not use a vtkXYGraph object, instead just draw the X and Y axis and use
other object class to represent each country, then map the value at a
specific point in time to an x, y value in the viewport and move each
object accordingly.

Which approach do you guys think would be the best?
Any other ideas on how to tackle this?

I think it might be a simple project but I think it's a fun pet project.

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140417/66adc9f6/attachment.html>


More information about the vtkusers mailing list