


ANIM_DEMO Demonstration of how to make a FLC movie in Matlab/UNIX using ANIM_FRAME and ANIM_MAKE. The technique is to grab each frame exactly as it appears in the figure window using GETFRAME (a.k.a. CAPTURE) to get the image, and then using IMWRITE to output the image to a file. These images are then assembled into a FLC format animation using the Unix program "ppm2fli". Since IMWRITE doesn't write out the PPM images that "ppm2fli" natively uses, we use the '-f ' option in ppm2fli and supply the name of a pcx to ppm conversion routine "pcxtoppm" and "convert" are popular free programs that build easily on nearly all UNIX platforms as the filter (or conversion) program. See ANIM_MAKE.m for details about where to get these UNIX programs. To run ANIM_DEMO, you need PPM2FLI installed and in your UNIX path, available at: http://vento.pi.tu-berlin.du/ppm2fli/main.html You also need a PCX to PPM conversion tool installed. See ANIM_MAKE.m for details.


0001 % ANIM_DEMO Demonstration of how to make a FLC movie in Matlab/UNIX 0002 % using ANIM_FRAME and ANIM_MAKE. 0003 % 0004 % The technique is to grab each frame exactly as it appears in the 0005 % figure window using GETFRAME (a.k.a. CAPTURE) to get the image, 0006 % and then using IMWRITE to output the image to a file. These images 0007 % are then assembled into a FLC format animation using the Unix program 0008 % "ppm2fli". Since IMWRITE doesn't write out the PPM images that 0009 % "ppm2fli" natively uses, we use the '-f ' option in ppm2fli and supply 0010 % the name of a pcx to ppm conversion routine "pcxtoppm" and "convert" 0011 % are popular free programs that build easily on nearly all UNIX platforms 0012 % as the filter (or conversion) program. See ANIM_MAKE.m for details 0013 % about where to get these UNIX programs. 0014 % 0015 % To run ANIM_DEMO, you need PPM2FLI installed and in your UNIX path, 0016 % available at: http://vento.pi.tu-berlin.du/ppm2fli/main.html 0017 % 0018 % You also need a PCX to PPM conversion tool installed. See ANIM_MAKE.m 0019 % for details. 0020 0021 % Rich Signell (rsignell@usgs.gov) 0022 % 0023 0024 peaks(40); 0025 [ax,el]=view; 0026 0027 for i=1:9 0028 view(ax,el+i*2); 0029 0030 % STEP 1. Make each frame with ANIM_FRAME 0031 anim_frame('peaks',i); 0032 0033 end 0034 0035 % STEP 2. Make the frames into a FLC with ANIM_MAKE 0036 anim_make