bx0=""; by0=""; bz0="";
bx1=""; by1=""; bz1="";
bcr="";
+clx="0"; cly="0"; clz="0";
while [ "$1" ]; do
case "$1" in
-nll) x0=$2; y0=$3; z0=$4; shift 4;;
-fur) x1=$2; y1=$3; z1=$4; shift 4;;
-c) cx=$2; cy=$3; cz=$4; shift 4;;
+ -L) clx=$2; cly=$3; clz=$4; shift 4;;
-l) lx=$2; ly=$3; lz=$4; shift 4;;
-o) ortographic=1; shift 1;;
-b) bx0=$2; by0=$3; bz0=$4;
echo " -b <x0> <y0> <z0> <x1> <y1> <z1>"
echo "povray:"
echo " -c <x> <y> <z> (camera position)"
+ echo " -L <x> <y> <z> (camera look)"
echo " -l <x> <y> <z> (light source)"
exit 1;;
esac
done
-if [ ! -d $directory ] ; then
- echo "no valid directory"
- exit 1
+POVRAY="povray -W${width} -H${height} -d"
+
+if [ -d $directory ]; then
+ filesource=$directory/atomic_conf_*.xyz
fi
-POVRAY="povray -W${width} -H${height} -d"
+if [ -f $directory ]; then
+ filesource=$directory
+fi
-for file in $directory/atomic_conf_*.xyz; do
+for file in $filesource; do
cat > temp.pov <<-EOF
#include "colors.inc"
fi
cat >> temp.pov <<-EOF
location $camloc
-look_at <0,0,0>
+look_at <$clx,$clz,$clz>
}
light_source { <0,100,-100> color White shadowless }
EOF