/***************************************************************************/
/* CIE Light sources data from: 
 *   
 *   ``Principles of Digital Image Synthesis'' Appendix G
 *     Andrew S. Glassner
 *     16 August 1994
 *   
 * This data is supplied free of charge to the computer graphics 
 * community by Morgan-Kaufmann publishers (1-800-745-7323).  
 * The data is provided
 * ``as-is''; no warranty or suitability claims of any kind are made.
 * Citations refer to the bibliography in the book,
 * ``Principles of Digital Image Synthesis'' by Andrew S. Glassner.
 * 
 * I have presented each of these functions in 5 nanometer increments 
 * from 380 to 775 nanometers, for a total of 80 values per curve.  
 * Sometimes this has meant interpolating the published data; I 
 * reconstructed the data with a hermite cubic spline and point-sampled 
 * it to get these values.  I didn't extrapolate the data beyond its 
 * measured endpoints, since for some of the data such extrapolation 
 * would have yielded values that would have dwarfed the rest of the curve.
 * Therefore I instead simply used the endpoint values when out of range.
 * 
 * As of publication, all the data in this appendix is available on the 
 * anonymous ftp server 
 * {\tt ftp.cs.princeton.edu} (internet address 128.112.92.1).
 * Please feel free to download the data, use it, and share it.  You may 
 * also repost or redistribute the information in this appendix data freely.
 * This release to the public domain applies to this appendix only, and to 
 * no other part of this book.
 * 
 * Reformated using gawk by Andrzej Lukaszewski 12.12.2003
 */
/***************************************************************************/
/*
 * This header defines following table in 5nm (380-780nm incl.) :
 * Light LightDB[]
 *   elements are struct of:  name - string, lambda - emission table  
 */
/***************************************************************************/
/* Table~\ref{tbl-abc-curves}
 * presents the reference curves for
 * CIE Standard Illuminants A, B, and C.
 * Table~\ref{tbl-bulbs}
 * provides data for a cool white fluorescent bulb
 * and CIE standard illuminant D65.
 * The values in these figures
 * were interpolated from data collected from
 * $[370,730]$ nanometers in one nanometer increments in
 * Brian Wandell's laboratory at Stanford University.
 * Table~\ref{tbl-cie-daylight} gives the curves for the
 * three CIE standard daylight illuminants.
 */
typedef struct Light {
   char  name[5];
   float lambda[81];
} Light;

