http://www.math.nyu.edu/~crorres/Archimedes/Lever/LeverIntro.html convert Muybridge_race_horse_animated.gif horse.jpg set path = ( /programs/kuim/bin/ $path ) rm -f sum.im sum.jpg type -f horse-0.jpg temp.im add -a 0 -b 0 temp.im temp.im sum.im foreach num ( `seq 0 14` ) mv sum.im last.im rm temp.im type -f horse-${num}.jpg temp.im add -a 1 -b 0.066667 last.im temp.im sum.im end rm -f sum.jpg type -j sum.im sum.jpg display sum.jpg rm -f byte.im type -b sum.im byte.im rm -f byte.jpg type -j byte.im byte.jpg display byte.jpg rm -f big.im big.jpg interp -s 3 sum.im big.im type -j big.im big.jpg convert field_a.gif field.png set num = 000 foreach file ( field-?.png field-??.png field-???.png ) set num = `echo $num | awk '{printf "%03d",$1+1}'` set pix = "1,1" if("$num" == 147) set pix = "10,10" convert +matte -negate -fill white -draw "color $pix replace" -type Palette $file frame_${num}.png end ls -l field_neg.gif convert -delay 2 frame_???.png field_neg.gif ls -l field_neg.gif