|
|
> #declare Acc = <0, 0, 0>;
> #for (I, 0, 35)
> #local Wl = 380 + I * 10;
> #declare Acc = Acc + CMF_xyz (Wl) * LEVEL; // Illuminant E
> #end
> #declare C = Acc / 36;
What units are the return value from CMF_xyz (specifically, is it nm^-1
or does it return the xyz for a 10nm band width)? I suspect you need to
multiply the value by 10 if you are using 10 nm width spectral bands.
Also I don't see why you need the Acc/36 line, the result should be the
sum of all the wavelength contributions, not the average.
If you change those two things, does the below give the correct result?
#declare Acc = <0, 0, 0>;
#for (I, 0, 35)
#local Wl = 380 + I * 10;
#declare Acc = Acc + CMF_xyz (Wl) * 10 * LEVEL; // Illuminant E
#end
#declare C = Acc;
Post a reply to this message
|
|