Light LightDB[] = {
  { "A", {
  0.045345, 0.050435, 0.055941, 0.061771, 0.068064, 0.074727, 
  0.081806, 0.089256, 0.097122, 0.105451, 0.114150, 0.123265, 
  0.132797, 0.142745, 0.153109, 0.163844, 0.174949, 0.186470, 
  0.198362, 0.210624, 0.223209, 0.236165, 0.249445, 0.263048, 
  0.276976, 0.291181, 0.305664, 0.320424, 0.335462, 0.350685, 
  0.366139, 0.381825, 0.397696, 0.413705, 0.429900, 0.446234, 
  0.462706, 0.479271, 0.495928, 0.512678, 0.529521, 0.546363, 
  0.563252, 0.580187, 0.597076, 0.614011, 0.630900, 0.647742, 
  0.664538, 0.681288, 0.697946, 0.714510, 0.730983, 0.747363, 
  0.763604, 0.779706, 0.795669, 0.811494, 0.827179, 0.842680, 
  0.857996, 0.873126, 0.888071, 0.902832, 0.917361, 0.931705, 
  0.945817, 0.959698, 0.973348, 0.986813, 1.000000, 1.000000, 
  1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 1.000000, 
  1.000000, 1.000000, 0.0 } },

  { "B", {
  0.103646, 0.124237, 0.144827, 0.167407, 0.191098, 0.215713, 
  0.241070, 0.266981, 0.292430, 0.316352, 0.338238, 0.357718, 
  0.373866, 0.386082, 0.395151, 0.401999, 0.408569, 0.416805, 
  0.425689, 0.433787, 0.440496, 0.445262, 0.442347, 0.442856, 
  0.435869, 0.427401, 0.419674, 0.414816, 0.414122, 0.418425, 
  0.426615, 0.437072, 0.448362, 0.458819, 0.467333, 0.472885, 
  0.475662, 0.476217, 0.474736, 0.471497, 0.467333, 0.463030, 
  0.459004, 0.455488, 0.453452, 0.453822, 0.455765, 0.458356, 
  0.461318, 0.464372, 0.467333, 0.469924, 0.472885, 0.476818, 
  0.480751, 0.483944, 0.485841, 0.486211, 0.485378, 0.483759, 
  0.480751, 0.475847, 0.470109, 0.464464, 0.458542, 0.452064, 
  0.445123, 0.437720, 0.429854, 0.421525, 0.413659, 0.413659, 
  0.413659, 0.413659, 0.413659, 0.413659, 0.413659, 0.413659, 
  0.413659, 0.413659, 0.0 } },

  { "C", {
  0.152693, 0.184712, 0.219323, 0.255275, 0.292893, 0.332269, 
  0.372941, 0.414261, 0.453914, 0.489543, 0.520081, 0.544836, 
  0.562188, 0.571210, 0.573755, 0.571904, 0.569591, 0.570516, 
  0.572830, 0.574172, 0.573293, 0.568758, 0.558486, 0.540903, 
  0.518693, 0.495003, 0.473348, 0.457200, 0.448362, 0.447807, 
  0.453452, 0.462428, 0.472423, 0.480983, 0.486767, 0.488941, 
  0.487229, 0.481723, 0.473348, 0.463400, 0.452526, 0.441560, 
  0.431242, 0.422080, 0.415047, 0.411022, 0.409032, 0.408060, 
  0.407644, 0.407459, 0.407181, 0.406533, 0.406256, 0.407135, 
  0.408107, 0.408107, 0.406718, 0.403572, 0.399315, 0.394688, 
  0.388673, 0.380391, 0.371090, 0.362021, 0.353045, 0.344068, 
  0.334999, 0.325745, 0.316028, 0.306774, 0.297983, 0.297983, 
  0.297983, 0.297983, 0.297983, 0.297983, 0.297983, 0.297983, 
  0.297983, 0.297983, 0.0 } },

  { "F", {
  0.000000, 0.000000, 0.000000, 0.000000, 0.243051, 0.000000, 
  0.246102, 0.097401, 0.096203, 0.368037, 0.637017, 0.626603, 
  0.459051, 0.320830, 0.256475, 0.263880, 0.296339, 0.308912, 
  0.308339, 0.310210, 0.313830, 0.315258, 0.313830, 0.309960, 
  0.305085, 0.301570, 0.304475, 0.315184, 0.317695, 0.309516, 
  0.359593, 0.518761, 0.693966, 0.784533, 0.803186, 0.792184, 
  0.798508, 0.854789, 0.931525, 0.987479, 0.996610, 0.948428, 
  0.879458, 0.826315, 0.778983, 0.721405, 0.660000, 0.603640, 
  0.548542, 0.488339, 0.418983, 0.341488, 0.274780, 0.234955, 
  0.208881, 0.180710, 0.152949, 0.131028, 0.113695, 0.098593, 
  0.085627, 0.075082, 0.066508, 0.059265, 0.052678, 0.000000, 
  0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 
  0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 
  0.000000, 0.000000, 0.0 } },

  { "D65", {
  50.000000, 52.299999, 54.599998, 68.699997, 82.800003, 87.150002, 
  91.500000, 92.449997, 93.400002, 90.050003, 86.699997, 95.800003, 
  104.900002, 110.949997, 117.000000, 117.400002, 117.800003, 116.349998, 
  114.900002, 115.400002, 115.900002, 112.349998, 108.800003, 109.099998, 
  109.400002, 108.599998, 107.800003, 106.300003, 104.800003, 106.250000, 
  107.699997, 106.050003, 104.400002, 104.199997, 104.000000, 102.000000, 
  100.000000, 98.150002, 96.300003, 96.050003, 95.800003, 92.250000, 
  88.699997, 89.349998, 90.000000, 89.800003, 89.599998, 88.650002, 
  87.699997, 85.500000, 83.300003, 83.500000, 83.699997, 81.849998, 
  80.000000, 80.099998, 80.199997, 81.250000, 82.300003, 80.300003, 
  78.300003, 74.000000, 69.699997, 70.650002, 71.599998, 72.949997, 
  74.300003, 67.949997, 61.599998, 65.750000, 69.900002, 69.900002, 
  69.900002, 69.900002, 69.900002, 69.900002, 69.900002, 69.900002, 
  69.900002, 69.900002, 0.0 } },

  { "day0", {
  63.400000, 64.600000, 65.800000, 80.300000, 94.800000, 99.800000, 
  104.800000, 105.400000, 105.900000, 101.400000, 96.800000, 105.400000, 
  113.900000, 119.800000, 125.600000, 125.600000, 125.500000, 123.400000, 
  121.300000, 121.300000, 121.300000, 117.400000, 113.500000, 113.300000, 
  113.100000, 112.000000, 110.800000, 108.700000, 106.500000, 107.700000, 
  108.800000, 107.100000, 105.300000, 104.900000, 104.400000, 102.200000, 
  100.000000, 98.000000, 96.000000, 95.600000, 95.100000, 92.100000, 
  89.100000, 89.800000, 90.500000, 90.400000, 90.300000, 89.400000, 
  88.400000, 86.200000, 84.000000, 84.600000, 85.100000, 83.500000, 
  81.900000, 82.300000, 82.600000, 83.800000, 84.900000, 83.100000, 
  81.300000, 76.600000, 71.900000, 73.100000, 74.300000, 75.400000, 
  76.400000, 69.900000, 63.300000, 67.500000, 71.700000, 74.400000, 
  77.000000, 71.100000, 65.200000, 56.500000, 47.700000, 58.200000, 
  68.600000, 66.800000, 0.0 } },

  { "day1", {
  38.500000, 36.800000, 35.000000, 39.200000, 43.400000, 44.900000, 
  46.300000, 45.100000, 43.900000, 40.500000, 37.100000, 36.900000, 
  36.700000, 36.300000, 35.900000, 34.300000, 32.600000, 30.300000, 
  27.900000, 26.100000, 24.300000, 22.200000, 20.100000, 18.200000, 
  16.200000, 14.700000, 13.200000, 10.900000, 8.600000, 7.400000, 
  6.100000, 5.200000, 4.200000, 3.100000, 1.900000, 1.000000, 
  0.000000, -0.800000, -1.600000, -2.600000, -3.500000, -3.500000, 
  -3.500000, -4.700000, -5.800000, -6.500000, -7.200000, -7.900000, 
  -8.600000, -9.100000, -9.500000, -10.200000, -10.900000, -10.800000, 
  -10.700000, -11.400000, -12.000000, -13.000000, -14.000000, -13.800000, 
  -13.600000, -12.800000, -12.000000, -12.700000, -13.300000, -13.100000, 
  -12.900000, -11.800000, -10.600000, -11.100000, -11.600000, -11.900000, 
  -12.200000, -11.200000, -10.200000, -9.000000, -7.800000, -9.500000, 
  -11.200000, -10.800000, 0.0 } },

  { "day2", {
  3.000000, 2.100000, 1.200000, 0.100000, -1.100000, -0.800000, 
  -0.500000, -0.600000, -0.700000, -0.900000, -1.200000, -1.900000, 
  -2.600000, -2.800000, -2.900000, -2.800000, -2.800000, -2.700000, 
  -2.600000, -2.600000, -2.600000, -2.200000, -1.800000, -1.600000, 
  -1.500000, -1.400000, -1.300000, -1.300000, -1.200000, -1.100000, 
  -1.000000, -0.800000, -0.500000, -0.400000, -0.300000, -0.200000, 
  0.000000, 0.100000, 0.200000, 0.400000, 0.500000, 1.300000, 
  2.100000, 2.700000, 3.200000, 3.700000, 4.100000, 4.400000, 
  4.700000, 4.900000, 5.100000, 5.900000, 6.700000, 7.000000, 
  7.300000, 8.000000, 8.600000, 9.200000, 9.800000, 10.000000, 
  10.200000, 9.300000, 8.300000, 9.000000, 9.600000, 9.000000, 
  8.500000, 7.800000, 7.000000, 7.300000, 7.600000, 7.800000, 
  8.000000, 7.400000, 6.700000, 6.000000, 5.200000, 6.300000, 
  7.400000, 7.100000, 0.0 } }

};   /* LightDB[] end */
