ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/px/pmdblur.csh
Revision: 3.1
Committed: Tue Jan 18 03:59:41 2005 UTC (19 years, 3 months ago) by greg
Content type: application/x-csh
Branch: MAIN
CVS Tags: rad5R4, rad5R2, rad4R2P2, rad5R0, rad5R1, rad3R7P2, rad3R7P1, rad4R2, rad4R1, rad4R0, rad3R8, rad3R9, rad4R2P1, rad5R3, HEAD
Log Message:
Created pmdblur script and added DBLUR variable to ranimate

File Contents

# Content
1 #!/bin/csh -f
2 # RCSid $Id$
3 #
4 # Generate views for motion and depth blurring on picture
5 #
6 if ($#argv != 5) then
7 echo "Usage: $0 speed aperture nsamp v0file v1file"
8 exit 1
9 endif
10 set s = "$1"
11 set a = "$2"
12 set n = "$3"
13 set vc = "$4"
14 set vn = "$5"
15 if (`ev "if($s-.01,0,1)"`) then
16 pdfblur $a $n $vc
17 exit
18 endif
19 if (`ev "if($a,0,1)"`) then
20 pmblur $s $n $vc $vn
21 exit
22 endif
23 cnt $n | rcalc -e `vwright C < $vc` -e `vwright N < $vn` \
24 -e "t=$s/$n"'*($1+rand($1))' \
25 -e "r=$a/2"'*sqrt(rand(182+7*$1));theta=2*PI*rand(-10-$1)' \
26 -e 'rcost=r*cos(theta);rsint=r*sin(theta)' \
27 -e 'opx= (1-t)*(Cpx+rcost*Chx+rsint*Cvx) + t*(Npx+rcost*Nhx+rsint*Nvx)' \
28 -e 'opy= (1-t)*(Cpy+rcost*Chy+rsint*Cvy) + t*(Npy+rcost*Nhy+rsint*Nvy)' \
29 -e 'opz= (1-t)*(Cpz+rcost*Chz+rsint*Cvz) + t*(Npz+rcost*Nhz+rsint*Nvz)' \
30 -e 'odx= (1-t)*Cdx*Cd + t*Ndx*Nd' \
31 -e 'ody= (1-t)*Cdy*Cd + t*Ndy*Nd' \
32 -e 'odz= (1-t)*Cdz*Cd + t*Ndz*Nd' \
33 -e 'oux=(1-t)*Cux+t*Nux;ouy=(1-t)*Cuy+t*Nuy;ouz=(1-t)*Cuz+t*Nuz' \
34 -e 'oh=(1-t)*Ch+t*Nh;ov=(1-t)*Cv+t*Nv' \
35 -e 'os= (1-t)*(Cs-rcost/(Cd*Chn)) + t*(Ns-rcost/(Nd*Nhn))' \
36 -e 'ol= (1-t)*(Cl-rsint/(Cd*Cvn)) + t*(Nl-rsint/(Nd*Nvn))' \
37 -o 'VIEW= -vp ${opx} ${opy} ${opz} -vd ${odx} ${ody} ${odz} -vu ${oux} ${ouy} ${ouz} -vh ${oh} -vv ${ov} -vs ${os} -vl ${ol}'