Making mpeg movies. ; specify the size of the window in pixels nxwin=512 ; nxwin and nywin should be multiples of 16 for mpeg nywin=nxwin ; nywin does not need to be the same as nxwin DEVICE,DECOMPOSED=0 LOADCT,33 WINDOW,1,XSIZE=nxwin,YSIZE=nywin,RETAIN=2 ; RETAIN=2 will avoid problems with mpeg mpeg_id=MPEG_OPEN([nxwin,nywin],FILENAME='movie.mpg') count=0 FOR n=1,nsteps DO BEGIN ; ..... here you update the 2d array t (for example) IF (n MOD 50 EQ 0) THEN BEGIN count=count+1 SHADE_SURF,t,ZRANGE=[0.,tmax],SHADES=BYTSCL(t) ; for example MPEG_PUT,mpeg_id,WINDOW=1,FRAME=count,/ORDER endif ENDFOR MPEG_SAVE, mpeg_id MPEG_CLOSE, mpeg_id _________________________________________________________________________ ; or if you do not want to display the movie on the screen as the mpeg file is being made, add /PIXMAP to the WINDOW procedure: WINDOW,1,XSIZE=nxwin,YSIZE=nywin,RETAIN=2,/PIXMAP _________________________________________________________________________ ; then the file movie.mpg can be played with an mpeg movie player, for example, vlc on the workstations in BE 105.