#! /bin/tcsh -f cat << EOF >! atoms.txt 0 0 5 0 0 -5 EOF set num = 0 foreach dist ( `awk 'BEGIN{for(d=1;d<=10000;d*=1.2) print d}'` ) set num = `echo $num | awk '{printf("%03d",$1+1)}'` set print = `echo $dist | awk '{printf("%.0f",$1)}'` ./nearBragg2D -file atoms.txt -wave 1 -source_distance 1e5 -distance ${dist}e-9 \ -detsize 512e-8 -pixel 1e-8 -point_pixel adsc2pgm intimage.img temp.pgm convert -rotate 90 -contrast-stretch 0%x0% temp.pgm temp.png convert -fill green -pointsize 30 -draw "text 20,40 '$print x'" temp.png frame_${num}.png end convert -delay 20 frame_???.png ~/html/nearBragg/near2far3.gif