ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/objpict.csh
Revision: 2.4
Committed: Wed Feb 16 05:40:12 2005 UTC (17 years, 9 months ago) by greg
Content type: application/x-csh
Branch: MAIN
CVS Tags: rad3R7P2, rad3R7P1, rad3R8, rad3R9
Changes since 2.3: +2 -2 lines
Log Message:
Replaced instances of "/usr/tmp" with "/tmp" in scripts & documentation

File Contents

# User Rev Content
1 greg 1.1 #!/bin/csh -f
2 greg 2.4 # RCSid: $Id: objpict.csh,v 2.3 2004/01/29 22:45:30 greg Exp $
3 greg 1.1 #
4     # Make a nice multi-view picture of an object
5 greg 2.3 # Command line arguments contain materials and object files
6 greg 1.1 #
7     set objdir=/usr/local/lib/ray/lib
8 greg 2.4 set tmpdir=/tmp
9 greg 1.1 set xres=250
10     set yres=250
11 greg 2.3 set rpict="rpict -av .2 .2 .2 -x $xres -y $yres"
12     set inprad=$tmpdir/op$$.rad
13 greg 1.1 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 greg 2.3 set tmpfiles="$inprad $octree $pict1 $pict2 $pict3 $pict4"
19 greg 1.1 onintr quit
20 greg 2.3 if ( $#argv ) then
21     cat $* > $inprad
22     else
23     cat > $inprad
24     endif
25     set dims=`getbbox -h $inprad`
26     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]))"`
27 greg 1.1 set vw1="-vtl -vp 2 .5 .5 -vd -1 0 0 -vh 1 -vv 1"
28     set vw2="-vtl -vp .5 2 .5 -vd 0 -1 0 -vh 1 -vv 1"
29     set vw3="-vtl -vp .5 .5 2 -vd 0 0 -1 -vu -1 0 0 -vh 1 -vv 1"
30     set vw4="-vp 3 3 3 -vd -1 -1 -1 -vh 20 -vv 20"
31    
32 greg 2.3 xform -t `ev "-($dims[1]+$dims[2])/2" "-($dims[3]+$dims[4])/2" "-($dims[5]+$dims[6])/2"` \
33     -s `ev 1/$siz` -t .5 .5 .5 $inprad \
34     | oconv $objdir/testroom - > $octree
35 greg 1.1 $rpict $vw1 $octree > $pict1
36     $rpict $vw2 $octree > $pict2
37     $rpict $vw3 $octree > $pict3
38     $rpict $vw4 $octree > $pict4
39     pcompos $pict3 0 $yres $pict4 $xres $yres $pict1 0 0 $pict2 $xres 0
40    
41     quit:
42     rm -f $tmpfiles
43     exit 0