[vtkusers] VTK/TCL logfile manipulation: howto update at a given frequency?

Graham E Voysey gvoysey at infoscitex.com
Wed Mar 12 14:13:00 EDT 2008


Hello List, 

I'm using VTK to display a human avatar and manipulate its position.
The intended user is a test subject in a motion study who will use a
joystick to position the avatar so that it reflects how the user feels
that they are moving.

I've been asked to modify our script to include logging the camera
orientation and position every 250ms.  I've hit two areas that confuse
me.

1. The script currently creates a log file with a hardcoded name.  I'd
like to change this so that the name of the file is
<dateAndTimeFirstOpened>.log, so that logs are not accidentally
overwritten.

set logFile [open "GSV_log.log" w 0666]

would replacing the above with something like 

set logFile [open "[clock format [clock seconds]].log" w 0666]  

be anything close to proper syntax?

2.  I'm confused about how I would create a loop that would write a line
to said logfile at a given time interval.  What's a good way to think
about this, or do it?


Thanks, 

-graham



More information about the vtkusers mailing list