Zuletzt geändert: Do, 11.01.2007

«K12/K13» loop.sh «PDF», «POD»



Download
#!/bin/sh

for i in \
  "1 1 1" \
  "1 1 2" "1 2 1" "2 1 1" \
  "1 2 2" "2 1 2" "2 2 1" \
  "2 2 2" \
  "1 1 3" "1 3 1" "3 1 1" \
  "1 2 3" "1 3 2" "2 3 1" "2 1 3" "3 1 2" "3 2 1" \
  "3 2 2" "2 3 2" "2 2 3" \
  "2 3 3" "3 2 3" "3 3 2" \
  "3 3 3" \
  "4 4 4"
do
  echo $i...

  energy="`echo "$i" | awk '{ printf "%02d", $1^2 + $2^2 + $3^2 }'`"
  id="$energy-$i"

  [ -e "v-$id.dat" ] || ./plotter.pl $i > "v-$id.dat"
  gnuplot <<GNUPLOT
    set xrange [ 0:pi ]
    set yrange [ 0:pi ]
    set zrange [ 0:pi ]

    set xlabel 'x'
    set ylabel 'y'
    set zlabel 'z'
    
    set xtics ('0' 0, 'pi/4' pi/4, 'pi/2' pi/2, '3pi/4' 3*pi/4, 'pi' pi)
    set ytics ('0' 0, 'pi/4' pi/4, 'pi/2' pi/2, '3pi/4' 3*pi/4, 'pi' pi)
    set ztics ('0' 0, 'pi/4' pi/4, 'pi/2' pi/2, '3pi/4' 3*pi/4, 'pi' pi)
    set grid

    set terminal png
    set output 'v-$id.png'
    splot 'v-$id.dat' t '$id'
GNUPLOT
done