ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/objline.csh
Revision: 2.3
Committed: Sat Feb 22 02:07:30 2003 UTC (21 years, 4 months ago) by greg
Content type: application/x-csh
Branch: MAIN
CVS Tags: rad3R5, rad3R6, rad3R6P1
Changes since 2.2: +1 -1 lines
Log Message:
Changes and check-in for 3.5 release
Includes new source files and modifications not recorded for many years
See ray/doc/notes/ReleaseNotes for notes between 3.1 and 3.5 release

File Contents

# User Rev Content
1 greg 2.1 #!/bin/csh -f
2 greg 2.3 # RCSid: $Id$
3 greg 2.1 # 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 greg 2.2 echo i $f:r.orig.mgf $oblqxf > $d/$f:r.oblq.mgf
17 greg 2.1 set oblqf=($oblqf $f:r.oblq.mgf)
18     end
19     else
20     set origf=stdin.orig.mgf
21     set oblqf=stdin.oblq.mgf
22     xform -e > $d/stdin.orig
23     rad2mgf $d/stdin.orig > $d/stdin.orig.mgf
24 greg 2.2 echo i stdin.orig.mgf $oblqxf > $d/stdin.oblq.mgf
25 greg 2.1 endif
26     cd $d
27     set rce='xm=($1+$2)/2;ym=($3+$4)/2;zm=($5+$6)/2;\
28     max(a,b):if(a-b,a,b);r=max(max($2-$1,$4-$3),$6-$5)*.52;\
29     $1=xm-r;$2=xm+r;$3=ym-r;$4=ym+r;$5=zm-r;$6=zm+r'
30     set origdim=`getbbox -h *.orig | rcalc -e $rce:q`
31     set oblqdim=`xform $oblqxf *.orig | getbbox -h | rcalc -e $rce:q`
32     mgf2meta -t .005 x $origdim $origf > x.mta
33     mgf2meta -t .005 y $origdim $origf > y.mta
34     mgf2meta -t .005 z $origdim $origf > z.mta
35     mgf2meta -t .005 x $oblqdim $oblqf > o.mta
36     plot4 {x,y,z,o}.mta
37     quit:
38     cd
39     exec rm -rf $d