Kevin Harris
CS6620
Programming assignment #2
25Jan99
Last modified 26jan1999
I'm not sure if this image is correct for the specifications, but I
sampled the image, estimated the integrals, and cranked the
resulting XYZ through the inverse of the matrix given by Bill.
Most of the images on here are estimating the integral by taking
samples across the entire space of wavelengths (400 to 700). They
all have a fuzzy look to them, and you can see where drand48 is
missing parts, as even the most sampled image I tried (4096 samples
per component) still has bad spots in it. I am not sure if this is
caused by drand48 or by my scaling to make it in range (floating
point precision lost when multiplying with a number which is at
least a factor of 300 times as big.
The matrix given was:
| 1.967 -0.995 0.064 | | -0.548 1.938 -0.130 | | -0.297 -0.027 0.982 |I have determined the above matrix to be the matrix that converts a color in the XYZ colorspace to a color in the RGB colorspace.
| 0.5935 0.3048 0.0017 | | 0.1802 0.6095 0.0689 | | 0.1845 0.1089 1.0207 |This matrix is the matrix that should be used to convert a color in the RGB colorspace to the XYZ colorspace.
Sampled with 1000 samples per pixel (1000 each for of X, Y, and Z).
1 sample per component (for every pixel)
2 samples per component (for every pixel)
4 samples per component (for every pixel)
8 samples per component (for every pixel)
16 samples per component (for every pixel)
32 samples per component (for every pixel)
64 samples per component (for every pixel)
4096 samples per component (for every pixel)
Here is an image that was created almost exactly like the above
images, except it was sampled regularly (not jittered), and the X,Y,
and Z values were converted to their x,y,z values (dividing by the
sum) before running through the conversion matrix, and I have
adjusted it with a gamma of 2.8. The result is an image that shows
the spectrum that is being sampled from with no fading based on the
vertical coordinate in the image.
256 samples per component (for every pixel), regular sampling
This one here was created without doing a sample of the integral. I
only sampled at the locations where the delta function would be
non-zero, took one sample per pixel component, shifted up all colors
so that the farthest negative value would have a color of black,
scaled down by the largest value (after being ajusted by the
smallest) to leave everything in the range of [0,1].
I prefer the randomly sampled versions, but I'll stick this one
here too.
1 sample per component (for every pixel)
Yet another image created for this. This one does NOT use the
inverted matrix, has a gamma of 1.7, and uses no sampling for
integral estimates. NOTE: Even though I only took one sample per
pixel, I lied to my delta function and said that there would be 128
samples per pixel.
A good looking version. 1 sample per pixel.
This image shows what I intended to show with the spectrum image
above. It is generated with a gamma of 1.7, and uses no samples for
the integral estimate. NOTE: Even though I only took one sample per
pixel, I lied to my delta function and said that there would be 128
samples per pixel.
The spectrum being sampled. One sample per pixel.