#
12 The making of multimedia files

If normal modes or the optimization history are animated and the user selects `Save drawing/TIFF` or `Save drawing/PNG` from the main window menu a series of TIFF or PNG files is written out, one for each frame of the animation (currently 20 frames for normal modes which cannot be changed by the user). These TIFF or PNG files can easily be converted to a video file (MPEG) showing the animation using standard image manipulation tools from the Internet. One possible MPEG encoder is `mpeg_encode` which is available from mm-ftp.CS.Berkeley.EDU via anonymous ftp. This encoder expects its input files either in PPM, PNM, or YUV format. To convert the TIFF files written by VIEWMOL you can use the PBMPLUS or NETPBM libraries which have a filter tifftopnm (you also need pnmflip, since tifftopnm changes the orientation of the picture). The following shell script will do the conversion (for sh and ksh users) if the default files from VIEWMOL have been used:

      for i in vm_image*.tiff
      do
        j=`basename $i tiff`pnm
        tifftopnm $i | pnmflip -topbottom > $j
      done

The resulting PNM files can then be processed by `mpeg_encode` to produce a MPEG file which can, e. g., be included in a World Wide Web document.

Selecting `Save drawing/Povray` from the main window menu with an animation running will write a series of input files for POVRAY. These files can also be processed by POVRAY and used to generate a movie of the animation. This process can, however, be very time consuming.