Changeset 2202


Ignore:
Timestamp:
Jan 5, 2013, 6:56:32 PM (7 years ago)
Author:
sam
Message:

color: move the CIEDE2000 distance code into the C++ file and
reorganise the CIE-1931 and CIE-1964 tables.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/image/color/cie1931.cpp

    r2200 r2202  
    1515#include "core.h"
    1616
     17/*
     18 * This file contains code and data related to various CIE standards.
     19 *  - the CIE-1931 Standard Colorimetric Observer data
     20 *  - the CIE-1964 Standard Colorimetric Observer data
     21 *  - the CIEDE2000 metric
     22 */
     23
    1724namespace lol
    1825{
     26
     27float Color::DistanceCIEDE2000(vec3 lab1, vec3 lab2)
     28{
     29    float const deg2rad = 6.28318530718f / 360.f;
     30    float const rad2deg = 360.f / 6.28318530718f;
     31
     32    float C1 = length(lab1.yz);
     33    float C2 = length(lab2.yz);
     34    float C_ = 0.5f * (C1 + C2);
     35
     36    float L1 = lab1.x;
     37    float L2 = lab2.x;
     38    float dLp = L2 - L1;
     39    float L_ = 0.5f * (L1 + L2);
     40
     41    float tmp1 = pow(C_, 7.f);
     42    float tmp2 = 1.5f - 0.5f * sqrt(tmp1 / (tmp1 + pow(25.f, 7.f)));
     43    float ap1 = lab1.y * tmp2;
     44    float ap2 = lab2.y * tmp2;
     45    float Cp1 = sqrt(ap1 * ap1 + lab1.z * lab1.z);
     46    float Cp2 = sqrt(ap2 * ap2 + lab2.z * lab2.z);
     47    float dCp = Cp2 - Cp1;
     48    float Cp_ = 0.5f * (Cp1 + Cp2);
     49
     50    float hp1 = fmod(atan2(lab1.z, ap1) * rad2deg, 360.f);
     51    if (hp1 < 0.f)
     52        hp1 += 360.f;
     53    float hp2 = fmod(atan2(lab2.z, ap2) * rad2deg, 360.f);
     54    if (hp2 < 0.f)
     55        hp2 += 360.f;
     56    float dhp;
     57    if (abs(hp1 - hp2) <= 180.f)
     58        dhp = hp2 - hp1;
     59    else if (hp2 <= hp1)
     60        dhp = hp2 - hp1 + 360.f;
     61    else
     62        dhp = hp2 - hp1 - 360.f;
     63    float dHp = 2.f * sqrt(Cp1 * Cp2) * sin(dhp / 2.f * deg2rad);
     64    float Hp_;
     65    if (abs(hp1 - hp2) > 180.f)
     66        Hp_ = 0.5f * (hp1 + hp2 + 360.f);
     67    else
     68        Hp_ = 0.5f * (hp1 + hp2);
     69
     70    float T = 1.f - 0.17f * cos((Hp_ - 30.f) * deg2rad)
     71                  + 0.24f * cos(2 * Hp_ * deg2rad)
     72                  + 0.32f * cos((3.f * Hp_ + 6.f) * deg2rad)
     73                  - 0.20f * cos((4.f * Hp_ - 63.f) * deg2rad);
     74    float SL = 1.f + 0.015f * (L_ - 50) * (L_ - 50)
     75                            / sqrt(20.f + (L_ - 50) * (L_ - 50));
     76    float SC = 1.f + 0.045f * Cp_;
     77    float SH = 1.f + 0.015f * Cp_ * T;
     78    float RT = -2.f * sqrt(pow(Cp_, 7.f) / (pow(Cp_, 7.f) + pow(25.f, 7.f)))
     79                    * sin(60.f * deg2rad * exp(-pow((Hp_ - 275.f) / 25.f, 2.f)));
     80
     81    dLp /= SL;
     82    dCp /= SC;
     83    dHp /= SH;
     84
     85    return sqrt(dLp * dLp + dCp * dCp + dHp * dHp + RT * dCp * dHp);
     86}
    1987
    2088/* CIE 1931 Standard Colorimetric Observer, aka. 2º Observer
     
    2290static float cie_1931_xyz[] =
    2391{
    24     0.0001299f, 3.917e-06f, 0.0006061f, /* 360 nm */
    25     0.0001458f, 4.394e-06f, 0.0006809f,
    26     0.0001638f, 4.93e-06f, 0.0007651f,
    27     0.000184f, 5.532e-06f, 0.00086f,
    28     0.0002067f, 6.208e-06f, 0.0009666f,
    29     0.0002321f, 6.965e-06f, 0.001086f,
    30     0.0002607f, 7.813e-06f, 0.0012206f,
    31     0.0002931f, 8.767e-06f, 0.0013727f,
    32     0.0003294f, 9.84e-06f, 0.0015436f,
    33     0.0003699f, 1.104e-05f, 0.0017343f,
    34     0.0004149f, 1.239e-05f, 0.001946f,
    35     0.0004642f, 1.389e-05f, 0.0021778f,
    36     0.000519f, 1.556e-05f, 0.0024358f,
    37     0.0005819f, 1.744e-05f, 0.002732f,
    38     0.0006552f, 1.958e-05f, 0.0030781f,
    39     0.0007416f, 2.202e-05f, 0.003486f,
    40     0.000845f, 2.484e-05f, 0.0039752f,
    41     0.0009645f, 2.804e-05f, 0.0045409f,
    42     0.0010949f, 3.153e-05f, 0.0051583f,
    43     0.0012312f, 3.522e-05f, 0.0058029f,
    44     0.001368f, 0.000039f, 0.00645f,
    45     0.0015021f, 4.283e-05f, 0.0070832f,
    46     0.0016423f, 4.691e-05f, 0.0077455f,
    47     0.0018024f, 5.159e-05f, 0.0085012f,
    48     0.0019958f, 5.718e-05f, 0.0094145f,
    49     0.002236f, 0.000064f, 0.01055f,
    50     0.0025354f, 7.234e-05f, 0.0119658f,
    51     0.0028926f, 8.221e-05f, 0.0136559f,
    52     0.0033008f, 9.351e-05f, 0.0155881f,
    53     0.0037532f, 0.0001061f, 0.0177302f,
    54     0.004243f, 0.00012f, 0.02005f,
    55     0.0047624f, 0.000135f, 0.0225114f,
    56     0.00533f, 0.0001515f, 0.0252029f,
    57     0.0059787f, 0.0001702f, 0.0282797f,
    58     0.0067411f, 0.0001918f, 0.031897f,
    59     0.00765f, 0.000217f, 0.03621f,
    60     0.0087514f, 0.0002469f, 0.0414377f,
    61     0.0100289f, 0.0002812f, 0.0475037f,
    62     0.0114217f, 0.0003185f, 0.0541199f,
    63     0.012869f, 0.0003573f, 0.060998f,
    64     0.01431f, 0.000396f, 0.06785f, /* 400 nm */
    65     0.0157044f, 0.0004337f, 0.0744863f,
    66     0.0171474f, 0.000473f, 0.0813616f,
    67     0.0187812f, 0.0005179f, 0.0891536f,
    68     0.020748f, 0.0005722f, 0.0985405f,
    69     0.02319f, 0.00064f, 0.1102f,
    70     0.0262074f, 0.0007246f, 0.1246133f,
    71     0.0297825f, 0.0008255f, 0.1417017f,
    72     0.0338809f, 0.0009412f, 0.1613035f,
    73     0.0384682f, 0.0010699f, 0.1832568f,
    74     0.04351f, 0.00121f, 0.2074f,
    75     0.0489956f, 0.0013621f, 0.2336921f,
    76     0.0550226f, 0.0015308f, 0.2626114f,
    77     0.0617188f, 0.0017204f, 0.2947746f,
    78     0.069212f, 0.0019353f, 0.3307985f,
    79     0.07763f, 0.00218f, 0.3713f,
    80     0.0869581f, 0.0024548f, 0.4162091f,
    81     0.0971767f, 0.002764f, 0.4654642f,
    82     0.1084063f, 0.0031178f, 0.5196948f,
    83     0.1207672f, 0.0035264f, 0.5795303f,
    84     0.13438f, 0.004f, 0.6456f,
    85     0.1493582f, 0.0045462f, 0.7184838f,
    86     0.1653957f, 0.0051593f, 0.7967133f,
    87     0.1819831f, 0.0058293f, 0.8778459f,
    88     0.198611f, 0.0065462f, 0.959439f,
    89     0.21477f, 0.0073f, 1.0390501f,
    90     0.2301868f, 0.0080865f, 1.1153673f,
    91     0.2448797f, 0.0089087f, 1.1884971f,
    92     0.2587773f, 0.0097677f, 1.2581233f,
    93     0.2718079f, 0.0106644f, 1.3239296f,
    94     0.2839f, 0.0116f, 1.3856f,
    95     0.2949438f, 0.0125732f, 1.4426352f,
    96     0.3048965f, 0.0135827f, 1.4948035f,
    97     0.3137873f, 0.0146297f, 1.5421903f,
    98     0.3216454f, 0.0157151f, 1.5848807f,
    99     0.3285f, 0.01684f, 1.62296f,
    100     0.3343513f, 0.0180074f, 1.6564048f,
    101     0.3392101f, 0.0192145f, 1.6852959f,
    102     0.3431213f, 0.0204539f, 1.7098745f,
    103     0.3461296f, 0.0217182f, 1.7303821f,
    104     0.34828f, 0.023f, 1.74706f, /* 440 nm */
    105     0.3495999f, 0.0242946f, 1.7600446f,
    106     0.3501474f, 0.0256102f, 1.7696233f,
    107     0.350013f, 0.0269586f, 1.7762637f,
    108     0.349287f, 0.0283513f, 1.7804334f,
    109     0.34806f, 0.0298f, 1.7826f,
    110     0.3463733f, 0.0313108f, 1.7829682f,
    111     0.3442624f, 0.0328837f, 1.7816998f,
    112     0.3418088f, 0.0345211f, 1.7791982f,
    113     0.3390941f, 0.0362257f, 1.7758671f,
    114     0.3362f, 0.038f, 1.77211f,
    115     0.3331977f, 0.0398467f, 1.7682589f,
    116     0.3300411f, 0.041768f, 1.764039f,
    117     0.3266357f, 0.043766f, 1.7589438f,
    118     0.3228868f, 0.0458427f, 1.7524663f,
    119     0.3187f, 0.048f, 1.7441f,
    120     0.3140251f, 0.0502437f, 1.7335595f,
    121     0.308884f, 0.052573f, 1.7208581f,
    122     0.3032904f, 0.0549806f, 1.7059369f,
    123     0.2972579f, 0.0574587f, 1.6887372f,
    124     0.2908f, 0.06f, 1.6692f,
    125     0.2839701f, 0.062602f, 1.6475287f,
    126     0.2767214f, 0.0652775f, 1.6234127f,
    127     0.2689178f, 0.0680421f, 1.5960223f,
    128     0.2604227f, 0.0709111f, 1.564528f,
    129     0.2511f, 0.0739f, 1.5281f,
    130     0.2408475f, 0.077016f, 1.4861114f,
    131     0.2298512f, 0.0802664f, 1.4395215f,
    132     0.2184072f, 0.0836668f, 1.3898799f,
    133     0.2068115f, 0.0872328f, 1.3387362f,
    134     0.19536f, 0.09098f, 1.28764f,
    135     0.1842136f, 0.0949176f, 1.2374223f,
    136     0.1733273f, 0.0990458f, 1.1878243f,
    137     0.1626881f, 0.1033674f, 1.1387611f,
    138     0.1522833f, 0.1078846f, 1.090148f,
    139     0.1421f, 0.1126f, 1.0419f,
    140     0.1321786f, 0.117532f, 0.9941976f,
    141     0.1225696f, 0.1226744f, 0.9473473f,
    142     0.1132752f, 0.1279928f, 0.9014531f,
    143     0.1042979f, 0.1334528f, 0.8566193f,
    144     0.09564f, 0.13902f, 0.8129501f, /* 480 nm */
    145     0.0872996f, 0.1446764f, 0.7705173f,
    146     0.079308f, 0.1504693f, 0.7294448f,
    147     0.0717178f, 0.1564619f, 0.6899136f,
    148     0.064581f, 0.1627177f, 0.6521049f,
    149     0.05795f, 0.1693f, 0.6162f,
    150     0.0518621f, 0.1762431f, 0.5823286f,
    151     0.0462815f, 0.1835581f, 0.5504162f,
    152     0.0411509f, 0.1912735f, 0.5203376f,
    153     0.0364128f, 0.199418f, 0.4919673f,
    154     0.03201f, 0.20802f, 0.46518f,
    155     0.0279172f, 0.2171199f, 0.4399246f,
    156     0.0241444f, 0.2267345f, 0.4161836f,
    157     0.020687f, 0.2368571f, 0.3938822f,
    158     0.0175404f, 0.2474812f, 0.3729459f,
    159     0.0147f, 0.2586f, 0.3533f,
    160     0.0121618f, 0.2701849f, 0.3348578f,
    161     0.00992f, 0.2822939f, 0.3175521f,
    162     0.0079672f, 0.2950505f, 0.3013375f,
    163     0.0062963f, 0.308578f, 0.2861686f,
    164     0.0049f, 0.323f, 0.272f,
    165     0.0037772f, 0.3384021f, 0.2588171f,
    166     0.0029453f, 0.3546858f, 0.2464838f,
    167     0.0024249f, 0.3716986f, 0.2347718f,
    168     0.0022363f, 0.3892875f, 0.2234533f,
    169     0.0024f, 0.4073f, 0.2123f,
    170     0.0029255f, 0.4256299f, 0.2011692f,
    171     0.0038366f, 0.4443096f, 0.1901196f,
    172     0.0051748f, 0.4633944f, 0.1792254f,
    173     0.0069821f, 0.4829395f, 0.1685608f,
    174     0.0093f, 0.503f, 0.1582f,
    175     0.0121495f, 0.5235693f, 0.1481383f,
    176     0.0155359f, 0.544512f, 0.1383758f,
    177     0.0194775f, 0.56569f, 0.1289942f,
    178     0.0239928f, 0.5869653f, 0.1200751f,
    179     0.0291f, 0.6082f, 0.1117f,
    180     0.0348149f, 0.6293456f, 0.1039048f,
    181     0.0411202f, 0.6503068f, 0.0966675f,
    182     0.047985f, 0.6708752f, 0.0899827f,
    183     0.0553786f, 0.6908424f, 0.0838453f,
    184     0.06327f, 0.71f, 0.07825f, /* 520 nm */
    185     0.071635f, 0.7281852f, 0.073209f,
    186     0.0804622f, 0.7454636f, 0.0686782f,
    187     0.08974f, 0.7619694f, 0.0645678f,
    188     0.0994565f, 0.7778368f, 0.0607884f,
    189     0.1096f, 0.7932f, 0.05725f,
    190     0.1201674f, 0.8081104f, 0.0539044f,
    191     0.1311145f, 0.8224962f, 0.0507466f,
    192     0.1423679f, 0.8363068f, 0.0477528f,
    193     0.1538542f, 0.8494916f, 0.0448986f,
    194     0.1655f, 0.862f, 0.04216f,
    195     0.1772571f, 0.8738108f, 0.0395073f,
    196     0.18914f, 0.8849624f, 0.0369356f,
    197     0.2011694f, 0.8954936f, 0.0344584f,
    198     0.2133658f, 0.9054432f, 0.0320887f,
    199     0.2257499f, 0.9148501f, 0.02984f,
    200     0.2383209f, 0.9237348f, 0.0277118f,
    201     0.2510668f, 0.9320924f, 0.0256944f,
    202     0.2639922f, 0.9399226f, 0.0237872f,
    203     0.2771017f, 0.9472252f, 0.0219893f,
    204     0.2904f, 0.954f, 0.0203f,
    205     0.3038912f, 0.9602561f, 0.0187181f,
    206     0.3175726f, 0.9660074f, 0.0172404f,
    207     0.3314384f, 0.9712606f, 0.0158636f,
    208     0.3454828f, 0.9760225f, 0.0145846f,
    209     0.3597f, 0.9803f, 0.0134f,
    210     0.3740839f, 0.9840924f, 0.0123072f,
    211     0.3886396f, 0.9874182f, 0.0113019f,
    212     0.4033784f, 0.9903128f, 0.0103779f,
    213     0.4183115f, 0.9928116f, 0.0095293f,
    214     0.4334499f, 0.9949501f, 0.00875f,
    215     0.4487953f, 0.9967108f, 0.0080352f,
    216     0.464336f, 0.9980983f, 0.0073816f,
    217     0.480064f, 0.999112f, 0.0067854f,
    218     0.4959713f, 0.9997482f, 0.0062428f,
    219     0.5120501f, 1.f, 0.00575f,
    220     0.5282959f, 0.9998567f, 0.0053036f,
    221     0.5446916f, 0.9993046f, 0.0048998f,
    222     0.5612094f, 0.9983255f, 0.0045342f,
    223     0.5778215f, 0.9968987f, 0.0042024f,
    224     0.5945f, 0.995f, 0.0039f, /* 560 nm */
    225     0.6112209f, 0.9926005f, 0.0036232f,
    226     0.6279758f, 0.9897426f, 0.0033706f,
    227     0.6447602f, 0.9864444f, 0.0031414f,
    228     0.6615697f, 0.9827241f, 0.0029348f,
    229     0.6784f, 0.9786f, 0.00275f,
    230     0.6952392f, 0.9740837f, 0.0025852f,
    231     0.7120586f, 0.9691712f, 0.0024386f,
    232     0.7288284f, 0.9638568f, 0.0023094f,
    233     0.7455188f, 0.9581349f, 0.0021968f,
    234     0.7621f, 0.952f, 0.0021f,
    235     0.7785432f, 0.9454504f, 0.0020177f,
    236     0.7948256f, 0.9384992f, 0.0019482f,
    237     0.8109264f, 0.9311628f, 0.0018898f,
    238     0.8268248f, 0.9234576f, 0.0018409f,
    239     0.8425f, 0.9154f, 0.0018f,
    240     0.8579325f, 0.9070064f, 0.0017663f,
    241     0.8730816f, 0.8982772f, 0.0017378f,
    242     0.8878944f, 0.8892048f, 0.0017112f,
    243     0.9023181f, 0.8797816f, 0.0016831f,
    244     0.9163f, 0.87f, 0.00165f,
    245     0.9297995f, 0.8598613f, 0.0016101f,
    246     0.9427984f, 0.849392f, 0.0015644f,
    247     0.9552776f, 0.838622f, 0.0015136f,
    248     0.9672179f, 0.8275813f, 0.0014585f,
    249     0.9786f, 0.8163f, 0.0014f,
    250     0.9893856f, 0.8047947f, 0.0013367f,
    251     0.9995488f, 0.793082f, 0.00127f,
    252     1.0090892f, 0.781192f, 0.001205f,
    253     1.0180064f, 0.7691547f, 0.0011467f,
    254     1.0263f, 0.757f, 0.0011f,
    255     1.0339827f, 0.7447541f, 0.0010688f,
    256     1.040986f, 0.7324224f, 0.0010494f,
    257     1.047188f, 0.7200036f, 0.0010356f,
    258     1.0524667f, 0.7074965f, 0.0010212f,
    259     1.0567f, 0.6949f, 0.001f,
    260     1.0597944f, 0.6822192f, 0.0009686f,
    261     1.0617992f, 0.6694716f, 0.0009299f,
    262     1.0628068f, 0.6566744f, 0.0008869f,
    263     1.0629096f, 0.6438448f, 0.0008426f,
    264     1.0622f, 0.631f, 0.0008f, /* 600 nm */
    265     1.0607352f, 0.6181555f, 0.000761f,
    266     1.0584436f, 0.6053144f, 0.0007237f,
    267     1.0552244f, 0.5924756f, 0.0006859f,
    268     1.0509768f, 0.5796379f, 0.0006454f,
    269     1.0456f, 0.5668f, 0.0006f,
    270     1.0390369f, 0.5539611f, 0.0005479f,
    271     1.0313608f, 0.5411372f, 0.0004916f,
    272     1.0226662f, 0.5283528f, 0.0004354f,
    273     1.0130477f, 0.5156323f, 0.0003835f,
    274     1.0026f, 0.503f, 0.00034f,
    275     0.9913675f, 0.4904688f, 0.0003073f,
    276     0.9793314f, 0.4780304f, 0.0002832f,
    277     0.9664916f, 0.4656776f, 0.0002654f,
    278     0.9528479f, 0.4534032f, 0.0002518f,
    279     0.9384f, 0.4412f, 0.00024f,
    280     0.923194f, 0.42908f, 0.0002295f,
    281     0.907244f, 0.417036f, 0.0002206f,
    282     0.890502f, 0.405032f, 0.000212f,
    283     0.87292f, 0.393032f, 0.0002022f,
    284     0.8544499f, 0.381f, 0.00019f,
    285     0.835084f, 0.3689184f, 0.0001742f,
    286     0.814946f, 0.3568272f, 0.0001556f,
    287     0.794186f, 0.3447768f, 0.000136f,
    288     0.772954f, 0.3328176f, 0.0001169f,
    289     0.7514f, 0.321f, 0.0001f,
    290     0.7295836f, 0.3093381f, 8.613e-05f,
    291     0.7075888f, 0.2978504f, 0.0000746f,
    292     0.6856022f, 0.2865936f, 0.000065f,
    293     0.6638104f, 0.2756245f, 5.693e-05f,
    294     0.6424f, 0.265f, 5e-05f,
    295     0.6215149f, 0.2547632f, 4.416e-05f,
    296     0.6011138f, 0.2448896f, 3.948e-05f,
    297     0.5811052f, 0.2353344f, 3.572e-05f,
    298     0.5613977f, 0.2260528f, 3.264e-05f,
    299     0.5419f, 0.217f, 0.00003f,
    300     0.5225995f, 0.2081616f, 2.765e-05f,
    301     0.5035464f, 0.1995488f, 2.556e-05f,
    302     0.4847436f, 0.1911552f, 2.364e-05f,
    303     0.4661939f, 0.1829744f, 2.181e-05f,
    304     0.4479f, 0.175f, 0.00002f, /* 640 nm */
    305     0.4298613f, 0.1672235f, 1.813e-05f,
    306     0.412098f, 0.1596464f, 0.0000162f,
    307     0.394644f, 0.1522776f, 0.0000142f,
    308     0.3775333f, 0.1451259f, 1.213e-05f,
    309     0.3608f, 0.1382f, 0.00001f,
    310     0.3444563f, 0.1315003f, 7.733e-06f,
    311     0.3285168f, 0.1250248f, 0.0000054f,
    312     0.3130192f, 0.1187792f, 0.0000032f,
    313     0.2980011f, 0.1127691f, 1.333e-06f,
    314     0.2835f, 0.107f, 0.0f,
    315     0.2695448f, 0.1014762f, 0.0f,
    316     0.2561184f, 0.0961886f, 0.0f,
    317     0.2431896f, 0.091123f, 0.0f,
    318     0.2307272f, 0.0862649f, 0.0f,
    319     0.2187f, 0.0816f, 0.0f,
    320     0.2070971f, 0.0771206f, 0.0f,
    321     0.1959232f, 0.0728255f, 0.0f,
    322     0.1851708f, 0.0687101f, 0.0f,
    323     0.1748323f, 0.0647698f, 0.0f,
    324     0.1649f, 0.061f, 0.0f,
    325     0.1553667f, 0.0573962f, 0.0f,
    326     0.14623f, 0.053955f, 0.0f,
    327     0.13749f, 0.0506738f, 0.0f,
    328     0.1291467f, 0.0475497f, 0.0f,
    329     0.1212f, 0.04458f, 0.0f,
    330     0.1136397f, 0.0417587f, 0.0f,
    331     0.106465f, 0.039085f, 0.0f,
    332     0.0996904f, 0.0365638f, 0.0f,
    333     0.0933306f, 0.0342005f, 0.0f,
    334     0.0874f, 0.032f, 0.0f,
    335     0.081901f, 0.0299626f, 0.0f,
    336     0.0768043f, 0.0280766f, 0.0f,
    337     0.0720771f, 0.0263294f, 0.0f,
    338     0.0676866f, 0.0247081f, 0.0f,
    339     0.0636f, 0.0232f, 0.0f,
    340     0.0598069f, 0.0218008f, 0.0f,
    341     0.0562822f, 0.0205011f, 0.0f,
    342     0.052971f, 0.0192811f, 0.0f,
    343     0.0498186f, 0.0181207f, 0.0f,
    344     0.04677f, 0.017f, 0.0f, /* 680 nm */
    345     0.0437841f, 0.0159038f, 0.0f,
    346     0.0408754f, 0.0148372f, 0.0f,
    347     0.0380726f, 0.0138107f, 0.0f,
    348     0.0354046f, 0.0128348f, 0.0f,
    349     0.0329f, 0.01192f, 0.0f,
    350     0.0305642f, 0.0110683f, 0.0f,
    351     0.0283806f, 0.0102734f, 0.0f,
    352     0.0263448f, 0.0095333f, 0.0f,
    353     0.0244528f, 0.0088462f, 0.0f,
    354     0.0227f, 0.00821f, 0.0f,
    355     0.0210843f, 0.0076238f, 0.0f,
    356     0.0195999f, 0.0070854f, 0.0f,
    357     0.0182373f, 0.0065915f, 0.0f,
    358     0.0169872f, 0.0061385f, 0.0f,
    359     0.01584f, 0.005723f, 0.0f,
    360     0.0147906f, 0.0053431f, 0.0f,
    361     0.0138313f, 0.0049958f, 0.0f,
    362     0.0129487f, 0.0046764f, 0.0f,
    363     0.0121292f, 0.0043801f, 0.0f,
    364     0.0113592f, 0.004102f, 0.0f,
    365     0.0106294f, 0.0038385f, 0.0f,
    366     0.0099388f, 0.0035891f, 0.0f,
    367     0.0092884f, 0.0033542f, 0.0f,
    368     0.0086789f, 0.0031341f, 0.0f,
    369     0.0081109f, 0.002929f, 0.0f,
    370     0.0075824f, 0.0027381f, 0.0f,
    371     0.0070887f, 0.0025599f, 0.0f,
    372     0.0066273f, 0.0023932f, 0.0f,
    373     0.0061954f, 0.0022373f, 0.0f,
    374     0.0057903f, 0.002091f, 0.0f,
    375     0.0054098f, 0.0019536f, 0.0f,
    376     0.0050526f, 0.0018246f, 0.0f,
    377     0.0047175f, 0.0017036f, 0.0f,
    378     0.0044035f, 0.0015902f, 0.0f,
    379     0.0041095f, 0.001484f, 0.0f,
    380     0.0038339f, 0.0013845f, 0.0f,
    381     0.0035757f, 0.0012913f, 0.0f,
    382     0.0033343f, 0.0012041f, 0.0f,
    383     0.0031091f, 0.0011227f, 0.0f,
    384     0.0028993f, 0.001047f, 0.0f, /* 720 nm */
    385     0.0027043f, 0.0009766f, 0.0f,
    386     0.002523f, 0.0009111f, 0.0f,
    387     0.0023542f, 0.0008501f, 0.0f,
    388     0.0021966f, 0.0007932f, 0.0f,
    389     0.0020492f, 0.00074f, 0.0f,
    390     0.001911f, 0.0006901f, 0.0f,
    391     0.0017814f, 0.0006433f, 0.0f,
    392     0.0016601f, 0.0005995f, 0.0f,
    393     0.0015465f, 0.0005585f, 0.0f,
    394     0.00144f, 0.00052f, 0.0f,
    395     0.00134f, 0.0004839f, 0.0f,
    396     0.0012463f, 0.0004501f, 0.0f,
    397     0.0011585f, 0.0004183f, 0.0f,
    398     0.0010764f, 0.0003887f, 0.0f,
    399     0.0009999f, 0.0003611f, 0.0f,
    400     0.0009287f, 0.0003354f, 0.0f,
    401     0.0008624f, 0.0003114f, 0.0f,
    402     0.0008008f, 0.0002892f, 0.0f,
    403     0.0007434f, 0.0002685f, 0.0f,
    404     0.0006901f, 0.0002492f, 0.0f,
    405     0.0006405f, 0.0002313f, 0.0f,
    406     0.0005945f, 0.0002147f, 0.0f,
    407     0.0005519f, 0.0001993f, 0.0f,
    408     0.0005124f, 0.000185f, 0.0f,
    409     0.000476f, 0.0001719f, 0.0f,
    410     0.0004425f, 0.0001598f, 0.0f,
    411     0.0004115f, 0.0001486f, 0.0f,
    412     0.000383f, 0.0001383f, 0.0f,
    413     0.0003566f, 0.0001288f, 0.0f,
    414     0.0003323f, 0.00012f, 0.0f,
    415     0.0003098f, 0.0001119f, 0.0f,
    416     0.0002889f, 0.0001043f, 0.0f,
    417     0.0002695f, 9.734e-05f, 0.0f,
    418     0.0002516f, 9.085e-05f, 0.0f,
    419     0.0002348f, 0.0000848f, 0.0f,
    420     0.0002192f, 7.915e-05f, 0.0f,
    421     0.0002045f, 7.386e-05f, 0.0f,
    422     0.0001908f, 6.892e-05f, 0.0f,
    423     0.0001781f, 6.43e-05f, 0.0f,
    424     0.0001662f, 0.00006f, 0.0f, /* 760 nm */
    425     0.000155f, 5.598e-05f, 0.0f,
    426     0.0001446f, 5.223e-05f, 0.0f,
    427     0.0001349f, 4.872e-05f, 0.0f,
    428     0.0001259f, 4.545e-05f, 0.0f,
    429     0.0001174f, 0.0000424f, 0.0f,
    430     0.0001096f, 3.956e-05f, 0.0f,
    431     0.0001022f, 3.692e-05f, 0.0f,
    432     9.539e-05f, 3.445e-05f, 0.0f,
    433     8.902e-05f, 3.215e-05f, 0.0f,
    434     8.308e-05f, 0.00003f, 0.0f,
    435     7.751e-05f, 2.799e-05f, 0.0f,
    436     7.231e-05f, 2.611e-05f, 0.0f,
    437     6.746e-05f, 2.436e-05f, 0.0f,
    438     6.293e-05f, 2.272e-05f, 0.0f,
    439     5.871e-05f, 0.0000212f, 0.0f,
    440     5.477e-05f, 1.978e-05f, 0.0f,
    441     5.11e-05f, 1.845e-05f, 0.0f,
    442     4.768e-05f, 1.722e-05f, 0.0f,
    443     4.449e-05f, 1.606e-05f, 0.0f,
    444     4.151e-05f, 1.499e-05f, 0.0f,
    445     3.873e-05f, 1.399e-05f, 0.0f,
    446     3.614e-05f, 1.305e-05f, 0.0f,
    447     3.372e-05f, 1.218e-05f, 0.0f,
    448     3.146e-05f, 1.136e-05f, 0.0f,
    449     2.935e-05f, 0.0000106f, 0.0f,
    450     2.738e-05f, 9.886e-06f, 0.0f,
    451     2.552e-05f, 9.217e-06f, 0.0f,
    452     2.379e-05f, 8.592e-06f, 0.0f,
    453     2.218e-05f, 8.009e-06f, 0.0f,
    454     2.067e-05f, 7.466e-06f, 0.0f,
    455     1.927e-05f, 6.96e-06f, 0.0f,
    456     1.797e-05f, 6.488e-06f, 0.0f,
    457     1.675e-05f, 6.049e-06f, 0.0f,
    458     1.562e-05f, 5.639e-06f, 0.0f,
    459     1.456e-05f, 5.258e-06f, 0.0f,
    460     1.357e-05f, 4.902e-06f, 0.0f,
    461     1.265e-05f, 4.57e-06f, 0.0f,
    462     1.18e-05f, 4.26e-06f, 0.0f,
    463     1.1e-05f, 3.972e-06f, 0.0f,
    464     1.025e-05f, 3.703e-06f, 0.0f, /* 800 nm */
    465     9.56e-06f, 3.452e-06f, 0.0f,
    466     8.912e-06f, 3.218e-06f, 0.0f,
    467     8.308e-06f, 3e-06f, 0.0f,
    468     7.746e-06f, 2.797e-06f, 0.0f,
    469     7.221e-06f, 2.608e-06f, 0.0f,
    470     6.732e-06f, 2.431e-06f, 0.0f,
    471     6.276e-06f, 2.267e-06f, 0.0f,
    472     5.851e-06f, 2.113e-06f, 0.0f,
    473     5.455e-06f, 1.97e-06f, 0.0f,
    474     5.086e-06f, 1.837e-06f, 0.0f,
    475     4.741e-06f, 1.712e-06f, 0.0f,
    476     4.42e-06f, 1.596e-06f, 0.0f,
    477     4.121e-06f, 1.488e-06f, 0.0f,
    478     3.842e-06f, 1.387e-06f, 0.0f,
    479     3.582e-06f, 1.293e-06f, 0.0f,
    480     3.339e-06f, 1.206e-06f, 0.0f,
    481     3.113e-06f, 1.124e-06f, 0.0f,
    482     2.902e-06f, 1.048e-06f, 0.0f,
    483     2.706e-06f, 9.771e-07f, 0.0f,
    484     2.523e-06f, 9.109e-07f, 0.0f,
    485     2.352e-06f, 8.493e-07f, 0.0f,
    486     2.192e-06f, 7.917e-07f, 0.0f,
    487     2.044e-06f, 7.381e-07f, 0.0f,
    488     1.905e-06f, 6.881e-07f, 0.0f,
    489     1.777e-06f, 6.415e-07f, 0.0f,
    490     1.656e-06f, 5.981e-07f, 0.0f,
    491     1.544e-06f, 5.576e-07f, 0.0f,
    492     1.439e-06f, 5.198e-07f, 0.0f,
    493     1.342e-06f, 4.846e-07f, 0.0f,
    494     1.251e-06f, 4.518e-07f, 0.0f, /* 830 nm */
     92    /* 360 — 399 nm */
     93    0.0001299f, 3.917e-06f, 0.0006061f, 0.0001458f, 4.394e-06f, 0.0006809f,
     94    0.0001638f, 4.930e-06f, 0.0007651f, 0.0001840f, 5.532e-06f, 0.0008600f,
     95    0.0002067f, 6.208e-06f, 0.0009666f, 0.0002321f, 6.965e-06f, 0.0010860f,
     96    0.0002607f, 7.813e-06f, 0.0012206f, 0.0002931f, 8.767e-06f, 0.0013727f,
     97    0.0003294f, 9.84e0-06f, 0.0015436f, 0.0003699f, 1.104e-05f, 0.0017343f,
     98    0.0004149f, 1.239e-05f, 0.0019460f, 0.0004642f, 1.389e-05f, 0.0021778f,
     99    0.0005190f, 1.556e-05f, 0.0024358f, 0.0005819f, 1.744e-05f, 0.0027320f,
     100    0.0006552f, 1.958e-05f, 0.0030781f, 0.0007416f, 2.202e-05f, 0.0034860f,
     101    0.0008450f, 2.484e-05f, 0.0039752f, 0.0009645f, 2.804e-05f, 0.0045409f,
     102    0.0010949f, 3.153e-05f, 0.0051583f, 0.0012312f, 3.522e-05f, 0.0058029f,
     103    0.0013680f, 3.900e-05f, 0.0064500f, 0.0015021f, 4.283e-05f, 0.0070832f,
     104    0.0016423f, 4.691e-05f, 0.0077455f, 0.0018024f, 5.159e-05f, 0.0085012f,
     105    0.0019958f, 5.718e-05f, 0.0094145f, 0.0022360f, 6.400e-05f, 0.0105500f,
     106    0.0025354f, 7.234e-05f, 0.0119658f, 0.0028926f, 8.221e-05f, 0.0136559f,
     107    0.0033008f, 9.351e-05f, 0.0155881f, 0.0037532f, 0.0001061f, 0.0177302f,
     108    0.0042430f, 0.0001200f, 0.0200500f, 0.0047624f, 0.0001350f, 0.0225114f,
     109    0.0053300f, 0.0001515f, 0.0252029f, 0.0059787f, 0.0001702f, 0.0282797f,
     110    0.0067411f, 0.0001918f, 0.0318970f, 0.0076500f, 0.0002170f, 0.0362100f,
     111    0.0087514f, 0.0002469f, 0.0414377f, 0.0100289f, 0.0002812f, 0.0475037f,
     112    0.0114217f, 0.0003185f, 0.0541199f, 0.0128690f, 0.0003573f, 0.0609980f,
     113    /* 400 — 439 nm */
     114    0.0143100f, 0.0003960f, 0.0678500f, 0.0157044f, 0.0004337f, 0.0744863f,
     115    0.0171474f, 0.0004730f, 0.0813616f, 0.0187812f, 0.0005179f, 0.0891536f,
     116    0.0207480f, 0.0005722f, 0.0985405f, 0.0231900f, 0.0006400f, 0.1102000f,
     117    0.0262074f, 0.0007246f, 0.1246133f, 0.0297825f, 0.0008255f, 0.1417017f,
     118    0.0338809f, 0.0009412f, 0.1613035f, 0.0384682f, 0.0010699f, 0.1832568f,
     119    0.0435100f, 0.0012100f, 0.2074000f, 0.0489956f, 0.0013621f, 0.2336921f,
     120    0.0550226f, 0.0015308f, 0.2626114f, 0.0617188f, 0.0017204f, 0.2947746f,
     121    0.0692120f, 0.0019353f, 0.3307985f, 0.0776300f, 0.0021800f, 0.3713000f,
     122    0.0869581f, 0.0024548f, 0.4162091f, 0.0971767f, 0.0027640f, 0.4654642f,
     123    0.1084063f, 0.0031178f, 0.5196948f, 0.1207672f, 0.0035264f, 0.5795303f,
     124    0.1343800f, 0.0040000f, 0.6456000f, 0.1493582f, 0.0045462f, 0.7184838f,
     125    0.1653957f, 0.0051593f, 0.7967133f, 0.1819831f, 0.0058293f, 0.8778459f,
     126    0.1986110f, 0.0065462f, 0.9594390f, 0.2147700f, 0.0073000f, 1.0390501f,
     127    0.2301868f, 0.0080865f, 1.1153673f, 0.2448797f, 0.0089087f, 1.1884971f,
     128    0.2587773f, 0.0097677f, 1.2581233f, 0.2718079f, 0.0106644f, 1.3239296f,
     129    0.2839000f, 0.0116000f, 1.3856000f, 0.2949438f, 0.0125732f, 1.4426352f,
     130    0.3048965f, 0.0135827f, 1.4948035f, 0.3137873f, 0.0146297f, 1.5421903f,
     131    0.3216454f, 0.0157151f, 1.5848807f, 0.3285000f, 0.0168400f, 1.6229600f,
     132    0.3343513f, 0.0180074f, 1.6564048f, 0.3392101f, 0.0192145f, 1.6852959f,
     133    0.3431213f, 0.0204539f, 1.7098745f, 0.3461296f, 0.0217182f, 1.7303821f,
     134    /* 440 — 479 nm */
     135    0.3482800f, 0.0230000f, 1.7470600f, 0.3495999f, 0.0242946f, 1.7600446f,
     136    0.3501474f, 0.0256102f, 1.7696233f, 0.3500130f, 0.0269586f, 1.7762637f,
     137    0.3492870f, 0.0283513f, 1.7804334f, 0.3480600f, 0.0298000f, 1.7826000f,
     138    0.3463733f, 0.0313108f, 1.7829682f, 0.3442624f, 0.0328837f, 1.7816998f,
     139    0.3418088f, 0.0345211f, 1.7791982f, 0.3390941f, 0.0362257f, 1.7758671f,
     140    0.3362000f, 0.0380000f, 1.7721100f, 0.3331977f, 0.0398467f, 1.7682589f,
     141    0.3300411f, 0.0417680f, 1.7640390f, 0.3266357f, 0.0437660f, 1.7589438f,
     142    0.3228868f, 0.0458427f, 1.7524663f, 0.3187000f, 0.0480000f, 1.7441000f,
     143    0.3140251f, 0.0502437f, 1.7335595f, 0.3088840f, 0.0525730f, 1.7208581f,
     144    0.3032904f, 0.0549806f, 1.7059369f, 0.2972579f, 0.0574587f, 1.6887372f,
     145    0.2908000f, 0.0600000f, 1.6692000f, 0.2839701f, 0.0626020f, 1.6475287f,
     146    0.2767214f, 0.0652775f, 1.6234127f, 0.2689178f, 0.0680421f, 1.5960223f,
     147    0.2604227f, 0.0709111f, 1.5645280f, 0.2511000f, 0.0739000f, 1.5281000f,
     148    0.2408475f, 0.0770160f, 1.4861114f, 0.2298512f, 0.0802664f, 1.4395215f,
     149    0.2184072f, 0.0836668f, 1.3898799f, 0.2068115f, 0.0872328f, 1.3387362f,
     150    0.1953600f, 0.0909800f, 1.2876400f, 0.1842136f, 0.0949176f, 1.2374223f,
     151    0.1733273f, 0.0990458f, 1.1878243f, 0.1626881f, 0.1033674f, 1.1387611f,
     152    0.1522833f, 0.1078846f, 1.0901480f, 0.1421000f, 0.1126000f, 1.0419000f,
     153    0.1321786f, 0.1175320f, 0.9941976f, 0.1225696f, 0.1226744f, 0.9473473f,
     154    0.1132752f, 0.1279928f, 0.9014531f, 0.1042979f, 0.1334528f, 0.8566193f,
     155    /* 480 — 519 nm */
     156    0.0956400f, 0.1390200f, 0.8129501f, 0.0872996f, 0.1446764f, 0.7705173f,
     157    0.0793080f, 0.1504693f, 0.7294448f, 0.0717178f, 0.1564619f, 0.6899136f,
     158    0.0645810f, 0.1627177f, 0.6521049f, 0.0579500f, 0.1693000f, 0.6162000f,
     159    0.0518621f, 0.1762431f, 0.5823286f, 0.0462815f, 0.1835581f, 0.5504162f,
     160    0.0411509f, 0.1912735f, 0.5203376f, 0.0364128f, 0.1994180f, 0.4919673f,
     161    0.0320100f, 0.2080200f, 0.4651800f, 0.0279172f, 0.2171199f, 0.4399246f,
     162    0.0241444f, 0.2267345f, 0.4161836f, 0.0206870f, 0.2368571f, 0.3938822f,
     163    0.0175404f, 0.2474812f, 0.3729459f, 0.0147000f, 0.2586000f, 0.3533000f,
     164    0.0121618f, 0.2701849f, 0.3348578f, 0.0099200f, 0.2822939f, 0.3175521f,
     165    0.0079672f, 0.2950505f, 0.3013375f, 0.0062963f, 0.3085780f, 0.2861686f,
     166    0.0049000f, 0.3230000f, 0.2720000f, 0.0037772f, 0.3384021f, 0.2588171f,
     167    0.0029453f, 0.3546858f, 0.2464838f, 0.0024249f, 0.3716986f, 0.2347718f,
     168    0.0022363f, 0.3892875f, 0.2234533f, 0.0024000f, 0.4073000f, 0.2123000f,
     169    0.0029255f, 0.4256299f, 0.2011692f, 0.0038366f, 0.4443096f, 0.1901196f,
     170    0.0051748f, 0.4633944f, 0.1792254f, 0.0069821f, 0.4829395f, 0.1685608f,
     171    0.0093000f, 0.5030000f, 0.1582000f, 0.0121495f, 0.5235693f, 0.1481383f,
     172    0.0155359f, 0.5445120f, 0.1383758f, 0.0194775f, 0.5656900f, 0.1289942f,
     173    0.0239928f, 0.5869653f, 0.1200751f, 0.0291000f, 0.6082000f, 0.1117000f,
     174    0.0348149f, 0.6293456f, 0.1039048f, 0.0411202f, 0.6503068f, 0.0966675f,
     175    0.0479850f, 0.6708752f, 0.0899827f, 0.0553786f, 0.6908424f, 0.0838453f,
     176    /* 520 — 559 nm */
     177    0.0632700f, 0.7100000f, 0.0782500f, 0.0716350f, 0.7281852f, 0.0732090f,
     178    0.0804622f, 0.7454636f, 0.0686782f, 0.0897400f, 0.7619694f, 0.0645678f,
     179    0.0994565f, 0.7778368f, 0.0607884f, 0.1096000f, 0.7932000f, 0.0572500f,
     180    0.1201674f, 0.8081104f, 0.0539044f, 0.1311145f, 0.8224962f, 0.0507466f,
     181    0.1423679f, 0.8363068f, 0.0477528f, 0.1538542f, 0.8494916f, 0.0448986f,
     182    0.1655000f, 0.8620000f, 0.0421600f, 0.1772571f, 0.8738108f, 0.0395073f,
     183    0.1891400f, 0.8849624f, 0.0369356f, 0.2011694f, 0.8954936f, 0.0344584f,
     184    0.2133658f, 0.9054432f, 0.0320887f, 0.2257499f, 0.9148501f, 0.0298400f,
     185    0.2383209f, 0.9237348f, 0.0277118f, 0.2510668f, 0.9320924f, 0.0256944f,
     186    0.2639922f, 0.9399226f, 0.0237872f, 0.2771017f, 0.9472252f, 0.0219893f,
     187    0.2904000f, 0.9540000f, 0.0203000f, 0.3038912f, 0.9602561f, 0.0187181f,
     188    0.3175726f, 0.9660074f, 0.0172404f, 0.3314384f, 0.9712606f, 0.0158636f,
     189    0.3454828f, 0.9760225f, 0.0145846f, 0.3597000f, 0.9803000f, 0.0134000f,
     190    0.3740839f, 0.9840924f, 0.0123072f, 0.3886396f, 0.9874182f, 0.0113019f,
     191    0.4033784f, 0.9903128f, 0.0103779f, 0.4183115f, 0.9928116f, 0.0095293f,
     192    0.4334499f, 0.9949501f, 0.0087500f, 0.4487953f, 0.9967108f, 0.0080352f,
     193    0.4643360f, 0.9980983f, 0.0073816f, 0.4800640f, 0.9991120f, 0.0067854f,
     194    0.4959713f, 0.9997482f, 0.0062428f, 0.5120501f, 1.0000000f, 0.0057500f,
     195    0.5282959f, 0.9998567f, 0.0053036f, 0.5446916f, 0.9993046f, 0.0048998f,
     196    0.5612094f, 0.9983255f, 0.0045342f, 0.5778215f, 0.9968987f, 0.0042024f,
     197    /* 560 — 599 nm */
     198    0.5945000f, 0.9950000f, 0.0039000f, 0.6112209f, 0.9926005f, 0.0036232f,
     199    0.6279758f, 0.9897426f, 0.0033706f, 0.6447602f, 0.9864444f, 0.0031414f,
     200    0.6615697f, 0.9827241f, 0.0029348f, 0.6784000f, 0.9786000f, 0.0027500f,
     201    0.6952392f, 0.9740837f, 0.0025852f, 0.7120586f, 0.9691712f, 0.0024386f,
     202    0.7288284f, 0.9638568f, 0.0023094f, 0.7455188f, 0.9581349f, 0.0021968f,
     203    0.7621000f, 0.9520000f, 0.0021000f, 0.7785432f, 0.9454504f, 0.0020177f,
     204    0.7948256f, 0.9384992f, 0.0019482f, 0.8109264f, 0.9311628f, 0.0018898f,
     205    0.8268248f, 0.9234576f, 0.0018409f, 0.8425000f, 0.9154000f, 0.0018000f,
     206    0.8579325f, 0.9070064f, 0.0017663f, 0.8730816f, 0.8982772f, 0.0017378f,
     207    0.8878944f, 0.8892048f, 0.0017112f, 0.9023181f, 0.8797816f, 0.0016831f,
     208    0.9163000f, 0.8700000f, 0.0016500f, 0.9297995f, 0.8598613f, 0.0016101f,
     209    0.9427984f, 0.8493920f, 0.0015644f, 0.9552776f, 0.8386220f, 0.0015136f,
     210    0.9672179f, 0.8275813f, 0.0014585f, 0.9786000f, 0.8163000f, 0.0014000f,
     211    0.9893856f, 0.8047947f, 0.0013367f, 0.9995488f, 0.7930820f, 0.0012700f,
     212    1.0090892f, 0.7811920f, 0.0012050f, 1.0180064f, 0.7691547f, 0.0011467f,
     213    1.0263000f, 0.7570000f, 0.0011000f, 1.0339827f, 0.7447541f, 0.0010688f,
     214    1.0409860f, 0.7324224f, 0.0010494f, 1.0471880f, 0.7200036f, 0.0010356f,
     215    1.0524667f, 0.7074965f, 0.0010212f, 1.0567000f, 0.6949000f, 0.0010000f,
     216    1.0597944f, 0.6822192f, 0.0009686f, 1.0617992f, 0.6694716f, 0.0009299f,
     217    1.0628068f, 0.6566744f, 0.0008869f, 1.0629096f, 0.6438448f, 0.0008426f,
     218    /* 600 — 639 nm */
     219    1.0622000f, 0.6310000f, 0.0008000f, 1.0607352f, 0.6181555f, 0.0007610f,
     220    1.0584436f, 0.6053144f, 0.0007237f, 1.0552244f, 0.5924756f, 0.0006859f,
     221    1.0509768f, 0.5796379f, 0.0006454f, 1.0456000f, 0.5668000f, 0.0006000f,
     222    1.0390369f, 0.5539611f, 0.0005479f, 1.0313608f, 0.5411372f, 0.0004916f,
     223    1.0226662f, 0.5283528f, 0.0004354f, 1.0130477f, 0.5156323f, 0.0003835f,
     224    1.0026000f, 0.5030000f, 0.0003400f, 0.9913675f, 0.4904688f, 0.0003073f,
     225    0.9793314f, 0.4780304f, 0.0002832f, 0.9664916f, 0.4656776f, 0.0002654f,
     226    0.9528479f, 0.4534032f, 0.0002518f, 0.9384000f, 0.4412000f, 0.0002400f,
     227    0.9231940f, 0.4290800f, 0.0002295f, 0.9072440f, 0.4170360f, 0.0002206f,
     228    0.8905020f, 0.4050320f, 0.0002120f, 0.8729200f, 0.3930320f, 0.0002022f,
     229    0.8544499f, 0.3810000f, 0.0001900f, 0.8350840f, 0.3689184f, 0.0001742f,
     230    0.8149460f, 0.3568272f, 0.0001556f, 0.7941860f, 0.3447768f, 0.0001360f,
     231    0.7729540f, 0.3328176f, 0.0001169f, 0.7514000f, 0.3210000f, 0.0001000f,
     232    0.7295836f, 0.3093381f, 8.613e-05f, 0.7075888f, 0.2978504f, 7.460e-05f,
     233    0.6856022f, 0.2865936f, 6.500e-05f, 0.6638104f, 0.2756245f, 5.693e-05f,
     234    0.6424000f, 0.2650000f, 5.000e-05f, 0.6215149f, 0.2547632f, 4.416e-05f,
     235    0.6011138f, 0.2448896f, 3.948e-05f, 0.5811052f, 0.2353344f, 3.572e-05f,
     236    0.5613977f, 0.2260528f, 3.264e-05f, 0.5419000f, 0.2170000f, 3.000e-05f,
     237    0.5225995f, 0.2081616f, 2.765e-05f, 0.5035464f, 0.1995488f, 2.556e-05f,
     238    0.4847436f, 0.1911552f, 2.364e-05f, 0.4661939f, 0.1829744f, 2.181e-05f,
     239    /* 640 — 679 nm */
     240    0.4479000f, 0.1750000f, 2.000e-05f, 0.4298613f, 0.1672235f, 1.813e-05f,
     241    0.4120980f, 0.1596464f, 1.620e-05f, 0.3946440f, 0.1522776f, 1.420e-05f,
     242    0.3775333f, 0.1451259f, 1.213e-05f, 0.3608000f, 0.1382000f, 1.000e-05f,
     243    0.3444563f, 0.1315003f, 7.733e-06f, 0.3285168f, 0.1250248f, 5.400e-06f,
     244    0.3130192f, 0.1187792f, 3.200e-06f, 0.2980011f, 0.1127691f, 1.333e-06f,
     245    0.2835000f, 0.1070000f, 0.0000000f, 0.2695448f, 0.1014762f, 0.0000000f,
     246    0.2561184f, 0.0961886f, 0.0000000f, 0.2431896f, 0.0911230f, 0.0000000f,
     247    0.2307272f, 0.0862649f, 0.0000000f, 0.2187000f, 0.0816000f, 0.0000000f,
     248    0.2070971f, 0.0771206f, 0.0000000f, 0.1959232f, 0.0728255f, 0.0000000f,
     249    0.1851708f, 0.0687101f, 0.0000000f, 0.1748323f, 0.0647698f, 0.0000000f,
     250    0.1649000f, 0.0610000f, 0.0000000f, 0.1553667f, 0.0573962f, 0.0000000f,
     251    0.1462300f, 0.0539550f, 0.0000000f, 0.1374900f, 0.0506738f, 0.0000000f,
     252    0.1291467f, 0.0475497f, 0.0000000f, 0.1212000f, 0.0445800f, 0.0000000f,
     253    0.1136397f, 0.0417587f, 0.0000000f, 0.1064650f, 0.0390850f, 0.0000000f,
     254    0.0996904f, 0.0365638f, 0.0000000f, 0.0933306f, 0.0342005f, 0.0000000f,
     255    0.0874000f, 0.0320000f, 0.0000000f, 0.0819010f, 0.0299626f, 0.0000000f,
     256    0.0768043f, 0.0280766f, 0.0000000f, 0.0720771f, 0.0263294f, 0.0000000f,
     257    0.0676866f, 0.0247081f, 0.0000000f, 0.0636000f, 0.0232000f, 0.0000000f,
     258    0.0598069f, 0.0218008f, 0.0000000f, 0.0562822f, 0.0205011f, 0.0000000f,
     259    0.0529710f, 0.0192811f, 0.0000000f, 0.0498186f, 0.0181207f, 0.0000000f,
     260    /* 680 — 719 nm */
     261    0.0467700f, 0.0170000f, 0.0000000f, 0.0437841f, 0.0159038f, 0.0000000f,
     262    0.0408754f, 0.0148372f, 0.0000000f, 0.0380726f, 0.0138107f, 0.0000000f,
     263    0.0354046f, 0.0128348f, 0.0000000f, 0.0329000f, 0.0119200f, 0.0000000f,
     264    0.0305642f, 0.0110683f, 0.0000000f, 0.0283806f, 0.0102734f, 0.0000000f,
     265    0.0263448f, 0.0095333f, 0.0000000f, 0.0244528f, 0.0088462f, 0.0000000f,
     266    0.0227000f, 0.0082100f, 0.0000000f, 0.0210843f, 0.0076238f, 0.0000000f,
     267    0.0195999f, 0.0070854f, 0.0000000f, 0.0182373f, 0.0065915f, 0.0000000f,
     268    0.0169872f, 0.0061385f, 0.0000000f, 0.0158400f, 0.0057230f, 0.0000000f,
     269    0.0147906f, 0.0053431f, 0.0000000f, 0.0138313f, 0.0049958f, 0.0000000f,
     270    0.0129487f, 0.0046764f, 0.0000000f, 0.0121292f, 0.0043801f, 0.0000000f,
     271    0.0113592f, 0.0041020f, 0.0000000f, 0.0106294f, 0.0038385f, 0.0000000f,
     272    0.0099388f, 0.0035891f, 0.0000000f, 0.0092884f, 0.0033542f, 0.0000000f,
     273    0.0086789f, 0.0031341f, 0.0000000f, 0.0081109f, 0.0029290f, 0.0000000f,
     274    0.0075824f, 0.0027381f, 0.0000000f, 0.0070887f, 0.0025599f, 0.0000000f,
     275    0.0066273f, 0.0023932f, 0.0000000f, 0.0061954f, 0.0022373f, 0.0000000f,
     276    0.0057903f, 0.0020910f, 0.0000000f, 0.0054098f, 0.0019536f, 0.0000000f,
     277    0.0050526f, 0.0018246f, 0.0000000f, 0.0047175f, 0.0017036f, 0.0000000f,
     278    0.0044035f, 0.0015902f, 0.0000000f, 0.0041095f, 0.0014840f, 0.0000000f,
     279    0.0038339f, 0.0013845f, 0.0000000f, 0.0035757f, 0.0012913f, 0.0000000f,
     280    0.0033343f, 0.0012041f, 0.0000000f, 0.0031091f, 0.0011227f, 0.0000000f,
     281    /* 720 — 759 nm */
     282    0.0028993f, 0.0010470f, 0.0000000f, 0.0027043f, 0.0009766f, 0.0000000f,
     283    0.0025230f, 0.0009111f, 0.0000000f, 0.0023542f, 0.0008501f, 0.0000000f,
     284    0.0021966f, 0.0007932f, 0.0000000f, 0.0020492f, 0.0007400f, 0.0000000f,
     285    0.0019110f, 0.0006901f, 0.0000000f, 0.0017814f, 0.0006433f, 0.0000000f,
     286    0.0016601f, 0.0005995f, 0.0000000f, 0.0015465f, 0.0005585f, 0.0000000f,
     287    0.0014400f, 0.0005200f, 0.0000000f, 0.0013400f, 0.0004839f, 0.0000000f,
     288    0.0012463f, 0.0004501f, 0.0000000f, 0.0011585f, 0.0004183f, 0.0000000f,
     289    0.0010764f, 0.0003887f, 0.0000000f, 0.0009999f, 0.0003611f, 0.0000000f,
     290    0.0009287f, 0.0003354f, 0.0000000f, 0.0008624f, 0.0003114f, 0.0000000f,
     291    0.0008008f, 0.0002892f, 0.0000000f, 0.0007434f, 0.0002685f, 0.0000000f,
     292    0.0006901f, 0.0002492f, 0.0000000f, 0.0006405f, 0.0002313f, 0.0000000f,
     293    0.0005945f, 0.0002147f, 0.0000000f, 0.0005519f, 0.0001993f, 0.0000000f,
     294    0.0005124f, 0.0001850f, 0.0000000f, 0.0004760f, 0.0001719f, 0.0000000f,
     295    0.0004425f, 0.0001598f, 0.0000000f, 0.0004115f, 0.0001486f, 0.0000000f,
     296    0.0003830f, 0.0001383f, 0.0000000f, 0.0003566f, 0.0001288f, 0.0000000f,
     297    0.0003323f, 0.0001200f, 0.0000000f, 0.0003098f, 0.0001119f, 0.0000000f,
     298    0.0002889f, 0.0001043f, 0.0000000f, 0.0002695f, 9.734e-05f, 0.0000000f,
     299    0.0002516f, 9.085e-05f, 0.0000000f, 0.0002348f, 8.480e-05f, 0.0000000f,
     300    0.0002192f, 7.915e-05f, 0.0000000f, 0.0002045f, 7.386e-05f, 0.0000000f,
     301    0.0001908f, 6.892e-05f, 0.0000000f, 0.0001781f, 6.430e-05f, 0.0000000f,
     302    /* 760 — 799 nm */
     303    0.0001662f, 6.000e-05f, 0.0000000f, 0.0001550f, 5.598e-05f, 0.0000000f,
     304    0.0001446f, 5.223e-05f, 0.0000000f, 0.0001349f, 4.872e-05f, 0.0000000f,
     305    0.0001259f, 4.545e-05f, 0.0000000f, 0.0001174f, 4.240e-05f, 0.0000000f,
     306    0.0001096f, 3.956e-05f, 0.0000000f, 0.0001022f, 3.692e-05f, 0.0000000f,
     307    9.539e-05f, 3.445e-05f, 0.0000000f, 8.902e-05f, 3.215e-05f, 0.0000000f,
     308    8.308e-05f, 3.000e-05f, 0.0000000f, 7.751e-05f, 2.799e-05f, 0.0000000f,
     309    7.231e-05f, 2.611e-05f, 0.0000000f, 6.746e-05f, 2.436e-05f, 0.0000000f,
     310    6.293e-05f, 2.272e-05f, 0.0000000f, 5.871e-05f, 2.120e-05f, 0.0000000f,
     311    5.477e-05f, 1.978e-05f, 0.0000000f, 5.110e-05f, 1.845e-05f, 0.0000000f,
     312    4.768e-05f, 1.722e-05f, 0.0000000f, 4.449e-05f, 1.606e-05f, 0.0000000f,
     313    4.151e-05f, 1.499e-05f, 0.0000000f, 3.873e-05f, 1.399e-05f, 0.0000000f,
     314    3.614e-05f, 1.305e-05f, 0.0000000f, 3.372e-05f, 1.218e-05f, 0.0000000f,
     315    3.146e-05f, 1.136e-05f, 0.0000000f, 2.935e-05f, 1.060e-05f, 0.0000000f,
     316    2.738e-05f, 9.886e-06f, 0.0000000f, 2.552e-05f, 9.217e-06f, 0.0000000f,
     317    2.379e-05f, 8.592e-06f, 0.0000000f, 2.218e-05f, 8.009e-06f, 0.0000000f,
     318    2.067e-05f, 7.466e-06f, 0.0000000f, 1.927e-05f, 6.960e-06f, 0.0000000f,
     319    1.797e-05f, 6.488e-06f, 0.0000000f, 1.675e-05f, 6.049e-06f, 0.0000000f,
     320    1.562e-05f, 5.639e-06f, 0.0000000f, 1.456e-05f, 5.258e-06f, 0.0000000f,
     321    1.357e-05f, 4.902e-06f, 0.0000000f, 1.265e-05f, 4.570e-06f, 0.0000000f,
     322    1.180e-05f, 4.260e-06f, 0.0000000f, 1.100e-05f, 3.972e-06f, 0.0000000f,
     323    /* 800 — 830 nm */
     324    1.025e-05f, 3.703e-06f, 0.0000000f, 9.560e-06f, 3.452e-06f, 0.0000000f,
     325    8.912e-06f, 3.218e-06f, 0.0000000f, 8.308e-06f, 3.000e-06f, 0.0000000f,
     326    7.746e-06f, 2.797e-06f, 0.0000000f, 7.221e-06f, 2.608e-06f, 0.0000000f,
     327    6.732e-06f, 2.431e-06f, 0.0000000f, 6.276e-06f, 2.267e-06f, 0.0000000f,
     328    5.851e-06f, 2.113e-06f, 0.0000000f, 5.455e-06f, 1.970e-06f, 0.0000000f,
     329    5.086e-06f, 1.837e-06f, 0.0000000f, 4.741e-06f, 1.712e-06f, 0.0000000f,
     330    4.420e-06f, 1.596e-06f, 0.0000000f, 4.121e-06f, 1.488e-06f, 0.0000000f,
     331    3.842e-06f, 1.387e-06f, 0.0000000f, 3.582e-06f, 1.293e-06f, 0.0000000f,
     332    3.339e-06f, 1.206e-06f, 0.0000000f, 3.113e-06f, 1.124e-06f, 0.0000000f,
     333    2.902e-06f, 1.048e-06f, 0.0000000f, 2.706e-06f, 9.771e-07f, 0.0000000f,
     334    2.523e-06f, 9.109e-07f, 0.0000000f, 2.352e-06f, 8.493e-07f, 0.0000000f,
     335    2.192e-06f, 7.917e-07f, 0.0000000f, 2.044e-06f, 7.381e-07f, 0.0000000f,
     336    1.905e-06f, 6.881e-07f, 0.0000000f, 1.777e-06f, 6.415e-07f, 0.0000000f,
     337    1.656e-06f, 5.981e-07f, 0.0000000f, 1.544e-06f, 5.576e-07f, 0.0000000f,
     338    1.439e-06f, 5.198e-07f, 0.0000000f, 1.342e-06f, 4.846e-07f, 0.0000000f,
     339    1.251e-06f, 4.518e-07f, 0.0000000f,
    495340};
    496341
     
    499344static float cie_1964_xyz[] =
    500345{
    501     1.222e-07f, 1.34e-08f, 5.35e-07f, /* 360 nm */
    502     1.851e-07f, 2.029e-08f, 8.107e-07f,
    503     2.788e-07f, 3.056e-08f, 1.221e-06f,
    504     4.175e-07f, 4.574e-08f, 1.829e-06f,
    505     6.213e-07f, 6.805e-08f, 2.722e-06f,
    506     9.193e-07f, 1.007e-07f, 4.028e-06f,
    507     1.352e-06f, 1.48e-07f, 5.926e-06f,
    508     1.977e-06f, 2.163e-07f, 8.665e-06f,
    509     2.873e-06f, 3.142e-07f, 1.26e-05f,
    510     4.15e-06f, 4.537e-07f, 1.82e-05f,
    511     5.959e-06f, 6.511e-07f, 2.614e-05f,
    512     8.506e-06f, 9.288e-07f, 3.733e-05f,
    513     1.207e-05f, 1.318e-06f, 5.299e-05f,
    514     1.702e-05f, 1.857e-06f, 7.476e-05f,
    515     2.387e-05f, 2.602e-06f, 0.0001049f,
    516     3.327e-05f, 3.625e-06f, 0.0001462f,
    517     4.609e-05f, 5.019e-06f, 0.0002027f,
    518     6.347e-05f, 6.907e-06f, 0.0002792f,
    519     8.689e-05f, 9.449e-06f, 0.0003825f,
    520     0.0001182f, 1.285e-05f, 0.0005207f,
    521     0.00016f, 1.736e-05f, 0.0007048f,
    522     0.0002151f, 2.333e-05f, 0.0009482f,
    523     0.0002875f, 3.115e-05f, 0.0012682f,
    524     0.000382f, 4.135e-05f, 0.0016861f,
    525     0.0005046f, 5.456e-05f, 0.0022285f,
    526     0.0006624f, 7.156e-05f, 0.0029278f,
    527     0.0008645f, 0.0000933f, 0.0038237f,
    528     0.0011215f, 0.0001209f, 0.0049642f,
    529     0.0014462f, 0.0001556f, 0.0064067f,
    530     0.0018536f, 0.0001992f, 0.0082193f,
    531     0.0023616f, 0.0002534f, 0.0104822f,
    532     0.0029906f, 0.0003202f, 0.013289f,
    533     0.0037645f, 0.0004024f, 0.016747f,
    534     0.0047102f, 0.0005023f, 0.02098f,
    535     0.0058581f, 0.0006232f, 0.026127f,
    536     0.0072423f, 0.0007685f, 0.032344f,
    537     0.0088996f, 0.0009417f, 0.039802f,
    538     0.0108709f, 0.0011478f, 0.048691f,
    539     0.0131989f, 0.0013903f, 0.05921f,
    540     0.0159292f, 0.001674f, 0.071576f,
    541     0.0191097f, 0.0020044f, 0.0860109f, /* 400 nm */
    542     0.022788f, 0.002386f, 0.10274f,
    543     0.027011f, 0.002822f, 0.122f,
    544     0.031829f, 0.003319f, 0.14402f,
    545     0.037278f, 0.00388f, 0.16899f,
    546     0.0434f, 0.004509f, 0.19712f,
    547     0.050223f, 0.005209f, 0.22857f,
    548     0.057764f, 0.005985f, 0.26347f,
    549     0.066038f, 0.006833f, 0.3019f,
    550     0.075033f, 0.007757f, 0.34387f,
    551     0.084736f, 0.008756f, 0.389366f,
    552     0.095041f, 0.009816f, 0.43797f,
    553     0.105836f, 0.010918f, 0.48922f,
    554     0.117066f, 0.012058f, 0.5429f,
    555     0.128682f, 0.013237f, 0.59881f,
    556     0.140638f, 0.014456f, 0.65676f,
    557     0.152893f, 0.015717f, 0.71658f,
    558     0.165416f, 0.017025f, 0.77812f,
    559     0.178191f, 0.018399f, 0.84131f,
    560     0.191214f, 0.019848f, 0.90611f,
    561     0.204492f, 0.021391f, 0.972542f,
    562     0.21765f, 0.022992f, 1.0389f,
    563     0.230267f, 0.024598f, 1.1031f,
    564     0.242311f, 0.026213f, 1.1651f,
    565     0.253793f, 0.027841f, 1.2249f,
    566     0.264737f, 0.029497f, 1.2825f,
    567     0.275195f, 0.031195f, 1.3382f,
    568     0.285301f, 0.032927f, 1.3926f,
    569     0.295143f, 0.034738f, 1.4461f,
    570     0.304869f, 0.036654f, 1.4994f,
    571     0.314679f, 0.038676f, 1.55348f,
    572     0.324355f, 0.040792f, 1.6072f,
    573     0.33357f, 0.042946f, 1.6589f,
    574     0.342243f, 0.045114f, 1.7082f,
    575     0.350312f, 0.047333f, 1.7548f,
    576     0.357719f, 0.049602f, 1.7985f,
    577     0.364482f, 0.051934f, 1.8392f,
    578     0.370493f, 0.054337f, 1.8766f,
    579     0.375727f, 0.056822f, 1.9105f,
    580     0.380158f, 0.059399f, 1.9408f,
    581     0.383734f, 0.062077f, 1.96728f, /* 440 nm */
    582     0.386327f, 0.064737f, 1.9891f,
    583     0.387858f, 0.067285f, 2.0057f,
    584     0.388396f, 0.069764f, 2.0174f,
    585     0.387978f, 0.072218f, 2.0244f,
    586     0.386726f, 0.074704f, 2.0273f,
    587     0.384696f, 0.077272f, 2.0264f,
    588     0.382006f, 0.079979f, 2.0223f,
    589     0.378709f, 0.082874f, 2.0153f,
    590     0.374915f, 0.086f, 2.006f,
    591     0.370702f, 0.089456f, 1.9948f,
    592     0.366089f, 0.092947f, 1.9814f,
    593     0.361045f, 0.096275f, 1.9653f,
    594     0.355518f, 0.099535f, 1.9464f,
    595     0.349486f, 0.102829f, 1.9248f,
    596     0.342957f, 0.106256f, 1.9007f,
    597     0.335893f, 0.109901f, 1.8741f,
    598     0.328284f, 0.113835f, 1.8451f,
    599     0.32015f, 0.118167f, 1.8139f,
    600     0.311475f, 0.122932f, 1.7806f,
    601     0.302273f, 0.128201f, 1.74537f,
    602     0.292858f, 0.133457f, 1.7091f,
    603     0.283502f, 0.138323f, 1.6723f,
    604     0.274044f, 0.143042f, 1.6347f,
    605     0.264263f, 0.147787f, 1.5956f,
    606     0.254085f, 0.152761f, 1.5549f,
    607     0.243392f, 0.158102f, 1.5122f,
    608     0.232187f, 0.163941f, 1.4673f,
    609     0.220488f, 0.170362f, 1.4199f,
    610     0.208198f, 0.177425f, 1.37f,
    611     0.195618f, 0.18519f, 1.31756f,
    612     0.183034f, 0.193025f, 1.2624f,
    613     0.170222f, 0.200313f, 1.205f,
    614     0.157348f, 0.207156f, 1.1466f,
    615     0.14465f, 0.213644f, 1.088f,
    616     0.132349f, 0.21994f, 1.0302f,
    617     0.120584f, 0.22617f, 0.97383f,
    618     0.109456f, 0.232467f, 0.91943f,
    619     0.099042f, 0.239025f, 0.86746f,
    620     0.089388f, 0.245997f, 0.81828f,
    621     0.080507f, 0.253589f, 0.772125f, /* 480 nm */
    622     0.072034f, 0.261876f, 0.72829f,
    623     0.06371f, 0.270643f, 0.68604f,
    624     0.055694f, 0.279645f, 0.64553f,
    625     0.048117f, 0.288694f, 0.60685f,
    626     0.041072f, 0.297665f, 0.57006f,
    627     0.034642f, 0.306469f, 0.53522f,
    628     0.028896f, 0.315035f, 0.50234f,
    629     0.023876f, 0.323335f, 0.4714f,
    630     0.019628f, 0.331366f, 0.44239f,
    631     0.016172f, 0.339133f, 0.415254f,
    632     0.0133f, 0.34786f, 0.390024f,
    633     0.010759f, 0.358326f, 0.366399f,
    634     0.008542f, 0.370001f, 0.344015f,
    635     0.006661f, 0.382464f, 0.322689f,
    636     0.005132f, 0.395379f, 0.302356f,
    637     0.003982f, 0.408482f, 0.283036f,
    638     0.003239f, 0.421588f, 0.264816f,
    639     0.002934f, 0.434619f, 0.247848f,
    640     0.003114f, 0.447601f, 0.232318f,
    641     0.003816f, 0.460777f, 0.218502f,
    642     0.005095f, 0.47434f, 0.205851f,
    643     0.006936f, 0.4882f, 0.193596f,
    644     0.009299f, 0.50234f, 0.181736f,
    645     0.012147f, 0.51674f, 0.170281f,
    646     0.015444f, 0.53136f, 0.159249f,
    647     0.019156f, 0.54619f, 0.148673f,
    648     0.02325f, 0.56118f, 0.138609f,
    649     0.02769f, 0.57629f, 0.129096f,
    650     0.032444f, 0.5915f, 0.120215f,
    651     0.037465f, 0.606741f, 0.112044f,
    652     0.042956f, 0.62215f, 0.10471f,
    653     0.049114f, 0.63783f, 0.098196f,
    654     0.05592f, 0.65371f, 0.092361f,
    655     0.063349f, 0.66968f, 0.087088f,
    656     0.071358f, 0.68566f, 0.082248f,
    657     0.079901f, 0.70155f, 0.077744f,
    658     0.088909f, 0.71723f, 0.073456f,
    659     0.098293f, 0.73257f, 0.069268f,
    660     0.107949f, 0.74746f, 0.06506f,
    661     0.117749f, 0.761757f, 0.060709f, /* 520 nm */
    662     0.127839f, 0.77534f, 0.056457f,
    663     0.13845f, 0.78822f, 0.052609f,
    664     0.149516f, 0.80046f, 0.049122f,
    665     0.161041f, 0.81214f, 0.045954f,
    666     0.172953f, 0.82333f, 0.04305f,
    667     0.185209f, 0.83412f, 0.040368f,
    668     0.197755f, 0.8446f, 0.037839f,
    669     0.210538f, 0.85487f, 0.035384f,
    670     0.22346f, 0.86504f, 0.032949f,
    671     0.236491f, 0.875211f, 0.030451f,
    672     0.249633f, 0.88537f, 0.028029f,
    673     0.262972f, 0.89537f, 0.025862f,
    674     0.276515f, 0.90515f, 0.02392f,
    675     0.290269f, 0.91465f, 0.022174f,
    676     0.304213f, 0.92381f, 0.020584f,
    677     0.318361f, 0.93255f, 0.019127f,
    678     0.332705f, 0.94081f, 0.01774f,
    679     0.347232f, 0.94852f, 0.016403f,
    680     0.361926f, 0.9556f, 0.015064f,
    681     0.376772f, 0.961988f, 0.013676f,
    682     0.391683f, 0.96754f, 0.012308f,
    683     0.406594f, 0.97223f, 0.011056f,
    684     0.421539f, 0.97617f, 0.009915f,
    685     0.436517f, 0.97946f, 0.008872f,
    686     0.451584f, 0.9822f, 0.007918f,
    687     0.466782f, 0.98452f, 0.00703f,
    688     0.482147f, 0.98652f, 0.006223f,
    689     0.497738f, 0.98832f, 0.005453f,
    690     0.513606f, 0.99002f, 0.004714f,
    691     0.529826f, 0.991761f, 0.003988f,
    692     0.54644f, 0.99353f, 0.003289f,
    693     0.563426f, 0.99523f, 0.002646f,
    694     0.580726f, 0.99677f, 0.002063f,
    695     0.59829f, 0.99809f, 0.001533f,
    696     0.616053f, 0.99911f, 0.001091f,
    697     0.633948f, 0.99977f, 0.000711f,
    698     0.651901f, 1.f, 0.000407f,
    699     0.669824f, 0.99971f, 0.000184f,
    700     0.687632f, 0.99885f, 0.000047f,
    701     0.705224f, 0.99734f, 0.0f, /* 560 nm */
    702     0.722773f, 0.99526f, 0.0f,
    703     0.740483f, 0.99274f, 0.0f,
    704     0.758273f, 0.98975f, 0.0f,
    705     0.776083f, 0.9863f, 0.0f,
    706     0.793832f, 0.98238f, 0.0f,
    707     0.811436f, 0.97798f, 0.0f,
    708     0.828822f, 0.97311f, 0.0f,
    709     0.845879f, 0.96774f, 0.0f,
    710     0.862525f, 0.96189f, 0.0f,
    711     0.878655f, 0.955552f, 0.0f,
    712     0.894208f, 0.948601f, 0.0f,
    713     0.909206f, 0.940981f, 0.0f,
    714     0.923672f, 0.932798f, 0.0f,
    715     0.937638f, 0.924158f, 0.0f,
    716     0.951162f, 0.915175f, 0.0f,
    717     0.964283f, 0.905954f, 0.0f,
    718     0.977068f, 0.896608f, 0.0f,
    719     0.98959f, 0.887249f, 0.0f,
    720     1.00191f, 0.877986f, 0.0f,
    721     1.01416f, 0.868934f, 0.0f,
    722     1.0265f, 0.860164f, 0.0f,
    723     1.0388f, 0.851519f, 0.0f,
    724     1.051f, 0.842963f, 0.0f,
    725     1.0629f, 0.834393f, 0.0f,
    726     1.0743f, 0.825623f, 0.0f,
    727     1.0852f, 0.816764f, 0.0f,
    728     1.0952f, 0.807544f, 0.0f,
    729     1.1042f, 0.797947f, 0.0f,
    730     1.112f, 0.787893f, 0.0f,
    731     1.11852f, 0.777405f, 0.0f,
    732     1.1238f, 0.76649f, 0.0f,
    733     1.128f, 0.755309f, 0.0f,
    734     1.1311f, 0.743845f, 0.0f,
    735     1.1332f, 0.73219f, 0.0f,
    736     1.1343f, 0.720353f, 0.0f,
    737     1.1343f, 0.708281f, 0.0f,
    738     1.1333f, 0.696055f, 0.0f,
    739     1.1312f, 0.683621f, 0.0f,
    740     1.1281f, 0.671048f, 0.0f,
    741     1.12399f, 0.658341f, 0.0f, /* 600 nm */
    742     1.1189f, 0.645545f, 0.0f,
    743     1.1129f, 0.632718f, 0.0f,
    744     1.1059f, 0.619815f, 0.0f,
    745     1.098f, 0.606887f, 0.0f,
    746     1.0891f, 0.593878f, 0.0f,
    747     1.0792f, 0.580781f, 0.0f,
    748     1.0684f, 0.567653f, 0.0f,
    749     1.0567f, 0.55449f, 0.0f,
    750     1.044f, 0.541228f, 0.0f,
    751     1.03048f, 0.527963f, 0.0f,
    752     1.016f, 0.514634f, 0.0f,
    753     1.0008f, 0.501363f, 0.0f,
    754     0.98479f, 0.488124f, 0.0f,
    755     0.96808f, 0.474935f, 0.0f,
    756     0.95074f, 0.461834f, 0.0f,
    757     0.9328f, 0.448823f, 0.0f,
    758     0.91434f, 0.435917f, 0.0f,
    759     0.89539f, 0.423153f, 0.0f,
    760     0.87603f, 0.410526f, 0.0f,
    761     0.856297f, 0.398057f, 0.0f,
    762     0.83635f, 0.385835f, 0.0f,
    763     0.81629f, 0.373951f, 0.0f,
    764     0.79605f, 0.362311f, 0.0f,
    765     0.77561f, 0.350863f, 0.0f,
    766     0.75493f, 0.339554f, 0.0f,
    767     0.73399f, 0.328309f, 0.0f,
    768     0.71278f, 0.317118f, 0.0f,
    769     0.69129f, 0.305936f, 0.0f,
    770     0.66952f, 0.294737f, 0.0f,
    771     0.647467f, 0.283493f, 0.0f,
    772     0.62511f, 0.272222f, 0.0f,
    773     0.60252f, 0.26099f, 0.0f,
    774     0.57989f, 0.249877f, 0.0f,
    775     0.55737f, 0.238946f, 0.0f,
    776     0.53511f, 0.228254f, 0.0f,
    777     0.51324f, 0.217853f, 0.0f,
    778     0.49186f, 0.20778f, 0.0f,
    779     0.47108f, 0.198072f, 0.0f,
    780     0.45096f, 0.188748f, 0.0f,
    781     0.431567f, 0.179828f, 0.0f, /* 640 nm */
    782     0.41287f, 0.171285f, 0.0f,
    783     0.39475f, 0.163059f, 0.0f,
    784     0.37721f, 0.155151f, 0.0f,
    785     0.36019f, 0.147535f, 0.0f,
    786     0.34369f, 0.140211f, 0.0f,
    787     0.32769f, 0.13317f, 0.0f,
    788     0.31217f, 0.1264f, 0.0f,
    789     0.29711f, 0.119892f, 0.0f,
    790     0.2825f, 0.11364f, 0.0f,
    791     0.268329f, 0.107633f, 0.0f,
    792     0.25459f, 0.10187f, 0.0f,
    793     0.2413f, 0.096347f, 0.0f,
    794     0.22848f, 0.091063f, 0.0f,
    795     0.21614f, 0.08601f, 0.0f,
    796     0.2043f, 0.081187f, 0.0f,
    797     0.19295f, 0.076583f, 0.0f,
    798     0.18211f, 0.072198f, 0.0f,
    799     0.17177f, 0.068024f, 0.0f,
    800     0.16192f, 0.064052f, 0.0f,
    801     0.152568f, 0.060281f, 0.0f,
    802     0.14367f, 0.056697f, 0.0f,
    803     0.1352f, 0.053292f, 0.0f,
    804     0.12713f, 0.050059f, 0.0f,
    805     0.11948f, 0.046998f, 0.0f,
    806     0.11221f, 0.044096f, 0.0f,
    807     0.10531f, 0.041345f, 0.0f,
    808     0.098786f, 0.0387507f, 0.0f,
    809     0.09261f, 0.0362978f, 0.0f,
    810     0.086773f, 0.0339832f, 0.0f,
    811     0.0812606f, 0.0318004f, 0.0f,
    812     0.076048f, 0.0297395f, 0.0f,
    813     0.071114f, 0.0277918f, 0.0f,
    814     0.066454f, 0.0259551f, 0.0f,
    815     0.062062f, 0.0242263f, 0.0f,
    816     0.05793f, 0.0226017f, 0.0f,
    817     0.05405f, 0.0210779f, 0.0f,
    818     0.050412f, 0.0196505f, 0.0f,
    819     0.047006f, 0.0183153f, 0.0f,
    820     0.043823f, 0.0170686f, 0.0f,
    821     0.0408508f, 0.0159051f, 0.0f, /* 680 nm */
    822     0.038072f, 0.0148183f, 0.0f,
    823     0.035468f, 0.0138008f, 0.0f,
    824     0.033031f, 0.0128495f, 0.0f,
    825     0.030753f, 0.0119607f, 0.0f,
    826     0.028623f, 0.0111303f, 0.0f,
    827     0.026635f, 0.0103555f, 0.0f,
    828     0.024781f, 0.0096332f, 0.0f,
    829     0.023052f, 0.0089599f, 0.0f,
    830     0.021441f, 0.0083324f, 0.0f,
    831     0.0199413f, 0.0077488f, 0.0f,
    832     0.018544f, 0.0072046f, 0.0f,
    833     0.017241f, 0.0066975f, 0.0f,
    834     0.016027f, 0.0062251f, 0.0f,
    835     0.014896f, 0.005785f, 0.0f,
    836     0.013842f, 0.0053751f, 0.0f,
    837     0.012862f, 0.0049941f, 0.0f,
    838     0.011949f, 0.0046392f, 0.0f,
    839     0.0111f, 0.0043093f, 0.0f,
    840     0.010311f, 0.0040028f, 0.0f,
    841     0.0095769f, 0.0037177f, 0.0f,
    842     0.008894f, 0.0034526f, 0.0f,
    843     0.0082581f, 0.0032058f, 0.0f,
    844     0.0076664f, 0.0029762f, 0.0f,
    845     0.0071163f, 0.0027628f, 0.0f,
    846     0.0066052f, 0.0025646f, 0.0f,
    847     0.0061306f, 0.0023805f, 0.0f,
    848     0.0056903f, 0.0022097f, 0.0f,
    849     0.0052819f, 0.0020513f, 0.0f,
    850     0.0049033f, 0.0019045f, 0.0f,
    851     0.0045526f, 0.0017685f, 0.0f,
    852     0.0042275f, 0.0016424f, 0.0f,
    853     0.0039258f, 0.0015254f, 0.0f,
    854     0.0036457f, 0.0014167f, 0.0f,
    855     0.0033859f, 0.001316f, 0.0f,
    856     0.0031447f, 0.0012224f, 0.0f,
    857     0.0029208f, 0.0011356f, 0.0f,
    858     0.002713f, 0.0010549f, 0.0f,
    859     0.0025202f, 0.0009801f, 0.0f,
    860     0.0023411f, 0.0009107f, 0.0f,
    861     0.002175f, 0.0008462f, 0.0f, /* 720 nm */
    862     0.0020206f, 0.0007863f, 0.0f,
    863     0.0018773f, 0.0007307f, 0.0f,
    864     0.0017441f, 0.000679f, 0.0f,
    865     0.0016205f, 0.000631f, 0.0f,
    866     0.0015057f, 0.0005864f, 0.0f,
    867     0.0013992f, 0.0005451f, 0.0f,
    868     0.0013004f, 0.0005067f, 0.0f,
    869     0.0012087f, 0.0004711f, 0.0f,
    870     0.0011236f, 0.0004381f, 0.0f,
    871     0.0010448f, 0.0004074f, 0.0f,
    872     0.0009716f, 0.000379f, 0.0f,
    873     0.0009036f, 0.0003525f, 0.0f,
    874     0.0008405f, 0.000328f, 0.0f,
    875     0.0007819f, 0.0003052f, 0.0f,
    876     0.0007275f, 0.000284f, 0.0f,
    877     0.0006769f, 0.0002644f, 0.0f,
    878     0.00063f, 0.0002461f, 0.0f,
    879     0.0005864f, 0.0002291f, 0.0f,
    880     0.0005459f, 0.0002134f, 0.0f,
    881     0.0005083f, 0.0001987f, 0.0f,
    882     0.0004733f, 0.0001851f, 0.0f,
    883     0.0004408f, 0.0001725f, 0.0f,
    884     0.0004106f, 0.0001607f, 0.0f,
    885     0.0003825f, 0.0001497f, 0.0f,
    886     0.0003564f, 0.0001396f, 0.0f,
    887     0.0003321f, 0.0001301f, 0.0f,
    888     0.0003096f, 0.0001213f, 0.0f,
    889     0.0002886f, 0.0001131f, 0.0f,
    890     0.0002691f, 0.0001055f, 0.0f,
    891     0.000251f, 9.843e-05f, 0.0f,
    892     0.0002341f, 9.185e-05f, 0.0f,
    893     0.0002185f, 8.574e-05f, 0.0f,
    894     0.000203910f, 8.005e-05f, 0.0f,
    895     0.0001904f, 7.475e-05f, 0.0f,
    896     0.0001777f, 6.982e-05f, 0.0f,
    897     0.000166f, 6.522e-05f, 0.0f,
    898     0.000155f, 6.094e-05f, 0.0f,
    899     0.0001448f, 5.694e-05f, 0.0f,
    900     0.0001353f, 5.322e-05f, 0.0f,
    901     0.0001264f, 4.974e-05f, 0.0f, /* 760 nm */
    902     0.0001181f, 4.649e-05f, 0.0f,
    903     0.0001104f, 4.346e-05f, 0.0f,
    904     0.0001032f, 4.064e-05f, 0.0f,
    905     9.643e-05f, 0.000038f, 0.0f,
    906     9.015e-05f, 3.554e-05f, 0.0f,
    907     8.429e-05f, 3.324e-05f, 0.0f,
    908     7.883e-05f, 3.11e-05f, 0.0f,
    909     7.373e-05f, 2.91e-05f, 0.0f,
    910     6.897e-05f, 2.723e-05f, 0.0f,
    911     6.453e-05f, 2.549e-05f, 0.0f,
    912     6.038e-05f, 2.386e-05f, 0.0f,
    913     0.0000565f, 2.233e-05f, 0.0f,
    914     5.288e-05f, 2.091e-05f, 0.0f,
    915     4.95e-05f, 1.958e-05f, 0.0f,
    916     4.634e-05f, 1.834e-05f, 0.0f,
    917     4.339e-05f, 1.718e-05f, 0.0f,
    918     4.063e-05f, 1.609e-05f, 0.0f,
    919     3.806e-05f, 1.508e-05f, 0.0f,
    920     3.566e-05f, 1.413e-05f, 0.0f,
    921     3.341e-05f, 1.325e-05f, 0.0f,
    922     3.132e-05f, 1.242e-05f, 0.0f,
    923     2.936e-05f, 1.165e-05f, 0.0f,
    924     2.752e-05f, 1.093e-05f, 0.0f,
    925     2.581e-05f, 1.025e-05f, 0.0f,
    926     2.421e-05f, 9.62e-06f, 0.0f,
    927     2.271e-05f, 9.028e-06f, 0.0f,
    928     2.131e-05f, 8.474e-06f, 0.0f,
    929     1.999e-05f, 7.955e-06f, 0.0f,
    930     1.876e-05f, 7.469e-06f, 0.0f,
    931     1.761e-05f, 7.013e-06f, 0.0f,
    932     1.653e-05f, 6.586e-06f, 0.0f,
    933     1.552e-05f, 6.186e-06f, 0.0f,
    934     1.457e-05f, 5.811e-06f, 0.0f,
    935     1.369e-05f, 5.459e-06f, 0.0f,
    936     1.286e-05f, 5.13e-06f, 0.0f,
    937     1.208e-05f, 4.821e-06f, 0.0f,
    938     1.135e-05f, 4.531e-06f, 0.0f,
    939     1.066e-05f, 4.259e-06f, 0.0f,
    940     1.002e-05f, 4.004e-06f, 0.0f,
    941     9.414e-06f, 3.765e-06f, 0.0f, /* 800 nm */
    942     8.848e-06f, 3.54e-06f, 0.0f,
    943     8.317e-06f, 3.329e-06f, 0.0f,
    944     7.819e-06f, 3.131e-06f, 0.0f,
    945     7.352e-06f, 2.945e-06f, 0.0f,
    946     6.913e-06f, 2.771e-06f, 0.0f,
    947     6.502e-06f, 2.607e-06f, 0.0f,
    948     6.115e-06f, 2.453e-06f, 0.0f,
    949     5.753e-06f, 2.309e-06f, 0.0f,
    950     5.413e-06f, 2.173e-06f, 0.0f,
    951     5.093e-06f, 2.046e-06f, 0.0f,
    952     4.794e-06f, 1.927e-06f, 0.0f,
    953     4.513e-06f, 1.814e-06f, 0.0f,
    954     4.248e-06f, 1.709e-06f, 0.0f,
    955     4e-06f, 1.61e-06f, 0.0f,
    956     3.767e-06f, 1.517e-06f, 0.0f,
    957     3.548e-06f, 1.429e-06f, 0.0f,
    958     3.342e-06f, 1.347e-06f, 0.0f,
    959     3.149e-06f, 1.269e-06f, 0.0f,
    960     2.967e-06f, 1.197e-06f, 0.0f,
    961     2.795e-06f, 1.128e-06f, 0.0f,
    962     2.635e-06f, 1.064e-06f, 0.0f,
    963     2.483e-06f, 1.003e-06f, 0.0f,
    964     2.341e-06f, 9.462e-07f, 0.0f,
    965     2.208e-06f, 8.926e-07f, 0.0f,
    966     2.082e-06f, 8.422e-07f, 0.0f,
    967     1.964e-06f, 7.946e-07f, 0.0f,
    968     1.852e-06f, 7.498e-07f, 0.0f,
    969     1.747e-06f, 7.074e-07f, 0.0f,
    970     1.647e-06f, 6.675e-07f, 0.0f,
    971     1.553e-06f, 6.297e-07f, 0.0f, /* 830 nm */
     346    /* 360 — 399 nm */
     347    1.222e-07f, 1.340e-08f, 5.350e-07f, 1.851e-07f, 2.029e-08f, 8.107e-07f,
     348    2.788e-07f, 3.056e-08f, 1.221e-06f, 4.175e-07f, 4.574e-08f, 1.829e-06f,
     349    6.213e-07f, 6.805e-08f, 2.722e-06f, 9.193e-07f, 1.007e-07f, 4.028e-06f,
     350    1.352e-06f, 1.480e-07f, 5.926e-06f, 1.977e-06f, 2.163e-07f, 8.665e-06f,
     351    2.873e-06f, 3.142e-07f, 1.260e-05f, 4.150e-06f, 4.537e-07f, 1.820e-05f,
     352    5.959e-06f, 6.511e-07f, 2.614e-05f, 8.506e-06f, 9.288e-07f, 3.733e-05f,
     353    1.207e-05f, 1.318e-06f, 5.299e-05f, 1.702e-05f, 1.857e-06f, 7.476e-05f,
     354    2.387e-05f, 2.602e-06f, 0.0001049f, 3.327e-05f, 3.625e-06f, 0.0001462f,
     355    4.609e-05f, 5.019e-06f, 0.0002027f, 6.347e-05f, 6.907e-06f, 0.0002792f,
     356    8.689e-05f, 9.449e-06f, 0.0003825f, 0.0001182f, 1.285e-05f, 0.0005207f,
     357    0.0001600f, 1.736e-05f, 0.0007048f, 0.0002151f, 2.333e-05f, 0.0009482f,
     358    0.0002875f, 3.115e-05f, 0.0012682f, 0.0003820f, 4.135e-05f, 0.0016861f,
     359    0.0005046f, 5.456e-05f, 0.0022285f, 0.0006624f, 7.156e-05f, 0.0029278f,
     360    0.0008645f, 0.0000933f, 0.0038237f, 0.0011215f, 0.0001209f, 0.0049642f,
     361    0.0014462f, 0.0001556f, 0.0064067f, 0.0018536f, 0.0001992f, 0.0082193f,
     362    0.0023616f, 0.0002534f, 0.0104822f, 0.0029906f, 0.0003202f, 0.0132890f,
     363    0.0037645f, 0.0004024f, 0.0167470f, 0.0047102f, 0.0005023f, 0.0209800f,
     364    0.0058581f, 0.0006232f, 0.0261270f, 0.0072423f, 0.0007685f, 0.0323440f,
     365    0.0088996f, 0.0009417f, 0.0398020f, 0.0108709f, 0.0011478f, 0.0486910f,
     366    0.0131989f, 0.0013903f, 0.0592100f, 0.0159292f, 0.0016740f, 0.0715760f,
     367    /* 400 — 439 nm */
     368    0.0191097f, 0.0020044f, 0.0860109f, 0.0227880f, 0.0023860f, 0.1027400f,
     369    0.0270110f, 0.0028220f, 0.1220000f, 0.0318290f, 0.0033190f, 0.1440200f,
     370    0.0372780f, 0.0038800f, 0.1689900f, 0.0434000f, 0.0045090f, 0.1971200f,
     371    0.0502230f, 0.0052090f, 0.2285700f, 0.0577640f, 0.0059850f, 0.2634700f,
     372    0.0660380f, 0.0068330f, 0.3019000f, 0.0750330f, 0.0077570f, 0.3438700f,
     373    0.0847360f, 0.0087560f, 0.3893660f, 0.0950410f, 0.0098160f, 0.4379700f,
     374    0.1058360f, 0.0109180f, 0.4892200f, 0.1170660f, 0.0120580f, 0.5429000f,
     375    0.1286820f, 0.0132370f, 0.5988100f, 0.1406380f, 0.0144560f, 0.6567600f,
     376    0.1528930f, 0.0157170f, 0.7165800f, 0.1654160f, 0.0170250f, 0.7781200f,
     377    0.1781910f, 0.0183990f, 0.8413100f, 0.1912140f, 0.0198480f, 0.9061100f,
     378    0.2044920f, 0.0213910f, 0.9725420f, 0.2176500f, 0.0229920f, 1.0389000f,
     379    0.2302670f, 0.0245980f, 1.1031000f, 0.2423110f, 0.0262130f, 1.1651000f,
     380    0.2537930f, 0.0278410f, 1.2249000f, 0.2647370f, 0.0294970f, 1.2825000f,
     381    0.2751950f, 0.0311950f, 1.3382000f, 0.2853010f, 0.0329270f, 1.3926000f,
     382    0.2951430f, 0.0347380f, 1.4461000f, 0.3048690f, 0.0366540f, 1.4994000f,
     383    0.3146790f, 0.0386760f, 1.5534800f, 0.3243550f, 0.0407920f, 1.6072000f,
     384    0.3335700f, 0.0429460f, 1.6589000f, 0.3422430f, 0.0451140f, 1.7082000f,
     385    0.3503120f, 0.0473330f, 1.7548000f, 0.3577190f, 0.0496020f, 1.7985000f,
     386    0.3644820f, 0.0519340f, 1.8392000f, 0.3704930f, 0.0543370f, 1.8766000f,
     387    0.3757270f, 0.0568220f, 1.9105000f, 0.3801580f, 0.0593990f, 1.9408000f,
     388    /* 440 — 479 nm */
     389    0.3837340f, 0.0620770f, 1.9672800f, 0.3863270f, 0.0647370f, 1.9891000f,
     390    0.3878580f, 0.0672850f, 2.0057000f, 0.3883960f, 0.0697640f, 2.0174000f,
     391    0.3879780f, 0.0722180f, 2.0244000f, 0.3867260f, 0.0747040f, 2.0273000f,
     392    0.3846960f, 0.0772720f, 2.0264000f, 0.3820060f, 0.0799790f, 2.0223000f,
     393    0.3787090f, 0.0828740f, 2.0153000f, 0.3749150f, 0.0860000f, 2.0060000f,
     394    0.3707020f, 0.0894560f, 1.9948000f, 0.3660890f, 0.0929470f, 1.9814000f,
     395    0.3610450f, 0.0962750f, 1.9653000f, 0.3555180f, 0.0995350f, 1.9464000f,
     396    0.3494860f, 0.1028290f, 1.9248000f, 0.3429570f, 0.1062560f, 1.9007000f,
     397    0.3358930f, 0.1099010f, 1.8741000f, 0.3282840f, 0.1138350f, 1.8451000f,
     398    0.3201500f, 0.1181670f, 1.8139000f, 0.3114750f, 0.1229320f, 1.7806000f,
     399    0.3022730f, 0.1282010f, 1.7453700f, 0.2928580f, 0.1334570f, 1.7091000f,
     400    0.2835020f, 0.1383230f, 1.6723000f, 0.2740440f, 0.1430420f, 1.6347000f,
     401    0.2642630f, 0.1477870f, 1.5956000f, 0.2540850f, 0.1527610f, 1.5549000f,
     402    0.2433920f, 0.1581020f, 1.5122000f, 0.2321870f, 0.1639410f, 1.4673000f,
     403    0.2204880f, 0.1703620f, 1.4199000f, 0.2081980f, 0.1774250f, 1.3700000f,
     404    0.1956180f, 0.1851900f, 1.3175600f, 0.1830340f, 0.1930250f, 1.2624000f,
     405    0.1702220f, 0.2003130f, 1.2050000f, 0.1573480f, 0.2071560f, 1.1466000f,
     406    0.1446500f, 0.2136440f, 1.0880000f, 0.1323490f, 0.2199400f, 1.0302000f,
     407    0.1205840f, 0.2261700f, 0.9738300f, 0.1094560f, 0.2324670f, 0.9194300f,
     408    0.0990420f, 0.2390250f, 0.8674600f, 0.0893880f, 0.2459970f, 0.8182800f,
     409    /* 480 — 519 nm */
     410    0.0805070f, 0.2535890f, 0.7721250f, 0.0720340f, 0.2618760f, 0.7282900f,
     411    0.0637100f, 0.2706430f, 0.6860400f, 0.0556940f, 0.2796450f, 0.6455300f,
     412    0.0481170f, 0.2886940f, 0.6068500f, 0.0410720f, 0.2976650f, 0.5700600f,
     413    0.0346420f, 0.3064690f, 0.5352200f, 0.0288960f, 0.3150350f, 0.5023400f,
     414    0.0238760f, 0.3233350f, 0.4714000f, 0.0196280f, 0.3313660f, 0.4423900f,
     415    0.0161720f, 0.3391330f, 0.4152540f, 0.0133000f, 0.3478600f, 0.3900240f,
     416    0.0107590f, 0.3583260f, 0.3663990f, 0.0085420f, 0.3700010f, 0.3440150f,
     417    0.0066610f, 0.3824640f, 0.3226890f, 0.0051320f, 0.3953790f, 0.3023560f,
     418    0.0039820f, 0.4084820f, 0.2830360f, 0.0032390f, 0.4215880f, 0.2648160f,
     419    0.0029340f, 0.4346190f, 0.2478480f, 0.0031140f, 0.4476010f, 0.2323180f,
     420    0.0038160f, 0.4607770f, 0.2185020f, 0.0050950f, 0.4743400f, 0.2058510f,
     421    0.0069360f, 0.4882000f, 0.1935960f, 0.0092990f, 0.5023400f, 0.1817360f,
     422    0.0121470f, 0.5167400f, 0.1702810f, 0.0154440f, 0.5313600f, 0.1592490f,
     423    0.0191560f, 0.5461900f, 0.1486730f, 0.0232500f, 0.5611800f, 0.1386090f,
     424    0.0276900f, 0.5762900f, 0.1290960f, 0.0324440f, 0.5915000f, 0.1202150f,
     425    0.0374650f, 0.6067410f, 0.1120440f, 0.0429560f, 0.6221500f, 0.1047100f,
     426    0.0491140f, 0.6378300f, 0.0981960f, 0.0559200f, 0.6537100f, 0.0923610f,
     427    0.0633490f, 0.6696800f, 0.0870880f, 0.0713580f, 0.6856600f, 0.0822480f,
     428    0.0799010f, 0.7015500f, 0.0777440f, 0.0889090f, 0.7172300f, 0.0734560f,
     429    0.0982930f, 0.7325700f, 0.0692680f, 0.1079490f, 0.7474600f, 0.0650600f,
     430    /* 520 — 559 nm */
     431    0.1177490f, 0.7617570f, 0.0607090f, 0.1278390f, 0.7753400f, 0.0564570f,
     432    0.1384500f, 0.7882200f, 0.0526090f, 0.1495160f, 0.8004600f, 0.0491220f,
     433    0.1610410f, 0.8121400f, 0.0459540f, 0.1729530f, 0.8233300f, 0.0430500f,
     434    0.1852090f, 0.8341200f, 0.0403680f, 0.1977550f, 0.8446000f, 0.0378390f,
     435    0.2105380f, 0.8548700f, 0.0353840f, 0.2234600f, 0.8650400f, 0.0329490f,
     436    0.2364910f, 0.8752110f, 0.0304510f, 0.2496330f, 0.8853700f, 0.0280290f,
     437    0.2629720f, 0.8953700f, 0.0258620f, 0.2765150f, 0.9051500f, 0.0239200f,
     438    0.2902690f, 0.9146500f, 0.0221740f, 0.3042130f, 0.9238100f, 0.0205840f,
     439    0.3183610f, 0.9325500f, 0.0191270f, 0.3327050f, 0.9408100f, 0.0177400f,
     440    0.3472320f, 0.9485200f, 0.0164030f, 0.3619260f, 0.9556000f, 0.0150640f,
     441    0.3767720f, 0.9619880f, 0.0136760f, 0.3916830f, 0.9675400f, 0.0123080f,
     442    0.4065940f, 0.9722300f, 0.0110560f, 0.4215390f, 0.9761700f, 0.0099150f,
     443    0.4365170f, 0.9794600f, 0.0088720f, 0.4515840f, 0.9822000f, 0.0079180f,
     444    0.4667820f, 0.9845200f, 0.0070300f, 0.4821470f, 0.9865200f, 0.0062230f,
     445    0.4977380f, 0.9883200f, 0.0054530f, 0.5136060f, 0.9900200f, 0.0047140f,
     446    0.5298260f, 0.9917610f, 0.0039880f, 0.5464400f, 0.9935300f, 0.0032890f,
     447    0.5634260f, 0.9952300f, 0.0026460f, 0.5807260f, 0.9967700f, 0.0020630f,
     448    0.5982900f, 0.9980900f, 0.0015330f, 0.6160530f, 0.9991100f, 0.0010910f,
     449    0.6339480f, 0.9997700f, 0.0007110f, 0.6519010f, 1.0000000f, 0.0004070f,
     450    0.6698240f, 0.9997100f, 0.0001840f, 0.6876320f, 0.9988500f, 0.0000470f,
     451    /* 560 — 599 nm */
     452    0.7052240f, 0.9973400f, 0.0000000f, 0.7227730f, 0.9952600f, 0.0000000f,
     453    0.7404830f, 0.9927400f, 0.0000000f, 0.7582730f, 0.9897500f, 0.0000000f,
     454    0.7760830f, 0.9863000f, 0.0000000f, 0.7938320f, 0.9823800f, 0.0000000f,
     455    0.8114360f, 0.9779800f, 0.0000000f, 0.8288220f, 0.9731100f, 0.0000000f,
     456    0.8458790f, 0.9677400f, 0.0000000f, 0.8625250f, 0.9618900f, 0.0000000f,
     457    0.8786550f, 0.9555520f, 0.0000000f, 0.8942080f, 0.9486010f, 0.0000000f,
     458    0.9092060f, 0.9409810f, 0.0000000f, 0.9236720f, 0.9327980f, 0.0000000f,
     459    0.9376380f, 0.9241580f, 0.0000000f, 0.9511620f, 0.9151750f, 0.0000000f,
     460    0.9642830f, 0.9059540f, 0.0000000f, 0.9770680f, 0.8966080f, 0.0000000f,
     461    0.9895900f, 0.8872490f, 0.0000000f, 1.0019100f, 0.8779860f, 0.0000000f,
     462    1.0141600f, 0.8689340f, 0.0000000f, 1.0265000f, 0.8601640f, 0.0000000f,
     463    1.0388000f, 0.8515190f, 0.0000000f, 1.0510000f, 0.8429630f, 0.0000000f,
     464    1.0629000f, 0.8343930f, 0.0000000f, 1.0743000f, 0.8256230f, 0.0000000f,
     465    1.0852000f, 0.8167640f, 0.0000000f, 1.0952000f, 0.8075440f, 0.0000000f,
     466    1.1042000f, 0.7979470f, 0.0000000f, 1.1120000f, 0.7878930f, 0.0000000f,
     467    1.1185200f, 0.7774050f, 0.0000000f, 1.1238000f, 0.7664900f, 0.0000000f,
     468    1.1280000f, 0.7553090f, 0.0000000f, 1.1311000f, 0.7438450f, 0.0000000f,
     469    1.1332000f, 0.7321900f, 0.0000000f, 1.1343000f, 0.7203530f, 0.0000000f,
     470    1.1343000f, 0.7082810f, 0.0000000f, 1.1333000f, 0.6960550f, 0.0000000f,
     471    1.1312000f, 0.6836210f, 0.0000000f, 1.1281000f, 0.6710480f, 0.0000000f,
     472    /* 600 — 639 nm */
     473    1.1239900f, 0.6583410f, 0.0000000f, 1.1189000f, 0.6455450f, 0.0000000f,
     474    1.1129000f, 0.6327180f, 0.0000000f, 1.1059000f, 0.6198150f, 0.0000000f,
     475    1.0980000f, 0.6068870f, 0.0000000f, 1.0891000f, 0.5938780f, 0.0000000f,
     476    1.0792000f, 0.5807810f, 0.0000000f, 1.0684000f, 0.5676530f, 0.0000000f,
     477    1.0567000f, 0.5544900f, 0.0000000f, 1.0440000f, 0.5412280f, 0.0000000f,
     478    1.0304800f, 0.5279630f, 0.0000000f, 1.0160000f, 0.5146340f, 0.0000000f,
     479    1.0008000f, 0.5013630f, 0.0000000f, 0.9847900f, 0.4881240f, 0.0000000f,
     480    0.9680800f, 0.4749350f, 0.0000000f, 0.9507400f, 0.4618340f, 0.0000000f,
     481    0.9328000f, 0.4488230f, 0.0000000f, 0.9143400f, 0.4359170f, 0.0000000f,
     482    0.8953900f, 0.4231530f, 0.0000000f, 0.8760300f, 0.4105260f, 0.0000000f,
     483    0.8562970f, 0.3980570f, 0.0000000f, 0.8363500f, 0.3858350f, 0.0000000f,
     484    0.8162900f, 0.3739510f, 0.0000000f, 0.7960500f, 0.3623110f, 0.0000000f,
     485    0.7756100f, 0.3508630f, 0.0000000f, 0.7549300f, 0.3395540f, 0.0000000f,
     486    0.7339900f, 0.3283090f, 0.0000000f, 0.7127800f, 0.3171180f, 0.0000000f,
     487    0.6912900f, 0.3059360f, 0.0000000f, 0.6695200f, 0.2947370f, 0.0000000f,
     488    0.6474670f, 0.2834930f, 0.0000000f, 0.6251100f, 0.2722220f, 0.0000000f,
     489    0.6025200f, 0.2609900f, 0.0000000f, 0.5798900f, 0.2498770f, 0.0000000f,
     490    0.5573700f, 0.2389460f, 0.0000000f, 0.5351100f, 0.2282540f, 0.0000000f,
     491    0.5132400f, 0.2178530f, 0.0000000f, 0.4918600f, 0.2077800f, 0.0000000f,
     492    0.4710800f, 0.1980720f, 0.0000000f, 0.4509600f, 0.1887480f, 0.0000000f,
     493    /* 640 — 679 nm */
     494    0.4315670f, 0.1798280f, 0.0000000f, 0.4128700f, 0.1712850f, 0.0000000f,
     495    0.3947500f, 0.1630590f, 0.0000000f, 0.3772100f, 0.1551510f, 0.0000000f,
     496    0.3601900f, 0.1475350f, 0.0000000f, 0.3436900f, 0.1402110f, 0.0000000f,
     497    0.3276900f, 0.1331700f, 0.0000000f, 0.3121700f, 0.1264000f, 0.0000000f,
     498    0.2971100f, 0.1198920f, 0.0000000f, 0.2825000f, 0.1136400f, 0.0000000f,
     499    0.2683290f, 0.1076330f, 0.0000000f, 0.2545900f, 0.1018700f, 0.0000000f,
     500    0.2413000f, 0.0963470f, 0.0000000f, 0.2284800f, 0.0910630f, 0.0000000f,
     501    0.2161400f, 0.0860100f, 0.0000000f, 0.2043000f, 0.0811870f, 0.0000000f,
     502    0.1929500f, 0.0765830f, 0.0000000f, 0.1821100f, 0.0721980f, 0.0000000f,
     503    0.1717700f, 0.0680240f, 0.0000000f, 0.1619200f, 0.0640520f, 0.0000000f,
     504    0.1525680f, 0.0602810f, 0.0000000f, 0.1436700f, 0.0566970f, 0.0000000f,
     505    0.1352000f, 0.0532920f, 0.0000000f, 0.1271300f, 0.0500590f, 0.0000000f,
     506    0.1194800f, 0.0469980f, 0.0000000f, 0.1122100f, 0.0440960f, 0.0000000f,
     507    0.1053100f, 0.0413450f, 0.0000000f, 0.0987860f, 0.0387507f, 0.0000000f,
     508    0.0926100f, 0.0362978f, 0.0000000f, 0.0867730f, 0.0339832f, 0.0000000f,
     509    0.0812606f, 0.0318004f, 0.0000000f, 0.0760480f, 0.0297395f, 0.0000000f,
     510    0.0711140f, 0.0277918f, 0.0000000f, 0.0664540f, 0.0259551f, 0.0000000f,
     511    0.0620620f, 0.0242263f, 0.0000000f, 0.0579300f, 0.0226017f, 0.0000000f,
     512    0.0540500f, 0.0210779f, 0.0000000f, 0.0504120f, 0.0196505f, 0.0000000f,
     513    0.0470060f, 0.0183153f, 0.0000000f, 0.0438230f, 0.0170686f, 0.0000000f,
     514    /* 680 — 719 nm */
     515    0.0408508f, 0.0159051f, 0.0000000f, 0.0380720f, 0.0148183f, 0.0000000f,
     516    0.0354680f, 0.0138008f, 0.0000000f, 0.0330310f, 0.0128495f, 0.0000000f,
     517    0.0307530f, 0.0119607f, 0.0000000f, 0.0286230f, 0.0111303f, 0.0000000f,
     518    0.0266350f, 0.0103555f, 0.0000000f, 0.0247810f, 0.0096332f, 0.0000000f,
     519    0.0230520f, 0.0089599f, 0.0000000f, 0.0214410f, 0.0083324f, 0.0000000f,
     520    0.0199413f, 0.0077488f, 0.0000000f, 0.0185440f, 0.0072046f, 0.0000000f,
     521    0.0172410f, 0.0066975f, 0.0000000f, 0.0160270f, 0.0062251f, 0.0000000f,
     522    0.0148960f, 0.0057850f, 0.0000000f, 0.0138420f, 0.0053751f, 0.0000000f,
     523    0.0128620f, 0.0049941f, 0.0000000f, 0.0119490f, 0.0046392f, 0.0000000f,
     524    0.0111000f, 0.0043093f, 0.0000000f, 0.0103110f, 0.0040028f, 0.0000000f,
     525    0.0095769f, 0.0037177f, 0.0000000f, 0.0088940f, 0.0034526f, 0.0000000f,
     526    0.0082581f, 0.0032058f, 0.0000000f, 0.0076664f, 0.0029762f, 0.0000000f,
     527    0.0071163f, 0.0027628f, 0.0000000f, 0.0066052f, 0.0025646f, 0.0000000f,
     528    0.0061306f, 0.0023805f, 0.0000000f, 0.0056903f, 0.0022097f, 0.0000000f,
     529    0.0052819f, 0.0020513f, 0.0000000f, 0.0049033f, 0.0019045f, 0.0000000f,
     530    0.0045526f, 0.0017685f, 0.0000000f, 0.0042275f, 0.0016424f, 0.0000000f,
     531    0.0039258f, 0.0015254f, 0.0000000f, 0.0036457f, 0.0014167f, 0.0000000f,
     532    0.0033859f, 0.0013160f, 0.0000000f, 0.0031447f, 0.0012224f, 0.0000000f,
     533    0.0029208f, 0.0011356f, 0.0000000f, 0.0027130f, 0.0010549f, 0.0000000f,
     534    0.0025202f, 0.0009801f, 0.0000000f, 0.0023411f, 0.0009107f, 0.0000000f,
     535    /* 720 — 759 nm */
     536    0.0021750f, 0.0008462f, 0.0000000f, 0.0020206f, 0.0007863f, 0.0000000f,
     537    0.0018773f, 0.0007307f, 0.0000000f, 0.0017441f, 0.0006790f, 0.0000000f,
     538    0.0016205f, 0.0006310f, 0.0000000f, 0.0015057f, 0.0005864f, 0.0000000f,
     539    0.0013992f, 0.0005451f, 0.0000000f, 0.0013004f, 0.0005067f, 0.0000000f,
     540    0.0012087f, 0.0004711f, 0.0000000f, 0.0011236f, 0.0004381f, 0.0000000f,
     541    0.0010448f, 0.0004074f, 0.0000000f, 0.0009716f, 0.0003790f, 0.0000000f,
     542    0.0009036f, 0.0003525f, 0.0000000f, 0.0008405f, 0.0003280f, 0.0000000f,
     543    0.0007819f, 0.0003052f, 0.0000000f, 0.0007275f, 0.0002840f, 0.0000000f,
     544    0.0006769f, 0.0002644f, 0.0000000f, 0.0006300f, 0.0002461f, 0.0000000f,
     545    0.0005864f, 0.0002291f, 0.0000000f, 0.0005459f, 0.0002134f, 0.0000000f,
     546    0.0005083f, 0.0001987f, 0.0000000f, 0.0004733f, 0.0001851f, 0.0000000f,
     547    0.0004408f, 0.0001725f, 0.0000000f, 0.0004106f, 0.0001607f, 0.0000000f,
     548    0.0003825f, 0.0001497f, 0.0000000f, 0.0003564f, 0.0001396f, 0.0000000f,
     549    0.0003321f, 0.0001301f, 0.0000000f, 0.0003096f, 0.0001213f, 0.0000000f,
     550    0.0002886f, 0.0001131f, 0.0000000f, 0.0002691f, 0.0001055f, 0.0000000f,
     551    0.0002510f, 9.843e-05f, 0.0000000f, 0.0002341f, 9.185e-05f, 0.0000000f,
     552    0.0002185f, 8.574e-05f, 0.0000000f, 2.0391e-4f, 8.005e-05f, 0.0000000f,
     553    1.9040e-4f, 7.475e-05f, 0.0000000f, 1.7770e-4f, 6.982e-05f, 0.0000000f,
     554    0.0001660f, 6.522e-05f, 0.0000000f, 0.0001550f, 6.094e-05f, 0.0000000f,
     555    0.0001448f, 5.694e-05f, 0.0000000f, 0.0001353f, 5.322e-05f, 0.0000000f,
     556    /* 760 — 799 nm */
     557    0.0001264f, 4.974e-05f, 0.0000000f, 0.0001181f, 4.649e-05f, 0.0000000f,
     558    0.0001104f, 4.346e-05f, 0.0000000f, 0.0001032f, 4.064e-05f, 0.0000000f,
     559    9.643e-05f, 3.800e-05f, 0.0000000f, 9.015e-05f, 3.554e-05f, 0.0000000f,
     560    8.429e-05f, 3.324e-05f, 0.0000000f, 7.883e-05f, 3.110e-05f, 0.0000000f,
     561    7.373e-05f, 2.910e-05f, 0.0000000f, 6.897e-05f, 2.723e-05f, 0.0000000f,
     562    6.453e-05f, 2.549e-05f, 0.0000000f, 6.038e-05f, 2.386e-05f, 0.0000000f,
     563    0.0000565f, 2.233e-05f, 0.0000000f, 5.288e-05f, 2.091e-05f, 0.0000000f,
     564    4.950e-05f, 1.958e-05f, 0.0000000f, 4.634e-05f, 1.834e-05f, 0.0000000f,
     565    4.339e-05f, 1.718e-05f, 0.0000000f, 4.063e-05f, 1.609e-05f, 0.0000000f,
     566    3.806e-05f, 1.508e-05f, 0.0000000f, 3.566e-05f, 1.413e-05f, 0.0000000f,
     567    3.341e-05f, 1.325e-05f, 0.0000000f, 3.132e-05f, 1.242e-05f, 0.0000000f,
     568    2.936e-05f, 1.165e-05f, 0.0000000f, 2.752e-05f, 1.093e-05f, 0.0000000f,
     569    2.581e-05f, 1.025e-05f, 0.0000000f, 2.421e-05f, 9.620e-06f, 0.0000000f,
     570    2.271e-05f, 9.028e-06f, 0.0000000f, 2.131e-05f, 8.474e-06f, 0.0000000f,
     571    1.999e-05f, 7.955e-06f, 0.0000000f, 1.876e-05f, 7.469e-06f, 0.0000000f,
     572    1.761e-05f, 7.013e-06f, 0.0000000f, 1.653e-05f, 6.586e-06f, 0.0000000f,
     573    1.552e-05f, 6.186e-06f, 0.0000000f, 1.457e-05f, 5.811e-06f, 0.0000000f,
     574    1.369e-05f, 5.459e-06f, 0.0000000f, 1.286e-05f, 5.130e-06f, 0.0000000f,
     575    1.208e-05f, 4.821e-06f, 0.0000000f, 1.135e-05f, 4.531e-06f, 0.0000000f,
     576    1.066e-05f, 4.259e-06f, 0.0000000f, 1.002e-05f, 4.004e-06f, 0.0000000f,
     577    /* 800 — 830 nm */
     578    9.414e-06f, 3.765e-06f, 0.0000000f, 8.848e-06f, 3.540e-06f, 0.0000000f,
     579    8.317e-06f, 3.329e-06f, 0.0000000f, 7.819e-06f, 3.131e-06f, 0.0000000f,
     580    7.352e-06f, 2.945e-06f, 0.0000000f, 6.913e-06f, 2.771e-06f, 0.0000000f,
     581    6.502e-06f, 2.607e-06f, 0.0000000f, 6.115e-06f, 2.453e-06f, 0.0000000f,
     582    5.753e-06f, 2.309e-06f, 0.0000000f, 5.413e-06f, 2.173e-06f, 0.0000000f,
     583    5.093e-06f, 2.046e-06f, 0.0000000f, 4.794e-06f, 1.927e-06f, 0.0000000f,
     584    4.513e-06f, 1.814e-06f, 0.0000000f, 4.248e-06f, 1.709e-06f, 0.0000000f,
     585    4.000e-06f, 1.610e-06f, 0.0000000f, 3.767e-06f, 1.517e-06f, 0.0000000f,
     586    3.548e-06f, 1.429e-06f, 0.0000000f, 3.342e-06f, 1.347e-06f, 0.0000000f,
     587    3.149e-06f, 1.269e-06f, 0.0000000f, 2.967e-06f, 1.197e-06f, 0.0000000f,
     588    2.795e-06f, 1.128e-06f, 0.0000000f, 2.635e-06f, 1.064e-06f, 0.0000000f,
     589    2.483e-06f, 1.003e-06f, 0.0000000f, 2.341e-06f, 9.462e-07f, 0.0000000f,
     590    2.208e-06f, 8.926e-07f, 0.0000000f, 2.082e-06f, 8.422e-07f, 0.0000000f,
     591    1.964e-06f, 7.946e-07f, 0.0000000f, 1.852e-06f, 7.498e-07f, 0.0000000f,
     592    1.747e-06f, 7.074e-07f, 0.0000000f, 1.647e-06f, 6.675e-07f, 0.0000000f,
     593    1.553e-06f, 6.297e-07f, 0.0000000f,
    972594};
    973595
  • trunk/src/lol/image/color.h

    r2200 r2202  
    215215     * input should be in CIE L*a*b*.
    216216     */
    217     static float DistanceCIEDE2000(vec3 lab1, vec3 lab2)
    218     {
    219         float const deg2rad = 6.28318530718f / 360.f;
    220         float const rad2deg = 360.f / 6.28318530718f;
    221 
    222         float C1 = length(lab1.yz);
    223         float C2 = length(lab2.yz);
    224         float C_ = 0.5f * (C1 + C2);
    225 
    226         float L1 = lab1.x;
    227         float L2 = lab2.x;
    228         float dLp = L2 - L1;
    229         float L_ = 0.5f * (L1 + L2);
    230 
    231         float tmp1 = pow(C_, 7.f);
    232         float tmp2 = 1.5f - 0.5f * sqrt(tmp1 / (tmp1 + pow(25.f, 7.f)));
    233         float ap1 = lab1.y * tmp2;
    234         float ap2 = lab2.y * tmp2;
    235         float Cp1 = sqrt(ap1 * ap1 + lab1.z * lab1.z);
    236         float Cp2 = sqrt(ap2 * ap2 + lab2.z * lab2.z);
    237         float dCp = Cp2 - Cp1;
    238         float Cp_ = 0.5f * (Cp1 + Cp2);
    239 
    240         float hp1 = fmod(atan2(lab1.z, ap1) * rad2deg, 360.f);
    241         if (hp1 < 0.f)
    242             hp1 += 360.f;
    243         float hp2 = fmod(atan2(lab2.z, ap2) * rad2deg, 360.f);
    244         if (hp2 < 0.f)
    245             hp2 += 360.f;
    246         float dhp;
    247         if (abs(hp1 - hp2) <= 180.f)
    248             dhp = hp2 - hp1;
    249         else if (hp2 <= hp1)
    250             dhp = hp2 - hp1 + 360.f;
    251         else
    252             dhp = hp2 - hp1 - 360.f;
    253         float dHp = 2.f * sqrt(Cp1 * Cp2) * sin(dhp / 2.f * deg2rad);
    254         float Hp_;
    255         if (abs(hp1 - hp2) > 180.f)
    256             Hp_ = 0.5f * (hp1 + hp2 + 360.f);
    257         else
    258             Hp_ = 0.5f * (hp1 + hp2);
    259 
    260         float T = 1.f - 0.17f * cos((Hp_ - 30.f) * deg2rad)
    261                       + 0.24f * cos(2 * Hp_ * deg2rad)
    262                       + 0.32f * cos((3.f * Hp_ + 6.f) * deg2rad)
    263                       - 0.20f * cos((4.f * Hp_ - 63.f) * deg2rad);
    264         float SL = 1.f + 0.015f * (L_ - 50) * (L_ - 50)
    265                                 / sqrt(20.f + (L_ - 50) * (L_ - 50));
    266         float SC = 1.f + 0.045f * Cp_;
    267         float SH = 1.f + 0.015f * Cp_ * T;
    268         float RT = -2.f * sqrt(pow(Cp_, 7.f) / (pow(Cp_, 7.f) + pow(25.f, 7.f)))
    269                         * sin(60.f * deg2rad * exp(-pow((Hp_ - 275.f) / 25.f, 2.f)));
    270 
    271         dLp /= SL;
    272         dCp /= SC;
    273         dHp /= SH;
    274 
    275         return sqrt(dLp * dLp + dCp * dCp + dHp * dHp + RT * dCp * dHp);
    276     }
    277 
    278     /* Convert a wavelength to an xyY fully saturated colour */
     217    static float DistanceCIEDE2000(vec3 lab1, vec3 lab2);
     218
     219    /*
     220     * Convert a wavelength into an xyY fully saturated colour.
     221     */
    279222    static vec3 WavelengthToCIExyY(float nm);
    280223};
Note: See TracChangeset for help on using the changeset viewer.