···
=================================
min : $min ;
max : $max ;
step : $step ;
scale : $max-$min ;
clipx : ifx\-1,1,if\(x,x,0);
renderx = floor\(x\-min/step)*step/scale;
{renderx = x\-min/scale;}
interp_arr10x, arr = \(x\-floor\(x) *
arrceil\(x+1)-arrfloor\(x+1)) / 1 ) + arrfloor\(x+1);
interp_arrx, arr = interp_arr10x\*10, arr;
def_redx = interp_arrx, def\_red\_arr;
def_grnx = interp_arrx, def\_grn\_arr;
def_blux = interp_arrx, def\_blu\_arr;
def_red_arri : select(i,
.03,.17,.31,.45,.57,.67,.76,.84,.90,.97,.99 );
def_grn_arri : select(i,
.10,.21,.32,.43,.53,.60,.69,.78,.87,.96,.99 );
def_blu_arri : select(i,
.27,.34,.41,.47,.53,.58,.64,.74,.85,.95,.96 );
in = 1;
ro = ifin, def\_red\(clip\(render\(v)), rorig);
go = ifin, def\_grn\(clip\(render\(v)), gorig);
bo = ifin, def\_blu\(clip\(render\(v)), borig);
Where you can implement your own palette by changing these lines:
...selecti, \.03,\.17,\.31,\.45,\.57,\.67,\.76,\.84,\.90,\.97,\.99 ;
...selecti, \.10,\.21,\.32,\.43,\.53,\.60,\.69,\.78,\.87,\.96,\.99 ;
...selecti, \.27,\.34,\.41,\.47,\.53,\.58,\.64,\.74,\.85,\.95,\.96 ;
Best Regards,
Ilya A. Zimnovich
David Smith wrote:
I'm trying to make a false color / pseudo color image that matches the
color palette from a non-lighting program. It would work great with
four nested IF statements, but falsecolor -r/g/b doesn't seem to want
to take them. Has anybody come up with a workaround for this or am I
better off editing the falsecolor script?
Perhaps there is a way to use higher order functions?
Here's an image of the scale and a close numerical pseudocolor
traversal: ImageShack - Best place for all of your image hosting and image sharing needs
This would be the if statement for the falsecolor -r argument:
ifv\-5/7,1,if\(v\-4/7,7v\-4,if\(v\-2/7,0,if\(v\-1/7,2\-7v,7v)))
--Dave
_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general