EOF
}
-
-
directory="doesnt_exist____for_sure"
width="1024"
height="768"
x1=""; y1=""; z1="";
cx=""; cy=""; cz="";
lx="0"; ly="-100"; lz="100";
+bx0=""; by0=""; bz0="";
+bx1=""; by1=""; bz1="";
while [ "$1" ]; do
case "$1" in
-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 "########"
echo " -nll <x> <y> <z> (near lower left)"
echo " -fur <x> <y> <z> (far upper right)"
echo " -o (ortographic)"
+ echo "bounding box:"
+ echo " -b <x0> <y0> <z0> <x1> <y1> <z1>"
echo "povray:"
echo " -c <x> <y> <z> (camera position)"
echo " -l <x> <y> <z> (light source)"
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
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 {