ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/objline.csh
Revision: 2.1
Committed: Thu Oct 26 19:23:11 1995 UTC (27 years, 7 months ago) by greg
Content type: application/x-csh
Branch: MAIN
Log Message:
Initial revision

File Contents

# Content
1 #!/bin/csh -f
2 # SCCSid "$SunId$ LBL"
3 # Create four standard views of scene and present as line drawings
4 #
5 set oblqxf="-rz 45 -ry 45"
6 set d=/usr/tmp/ol$$
7 onintr quit
8 mkdir $d
9 if ($#argv) then
10 set origf=""
11 set oblqf=""
12 foreach f ($argv)
13 xform -e $f > $d/$f.orig
14 rad2mgf $d/$f.orig > $d/$f:r.orig.mgf
15 set origf=($origf $f:r.orig.mgf)
16 (echo xf $oblqxf; cat $d/$f:r.orig.mgf; echo xf) \
17 > $d/$f:r.oblq.mgf
18 set oblqf=($oblqf $f:r.oblq.mgf)
19 end
20 else
21 set origf=stdin.orig.mgf
22 set oblqf=stdin.oblq.mgf
23 xform -e > $d/stdin.orig
24 rad2mgf $d/stdin.orig > $d/stdin.orig.mgf
25 (echo xf $oblqxf; cat $d/stdin.orig.mgf; echo xf) \
26 > $d/stdin.oblq.mgf
27 endif
28 cd $d
29 set rce='xm=($1+$2)/2;ym=($3+$4)/2;zm=($5+$6)/2;\
30 max(a,b):if(a-b,a,b);r=max(max($2-$1,$4-$3),$6-$5)*.52;\
31 $1=xm-r;$2=xm+r;$3=ym-r;$4=ym+r;$5=zm-r;$6=zm+r'
32 set origdim=`getbbox -h *.orig | rcalc -e $rce:q`
33 set oblqdim=`xform $oblqxf *.orig | getbbox -h | rcalc -e $rce:q`
34 mgf2meta -t .005 x $origdim $origf > x.mta
35 mgf2meta -t .005 y $origdim $origf > y.mta
36 mgf2meta -t .005 z $origdim $origf > z.mta
37 mgf2meta -t .005 x $oblqdim $oblqf > o.mta
38 plot4 {x,y,z,o}.mta
39 quit:
40 cd
41 exec rm -rf $d