Problem
You need a set of bitmaps to make a GIF animation or a video.
Solution
This JSL shows how you might change a platform parameter over a series of values and capture a picture at each step.
dt = open("$sample_data/big class.jmp");
bv = Bivariate( Y( :height ), X( :weight ) );
bv<<Fit Spline( 0.000001, {Line Color( "Red" )} );
dir = "$temp/deleteMe_pictures/";
if( DirectoryExists(dir),DeleteDirectory(dir));
CreateDirectory(dir);
sequence = 0;
For( slide=.1,slide<=6,slide+=.1,
report(bv)[sliderBox(1)]<<set(slide);
Wait( .1 );
sequence += 1;
report(bv)[framebox(1)]<<savepicture(dir||"pic"||right(char(sequence),6,"0")||".png","png");
);
print("done capturing");
bv<<closewindow;
close(dt,"nosave");
allfiles = filesindirectory(dir);
allfiles = sortlist(allfiles);
duration=80;
animation = newimage(dir||removefrom(allfiles,1)[1]);
animation<<setFrameDuration(duration);
while(nitems(allfiles)>0,
p = newimage(dir||removefrom(allfiles,1)[1]);
animation<<addFrame;
animation<<setFrameDuration(duration);
animation<<setPixels(p<<getpixels);
p=0;
);
animation<<saveImage(dir||"p.gif","gif");
open(dir||"p.gif");
animation=0;
Discussion
Animated GIFs are suitable for small images and short durations. You can use other video editors to assemble bigger videos as AVI files. Sometimes you may need to re-run the platform with the new parameter. Above, the slider worked well, but setting the number field from JSL did not update the image.
Animated GIF changing spline tension
See Also
Image Documentation