GS511 Homework #4 - Making Movies


  1. Assignment Statement
  2. Testing of the Movie Making Process with the CG Method
  3. Movie of the Pascal Limacon

Assignment Statement

Choose a numerical model or an analytical solution of some problem in your area of study (e.g. groundwater, thermodynamics, structures...) and use the model/solution to create a sequence of images suitable for display as an MPEG animation. The class notes on making MPEG movies may be helpful to you in this homework.

After you have made your MPEG movie, write a short html document that explains your animation and references it using a tag similar to:

<a href="your_movie.mpg">text to click on to see your movie</a>

Next, use the tar command:

tar -cvf huddleston_j_mpeg.tar your_movie.mpg your_explain.html

to bundle your explanation and your movie.

Finally, put the above tar file in the CVL directory:

/net/home/backup/gs510/put_hw

Testing the Movie Making Process with CG Method


    The system of scripts and programs as detailed in the GS511 class notes were recreated on my local system. Here is the following order for making a movie of the Conjugate Gradient process to ensure that the movie can be made:
  1. the cg_mpg.f file was compiled on a Sparc 2. (i.e. f77 cg.f)
  2. an images directory was created and the program was run (i.e. cd images;../a.out)
  3. the r8tohdf program was downloaded from http://starbase.jpl.nasa.gov/cdroms/ncsa_cd/hdf/pc_hdf/src/ as well as the df.h and dfi.h files for compilation. The program was compiled with the command:
    cc -o r8tohdf -DSUN r8tohdf.c -L/usr/local/lib -lhdf
  4. rawtohdf was rewritten as a Unix Bourne shell script
    #!/bin/sh
    # for the source to r8tohdf go to the following URL:
    # http://starbase.jpl.nasa.gov/cdroms/ncsa_cd/hdf/pc_hdf/src/
    for i in $*
    do
    NAME=`echo $i|cut -d. -f1`
    r8tohdf 300 300 $NAME.hdf -p /usr/local/lib/pals/demo.pal $i
    done
    The script was run as 'rawtohdf *.raw'
  5. The raw files were removed with the command 'rm *.raw'
  6. the imconv binary was downloaded from the FTP site at SDSC
    ftp://rosebud.sdsc.edu:/pub/sdsc/graphics/imtools
  7. hdftogif was rewritten as a Unix Bourne shell script
    #!/bin/sh
    # for the binary to imconv go to the following URL:
    # ftp://rosebud.sdsc.edu:/pub/sdsc/graphics/imtools
    #
    for i in $*
    do
    NAME=`echo $i | cut -d. -f1`
    imconv -informat hdf -infile $i -outformat gif -outfile $NAME.gif
    done
    The *.hdf files were converted to gif files with the command
    'hdftogif *.hdf'
  8. The hdf files were removed with the command 'rm *.hdf'
  9. The mpeg_play program was available locally but the mpeg_encode program had to be downloaded from the URL directory:
    ftp://s2k-ftp.cs.berkeley.edu/pub/multimedia/mpeg/encode
  10. The *.gif files were combined into a movie
    makempeg -format gif -from . -o cg.mpg -name "img(\d+).gif" -temp /usr3/tmp
  11. Finally the movie can be played with the command
    mpeg_play cg.mpg

Movie Making Process with Pascal Limacon