[Radiance-general] Re: trans dashboard widget
Gregory J. Ward
gregoryjward at gmail.com
Fri Apr 30 11:55:06 PDT 2010
Hi Andy,
This was more of a struggle than I expected. I don't know what I did
with my old color wheel, so I tried to come up with an expression to
generate a new one based on the Wikipedia page on HSV conversions.
It's not quite what I was going for, but it's OK:
pcomb -x 512 -y xres \
-e 'xc:xres/2;yc:yres/2;xr=(x-xc)/xc;yr=(y-yc)/yc' \
-e 'rv=.7349*xr-.3495*yr;gv=-.2651*xr+.2279*yr;bv=-.2651*xr-.9268*yr' \
-e 'max(a,b):if(a-b,a,b);Y=1-max(rv,max(gv,bv))' \
-e 'in=1-xr*xr-yr*yr' \
-e 'ro=if(in,Y+rv,.5);go=if(in,Y+gv,.5);bo=if(in,Y+bv,.5)' \
| ra_tiff - color_wheel.tif
When the user chooses a color, you'll have to map back to linear RGB
(undoing the 2.2 gamma) and normalize.
Hope it works!
-Greg
P.S. I didn't notice the trick of going to "plastic" when
transmission is zero -- very nice!
> From: Andy McNeil <amcneil at lbl.gov>
> Date: April 30, 2010 9:22:17 AM PDT
>
> Hi Greg,
>
> You're right, the ability to specify color would be nice. Yes,
> please send your image.
> Did you notice what happens when Td & Ts are set to zero?
>
> Thanks,
> Andy
More information about the Radiance-general
mailing list