[Radiance-general] Spherical sensor
Greg Ward
gregoryjward at gmail.com
Sat Apr 21 12:35:01 PDT 2012
Hi Minki,
There's a small error in your script. It should read:
set N=10000
cnt 10 10 10 $N | rcalc -of -e 'Dz=1-2*($4+rand(.77-.61*recno))/'$N \
-e 'phi=2*PI*($4+rand(-.10+.39*recno))'/$N \
-e 'rxy=sqrt(1-Dz*Dz);Dx=rxy*cos(phi);Dy=rxy*sin(phi)' \
-e 'Ox=$1*.02+0.02;Oy=$2*0.02+0.02;Oz=$3*0.02+0.02' \
-e '$1=Ox;$2=Oy;$3=Oz;$4=Dx;$5=Dy;$6=Dz' \
| rtrace -h -ff -oov -ar 256 -as 256 -ad 512 -ab 3 scene.oct \
| total -if6 -10000 -m \
| rcalc -e '$1=$1;$2=$2;$3=$3;$4=4*PI*($4+$5+$6)/3' > fluence.dat
The "-oov" option of rtrace will output 6 floating point values, the XYZ origin for the ray and the RGB value. Your "total" command with "-if4" was not matching record boundaries, so the results would be all wrong.
Best,
-Greg
> From: Minki Sung <minki.sung at gmail.com>
> Date: April 21, 2012 11:48:41 AM PDT
>
> Hi Lars~
>
> I modified the script as follows, because i use just one channel out of RGB channels.
>
> set N=10000
> cnt 10 10 10 $N | rcalc -of -e 'Dz=1-2*($4+rand(.77-.61*recno))/'$N \
> -e 'phi=2*PI*($4+rand(-.10+.39*recno))'/$N \
> -e 'rxy=sqrt(1-Dz*Dz);Dx=rxy*cos(phi);Dy=rxy*sin(phi)' \
> -e 'Ox=$1*.02+0.02;Oy=$2*0.02+0.02;Oz=$3*0.02+0.02' \
> -e '$1=Ox;$2=Oy;$3=Oz;$4=Dx;$5=Dy;$6=Dz' \
> | rtrace -h -ff -oov -ar 256 -as 256 -ad 512 -ab 3 scene.oct \
> | total -if4 -10000 -m \
> | rcalc -e '$1=$1;$2=$2;$3=$3;$4=4*PI*$4' > fluence.dat
>
> I checked appropriate number of rays to trace for some positions and changes below 1% in results were observed between 10000 and more rays, but less than 10000 was not desirable. I need to check for all the positions concerned.
>
> Many thank you~
>
> Best,
> Minki
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.radiance-online.org/pipermail/radiance-general/attachments/20120421/c6bb5341/attachment.html>
More information about the Radiance-general
mailing list