#! /bin/ksh unalias rm integer i=$1 integer j=0 print $2 >dat a.out < dat while [ i -lt $2 ] do if [ i -lt 10 ] then print "set view 60,60; set terminal pbm small color; set zrange [-1:1]; set output\"$3t=000$i.ppm\"; set contour base; set hidden3d; splot 'data000$i' with lines; " >data000$i.gnu gnuplot data000$i.gnu ppmquant -map samp $3t=000$i.ppm>$3at=000$i.ppm ppmtogif $3at=000$i.ppm > $3000$i.gif ppmtoyuvsplit $3000$i $3at=000$i.ppm j=i-2 rm $3t=000$j.ppm $3at=000$j.ppm data000$j data000$j.gnu i=i+2 fi if [ i -gt 9 -a i -lt 100 ] then print "set view 60,60; set terminal pbm small color; set zrange [-1:1]; set output\"$3t=00$i.ppm\"; set contour base; set hidden3d; splot 'data00$i' with lines; " >data00$i.gnu gnuplot data00$i.gnu ppmquant -map samp $3t=00$i.ppm>$3at=00$i.ppm ppmtogif $3at=00$i.ppm > $300$i.gif ppmtoyuvsplit $300$i $3at=00$i.ppm j=i-2 rm $3t=00$j.ppm $3at=00$j.ppm data00$j data00$j.gnu i=i+2 fi if [ i -gt 99 -a i -lt 1000 ] then print "set view 60,60; set terminal pbm small color; set zrange [-1:1]; set output\"$3t=0$i.ppm\"; set contour base; set hidden3d; splot 'data0$i' with lines; " > data0$i.gnu gnuplot data0$i.gnu ppmquant -map samp $3t=0$i.ppm>$3at=0$i.ppm ppmtogif $3at=0$i.ppm > $30$i.gif ppmtoyuvsplit $30$i $3at=0$i.ppm j=i-2 rm $3t=0$j.ppm $3at=0$j.ppm data0$j data0$j.gnu i=i+2 fi if [ i -gt 999 ] then print "set view 60,60; set terminal pbm small color; set zrange [-1:1]; set output\"$3t=$i.ppm\"; set contour base; set hidden3d; splot 'data$i' with lines; " > data$i.gnu gnuplot data$i.gnu ppmquant -map samp $3t=$i.ppm>$3at=$i.ppm ppmtogif $3at=$i.ppm > $3$i.gif ppmtoyuvsplit $3$i $3at=$i.ppm j=i-2 rm $3t=$j.ppm $3at=$j.ppm data$j data$j.gnu i=i+2 fi done rm *.ppm *.gnu data* ls *.gif > $3.lst fbm2fli $3.lst $3.fli or gifmerge *.gif > $3.gif mpeg -a $1 -b $2 $3 -s $3.mpg |
Specifying Korn shell unaliasing the remove command Initialize variables i,j,(input) print max time variable to file feed time file to executable Begin main while loop Case argument to call data correctly Creating a gnuplot input file to set up appropriate options Send gnuplot data file to gnuplot Changing color of ppm file Create GIF from new ppm file Creating U, Y, and V files for MPEG encoder Deleting ppm, gnu and data files(save disk space) End of case statement Repeat above steps Remove the unwanted files Create the control file Create the fli movie Create Gif89a animation Create MPEG |