From: hackbard Date: Sun, 10 Feb 2008 17:43:22 +0000 (+0100) Subject: enhanced visualize script to create single images X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=32377cc471f36b75710e620289e62284c28b4c76;p=physik%2Fposic.git enhanced visualize script to create single images --- diff --git a/visualize b/visualize index ab6e374..8f4e83a 100755 --- a/visualize +++ b/visualize @@ -35,6 +35,7 @@ ortographic="" bx0=""; by0=""; bz0=""; bx1=""; by1=""; bz1=""; bcr=""; +clx="0"; cly="0"; clz="0"; while [ "$1" ]; do case "$1" in @@ -45,6 +46,7 @@ while [ "$1" ]; do -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; @@ -69,19 +71,23 @@ while [ "$1" ]; do echo " -b " echo "povray:" echo " -c (camera position)" + echo " -L (camera look)" echo " -l (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" @@ -222,7 +228,7 @@ EOF 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