--- ray/doc/ray.html 2023/11/16 21:57:39 1.34 +++ ray/doc/ray.html 2023/12/13 23:26:16 1.38 @@ -1,5 +1,5 @@ - + The RADIANCE 6.0 Synthetic Imaging System @@ -1482,11 +1482,9 @@ or: </pre> <p> - The first two real arguments indicate the limits of the covered + The first two real arguments indicate the extrema of the spectral range in nanometers. - Subsequent real values correspond to multipliers in each wavelength band, - where the first band goes from nmA to nmA+(nmB-nmA)/N, and N is the - number of bands (i.e., the number of real arguments minus 2). + Subsequent real values correspond to multipliers at each wavelength. The nmA wavelength may be greater or less than nmB, but they may not be equal, and their ordering matches the order of the spectral values. @@ -1542,7 +1540,7 @@ or: <pre> mod specfunc id - 2+ sval funcfile transform + 2+ sfunc funcfile transform 0 2+ nmA nmB A3 .. </pre> @@ -1550,10 +1548,65 @@ or: <p> Like the spectrum primitive, the wavelength range is specified in the first two real arguments, and additional real values are - accessible to the sval function. + set in the evaluation context. This function is fed a wavelenth sample between nmA and nmB as its only argument, and it returns the corresponding spectral intensity. + +<dt> + <a NAME="Specdata"> + <b>Specdata</b> + </a> + +<dd> + Specdata is like brightdata and colordata, but with more + than 3 specular samples. + +<pre> + mod specdata id + 3+n+ + func datafile + funcfile x1 x2 .. xn transform + 0 + m A1 A2 .. Am +</pre> + +<p> + The data file must have one more dimension than the coordinate + variable count, as this final dimension corresponds to the covered + spectrum. + The starting and ending wavelengths are specified in "datafile" + as well as the number of spectral samples. + The function "func" will be called with two parameters, the + interpolated spectral value for the current coordinate and the + associated wavelength. + If the spectrum is broken into 12 components, then 12 calls + will be made to "func" for the relevant ray evaluation. + +<dt> + <a NAME="Specpict"> + <b>Specpict</b> + </a> + +<dd> + Specpict is a special case of specdata, where the pattern is + a hyperspectral image stored in the common-exponent file format. + The dimensions of the image data are determined by the picture + just as with the colorpict primitive. + +<pre> + mod specpict id + 5+ + func specfile + funcfile u v transform + 0 + m A1 A2 .. Am +</pre> + +<p> + The function "func" is called with the interpolated pixel value + and the wavelength sample in nanometers, the same as specdata, + with as many calls made as there are components in "specfile". </dl>