From: Benjamin Bouvier (benjamin.bouvier_at_ibcp.fr)
Date: Fri Oct 31 2008 - 13:36:24 CDT

Rogan,

Thanks for the link. Unfortunately, the tutorial confirms my initial idea
of using variable traces and manually redrawing the whole scene each time
the frame counter changes... In my case this is suboptimal, since it takes
more than a minute to compute the custom graphics for a single frame
(using C++ code). What I do now is to store the outputs of the C++ code (a
Tcl script per frame) and 'eval' the right one in conjunction with
'trace', which is much better. Still, the scripts are long, and Tcl
parsing does not come for free... Worse: while viewing a trajectory, I
might look at a given frame several times, and each time the Tcl parsing
has to be redone from scratch...

Processing all frames once and for all and storing the resulting low-level
primitives in some kind of display list (eg, as implemented by OpenGL)
would be much more efficient. I was wondering whether there was any way to
do that...

Cheers,

On Fri, 31 Oct 2008 17:22:55 +0100, Rogan Carr <rogan_at_ks.uiuc.edu> wrote:

> Hi Benjamin,
>
> You should check out the Images and Movies Tutorial. It has a section
> on drawing per-frame graphics, as well as tcl example code.
>
> http://www.ks.uiuc.edu/Training/Tutorials/
>
> Cheers,
> Rogan
>
> On Fri, 2008-10-31 at 16:46 +0100, Benjamin Bouvier wrote:
>> Hi all,
>>
>> I'd like to make a movie out of a set of custom representations that are
>> built using the 'graphics' low-level call.
>>
>> It seems, however, that 'graphics' calls affect all frames of a
>> trajectory
>> simultaneously rather than one at a time... Since the computation of the
>> representations (ie, the generation of the Tcl code that draws them) is
>> time-consuming, on-the-fly recalculation at each frame change is out of
>> the question. My initial idea would be to store the Tcl code for each
>> frame in a list or array, and have it execute at each frame change; not
>> very elegant, and also not very fast, since parsing the (rather lengthy)
>> Tcl code for each frame takes a couple of seconds...
>>
>> Any ideas?
>>
>> Cheers,
>> --
>> Benjamin
>

-- 
Benjamin