[GRASS-dev] TclTk animator finished - replaces xganim

Michael Barton michael.barton at asu.edu
Thu Sep 13 11:16:32 EDT 2007


As it currently is written, animate.tcl is not a stand-alone or scriptable
module. However, it could be. Glynn's original code closely mirrored xganim
and so could launch an animation display from a command-line implementation
with arguments of view=rast[1-n]...

I needed to take some of this code out in order to make this work with the
GUI and to make the functionality improvements and fixes I added.

However, I'm pretty sure that it would not be difficult to make it
scriptable for someone who understood better than I do BASH/TclTk
interaction.

The main thing that needs to be done is to start GmAnim::main (main display
window and controls) and pass a list of view parameters to
GmAnim::parse_viewmaps. The latter accepts a TclTk list in which each
element is the series of maps for an animation view. For example
{"rast[1-5]" "rast1,rast2,rast3" "rastB[1-10],rastC[1-4]"} for a 3 view
animation.

This is a somewhat different format than the original view1=... view2=...
but gets to the same place.

Michael


On 9/13/07 1:36 AM, "Markus Neteler" <neteler at itc.it> wrote:

> 
> Excellent!
> 
> Could we have a script to launch it from command line, too, to
> replace "xganim" in C? Then, if all functionality is covered, we
> could deprecate the C version.
> 
> Markus
> 
> 
> Michael Barton wrote:
>> 
>> I finished updating the new TclTk animation module and committed it to the
>> cvs. It does pretty much what xganim did, but with somewhat nicer
>> interface.
>> It also has several important improvements over xganim.
>> 
>> Enter up to 4 animation series "views", following same format used by
>> xganim
>> 
>>     rast[1-n],rast2[1-n],...
>> 
>> where rast[1-n] refers to raster maps rast1,rast2,rast3,...,rastn
>> 
>> You can also enter maps in the format, not supported by xganim
>> 
>>     rast1,rast2,rast3,...,rastn
>> 
>> An important improvement is that xganim currently will only actually work
>> with a series of 10 maps, rast[0-9]. Because it seek only individual
>> characters at the end of each map in the series, it cannot recognize
>> numbers
>> higher than the numerals 0-9. That is 11 is simply two ones. The TclTk
>> animator WILL recognize these as numbers, so that you can animate a series
>> of maps limited only by system capabilities.
>> 
>> As with xganim, single animation series will be displayed to fill the
>> TclTk
>> canvas window; a multi-view animation (up to 4 views) will divide the
>> canvas
>> into 4 subwindows with an animation series in each subwindow. Up to 4
>> simultaneous animations can be run.
>> 
>> Another improvement over xganim is that you can animate series with
>> different numbers of frames simutaneously (e.g., a multi-view animation
>> with
>> a 100 frame animation in one subwindow and a 20 frame animation in another
>> subwindow).
>> 
>> I'm not sure if the labels are working properly yet, but everything else
>> seems to be. Give it a try and let me know if you run into any snags.
>> 
>> Michael
>> __________________________________________
>> Michael Barton, Professor of Anthropology
>> Director of Graduate Studies
>> School of Human Evolution & Social Change
>> Center for Social Dynamics & Complexity
>> Arizona State University
>> 
>> phone: 480-965-6213
>> fax: 480-965-7671
>> www: http://www.public.asu.edu/~cmbarton
>> 

__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton





More information about the grass-dev mailing list