Billy Biggs 97049311 wbiggs@uwaterloo.ca
Haines, Eric, "Point in Polygon Strategies," Graphics Gems IV, ed. Paul Heckbert, Academic Press, p. 24-46, 1994 http://www.acm.org/pubs/tog/editors/erich/ptinpoly/. Tomas Möller and Ben Trumbore., "Fast, minimum storage ray-triangle intersection." Journal of Graphics Tools, 2(1):21--28, 1997. http://www.graphics.cornell.edu/pubs/1997/MT97.html.The adaptive supersampling technique is taken from Foly & van Dam. My reference for colour and gamma functions is, as always, Poynton. The model of the teapot is from an example nVidia model, and the phone handset (yes, that's what it is) is from an unknown source.
Source code and executable for the raytracer is here.
|   | 
| My scene: Flying teapot, blue sphere, and flying phone handset. Teapot model has over 8400 polygons. 2x supersampled. Two point light sources. Phong exponent of 50. (Yes, I'm going to code vertex normal support next, just to make that teapot look better). | 
|   | 
| My scene with vertex normals: Flying teapot, blue sphere, and flying phone handset. No vertex normals for the flying phone handset because of the silly model format used to generate it. This code was not in the raytracer I submitted for assignment 1, and I just put this up here because it's a cool contrast to the image above. | 
| Red |  |  | 
| Green |  |  | 
| Blue |  |  | 
| White (D65) |  |  | 
These are the primaries specified by both ITU-R BT.709 and sRGB.  Given
these chromanicities, we are given a relationship between the  coordinates and the values of
coordinates and the values of  ,
,  , and
, and  .  For example, the
.  For example, the  value of any
value of any  colour can be expressed as a linear combination of
the
 colour can be expressed as a linear combination of
the  values for
 values for  ,
,  , and
, and  individually.  Since we can derive
those from the chromanicities, we define constants
 individually.  Since we can derive
those from the chromanicities, we define constants  ,
,  and
 and
 to represent the factors of which the chromanicities contribute to
the resulting
 to represent the factors of which the chromanicities contribute to
the resulting  value.  To solve these values, I'm using the
notation and ideas from the method described in Foley/van Dam.
 value.  To solve these values, I'm using the
notation and ideas from the method described in Foley/van Dam.
![\begin{eqnarray*}
\left[\begin{array}{c} X \\ Y \\ Z \\ \end{array}\right]
& = &...
...ft[\begin{array}{c} R \\ G \\ B \\ \end{array}\right]
\end{array}\end{eqnarray*}](img17.png) 
In order to compute the values of  ,
,  and
 and  , we need a
known reference point.  For this we will use the D65 white point (black
body at 6500K) and use unity luminance (
, we need a
known reference point.  For this we will use the D65 white point (black
body at 6500K) and use unity luminance ( ) and map this to
) and map this to  .
.
 
We can now use these to solve for  ,
,  and
 and  by taking the
inverse of the following:
 by taking the
inverse of the following:
![\begin{eqnarray*}
\left[\begin{array}{c} X_{D65} \\ Y_{D65} \\ Z_{D65} \\ \end{a...
...gin{array}{c} C_r \\ C_g \\ C_b \\ \end{array}\right]
\end{array}\end{eqnarray*}](img22.png) 
We get:
![\begin{eqnarray*}
\left[\begin{array}{c} C_r \\ C_g \\ C_b \\ \end{array}\right]...
...n{array}{c} 0.6444 \\ 1.1919 \\ 1.2033 \\ \end{array}\right] \\
\end{eqnarray*}](img23.png) 
Submitting back, we get the final matrix:
![\begin{eqnarray*}
\left[\begin{array}{c} X \\ Y \\ Z \\ \end{array}\right]
& = &...
...ft[\begin{array}{c} R \\ G \\ B \\ \end{array}\right]
\end{array}\end{eqnarray*}](img17.png) 
Inverting this we get the desired matrix:
![\begin{eqnarray*}
\left[\begin{array}{c} R_{sRGB} \\ G_{sRGB} \\ Z_{sRGB} \\ \en...
...egin{array}{c} X \\ Y \\ Z \\ \end{array}\right]
\end{array} \\
\end{eqnarray*}](img24.png) 
|   | 
| Raw version, relative sensitivity on the y axis, wavelength in nanometers along the x axis. | 
|   | 
| Normalized version such that each integral sums to unity. Again, relative sensitivity on the y axis, wavelength in nanometers along the x axis. | 
|   | 
| Plot of xy chromaticities with the sRGB gamut hilighted by slightly higher luminance. x values along the x axis, y values along the y axis, with 0,0 in the lower left corner of the image. This image was converted to sRGB for a display gamma of 2.2 (using the crazy 2.4 curve specified in the standard). | 
|   | 
| Plot of u'v' chromaticities with the sRGB gamut hilighted by slightly higher luminance. The u' axis is along the bottom, and the v' axis along the left so 0,0 is again in the lower left corner. This image was also corrected for a display gamma of 2.2. | 
| ![[ICO]](/icons/blank.gif) | Name | Last modified | Size | Description | 
|---|---|---|---|---|
| ![[PARENTDIR]](/icons/back.gif) | Parent Directory | - | ||
| ![[   ]](/icons/compressed.gif) | colour-0.1.tar.gz | 2002-01-30 05:53 | 18K | |
| ![[DIR]](/icons/folder.gif) | colour/ | 2002-01-29 23:21 | - | |
| ![[IMG]](/icons/image2.gif) | final-vnormals.png | 2002-01-30 23:46 | 27K | |
| ![[IMG]](/icons/image2.gif) | final.png | 2002-01-30 05:16 | 30K | |
| ![[TXT]](/icons/text.gif) | final.txt | 2002-01-30 05:44 | 324K | |
| ![[IMG]](/icons/image2.gif) | img1.png | 2002-01-30 00:04 | 497 | |
| ![[IMG]](/icons/image2.gif) | img2.png | 2002-01-30 00:04 | 561 | |
| ![[IMG]](/icons/image2.gif) | img3.png | 2002-01-30 00:04 | 479 | |
| ![[IMG]](/icons/image2.gif) | img4.png | 2002-01-30 00:04 | 533 | |
| ![[IMG]](/icons/image2.gif) | img5.png | 2002-01-30 00:04 | 473 | |
| ![[IMG]](/icons/image2.gif) | img6.png | 2002-01-30 00:04 | 531 | |
| ![[IMG]](/icons/image2.gif) | img7.png | 2002-01-30 00:04 | 531 | |
| ![[IMG]](/icons/image2.gif) | img8.png | 2002-01-30 00:04 | 610 | |
| ![[IMG]](/icons/image2.gif) | img9.png | 2002-01-30 00:04 | 409 | |
| ![[IMG]](/icons/image2.gif) | img10.png | 2002-01-30 00:04 | 270 | |
| ![[IMG]](/icons/image2.gif) | img11.png | 2002-01-30 00:04 | 271 | |
| ![[IMG]](/icons/image2.gif) | img12.png | 2002-01-30 00:04 | 260 | |
| ![[IMG]](/icons/image2.gif) | img13.png | 2002-01-30 00:04 | 255 | |
| ![[IMG]](/icons/image2.gif) | img14.png | 2002-01-30 00:04 | 438 | |
| ![[IMG]](/icons/image2.gif) | img15.png | 2002-01-30 00:04 | 313 | |
| ![[IMG]](/icons/image2.gif) | img16.png | 2002-01-30 00:04 | 332 | |
| ![[IMG]](/icons/image2.gif) | img17.png | 2002-01-30 00:04 | 3.2K | |
| ![[IMG]](/icons/image2.gif) | img18.png | 2002-01-30 00:04 | 327 | |
| ![[IMG]](/icons/image2.gif) | img19.png | 2002-01-30 00:04 | 245 | |
| ![[IMG]](/icons/image2.gif) | img20.png | 2002-01-30 00:04 | 555 | |
| ![[IMG]](/icons/image2.gif) | img21.png | 2002-01-30 00:04 | 3.7K | |
| ![[IMG]](/icons/image2.gif) | img22.png | 2002-01-30 00:04 | 3.0K | |
| ![[IMG]](/icons/image2.gif) | img23.png | 2002-01-30 00:04 | 6.0K | |
| ![[IMG]](/icons/image2.gif) | img24.png | 2002-01-30 00:04 | 4.8K | |
| ![[   ]](/icons/compressed.gif) | portray-0.1.tar.gz | 2002-01-30 00:23 | 154K | |
| ![[IMG]](/icons/image2.gif) | rgbnorm.png | 2002-01-29 21:42 | 4.6K | |
| ![[IMG]](/icons/image2.gif) | rgbraw.png | 2002-01-29 21:42 | 4.4K | |
| ![[IMG]](/icons/image2.gif) | spheres.png | 2002-01-29 23:18 | 41K | |
| ![[   ]](/icons/a.gif) | srgb-derivation.ps | 2002-01-30 05:32 | 78K | |
| ![[   ]](/icons/tex.gif) | srgb-derivation.tex | 2002-01-30 00:06 | 3.7K | |
| ![[   ]](/icons/compressed.gif) | submission.tar.gz | 2002-01-30 05:53 | 307K | |
| ![[TXT]](/icons/text.gif) | textonly.html | 2002-01-30 00:09 | 9.0K | |
| ![[IMG]](/icons/image2.gif) | uv-srgb.png | 2002-01-29 21:43 | 35K | |
| ![[IMG]](/icons/image2.gif) | xy-srgb-ymapped.png | 2002-01-30 15:49 | 60K | |
| ![[IMG]](/icons/image2.gif) | xy-srgb.png | 2002-01-29 21:43 | 48K | |