ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/objpict.csh
(Generate patch)

Comparing ray/src/util/objpict.csh (file contents):
Revision 2.3 by greg, Thu Jan 29 22:45:30 2004 UTC vs.
Revision 2.7 by greg, Wed Jul 22 17:48:07 2009 UTC

# Line 4 | Line 4
4   # Make a nice multi-view picture of an object
5   # Command line arguments contain materials and object files
6   #
7 < set objdir=/usr/local/lib/ray/lib
8 < set tmpdir=/usr/tmp
9 < set xres=250
10 < set yres=250
7 > set tmpdir=/tmp/objv$$
8 > mkdir $tmpdir
9 > set xres=1024
10 > set yres=1024
11   set rpict="rpict -av .2 .2 .2 -x $xres -y $yres"
12 < set inprad=$tmpdir/op$$.rad
13 < set octree=$tmpdir/op$$.oct
14 < set pict1=$tmpdir/op$$a.pic
15 < set pict2=$tmpdir/op$$b.pic
16 < set pict3=$tmpdir/op$$c.pic
17 < set pict4=$tmpdir/op$$d.pic
18 < set tmpfiles="$inprad $octree $pict1 $pict2 $pict3 $pict4"
12 > set inprad=op$$.rad
13 > set testroom=$tmpdir/testroom.rad
14 > set octree=$tmpdir/op.oct
15   onintr quit
16   if ( $#argv ) then
17          cat $* > $inprad
18   else
19          cat > $inprad
20   endif
21 + cat > $testroom << '_EOF_'
22 + void plastic wall_mat 0 0 5 .681 .543 .686 0 .2
23 + void light bright 0 0 3 3000 3000 3000
24 + bright sphere lamp0 0 0 4 4 4 -4 .1
25 + bright sphere lamp1 0 0 4 4 0 4 .1
26 + bright sphere lamp2 0 0 4 0 4 4 .1
27 + wall_mat polygon box.1540 0 0 12
28 +                  5                 -5                 -5
29 +                  5                 -5                  5
30 +                 -5                 -5                  5
31 +                 -5                 -5                 -5
32 + wall_mat polygon box.4620 0 0 12
33 +                 -5                 -5                  5
34 +                 -5                  5                  5
35 +                 -5                  5                 -5
36 +                 -5                 -5                 -5
37 + wall_mat polygon box.2310 0 0 12
38 +                 -5                  5                 -5
39 +                  5                  5                 -5
40 +                  5                 -5                 -5
41 +                 -5                 -5                 -5
42 + wall_mat polygon box.3267 0 0 12
43 +                  5                  5                 -5
44 +                 -5                  5                 -5
45 +                 -5                  5                  5
46 +                  5                  5                  5
47 + wall_mat polygon box.5137 0 0 12
48 +                  5                 -5                  5
49 +                  5                 -5                 -5
50 +                  5                  5                 -5
51 +                  5                  5                  5
52 + wall_mat polygon box.6457 0 0 12
53 +                 -5                  5                  5
54 +                 -5                 -5                  5
55 +                  5                 -5                  5
56 +                  5                  5                  5
57 + '_EOF_'
58   set dims=`getbbox -h $inprad`
59   set siz=`rcalc -n -e 'max(a,b):if(a-b,a,b);$1='"max($dims[2]-$dims[1],max($dims[4]-$dims[3],$dims[6]-$dims[5]))"`
60   set vw1="-vtl -vp 2 .5 .5 -vd -1 0 0 -vh 1 -vv 1"
# Line 31 | Line 64 | set vw4="-vp 3 3 3 -vd -1 -1 -1 -vh 20 -vv 20"
64  
65   xform -t `ev "-($dims[1]+$dims[2])/2" "-($dims[3]+$dims[4])/2" "-($dims[5]+$dims[6])/2"` \
66                  -s `ev 1/$siz` -t .5 .5 .5 $inprad \
67 <        | oconv $objdir/testroom - > $octree
68 < $rpict $vw1 $octree > $pict1
69 < $rpict $vw2 $octree > $pict2
70 < $rpict $vw3 $octree > $pict3
71 < $rpict $vw4 $octree > $pict4
72 < pcompos $pict3 0 $yres $pict4 $xres $yres $pict1 0 0 $pict2 $xres 0
67 >        | oconv $testroom - > $octree
68 > pcompos "\!$rpict $vw3 $octree" 0 $yres \
69 >        "\!$rpict $vw4 $octree" $xres $yres \
70 >        "\!$rpict $vw1 $octree" 0 0 \
71 >        "\!$rpict $vw2 $octree" $xres 0 \
72 >        | pfilt -1 -r .6 -x /2 -y /2
73  
74   quit:
75 < rm -f $tmpfiles
75 > rm -r $tmpdir $inprad
76   exit 0

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines