Mark Alexiuk wrote:
Hi,
Could someone remind me how to save a series of images or screenshots
from a swarm simulation?
I am using the Fedora Core version.
Thanks a lot,
Mark Alexiuk
Here is an example method that writes the raster object "worldRaster" to a
.png file each time it is called ... it is called once per time step, and the
file name includes the time step number (currentTime).
If you skip the "setWidget" command, it grabs the whole screen.
I use some shareware called GIF Construction Set to assemble the .png files
into a movie. I'm sure there are other ways.
Steve R.
-(void) writeFrame {
char filename[256];
id pixID;
sprintf(filename, "Model%03d_Frame%03ld.png", modelNumber,
getCurrentTime());
pixID = [Pixmap createBegin: [self getZone]];
[pixID setWidget: worldRaster];
pixID = [pixID createEnd];
[pixID save: filename];
[pixID drop];
}