From: hackbard Date: Tue, 14 Aug 2007 13:15:37 +0000 (+0200) Subject: manual boundaries X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=aeb7fed06ed1af6ff767ab36e97fb98eb2cb8bcf;p=physik%2Fposic.git manual boundaries --- diff --git a/visualize b/visualize index 6255e89..f4736ea 100755 --- a/visualize +++ b/visualize @@ -15,8 +15,6 @@ pigment { color White } EOF } - - directory="doesnt_exist____for_sure" width="1024" height="768" @@ -25,6 +23,8 @@ x0=""; y0=""; z0=""; x1=""; y1=""; z1=""; cx=""; cy=""; cz=""; lx="0"; ly="-100"; lz="100"; +bx0=""; by0=""; bz0=""; +bx1=""; by1=""; bz1=""; while [ "$1" ]; do case "$1" in @@ -37,6 +37,8 @@ while [ "$1" ]; do -c) cx=$2; cy=$3; cz=$4; shift 4;; -l) lx=$2; ly=$3; lz=$4; shift 4;; -o) ortographic=1; shift 1;; + -b) bx0=$2; by0=$3; bz0=$4; + bx1=$5; by1=$6; bz1=$7; shift 7;; *) echo "options:" echo "########" @@ -51,6 +53,8 @@ while [ "$1" ]; do echo " -nll (near lower left)" echo " -fur (far upper right)" echo " -o (ortographic)" + echo "bounding box:" + echo " -b " echo "povray:" echo " -c (camera position)" echo " -l (light source)" @@ -118,6 +122,8 @@ EOF fi # boundaries + if [ -z "$bx0" ]; then + if [ -z "$x0" ]; then cat $file | grep '# \[D\]' | while read foo bar x1 y1 z1 x2 y2 z2 ; do cat >> temp.pov <<-EOF @@ -145,6 +151,26 @@ EOF draw_cyl $x1 $y1 $z1 $x1 $y1 $z0 fi + else + + # manually drawing the 3x4 boundaries specified by argv ... + draw_cyl $bx0 $by0 $bz0 $bx1 $by0 $bz0 + draw_cyl $bx0 $by0 $bz0 $bx0 $by1 $bz0 + draw_cyl $bx1 $by1 $bz0 $bx1 $by0 $bz0 + draw_cyl $bx0 $by1 $bz0 $bx1 $by1 $bz0 + + draw_cyl $bx0 $by0 $bz1 $bx1 $by0 $bz1 + draw_cyl $bx0 $by0 $bz1 $bx0 $by1 $bz1 + draw_cyl $bx1 $by1 $bz1 $bx1 $by0 $bz1 + draw_cyl $bx0 $by1 $bz1 $bx1 $by1 $bz1 + + draw_cyl $bx0 $by0 $bz1 $bx0 $by0 $bz0 + draw_cyl $bx0 $by1 $bz1 $bx0 $by1 $bz0 + draw_cyl $bx1 $by0 $bz1 $bx1 $by0 $bz0 + draw_cyl $bx1 $by1 $bz1 $bx1 $by1 $bz0 + + fi + # add camera and light source cat >> temp.pov <<-EOF camera {