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