#
# Tcl script to help make mpeg movie
#
# Frames will be created and stored in a frames subdirectory.
# Frame filenames are numbered consecutively,
# starting at frame1000 and increasing.
#
# At the Geometry Center, to convert frames to an mpeg video, try
#	img2mpeg -o frames/movie.mpg frames/frame????
#
# $Id: movie.tcl,v 1.1.1.1 2001/11/11 20:00:01 lloydwood Exp $

set N_FRAMES 30

# frame counter
set i 1000

proc save_frame {i} {
	puts stderr "Writing frame$i"
	savi GV_WAIT
	savi GV_SEND "(snapshot focus frames/frame$i)"
	savi GV_WAIT
}

#
# prepare satellites program and Geomview
#
savi STOP
savi GV_SEND "(window Camera {size 288 288})"

#
# save first frame now
#
save_frame $i

# now loop and save next frames
for {set j 1} {$j < $N_FRAMES} {incr j} {
	savi FORW_STEP
	incr i
	save_frame $i
}
