Program 2 - Spectral Sampling

From the flowchart Pete made for us in class, the first step is to take our L(x,y,lambda) function and come up with the CIE Tristimulus X, Y, and Z values. By integrating we see that X = y / ny * xbar(420 * x / nx + 380), with Y and Z values being analogous. Note: in class we had this with multiplied by 1 / 683. If you multiply by this value you'll need to up the k value when you tone map. Anyway, to find the value of xbar(lambda) we use the table Pete provided. Next we convert to (x, y, Y) space, and then tone map to obtain (X0, Y0, Z0). Finally we use the handy matrix from Pete's book to get (R, G, B) values and clamp them to the range [0, 1].


Rendered with k=1


k=0.5


k=4


k=8

I'll probably do the Macbeth color checker as well (if I make time).


-Amy Williams