Phlip wrote:
> Diego Virasoro wrote:
>> Hello,
>> I would need to create a very simple visualisation for some scientific
>> work I am doing. Basically I need to draw points in a 2D graph (and
>> specify which colours to use) and each time the user presses the
>> spacebar it should move to the next iteration and show (say with a
>> line) where everyone is.
>>
>> What would be the simplest way to go about this?
> 
> Any GUI tool with the word "canvas" in it, such as TkCanvas.

TkCanvas is pretty good for 2D animations. I've used it in engineering 
tools (including as a plug-in block for a simulink-based tool for a car 
company).

I developed a general tool called tkar that runs as a standalone process:

http://path.berkeley.edu/~vjoel/vis/tkar/

It's based on ruby/tk, but you can feed it data from anywhere, not just 
ruby code. It accepts data from pipes and sockets. Your controlling 
process can decide when to send data, so you would probably handle 
spacebar events on the upstream end of the socket.

It handles basic user interaction fairly well, allowing pan, zoom, 
click, drag-n-drop (the latter two send the commands back out the 
socket, so you can control the effects).

For an overview, see

http://path.berkeley.edu/~vjoel/vis/tkar/tkar.html

and of course the movie

http://path.berkeley.edu/~vjoel/vis/tkar/movie.gif

Full docs--most importantly the data stream protocol and shape defs--are in

http://path.berkeley.edu/~vjoel/vis/tkar/doc/

The program itself is all one file:

http://path.berkeley.edu/~vjoel/vis/tkar/tkarpi.rb

This simulink plugin is quite nice--beats the native simulink 2D 
animation, and is just about as flexible as the simulink plotter block. 
But probably not of interest on this list.

HTH.

-- 
       vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407