From 9584cf31aad9c737b4155240c8ae5f12af84e406 Mon Sep 17 00:00:00 2001 From: Keenan Crane Date: Fri, 3 Jan 2025 04:00:17 -0500 Subject: [PATCH] contour line scalar shading, add more perceptual colormaps (#317) * Add contour shader * Add darkness parameter to contour shader * Add grey and perceptually uniform colormaps * Add gray and perceptually uniform color maps * revert unintended changes * restore recently-added changes * unrelated small warning fix * re-restore new cmap names * missing shader register * merge contour lines to be a variant style for existing isolines option * rename isoline width to period * remove old note * add a few tests * change colormap order --------- Co-authored-by: keenancrane Co-authored-by: Nicholas Sharp --- include/polyscope/persistent_value.h | 2 + include/polyscope/render/color_maps.h | 9 +- include/polyscope/render/colormap_defs.h | 4 + .../polyscope/render/opengl/shaders/rules.h | 1 + include/polyscope/scalar_quantity.h | 17 ++- include/polyscope/scalar_quantity.ipp | 122 +++++++++++++++--- include/polyscope/types.h | 1 + src/persistent_value.cpp | 1 + src/render/color_maps.cpp | 12 ++ src/render/engine.cpp | 12 ++ src/render/mock_opengl/mock_gl_engine.cpp | 1 + src/render/opengl/gl_engine.cpp | 1 + src/render/opengl/shaders/rules.cpp | 26 ++++ src/surface_mesh.cpp | 2 - test/src/floating_test.cpp | 6 + test/src/point_cloud_test.cpp | 6 + test/src/surface_mesh_test.cpp | 7 + 17 files changed, 208 insertions(+), 22 deletions(-) diff --git a/include/polyscope/persistent_value.h b/include/polyscope/persistent_value.h index daa9449f..7d5bed04 100644 --- a/include/polyscope/persistent_value.h +++ b/include/polyscope/persistent_value.h @@ -143,6 +143,7 @@ extern PersistentCache persistentCache_paramVizStyle; extern PersistentCache persistentCache_BackFacePolicy; extern PersistentCache persistentCache_MeshNormalType; extern PersistentCache persistentCache_FilterMode; +extern PersistentCache persistentCache_IsolineStyle; template<> inline PersistentCache& getPersistentCacheRef() { return persistentCache_double; } template<> inline PersistentCache& getPersistentCacheRef() { return persistentCache_float; } @@ -157,6 +158,7 @@ template<> inline PersistentCache& getPersistentCacheR template<> inline PersistentCache& getPersistentCacheRef() { return persistentCache_BackFacePolicy; } template<> inline PersistentCache& getPersistentCacheRef() { return persistentCache_MeshNormalType; } template<> inline PersistentCache& getPersistentCacheRef() { return persistentCache_FilterMode; } +template<> inline PersistentCache& getPersistentCacheRef() { return persistentCache_IsolineStyle; } } // clang-format on diff --git a/include/polyscope/render/color_maps.h b/include/polyscope/render/color_maps.h index 131f53ce..ebd59f27 100644 --- a/include/polyscope/render/color_maps.h +++ b/include/polyscope/render/color_maps.h @@ -18,8 +18,14 @@ bool buildColormapSelector(std::string& cm, std::string fieldname = "##colormap_ // ColorMaps currently available below -// Sequential: +// Sequential & perceptually uniform: // - viridis (CM_VIRIDIS) +// - magma (CM_MAGMA) +// - inferno (CM_INFERNO) +// - plasma (CM_PLASMA) +// - gray (CM_GRAY) +// +// Sequential: // - blues (CM_BLUES) // - reds (CM_REDS) // @@ -32,7 +38,6 @@ bool buildColormapSelector(std::string& cm, std::string fieldname = "##colormap_ // - rainbow (CM_RAINBOW) // - jet (CM_JET) // - turbo (CM_TURBO) -// - hsv (CM_HSV) // // Cyclic: // - phase (CM_PHASE) diff --git a/include/polyscope/render/colormap_defs.h b/include/polyscope/render/colormap_defs.h index 77e494c5..d681294e 100644 --- a/include/polyscope/render/colormap_defs.h +++ b/include/polyscope/render/colormap_defs.h @@ -11,7 +11,11 @@ namespace render { // === the default colormaps themselves // (stored in color_maps.cpp) +extern const std::vector CM_GRAY; extern const std::vector CM_VIRIDIS; +extern const std::vector CM_PLASMA; +extern const std::vector CM_INFERNO; +extern const std::vector CM_MAGMA; extern const std::vector CM_COOLWARM; extern const std::vector CM_BLUES; extern const std::vector CM_PIYG; diff --git a/include/polyscope/render/opengl/shaders/rules.h b/include/polyscope/render/opengl/shaders/rules.h index ac8ec018..221a678a 100644 --- a/include/polyscope/render/opengl/shaders/rules.h +++ b/include/polyscope/render/opengl/shaders/rules.h @@ -29,6 +29,7 @@ extern const ShaderReplacementRule SHADE_CHECKER_VALUE2; // generate a tw extern const ShaderReplacementRule SHADE_CHECKER_CATEGORY; // generate a checker with colors from a categorical int extern const ShaderReplacementRule SHADEVALUE_MAG_VALUE2; // generate a shadeValue from the magnitude of shadeValue2 extern const ShaderReplacementRule ISOLINE_STRIPE_VALUECOLOR; // modulate albedoColor based on shadeValue +extern const ShaderReplacementRule CONTOUR_VALUECOLOR; // modulate albedoColor based on shadeValue extern const ShaderReplacementRule CHECKER_VALUE2COLOR; // modulate albedoColor based on shadeValue2 extern const ShaderReplacementRule SHADE_BASECOLOR; // constant from u_baseColor extern const ShaderReplacementRule PREMULTIPLY_COLOR; diff --git a/include/polyscope/scalar_quantity.h b/include/polyscope/scalar_quantity.h index e999d039..9d55dbb6 100644 --- a/include/polyscope/scalar_quantity.h +++ b/include/polyscope/scalar_quantity.h @@ -53,12 +53,21 @@ class ScalarQuantity { std::pair getDataRange(); // Isolines + // NOTE there's a name typo, errant `s` in isolinesEnabled (leaving to avoid breaking change) QuantityT* setIsolinesEnabled(bool newEnabled); bool getIsolinesEnabled(); - QuantityT* setIsolineWidth(double size, bool isRelative); - double getIsolineWidth(); + QuantityT* setIsolineStyle(IsolineStyle val); + IsolineStyle getIsolineStyle(); + QuantityT* setIsolinePeriod(double size, bool isRelative); + double getIsolinePeriod(); QuantityT* setIsolineDarkness(double val); double getIsolineDarkness(); + QuantityT* setIsolineContourThickness(double val); + double getIsolineContourThickness(); + + // Old / depracted methods kept for compatability + QuantityT* setIsolineWidth(double size, bool isRelative); + double getIsolineWidth(); protected: std::vector valuesData; @@ -75,8 +84,10 @@ class ScalarQuantity { // Parameters PersistentValue cMap; PersistentValue isolinesEnabled; - PersistentValue> isolineWidth; + PersistentValue isolineStyle; + PersistentValue> isolinePeriod; PersistentValue isolineDarkness; + PersistentValue isolineContourThickness; }; } // namespace polyscope diff --git a/include/polyscope/scalar_quantity.ipp b/include/polyscope/scalar_quantity.ipp index a7eea09b..00089bea 100644 --- a/include/polyscope/scalar_quantity.ipp +++ b/include/polyscope/scalar_quantity.ipp @@ -14,9 +14,11 @@ ScalarQuantity::ScalarQuantity(QuantityT& quantity_, const std::vecto vizRangeMax(quantity.uniquePrefix() + "vizRangeMax", -777.), // including clearing cache cMap(quantity.uniquePrefix() + "cmap", defaultColorMap(dataType)), isolinesEnabled(quantity.uniquePrefix() + "isolinesEnabled", false), - isolineWidth(quantity.uniquePrefix() + "isolineWidth", - absoluteValue((dataRange.second - dataRange.first) * 0.02)), - isolineDarkness(quantity.uniquePrefix() + "isolineDarkness", 0.7) + isolineStyle(quantity.uniquePrefix() + "isolinesStyle", IsolineStyle::Stripe), + isolinePeriod(quantity.uniquePrefix() + "isolinePeriod", + absoluteValue((dataRange.second - dataRange.first) * 0.02)), + isolineDarkness(quantity.uniquePrefix() + "isolineDarkness", 0.7), + isolineContourThickness(quantity.uniquePrefix() + "isolineContourThickness", 0.3) { values.checkInvalidValues(); @@ -144,22 +146,46 @@ void ScalarQuantity::buildScalarUI() { // Isolines if (isolinesEnabled.get()) { + ImGui::PushItemWidth(100); + + auto styleName = [](const IsolineStyle& m) -> std::string { + switch (m) { + case IsolineStyle::Stripe: + return "Stripe"; + case IsolineStyle::Contour: + return "Contour"; + } + return ""; + }; + + ImGui::TextUnformatted("Isoline style"); + ImGui::SameLine(); + if (ImGui::BeginCombo("##IsolineStyle", styleName(getIsolineStyle()).c_str())) { + for (IsolineStyle s : {IsolineStyle::Stripe, IsolineStyle::Contour}) { + std::string sName = styleName(s); + if (ImGui::Selectable(sName.c_str(), getIsolineStyle() == s)) { + setIsolineStyle(s); + } + } + ImGui::EndCombo(); + } + // Isoline width - ImGui::TextUnformatted("Isoline width"); + ImGui::TextUnformatted("Isoline period"); ImGui::SameLine(); - if (isolineWidth.get().isRelative()) { - if (ImGui::DragFloat("##Isoline width relative", isolineWidth.get().getValuePtr(), .001, 0.0001, 1.0, "%.4f", + if (isolinePeriod.get().isRelative()) { + if (ImGui::DragFloat("##Isoline period relative", isolinePeriod.get().getValuePtr(), .001, 0.0001, 1.0, "%.4f", ImGuiSliderFlags_Logarithmic | ImGuiSliderFlags_NoRoundToFormat)) { - isolineWidth.manuallyChanged(); + isolinePeriod.manuallyChanged(); requestRedraw(); } } else { float scaleWidth = dataRange.second - dataRange.first; - if (ImGui::DragFloat("##Isoline width absolute", isolineWidth.get().getValuePtr(), scaleWidth / 1000, 0., + if (ImGui::DragFloat("##Isoline period absolute", isolinePeriod.get().getValuePtr(), scaleWidth / 1000, 0., scaleWidth, "%.4f", ImGuiSliderFlags_Logarithmic | ImGuiSliderFlags_NoRoundToFormat)) { - isolineWidth.manuallyChanged(); + isolinePeriod.manuallyChanged(); requestRedraw(); } } @@ -172,6 +198,18 @@ void ScalarQuantity::buildScalarUI() { requestRedraw(); } + + // Isoline Contour Thickness + if (isolineStyle.get() == IsolineStyle::Contour) { + ImGui::TextUnformatted("Contour thickness"); + ImGui::SameLine(); + if (ImGui::DragFloat("##Contour thickness", &isolineContourThickness.get(), .001, 0.0001, 1.0, "%.4f", + ImGuiSliderFlags_Logarithmic | ImGuiSliderFlags_NoRoundToFormat)) { + isolineContourThickness.manuallyChanged(); + requestRedraw(); + } + } + ImGui::PopItemWidth(); } } @@ -192,9 +230,18 @@ std::vector ScalarQuantity::addScalarRules(std::vector::setScalarUniforms(render::ShaderProgram& p) { } if (isolinesEnabled.get()) { - p.setUniform("u_modLen", getIsolineWidth()); - p.setUniform("u_modDarkness", getIsolineDarkness()); + switch (isolineStyle.get()) { + case IsolineStyle::Stripe: + p.setUniform("u_modLen", getIsolinePeriod()); + p.setUniform("u_modDarkness", getIsolineDarkness()); + break; + case IsolineStyle::Contour: + p.setUniform("u_modLen", getIsolinePeriod()); + p.setUniform("u_modThickness", getIsolineContourThickness()); + p.setUniform("u_modDarkness", getIsolineDarkness()); + break; + } } } @@ -277,8 +333,8 @@ std::pair ScalarQuantity::getDataRange() { } template -QuantityT* ScalarQuantity::setIsolineWidth(double size, bool isRelative) { - isolineWidth = ScaledValue(size, isRelative); +QuantityT* ScalarQuantity::setIsolinePeriod(double size, bool isRelative) { + isolinePeriod = ScaledValue(size, isRelative); if (!isolinesEnabled.get()) { setIsolinesEnabled(true); } @@ -286,8 +342,17 @@ QuantityT* ScalarQuantity::setIsolineWidth(double size, bool isRelati return &quantity; } template +double ScalarQuantity::getIsolinePeriod() { + return isolinePeriod.get().asAbsolute(); +} + +template +QuantityT* ScalarQuantity::setIsolineWidth(double size, bool isRelative) { + return setIsolinePeriod(size, isRelative); +} +template double ScalarQuantity::getIsolineWidth() { - return isolineWidth.get().asAbsolute(); + return getIsolinePeriod(); } template @@ -319,4 +384,31 @@ bool ScalarQuantity::getIsolinesEnabled() { return isolinesEnabled.get(); } +template +QuantityT* ScalarQuantity::setIsolineStyle(IsolineStyle val) { + isolineStyle = val; + quantity.refresh(); + requestRedraw(); + return &quantity; +} +template +IsolineStyle ScalarQuantity::getIsolineStyle() { + return isolineStyle.get(); +} + + +template +QuantityT* ScalarQuantity::setIsolineContourThickness(double val) { + isolineContourThickness = val; + if (!isolinesEnabled.get()) { + setIsolinesEnabled(true); + } + requestRedraw(); + return &quantity; +} +template +double ScalarQuantity::getIsolineContourThickness() { + return isolineContourThickness.get(); +} + } // namespace polyscope diff --git a/include/polyscope/types.h b/include/polyscope/types.h index 13717d93..6280d363 100644 --- a/include/polyscope/types.h +++ b/include/polyscope/types.h @@ -21,6 +21,7 @@ enum class MeshElement { VERTEX = 0, FACE, EDGE, HALFEDGE, CORNER }; enum class MeshShadeStyle { Smooth = 0, Flat, TriFlat }; enum class VolumeMeshElement { VERTEX = 0, EDGE, FACE, CELL }; enum class VolumeCellType { TET = 0, HEX }; +enum class IsolineStyle { Stripe = 0, Contour }; enum class ImplicitRenderMode { SphereMarch, FixedStep }; enum class ImageOrigin { LowerLeft, UpperLeft }; diff --git a/src/persistent_value.cpp b/src/persistent_value.cpp index a87d060d..18b10c82 100644 --- a/src/persistent_value.cpp +++ b/src/persistent_value.cpp @@ -21,6 +21,7 @@ PersistentCache persistentCache_paramVizStyle; PersistentCache persistentCache_BackFacePolicy; PersistentCache persistentCache_MeshNormalType; PersistentCache persistentCache_FilterMode; +PersistentCache persistentCache_IsolineStyle; // clang-format on } // namespace detail } // namespace polyscope diff --git a/src/render/color_maps.cpp b/src/render/color_maps.cpp index 5e8f21c8..bfe0fb7c 100644 --- a/src/render/color_maps.cpp +++ b/src/render/color_maps.cpp @@ -39,9 +39,21 @@ bool buildColormapSelector(std::string& cm, std::string fieldName) { // clang-format off +const std::vector CM_GRAY = +{{5.119113838889112e-07,2.0522701956616554e-06,5.982577941045683e-06},{5.119113838889112e-07,2.0522701956616554e-06,5.982577941045683e-06},{0.0002598440803609316,0.00026259440245361075,0.00027706228396051196},{0.0002598440803609316,0.00026259440245361075,0.00027706228396051196},{0.0008656156394278344,0.0008570638031131798,0.0008794207369001088},{0.0008656156394278344,0.0008570638031131798,0.0008794207369001088},{0.001769403238430108,0.0017403680581581408,0.0017686070963996048},{0.001769403238430108,0.0017403680581581408,0.0017686070963996048},{0.002949472160671299,0.002891903379202927,0.002924180394823832},{0.002949472160671299,0.002891903379202927,0.002924180394823832},{0.004392323531342204,0.004298904740810658,0.004333431047933434},{0.004392323531342204,0.004298904740810658,0.004333431047933434},{0.00608855311595789,0.005952519318106651,0.005987527380406318},{0.00608855311595789,0.005952519318106651,0.005987527380406318},{0.008031191715623246,0.00784622292261931,0.00787995029696465},{0.008031191715623246,0.00784622292261931,0.00787995029696465},{0.010214875235272093,0.00997502608955014,0.010005706087016208},{0.010214875235272093,0.00997502608955014,0.010005706087016208},{0.012635372261218893,0.012335021633001353,0.012360877171488911},{0.012635372261218893,0.012335021633001353,0.012360877171488911},{0.015289290743098349,0.014923103611522015,0.014942342882390302},{0.015289290743098349,0.014923103611522015,0.014942342882390302},{0.018173884067540134,0.01773678153559083,0.017747594833936085},{0.018173884067540134,0.01773678153559083,0.017747594833936085},{0.02128691657088564,0.02077405157770593,0.02077460893832101},{0.02128691657088564,0.02077405157770593,0.02077460893832101},{0.02462656669738433,0.024033303900485702,0.024021753317628538},{0.02462656669738433,0.024033303900485702,0.024021753317628538},{0.028191355111633225,0.027513253929353176,0.027487720010651605},{0.028191355111633225,0.027513253929353176,0.027487720010651605},{0.031980089978436425,0.031212890095399095,0.03117147304311679},{0.031980089978436425,0.031212890095399095,0.03117147304311679},{0.03599182442355884,0.03513143325966101,0.035072208100447595},{0.03599182442355884,0.03513143325966101,0.035072208100447595},{0.04022582286584988,0.03926830463975649,0.03918932064337804},{0.04022582286584988,0.03926830463975649,0.03918932064337804},{0.044490079205597936,0.0435012249064101,0.04340640025397465},{0.044490079205597936,0.0435012249064101,0.04340640025397465},{0.04870367428407673,0.047678466927454234,0.047567902696042295},{0.052873620993883326,0.05181334368492382,0.051687053963736816},{0.052873620993883326,0.05181334368492382,0.051687053963736816},{0.057003147469548036,0.055909012523011246,0.05576700147480037},{0.057003147469548036,0.055909012523011246,0.05576700147480037},{0.061095137234846185,0.05996829329212761,0.05981055680351737},{0.061095137234846185,0.05996829329212761,0.05981055680351737},{0.06515218007540821,0.06399371820125457,0.0638202452197574},{0.06515218007540821,0.06399371820125457,0.0638202452197574},{0.06917661353844734,0.06798757248509635,0.06779834611081526},{0.06917661353844734,0.06798757248509635,0.06779834611081526},{0.07317055710313111,0.07195192788781538,0.07174692627103735},{0.07317055710313111,0.07195192788781538,0.07174692627103735},{0.07713594055593873,0.07588867046670467,0.07566786755046528},{0.07713594055593873,0.07588867046670467,0.07566786755046528},{0.08107452773767657,0.07979952385914274,0.0795628899969453},{0.08107452773767657,0.07979952385914274,0.0795628899969453},{0.08498793655960166,0.08368606889245686,0.08343357136470589},{0.08498793655960166,0.08368606889245686,0.08343357136470589},{0.0888776559863606,0.08754976022063193,0.08728136366834671},{0.0888776559863606,0.08754976022063193,0.08728136366834671},{0.0927450605335162,0.09139194052486757,0.09110760731542752},{0.0927450605335162,0.09139194052486757,0.09110760731542752},{0.09659142271361737,0.09521385270343014,0.09491354324016602},{0.09659142271361737,0.09521385270343014,0.09491354324016602},{0.10041792377751321,0.09901665039071003,0.09870032337586748},{0.10041792377751321,0.09901665039071003,0.09870032337586748},{0.10422566303005368,0.10280140707916763,0.10246901973797143},{0.10422566303005368,0.10280140707916763,0.10246901973797143},{0.10801566594658954,0.10656912406613869,0.10622063233826792},{0.10801566594658954,0.10656912406613869,0.10622063233826792},{0.11178889127514621,0.11032073740675324,0.10995609611040333},{0.11178889127514621,0.11032073740675324,0.10995609611040333},{0.11554623727620819,0.11405712402191859,0.1136762869947188},{0.11554623727620819,0.11405712402191859,0.1136762869947188},{0.11928854722572543,0.11777910708450154,0.11738202730482386},{0.11928854722572543,0.11777910708450154,0.11738202730482386},{0.12301661428577407,0.12148746078607905,0.12107409047767947},{0.12301661428577407,0.12148746078607905,0.12107409047767947},{0.12673118583015935,0.1251829145698134,0.12475320529226316},{0.13043296729827977,0.12886615690131367,0.12842005962827954},{0.13043296729827977,0.12886615690131367,0.12842005962827954},{0.13412262563913602,0.13253783863813123,0.132075303825237},{0.13412262563913602,0.13253783863813123,0.132075303825237},{0.13780079239794768,0.13619857604929606,0.13571955369302932},{0.13780079239794768,0.13619857604929606,0.13571955369302932},{0.14146806649004226,0.13984895352866278,0.13935339321756454},{0.14146806649004226,0.13984895352866278,0.13935339321756454},{0.14512501670019584,0.14348952603947387,0.14297737699866214},{0.14512501670019584,0.14348952603947387,0.14297737699866214},{0.14877218394019315,0.14712082132223708,0.14659203245216168},{0.14877218394019315,0.14712082132223708,0.14659203245216168},{0.15241008329281713,0.15074334189355915,0.15019786180375175},{0.15241008329281713,0.15074334189355915,0.15019786180375175},{0.1560392058666605,0.15435756685982158,0.15379534389829613},{0.1560392058666605,0.15435756685982158,0.15379534389829613},{0.15966002048290173,0.15796395356641008,0.15738493584527577},{0.15966002048290173,0.15796395356641008,0.15738493584527577},{0.1632729752124384,0.1615629391005102,0.16096707451828082},{0.1632729752124384,0.1615629391005102,0.16096707451828082},{0.16687849877942876,0.1651549416631864,0.16454217792420187},{0.16687849877942876,0.1651549416631864,0.16454217792420187},{0.17047700184528455,0.16874036182449317,0.16811064645581555},{0.17047700184528455,0.16874036182449317,0.16811064645581555},{0.17406887818543398,0.17231958367368572,0.17167286403977897},{0.17406887818543398,0.17231958367368572,0.17167286403977897},{0.17765450576970573,0.17589297587514247,0.17522919919060903},{0.17765450576970573,0.17589297587514247,0.17522919919060903},{0.18123424775588307,0.17946089263936252,0.17878000597996957},{0.18123424775588307,0.17946089263936252,0.17878000597996957},{0.1848084534049017,0.1830236746173137,0.1823256249295161},{0.1848084534049017,0.1830236746173137,0.1823256249295161},{0.18837745892516847,0.1865816497254701,0.18586638383460624},{0.18837745892516847,0.1865816497254701,0.18586638383460624},{0.19194158825267513,0.190135133908052,0.18940259852537042},{0.19194158825267513,0.190135133908052,0.18940259852537042},{0.19550115377282457,0.1936844318422727,0.19293457357092483},{0.19550115377282457,0.1936844318422727,0.19293457357092483},{0.1990564569892651,0.1972298375917655,0.1964626029318854},{0.20260778914445177,0.2007716352128197,0.1999869705657933},{0.20260778914445177,0.2007716352128197,0.1999869705657933},{0.2061554317961845,0.2043100993175656,0.2035079509895849},{0.2061554317961845,0.2043100993175656,0.2035079509895849},{0.20969965735391027,0.20784549559783222,0.2070258098028131},{0.20969965735391027,0.20784549559783222,0.2070258098028131},{0.21324072957821566,0.2113780813130166,0.21054080417495308},{0.21324072957821566,0.2113780813130166,0.21054080417495308},{0.2167789040465809,0.21490810574497904,0.2140531832997964},{0.2167789040465809,0.21490810574497904,0.2140531832997964},{0.22031442858818173,0.2184358106226793,0.21756318881964226},{0.22031442858818173,0.2184358106226793,0.21756318881964226},{0.22384754369024062,0.22196143051900868,0.22107105522173387},{0.22384754369024062,0.22196143051900868,0.22107105522173387},{0.22737848287820317,0.22548519322203997,0.22457701020915594},{0.22737848287820317,0.22548519322203997,0.22457701020915594},{0.23090747307179832,0.22900732008271107,0.2280812750482047},{0.23090747307179832,0.22900732008271107,0.2280812750482047},{0.2344347349188553,0.23252802634076847,0.23158406489405264},{0.2344347349188553,0.23252802634076847,0.23158406489405264},{0.23796048310857054,0.2360475214306363,0.2350855890963675},{0.23796048310857054,0.2360475214306363,0.2350855890963675},{0.24148492666578375,0.23956600926872218,0.2385860514863974},{0.24148492666578375,0.23956600926872218,0.2385860514863974},{0.24500826922766467,0.24308368852354312,0.24208565064689802},{0.24500826922766467,0.24308368852354312,0.24208565064689802},{0.24853070930410476,0.24660075286992894,0.2455845801661603},{0.24853070930410476,0.24660075286992894,0.2455845801661603},{0.2520524405229937,0.250117391228459,0.2490830288772885},{0.2520524405229937,0.250117391228459,0.2490830288772885},{0.2555736518614572,0.25363378799118214,0.2525811810837814},{0.2555736518614572,0.25363378799118214,0.2525811810837814},{0.2590945278640408,0.25715012323459174,0.25607921677238027},{0.2590945278640408,0.25715012323459174,0.25607921677238027},{0.26261524884875664,0.26066657292073886,0.2595773118140703},{0.26261524884875664,0.26066657292073886,0.2595773118140703},{0.2661359911018203,0.2641833090872994,0.2630756381540484},{0.2696569270618427,0.2677005000273448,0.26657436399140455},{0.2696569270618427,0.2677005000273448,0.26657436399140455},{0.2731782254941878,0.27121831045950634,0.27007365394920596},{0.2731782254941878,0.27121831045950634,0.27007365394920596},{0.2767000516561452,0.27473690168916753,0.27357366923561866},{0.2767000516561452,0.27473690168916753,0.27357366923561866},{0.2802225674535131,0.27825643176127346,0.2770745677966528},{0.2802225674535131,0.27825643176127346,0.2770745677966528},{0.2837459315891544,0.28177705560529565,0.2805765044610716},{0.2837459315891544,0.28177705560529565,0.2805765044610716},{0.2872702997040329,0.28529892517285693,0.2840796310779651},{0.2872702997040329,0.28529892517285693,0.2840796310779651},{0.29079582451120206,0.2888221895684777,0.2875840966474506},{0.29079582451120206,0.2888221895684777,0.2875840966474506},{0.2943226559231934,0.2923469951738719,0.2910900474449293},{0.2943226559231934,0.2923469951738719,0.2910900474449293},{0.2978509411732042,0.29587348576619366,0.29459762713929627},{0.2978509411732042,0.29587348576619366,0.29459762713929627},{0.30138082493046714,0.2994018026306029,0.29810697690547344},{0.30138082493046714,0.2994018026306029,0.29810697690547344},{0.304912449410152,0.3029320846674895,0.3016182355316066},{0.304912449410152,0.3029320846674895,0.3016182355316066},{0.30844595447811946,0.30646446849468284,0.3051315395212463},{0.30844595447811946,0.30646446849468284,0.3051315395212463},{0.3119814777508493,0.3099990885449341,0.30864702319080917},{0.3119814777508493,0.3099990885449341,0.30864702319080917},{0.31551915469079933,0.31353607715895315,0.3121648187625949},{0.31551915469079933,0.31353607715895315,0.3121648187625949},{0.3190591186974825,0.3170755646742604,0.31568505645361644},{0.3190591186974825,0.3170755646742604,0.31568505645361644},{0.322601501194492,0.32061767951008274,0.31920786456048234},{0.322601501194492,0.32061767951008274,0.31920786456048234},{0.3261464317127154,0.32416254824853064,0.3227333695405576},{0.3261464317127154,0.32416254824853064,0.3227333695405576},{0.3296940379699382,0.3277102957122579,0.3262616960896098},{0.3296940379699382,0.3277102957122579,0.3262616960896098},{0.3332444459470546,0.33126104503880144,0.32979296721613593},{0.3332444459470546,0.33126104503880144,0.32979296721613593},{0.3367977799610607,0.3348149177517828,0.3333273043125561},{0.34035416273500496,0.33837203382914927,0.33686482722343924},{0.34035416273500496,0.33837203382914927,0.33686482722343924},{0.34391371546506766,0.3419325117686051,0.34040565431092945},{0.34391371546506766,0.3419325117686051,0.34040565431092945},{0.3474765578849235,0.34549646865039063,0.3439499025175156},{0.3474765578849235,0.34549646865039063,0.3439499025175156},{0.3510428083275172,0.3490640201975498,0.34749768742628845},{0.3510428083275172,0.3490640201975498,0.34749768742628845},{0.35461258378441374,0.35263528083381307,0.3510491233188204},{0.35461258378441374,0.35263528083381307,0.3510491233188204},{0.35818599996282147,0.3562103637392294,0.3546043232307861},{0.35818599996282147,0.3562103637392294,0.3546043232307861},{0.36176317134043134,0.359789380903655,0.35816339900544786},{0.36176317134043134,0.359789380903655,0.35816339900544786},{0.3653442112181758,0.3633724431782132,0.3617264613451084},{0.3653442112181758,0.3633724431782132,0.3617264613451084},{0.36892923177100456,0.366959660324833,0.3652936198606414},{0.36892923177100456,0.366959660324833,0.3652936198606414},{0.37251834409679924,0.3705511410639528,0.36886498311919264},{0.37251834409679924,0.3705511410639528,0.36886498311919264},{0.37611165826349635,0.3741469931204934,0.37244065869014525},{0.37611165826349635,0.3741469931204934,0.37244065869014525},{0.37970928335452314,0.3777473232681791,0.3760207531894346},{0.37970928335452314,0.3777473232681791,0.3760207531894346},{0.38331132751262736,0.38135223737229057,0.37960537232229685},{0.38331132751262736,0.38135223737229057,0.37960537232229685},{0.38691789798217374,0.38496184043092785,0.38319462092452544},{0.38691789798217374,0.38496184043092785,0.38319462092452544},{0.39052910114998884,0.3885762366148534,0.38678860300230933},{0.39052910114998884,0.3885762366148534,0.38678860300230933},{0.39414504258482247,0.39219552930598844,0.39038742177072233},{0.39414504258482247,0.39219552930598844,0.39038742177072233},{0.39776582707548697,0.39581982113462366,0.3939911796909281},{0.39776582707548697,0.39581982113462366,0.3939911796909281},{0.4013915586677524,0.3994492140154045,0.3975999785061618},{0.4013915586677524,0.3994492140154045,0.3975999785061618},{0.405022340700029,0.4030838091821594,0.4012139192765472},{0.405022340700029,0.4030838091821594,0.4012139192765472},{0.4086582758379367,0.4067237072216088,0.40483310241280485},{0.41229946610776325,0.4103690081060248,0.4084576277089013},{0.41229946610776325,0.4103690081060248,0.4084576277089013},{0.4159460129289094,0.41401981122487985,0.41208759437369297},{0.4159460129289094,0.41401981122487985,0.41208759437369297},{0.4195980171453375,0.417676215415535,0.4157231010616072},{0.4195980171453375,0.417676215415535,0.4157231010616072},{0.4232555790560795,0.4213383189930122,0.4193642459024059},{0.4232555790560795,0.4213383189930122,0.4193642459024059},{0.4269187984448541,0.42500621977889325,0.4230111265300785},{0.4269187984448541,0.42500621977889325,0.4230111265300785},{0.43058777460882475,0.4286800151293829,0.4266638401108987},{0.43058777460882475,0.4286800151293829,0.4266638401108987},{0.43426260638653963,0.43235980196258117,0.4303224833706848},{0.43426260638653963,0.43235980196258117,0.4303224833706848},{0.4379433921850948,0.43604567678499145,0.4339871526213026},{0.4379433921850948,0.43604567678499145,0.4339871526213026},{0.4416302300065532,0.43973773571730596,0.4376579437864427},{0.4416302300065532,0.43973773571730596,0.4376579437864427},{0.4453232174736505,0.44343607451950195,0.4413349524267044},{0.4453232174736505,0.44343607451950195,0.4413349524267044},{0.4490224518548273,0.44714078861527135,0.44501827376402053},{0.4490224518548273,0.44714078861527135,0.44501827376402053},{0.4527280300886078,0.4508519731158264,0.4487080027054508},{0.4527280300886078,0.4508519731158264,0.4487080027054508},{0.4564400488073677,0.4545697228430991,0.4524042338663719},{0.4564400488073677,0.4545697228430991,0.4524042338663719},{0.460158604360502,0.4582941323523669,0.45610706159309317},{0.460158604360502,0.4582941323523669,0.45610706159309317},{0.4638837928370361,0.462025295954328,0.45981657998492237},{0.4638837928370361,0.462025295954328,0.45981657998492237},{0.46761571008769504,0.46576330773665214,0.46353288291570477},{0.46761571008769504,0.46576330773665214,0.46353288291570477},{0.4713544517464567,0.4695082615850323,0.4672560640548638},{0.4713544517464567,0.4695082615850323,0.4672560640548638},{0.47510011325161067,0.47326025120375664,0.4709862168879611},{0.47510011325161067,0.47326025120375664,0.4709862168879611},{0.47885278986635954,0.4770193701358209,0.4747234347367984},{0.48261257669895335,0.4807857117826079,0.4784678107790839},{0.48261257669895335,0.4807857117826079,0.4784678107790839},{0.48637956872241056,0.48455936942314876,0.48221943806768125},{0.48637956872241056,0.48455936942314876,0.48221943806768125},{0.4901538607938191,0.4883404362329858,0.48597840954945876},{0.4901538607938191,0.4883404362329858,0.48597840954945876},{0.4939355476732588,0.49212900530265485,0.4897448180837611},{0.4939355476732588,0.49212900530265485,0.4897448180837611},{0.497724724042333,0.4959251696558081,0.49351875646051496},{0.497724724042333,0.4959251696558081,0.49351875646051496},{0.5015214845223622,0.4997290222669866,0.4973003174179899},{0.5015214845223622,0.4997290222669866,0.4973003174179899},{0.5053259236922266,0.5035406560790654,0.5010895936602286},{0.5053259236922266,0.5035406560790654,0.5010895936602286},{0.5091381361058909,0.5073601640203813,0.5048866778741612},{0.5091381361058909,0.5073601640203813,0.5048866778741612},{0.5129582163096104,0.5111876390215643,0.5086916627464181},{0.5129582163096104,0.5111876390215643,0.5086916627464181},{0.5167862588588553,0.5150231740320771,0.5125046409798591},{0.5167862588588553,0.5150231740320771,0.5125046409798591},{0.520622358334941,0.5188668620364875,0.5163257053098251},{0.520622358334941,0.5188668620364875,0.5163257053098251},{0.5244666093614033,0.5227187960704766,0.5201549485201331},{0.5244666093614033,0.5227187960704766,0.5201549485201331},{0.5283191066201067,0.5265790692366017,0.5239924634588228},{0.5283191066201067,0.5265790692366017,0.5239924634588228},{0.5321799448671195,0.5304477747198241,0.5278383430536652},{0.5321799448671195,0.5304477747198241,0.5278383430536652},{0.5360492189483509,0.5343250058028127,0.5316926803274503},{0.5360492189483509,0.5343250058028127,0.5316926803274503},{0.5399270238149753,0.5382108558810341,0.5355555684130593},{0.5399270238149753,0.5382108558810341,0.5355555684130593},{0.5438134545386418,0.5421054184776435,0.5394271005683371},{0.5438134545386418,0.5421054184776435,0.5394271005683371},{0.5477086063264959,0.546008787258179,0.5433073701907696},{0.5477086063264959,0.546008787258179,0.5433073701907696},{0.5516125745359979,0.5499210560450836,0.547196470831983},{0.5516125745359979,0.5499210560450836,0.547196470831983},{0.5555254546895829,0.5538423188320419,0.5510944962120673},{0.5594473424891353,0.5577726697981703,0.55500154023374},{0.5594473424891353,0.5577726697981703,0.55500154023374},{0.5633783338303158,0.5617122033220392,0.558917696996353},{0.5633783338303158,0.5617122033220392,0.558917696996353},{0.5673185248167354,0.5656610139955613,0.562843060809758},{0.5673185248167354,0.5656610139955613,0.562843060809758},{0.5712680117739896,0.569619196637736,0.5667777262080311},{0.5712680117739896,0.569619196637736,0.5667777262080311},{0.5752268912635539,0.5735868463082713,0.5707217879630734},{0.5752268912635539,0.5735868463082713,0.5707217879630734},{0.5791952600965621,0.5775640583210816,0.5746753410980865},{0.5791952600965621,0.5775640583210816,0.5746753410980865},{0.5831732153474625,0.5815509282576771,0.5786384809009386},{0.5831732153474625,0.5815509282576771,0.5786384809009386},{0.5871608543675724,0.5855475519804424,0.5826113029374229},{0.5871608543675724,0.5855475519804424,0.5826113029374229},{0.5911582747985198,0.5895540256458232,0.5865939030644199},{0.5911582747985198,0.5895540256458232,0.5865939030644199},{0.5951655745855984,0.5935704457174206,0.5905863774429682},{0.5951655745855984,0.5935704457174206,0.5905863774429682},{0.5991828519910354,0.5975969089789966,0.594588822551246},{0.5991828519910354,0.5975969089789966,0.594588822551246},{0.6032102056071761,0.601633512547412,0.5986013351974859},{0.6032102056071761,0.601633512547412,0.5986013351974859},{0.6072477343695865,0.6056803538854836,0.6026240125328051},{0.6072477343695865,0.6056803538854836,0.6026240125328051},{0.6112955375701088,0.6097375308147855,0.6066569520639827},{0.6112955375701088,0.6097375308147855,0.6066569520639827},{0.6153537148698354,0.6138051415283824,0.6107002516661683},{0.6153537148698354,0.6138051415283824,0.6107002516661683},{0.6194223663120388,0.6178832846035217,0.6147540095955469},{0.6194223663120388,0.6178832846035217,0.6147540095955469},{0.6235015923350435,0.621972059014272,0.6188183245019492},{0.6235015923350435,0.621972059014272,0.6188183245019492},{0.6275914937850678,0.6260715641441202,0.6228932954414248},{0.6275914937850678,0.6260715641441202,0.6228932954414248},{0.6316921719290114,0.6301818997985384,0.626979021888779},{0.6316921719290114,0.6301818997985384,0.626979021888779},{0.6358037284672281,0.6343031662175185,0.6310756037500811},{0.6399262655462556,0.6384354640880802,0.6351831413751425},{0.6399262655462556,0.6384354640880802,0.6351831413751425},{0.6440598857715363,0.6425788945567643,0.6393017355699825},{0.6440598857715363,0.6425788945567643,0.6393017355699825},{0.6482046922201169,0.6467335592421093,0.6434314876092732},{0.6482046922201169,0.6467335592421093,0.6434314876092732},{0.6523607884533357,0.6508995602471196,0.6475724992487806},{0.6523607884533357,0.6508995602471196,0.6475724992487806},{0.6565282785295068,0.6550770001717297,0.6517248727377952},{0.6565282785295068,0.6550770001717297,0.6517248727377952},{0.6607072670166061,0.6592659821252699,0.6558887108315696},{0.6607072670166061,0.6592659821252699,0.6558887108315696},{0.6648978590049535,0.6634666097389375,0.6600641168037573},{0.6648978590049535,0.6634666097389375,0.6600641168037573},{0.6691001601199109,0.6676789871782777,0.6642511944588598},{0.6691001601199109,0.6676789871782777,0.6642511944588598},{0.6733142765345892,0.6719032191556819,0.6684500481446936},{0.6733142765345892,0.6719032191556819,0.6684500481446936},{0.6775403149825813,0.6761394109429005,0.6726607827648713},{0.6775403149825813,0.6761394109429005,0.6726607827648713},{0.6817783827707052,0.6803876683835863,0.6768835037913099},{0.6817783827707052,0.6803876683835863,0.6768835037913099},{0.6860285877917918,0.6846480979058628,0.6811183172767649},{0.6860285877917918,0.6846480979058628,0.6811183172767649},{0.6902910385374814,0.6889208065349255,0.6853653298673966},{0.6902910385374814,0.6889208065349255,0.6853653298673966},{0.6945658441110834,0.6932059019056817,0.6896246488153769},{0.6945658441110834,0.6932059019056817,0.6896246488153769},{0.6988531142404553,0.6975034922754331,0.6938963819915324},{0.6988531142404553,0.6975034922754331,0.6938963819915324},{0.7031529592909377,0.7018136865365993,0.6981806378980351},{0.7031529592909377,0.7018136865365993,0.6981806378980351},{0.7074654902783347,0.7061365942294986,0.7024775256811436},{0.7074654902783347,0.7061365942294986,0.7024775256811436},{0.7117908188819498,0.7104723255551799,0.7067871551439977},{0.7117908188819498,0.7104723255551799,0.7067871551439977},{0.7161290574576848,0.714820991388308,0.7111096367594696},{0.7204803190511825,0.7191827032901243,0.7154450816830777},{0.7204803190511825,0.7191827032901243,0.7154450816830777},{0.7248447174110647,0.7235575735214593,0.7197936017659686},{0.7248447174110647,0.7235575735214593,0.7197936017659686},{0.7292223670022127,0.7279457150558283,0.7241553095679665},{0.7292223670022127,0.7279457150558283,0.7241553095679665},{0.7336133830191388,0.7323472415925961,0.728530318370699},{0.7336133830191388,0.7323472415925961,0.728530318370699},{0.7380178813994349,0.7367622675702209,0.7329187421908016},{0.7380178813994349,0.7367622675702209,0.7329187421908016},{0.7424359788373007,0.7411909081795812,0.7373206957932009},{0.7424359788373007,0.7411909081795812,0.7373206957932009},{0.7468677927971572,0.7456332793773957,0.7417362947044913},{0.7468677927971572,0.7456332793773957,0.7417362947044913},{0.7513134415273599,0.7500894978997243,0.7461656552263957},{0.7513134415273599,0.7500894978997243,0.7461656552263957},{0.7557730440739957,0.7545596812755733,0.7506088944493226},{0.7557730440739957,0.7545596812755733,0.7506088944493226},{0.760246720294789,0.7590439478405959,0.755066130266025},{0.760246720294789,0.7590439478405959,0.755066130266025},{0.7647345908731116,0.7635424167508956,0.7595374813853585},{0.7647345908731116,0.7635424167508956,0.7595374813853585},{0.7692367773320856,0.7680552079969388,0.764023067346146},{0.7692367773320856,0.7680552079969388,0.764023067346146},{0.7737534020488214,0.7725824424175787,0.768523008531156},{0.7737534020488214,0.7725824424175787,0.768523008531156},{0.7782845882687531,0.7771242417141915,0.7730374261811926},{0.7782845882687531,0.7771242417141915,0.7730374261811926},{0.782830460120099,0.7816807284649387,0.7775664424093063},{0.782830460120099,0.7816807284649387,0.7775664424093063},{0.7873911426284513,0.7862520261391467,0.782110180215128},{0.7873911426284513,0.7862520261391467,0.782110180215128},{0.7919667617314894,0.7908382591118159,0.7866687634993276},{0.7919667617314894,0.7908382591118159,0.7866687634993276},{0.7965574442938269,0.7954395526782646,0.7912423170782062},{0.7965574442938269,0.7954395526782646,0.7912423170782062},{0.8011633181219949,0.8000560330689073,0.7958309666984237},{0.8011633181219949,0.8000560330689073,0.7958309666984237},{0.8057845119795648,0.8046878274641713,0.8004348390518634},{0.8104211556024299,0.8093350640095595,0.8050540617906442},{0.8104211556024299,0.8093350640095595,0.8050540617906442},{0.8150733797142105,0.8139978718308641,0.8096887635422754},{0.8150733797142105,0.8139978718308641,0.8096887635422754},{0.8197413160418366,0.8186763810495289,0.8143390739249705},{0.8197413160418366,0.8186763810495289,0.8143390739249705},{0.8244250973312831,0.823370722798173,0.8190051235631107},{0.8244250973312831,0.823370722798173,0.8190051235631107},{0.8291248573634559,0.8280810292362736,0.8236870441028736},{0.8291248573634559,0.8280810292362736,0.8236870441028736},{0.8338407309702662,0.8328074335660154,0.8283849682280267},{0.8338407309702662,0.8328074335660154,0.8283849682280267},{0.8385728540508588,0.8375500700483111,0.8330990296758882},{0.8385728540508588,0.8375500700483111,0.8330990296758882},{0.843321363588025,0.8423090740189962,0.8378293632534638},{0.843321363588025,0.8423090740189962,0.8378293632534638},{0.848086397664791,0.8470845819052075,0.8425761048537627},{0.848086397664791,0.8470845819052075,0.8425761048537627},{0.8528680954812019,0.8518767312419356,0.8473393914722943},{0.8528680954812019,0.8518767312419356,0.8473393914722943},{0.8576665973712845,0.8566856606887784,0.8521193612237554},{0.8576665973712845,0.8566856606887784,0.8521193612237554},{0.8624820448202135,0.8615115100468785,0.8569161533589083},{0.8624820448202135,0.8615115100468785,0.8569161533589083},{0.8673145804816755,0.8663544202760625,0.8617299082816555},{0.8673145804816755,0.8663544202760625,0.8617299082816555},{0.8721643481954295,0.8712145335121869,0.8665607675663184},{0.8721643481954295,0.8712145335121869,0.8665607675663184},{0.8770314930050886,0.8760919930846851,0.871408873975121},{0.8770314930050886,0.8760919930846851,0.871408873975121},{0.8819161611761233,0.8809869435343266,0.8762743714758872},{0.8819161611761233,0.8809869435343266,0.8762743714758872},{0.8868185002140476,0.8858995306312075,0.8811574052599523},{0.8868185002140476,0.8858995306312075,0.8811574052599523},{0.8917386588828792,0.8908299013929443,0.8860581217602967},{0.8917386588828792,0.8908299013929443,0.8860581217602967},{0.8966767872237935,0.8957782041031092,0.8909766686699112},{0.8966767872237935,0.8957782041031092,0.8909766686699112},{0.9016330365740295,0.9007445883298949,0.8959131949603859},{0.9066075595860337,0.9057292049450164,0.9008678509007446},{0.9066075595860337,0.9057292049450164,0.9008678509007446},{0.9116005102468445,0.9107322061428585,0.9058407880765155},{0.9116005102468445,0.9107322061428585,0.9058407880765155},{0.9166120438977335,0.915753745459873,0.9108321594090564},{0.9166120438977335,0.915753745459873,0.9108321594090564},{0.921642317254111,0.9207939777942258,0.9158421191751267},{0.921642317254111,0.9207939777942258,0.9158421191751267},{0.9266914884256761,0.9258530594257129,0.9208708230267246},{0.9266914884256761,0.9258530594257129,0.9208708230267246},{0.9317597169368546,0.9309311480359354,0.9259184280111854},{0.9317597169368546,0.9309311480359354,0.9259184280111854},{0.9368471637474911,0.9360284027287524,0.9309850925915528},{0.9368471637474911,0.9360284027287524,0.9309850925915528},{0.9419539912738586,0.9411449840510026,0.9360709766672254},{0.9419539912738586,0.9411449840510026,0.9360709766672254},{0.9470803634098973,0.9462810540135232,0.9411762415948877},{0.9470803634098973,0.9462810540135232,0.9411762415948877},{0.9522264455488126,0.9514367761124457,0.9463010502097274},{0.9522264455488126,0.9514367761124457,0.9463010502097274},{0.957392404604907,0.9566123153508007,0.9514455668469503},{0.957392404604907,0.9566123153508007,0.9514455668469503},{0.9625784090357906,0.9618078382604079,0.9566099573635957},{0.9625784090357906,0.9618078382604079,0.9566099573635957},{0.9677846288648154,0.9670235129241013,0.9617943891606574},{0.9677846288648154,0.9670235129241013,0.9617943891606574},{0.973011235703915,0.972259508998241,0.9669990312055218},{0.973011235703915,0.972259508998241,0.9669990312055218},{0.978258402776717,0.9775159977355695,0.972224054054729},{0.978258402776717,0.9775159977355695,0.972224054054729},{0.983526304942001,0.982793152008386,0.9774696298770532},{0.983526304942001,0.982793152008386,0.9774696298770532},{0.9888151187175039,0.9880911463320615,0.9827359324769277},{0.9888151187175039,0.9880911463320615,0.9827359324769277},{0.9941250223040635,0.9934101568888957,0.9880231373182063},{0.9941250223040635,0.9934101568888957,0.9880231373182063},{0.9994561956101177,0.9987503615523224,0.9933314215482737},{0.9994561956101177,0.9987503615523224,0.9933314215482737}}; + const std::vector CM_VIRIDIS = {{0.267004,0.004874,0.329415},{0.267004,0.004874,0.329415},{0.26851,0.009605,0.335427},{0.26851,0.009605,0.335427},{0.269944,0.014625,0.341379},{0.269944,0.014625,0.341379},{0.271305,0.019942,0.347269},{0.271305,0.019942,0.347269},{0.272594,0.025563,0.353093},{0.272594,0.025563,0.353093},{0.273809,0.031497,0.358853},{0.273809,0.031497,0.358853},{0.274952,0.037752,0.364543},{0.274952,0.037752,0.364543},{0.276022,0.044167,0.370164},{0.276022,0.044167,0.370164},{0.277018,0.050344,0.375715},{0.277018,0.050344,0.375715},{0.277941,0.056324,0.381191},{0.277941,0.056324,0.381191},{0.278791,0.062145,0.386592},{0.278791,0.062145,0.386592},{0.279566,0.067836,0.391917},{0.279566,0.067836,0.391917},{0.280267,0.073417,0.397163},{0.280267,0.073417,0.397163},{0.280894,0.078907,0.402329},{0.280894,0.078907,0.402329},{0.281446,0.08432,0.407414},{0.281446,0.08432,0.407414},{0.281924,0.089666,0.412415},{0.281924,0.089666,0.412415},{0.282327,0.094955,0.417331},{0.282327,0.094955,0.417331},{0.282656,0.100196,0.42216},{0.282656,0.100196,0.42216},{0.28291,0.105393,0.426902},{0.28291,0.105393,0.426902},{0.283091,0.110553,0.431554},{0.283197,0.11568,0.436115},{0.283197,0.11568,0.436115},{0.283229,0.120777,0.440584},{0.283229,0.120777,0.440584},{0.283187,0.125848,0.44496},{0.283187,0.125848,0.44496},{0.283072,0.130895,0.449241},{0.283072,0.130895,0.449241},{0.282884,0.13592,0.453427},{0.282884,0.13592,0.453427},{0.282623,0.140926,0.457517},{0.282623,0.140926,0.457517},{0.28229,0.145912,0.46151},{0.28229,0.145912,0.46151},{0.281887,0.150881,0.465405},{0.281887,0.150881,0.465405},{0.281412,0.155834,0.469201},{0.281412,0.155834,0.469201},{0.280868,0.160771,0.472899},{0.280868,0.160771,0.472899},{0.280255,0.165693,0.476498},{0.280255,0.165693,0.476498},{0.279574,0.170599,0.479997},{0.279574,0.170599,0.479997},{0.278826,0.17549,0.483397},{0.278826,0.17549,0.483397},{0.278012,0.180367,0.486697},{0.278012,0.180367,0.486697},{0.277134,0.185228,0.489898},{0.277134,0.185228,0.489898},{0.276194,0.190074,0.493001},{0.276194,0.190074,0.493001},{0.275191,0.194905,0.496005},{0.275191,0.194905,0.496005},{0.274128,0.199721,0.498911},{0.274128,0.199721,0.498911},{0.273006,0.20452,0.501721},{0.273006,0.20452,0.501721},{0.271828,0.209303,0.504434},{0.270595,0.214069,0.507052},{0.270595,0.214069,0.507052},{0.269308,0.218818,0.509577},{0.269308,0.218818,0.509577},{0.267968,0.223549,0.512008},{0.267968,0.223549,0.512008},{0.26658,0.228262,0.514349},{0.26658,0.228262,0.514349},{0.265145,0.232956,0.516599},{0.265145,0.232956,0.516599},{0.263663,0.237631,0.518762},{0.263663,0.237631,0.518762},{0.262138,0.242286,0.520837},{0.262138,0.242286,0.520837},{0.260571,0.246922,0.522828},{0.260571,0.246922,0.522828},{0.258965,0.251537,0.524736},{0.258965,0.251537,0.524736},{0.257322,0.25613,0.526563},{0.257322,0.25613,0.526563},{0.255645,0.260703,0.528312},{0.255645,0.260703,0.528312},{0.253935,0.265254,0.529983},{0.253935,0.265254,0.529983},{0.252194,0.269783,0.531579},{0.252194,0.269783,0.531579},{0.250425,0.27429,0.533103},{0.250425,0.27429,0.533103},{0.248629,0.278775,0.534556},{0.248629,0.278775,0.534556},{0.246811,0.283237,0.535941},{0.246811,0.283237,0.535941},{0.244972,0.287675,0.53726},{0.244972,0.287675,0.53726},{0.243113,0.292092,0.538516},{0.243113,0.292092,0.538516},{0.241237,0.296485,0.539709},{0.241237,0.296485,0.539709},{0.239346,0.300855,0.540844},{0.237441,0.305202,0.541921},{0.237441,0.305202,0.541921},{0.235526,0.309527,0.542944},{0.235526,0.309527,0.542944},{0.233603,0.313828,0.543914},{0.233603,0.313828,0.543914},{0.231674,0.318106,0.544834},{0.231674,0.318106,0.544834},{0.229739,0.322361,0.545706},{0.229739,0.322361,0.545706},{0.227802,0.326594,0.546532},{0.227802,0.326594,0.546532},{0.225863,0.330805,0.547314},{0.225863,0.330805,0.547314},{0.223925,0.334994,0.548053},{0.223925,0.334994,0.548053},{0.221989,0.339161,0.548752},{0.221989,0.339161,0.548752},{0.220057,0.343307,0.549413},{0.220057,0.343307,0.549413},{0.21813,0.347432,0.550038},{0.21813,0.347432,0.550038},{0.21621,0.351535,0.550627},{0.21621,0.351535,0.550627},{0.214298,0.355619,0.551184},{0.214298,0.355619,0.551184},{0.212395,0.359683,0.55171},{0.212395,0.359683,0.55171},{0.210503,0.363727,0.552206},{0.210503,0.363727,0.552206},{0.208623,0.367752,0.552675},{0.208623,0.367752,0.552675},{0.206756,0.371758,0.553117},{0.206756,0.371758,0.553117},{0.204903,0.375746,0.553533},{0.204903,0.375746,0.553533},{0.203063,0.379716,0.553925},{0.201239,0.38367,0.554294},{0.201239,0.38367,0.554294},{0.19943,0.387607,0.554642},{0.19943,0.387607,0.554642},{0.197636,0.391528,0.554969},{0.197636,0.391528,0.554969},{0.19586,0.395433,0.555276},{0.19586,0.395433,0.555276},{0.1941,0.399323,0.555565},{0.1941,0.399323,0.555565},{0.192357,0.403199,0.555836},{0.192357,0.403199,0.555836},{0.190631,0.407061,0.556089},{0.190631,0.407061,0.556089},{0.188923,0.41091,0.556326},{0.188923,0.41091,0.556326},{0.187231,0.414746,0.556547},{0.187231,0.414746,0.556547},{0.185556,0.41857,0.556753},{0.185556,0.41857,0.556753},{0.183898,0.422383,0.556944},{0.183898,0.422383,0.556944},{0.182256,0.426184,0.55712},{0.182256,0.426184,0.55712},{0.180629,0.429975,0.557282},{0.180629,0.429975,0.557282},{0.179019,0.433756,0.55743},{0.179019,0.433756,0.55743},{0.177423,0.437527,0.557565},{0.177423,0.437527,0.557565},{0.175841,0.44129,0.557685},{0.175841,0.44129,0.557685},{0.174274,0.445044,0.557792},{0.174274,0.445044,0.557792},{0.172719,0.448791,0.557885},{0.172719,0.448791,0.557885},{0.171176,0.45253,0.557965},{0.171176,0.45253,0.557965},{0.169646,0.456262,0.55803},{0.168126,0.459988,0.558082},{0.168126,0.459988,0.558082},{0.166617,0.463708,0.558119},{0.166617,0.463708,0.558119},{0.165117,0.467423,0.558141},{0.165117,0.467423,0.558141},{0.163625,0.471133,0.558148},{0.163625,0.471133,0.558148},{0.162142,0.474838,0.55814},{0.162142,0.474838,0.55814},{0.160665,0.47854,0.558115},{0.160665,0.47854,0.558115},{0.159194,0.482237,0.558073},{0.159194,0.482237,0.558073},{0.157729,0.485932,0.558013},{0.157729,0.485932,0.558013},{0.15627,0.489624,0.557936},{0.15627,0.489624,0.557936},{0.154815,0.493313,0.55784},{0.154815,0.493313,0.55784},{0.153364,0.497,0.557724},{0.153364,0.497,0.557724},{0.151918,0.500685,0.557587},{0.151918,0.500685,0.557587},{0.150476,0.504369,0.55743},{0.150476,0.504369,0.55743},{0.149039,0.508051,0.55725},{0.149039,0.508051,0.55725},{0.147607,0.511733,0.557049},{0.147607,0.511733,0.557049},{0.14618,0.515413,0.556823},{0.14618,0.515413,0.556823},{0.144759,0.519093,0.556572},{0.144759,0.519093,0.556572},{0.143343,0.522773,0.556295},{0.143343,0.522773,0.556295},{0.141935,0.526453,0.555991},{0.141935,0.526453,0.555991},{0.140536,0.530132,0.555659},{0.139147,0.533812,0.555298},{0.139147,0.533812,0.555298},{0.13777,0.537492,0.554906},{0.13777,0.537492,0.554906},{0.136408,0.541173,0.554483},{0.136408,0.541173,0.554483},{0.135066,0.544853,0.554029},{0.135066,0.544853,0.554029},{0.133743,0.548535,0.553541},{0.133743,0.548535,0.553541},{0.132444,0.552216,0.553018},{0.132444,0.552216,0.553018},{0.131172,0.555899,0.552459},{0.131172,0.555899,0.552459},{0.129933,0.559582,0.551864},{0.129933,0.559582,0.551864},{0.128729,0.563265,0.551229},{0.128729,0.563265,0.551229},{0.127568,0.566949,0.550556},{0.127568,0.566949,0.550556},{0.126453,0.570633,0.549841},{0.126453,0.570633,0.549841},{0.125394,0.574318,0.549086},{0.125394,0.574318,0.549086},{0.124395,0.578002,0.548287},{0.124395,0.578002,0.548287},{0.123463,0.581687,0.547445},{0.123463,0.581687,0.547445},{0.122606,0.585371,0.546557},{0.122606,0.585371,0.546557},{0.121831,0.589055,0.545623},{0.121831,0.589055,0.545623},{0.121148,0.592739,0.544641},{0.121148,0.592739,0.544641},{0.120565,0.596422,0.543611},{0.120565,0.596422,0.543611},{0.120092,0.600104,0.54253},{0.119738,0.603785,0.5414},{0.119738,0.603785,0.5414},{0.119512,0.607464,0.540218},{0.119512,0.607464,0.540218},{0.119423,0.611141,0.538982},{0.119423,0.611141,0.538982},{0.119483,0.614817,0.537692},{0.119483,0.614817,0.537692},{0.119699,0.61849,0.536347},{0.119699,0.61849,0.536347},{0.120081,0.622161,0.534946},{0.120081,0.622161,0.534946},{0.120638,0.625828,0.533488},{0.120638,0.625828,0.533488},{0.12138,0.629492,0.531973},{0.12138,0.629492,0.531973},{0.122312,0.633153,0.530398},{0.122312,0.633153,0.530398},{0.123444,0.636809,0.528763},{0.123444,0.636809,0.528763},{0.12478,0.640461,0.527068},{0.12478,0.640461,0.527068},{0.126326,0.644107,0.525311},{0.126326,0.644107,0.525311},{0.128087,0.647749,0.523491},{0.128087,0.647749,0.523491},{0.130067,0.651384,0.521608},{0.130067,0.651384,0.521608},{0.132268,0.655014,0.519661},{0.132268,0.655014,0.519661},{0.134692,0.658636,0.517649},{0.134692,0.658636,0.517649},{0.137339,0.662252,0.515571},{0.137339,0.662252,0.515571},{0.14021,0.665859,0.513427},{0.14021,0.665859,0.513427},{0.143303,0.669459,0.511215},{0.143303,0.669459,0.511215},{0.146616,0.67305,0.508936},{0.150148,0.676631,0.506589},{0.150148,0.676631,0.506589},{0.153894,0.680203,0.504172},{0.153894,0.680203,0.504172},{0.157851,0.683765,0.501686},{0.157851,0.683765,0.501686},{0.162016,0.687316,0.499129},{0.162016,0.687316,0.499129},{0.166383,0.690856,0.496502},{0.166383,0.690856,0.496502},{0.170948,0.694384,0.493803},{0.170948,0.694384,0.493803},{0.175707,0.6979,0.491033},{0.175707,0.6979,0.491033},{0.180653,0.701402,0.488189},{0.180653,0.701402,0.488189},{0.185783,0.704891,0.485273},{0.185783,0.704891,0.485273},{0.19109,0.708366,0.482284},{0.19109,0.708366,0.482284},{0.196571,0.711827,0.479221},{0.196571,0.711827,0.479221},{0.202219,0.715272,0.476084},{0.202219,0.715272,0.476084},{0.20803,0.718701,0.472873},{0.20803,0.718701,0.472873},{0.214,0.722114,0.469588},{0.214,0.722114,0.469588},{0.220124,0.725509,0.466226},{0.220124,0.725509,0.466226},{0.226397,0.728888,0.462789},{0.226397,0.728888,0.462789},{0.232815,0.732247,0.459277},{0.232815,0.732247,0.459277},{0.239374,0.735588,0.455688},{0.239374,0.735588,0.455688},{0.24607,0.73891,0.452024},{0.24607,0.73891,0.452024},{0.252899,0.742211,0.448284},{0.259857,0.745492,0.444467},{0.259857,0.745492,0.444467},{0.266941,0.748751,0.440573},{0.266941,0.748751,0.440573},{0.274149,0.751988,0.436601},{0.274149,0.751988,0.436601},{0.281477,0.755203,0.432552},{0.281477,0.755203,0.432552},{0.288921,0.758394,0.428426},{0.288921,0.758394,0.428426},{0.296479,0.761561,0.424223},{0.296479,0.761561,0.424223},{0.304148,0.764704,0.419943},{0.304148,0.764704,0.419943},{0.311925,0.767822,0.415586},{0.311925,0.767822,0.415586},{0.319809,0.770914,0.411152},{0.319809,0.770914,0.411152},{0.327796,0.77398,0.40664},{0.327796,0.77398,0.40664},{0.335885,0.777018,0.402049},{0.335885,0.777018,0.402049},{0.344074,0.780029,0.397381},{0.344074,0.780029,0.397381},{0.35236,0.783011,0.392636},{0.35236,0.783011,0.392636},{0.360741,0.785964,0.387814},{0.360741,0.785964,0.387814},{0.369214,0.788888,0.382914},{0.369214,0.788888,0.382914},{0.377779,0.791781,0.377939},{0.377779,0.791781,0.377939},{0.386433,0.794644,0.372886},{0.386433,0.794644,0.372886},{0.395174,0.797475,0.367757},{0.395174,0.797475,0.367757},{0.404001,0.800275,0.362552},{0.412913,0.803041,0.357269},{0.412913,0.803041,0.357269},{0.421908,0.805774,0.35191},{0.421908,0.805774,0.35191},{0.430983,0.808473,0.346476},{0.430983,0.808473,0.346476},{0.440137,0.811138,0.340967},{0.440137,0.811138,0.340967},{0.449368,0.813768,0.335384},{0.449368,0.813768,0.335384},{0.458674,0.816363,0.329727},{0.458674,0.816363,0.329727},{0.468053,0.818921,0.323998},{0.468053,0.818921,0.323998},{0.477504,0.821444,0.318195},{0.477504,0.821444,0.318195},{0.487026,0.823929,0.312321},{0.487026,0.823929,0.312321},{0.496615,0.826376,0.306377},{0.496615,0.826376,0.306377},{0.506271,0.828786,0.300362},{0.506271,0.828786,0.300362},{0.515992,0.831158,0.294279},{0.515992,0.831158,0.294279},{0.525776,0.833491,0.288127},{0.525776,0.833491,0.288127},{0.535621,0.835785,0.281908},{0.535621,0.835785,0.281908},{0.545524,0.838039,0.275626},{0.545524,0.838039,0.275626},{0.555484,0.840254,0.269281},{0.555484,0.840254,0.269281},{0.565498,0.84243,0.262877},{0.565498,0.84243,0.262877},{0.575563,0.844566,0.256415},{0.575563,0.844566,0.256415},{0.585678,0.846661,0.249897},{0.585678,0.846661,0.249897},{0.595839,0.848717,0.243329},{0.606045,0.850733,0.236712},{0.606045,0.850733,0.236712},{0.616293,0.852709,0.230052},{0.616293,0.852709,0.230052},{0.626579,0.854645,0.223353},{0.626579,0.854645,0.223353},{0.636902,0.856542,0.21662},{0.636902,0.856542,0.21662},{0.647257,0.8584,0.209861},{0.647257,0.8584,0.209861},{0.657642,0.860219,0.203082},{0.657642,0.860219,0.203082},{0.668054,0.861999,0.196293},{0.668054,0.861999,0.196293},{0.678489,0.863742,0.189503},{0.678489,0.863742,0.189503},{0.688944,0.865448,0.182725},{0.688944,0.865448,0.182725},{0.699415,0.867117,0.175971},{0.699415,0.867117,0.175971},{0.709898,0.868751,0.169257},{0.709898,0.868751,0.169257},{0.720391,0.87035,0.162603},{0.720391,0.87035,0.162603},{0.730889,0.871916,0.156029},{0.730889,0.871916,0.156029},{0.741388,0.873449,0.149561},{0.741388,0.873449,0.149561},{0.751884,0.874951,0.143228},{0.751884,0.874951,0.143228},{0.762373,0.876424,0.137064},{0.762373,0.876424,0.137064},{0.772852,0.877868,0.131109},{0.772852,0.877868,0.131109},{0.783315,0.879285,0.125405},{0.783315,0.879285,0.125405},{0.79376,0.880678,0.120005},{0.79376,0.880678,0.120005},{0.804182,0.882046,0.114965},{0.814576,0.883393,0.110347},{0.814576,0.883393,0.110347},{0.82494,0.88472,0.106217},{0.82494,0.88472,0.106217},{0.83527,0.886029,0.102646},{0.83527,0.886029,0.102646},{0.845561,0.887322,0.099702},{0.845561,0.887322,0.099702},{0.85581,0.888601,0.097452},{0.85581,0.888601,0.097452},{0.866013,0.889868,0.095953},{0.866013,0.889868,0.095953},{0.876168,0.891125,0.09525},{0.876168,0.891125,0.09525},{0.886271,0.892374,0.095374},{0.886271,0.892374,0.095374},{0.89632,0.893616,0.096335},{0.89632,0.893616,0.096335},{0.906311,0.894855,0.098125},{0.906311,0.894855,0.098125},{0.916242,0.896091,0.100717},{0.916242,0.896091,0.100717},{0.926106,0.89733,0.104071},{0.926106,0.89733,0.104071},{0.935904,0.89857,0.108131},{0.935904,0.89857,0.108131},{0.945636,0.899815,0.112838},{0.945636,0.899815,0.112838},{0.9553,0.901065,0.118128},{0.9553,0.901065,0.118128},{0.964894,0.902323,0.123941},{0.964894,0.902323,0.123941},{0.974417,0.90359,0.130215},{0.974417,0.90359,0.130215},{0.983868,0.904867,0.136897},{0.983868,0.904867,0.136897},{0.993248,0.906157,0.143936},{0.993248,0.906157,0.143936},}; +const std::vector CM_MAGMA = +{{0.001462, 0.000466, 0.013866}, {0.00186877, 0.000889637, 0.0161477}, {0.00228051, 0.00131726, 0.0184495}, {0.00280226, 0.0018334, 0.0211973}, {0.00333336, 0.00235724, 0.0239839}, {0.00396345, 0.00296281, 0.0271813}, {0.0046071, 0.00357948, 0.0304388}, {0.00534195, 0.00427089, 0.0341003}, {0.00609443, 0.00497641, 0.0378216}, {0.00693149, 0.00574959, 0.0418295}, {0.00779059, 0.00653963, 0.0458405}, {0.00872984, 0.00739099, 0.0498628}, {0.00969569, 0.00826087, 0.0538897}, {0.0107377, 0.00918378, 0.0579298}, {0.0118111, 0.0101278, 0.0619717}, {0.0129573, 0.0111207, 0.0660174}, {0.0141397, 0.0121359, 0.0700665}, {0.0153907, 0.0131932, 0.074122}, {0.0166835, 0.0142737, 0.0781864}, {0.0180423, 0.0153908, 0.0822649}, {0.0194492, 0.0165317, 0.0863533}, {0.0209194, 0.017704, 0.0904547}, {0.0224437, 0.0189008, 0.0945659}, {0.0240279, 0.0201246, 0.0986878}, {0.0256731, 0.0213726, 0.102822}, {0.0273754, 0.022643, 0.106966}, {0.0291469, 0.0239358, 0.111131}, {0.0309728, 0.025246, 0.11531}, {0.0328762, 0.0265773, 0.119509}, {0.0348303, 0.0279223, 0.123722}, {0.0368717, 0.0292875, 0.127955}, {0.0389608, 0.0306637, 0.1322}, {0.0410971, 0.0320564, 0.136467}, {0.0432547, 0.0334566, 0.140745}, {0.0454159, 0.0348707, 0.145049}, {0.0475786, 0.0362898, 0.149363}, {0.0497515, 0.037718, 0.153705}, {0.0519275, 0.0391489, 0.158056}, {0.0541189, 0.0405601, 0.162445}, {0.0563137, 0.0419669, 0.166842}, {0.0585258, 0.0433213, 0.171274}, {0.0607406, 0.0446673, 0.175711}, {0.0629771, 0.0459624, 0.180186}, {0.0652159, 0.0472522, 0.184664}, {0.0674804, 0.0484858, 0.189181}, {0.0697462, 0.0497163, 0.1937}, {0.072042, 0.0508876, 0.19826}, {0.0743392, 0.0520561, 0.202822}, {0.0766684, 0.0531635, 0.207425}, {0.0790006, 0.0542658, 0.212031}, {0.0813672, 0.0553088, 0.216675}, {0.0837385, 0.0563435, 0.221324}, {0.0861449, 0.0573186, 0.226009}, {0.0885585, 0.0582821, 0.2307}, {0.0910083, 0.0591871, 0.235423}, {0.0934677, 0.0600768, 0.240153}, {0.0959636, 0.0609082, 0.244912}, {0.098472, 0.0617207, 0.24968}, {0.101018, 0.0624765, 0.254472}, {0.103579, 0.0632091, 0.259272}, {0.106177, 0.0638863, 0.264094}, {0.108794, 0.0645344, 0.268925}, {0.111449, 0.0651257, 0.273778}, {0.114126, 0.0656839, 0.278638}, {0.11684, 0.0661882, 0.283512}, {0.11958, 0.0666556, 0.28839}, {0.122354, 0.0670726, 0.293274}, {0.125156, 0.0674476, 0.29816}, {0.12799, 0.0677747, 0.303047}, {0.130858, 0.0680538, 0.307933}, {0.133757, 0.0682868, 0.312817}, {0.136693, 0.0684653, 0.317695}, {0.13966, 0.0685997, 0.322569}, {0.142663, 0.0686796, 0.327424}, {0.145692, 0.0687225, 0.332264}, {0.148763, 0.068705, 0.337079}, {0.151856, 0.0686534, 0.341879}, {0.154994, 0.0685383, 0.346641}, {0.158151, 0.0683937, 0.351386}, {0.16135, 0.0681898, 0.356072}, {0.164564, 0.0679634, 0.360737}, {0.167824, 0.067673, 0.365333}, {0.171097, 0.0673633, 0.36991}, {0.174409, 0.0670026, 0.374391}, {0.17773, 0.0666301, 0.37885}, {0.181091, 0.0662073, 0.3832}, {0.184458, 0.065776, 0.387531}, {0.187857, 0.0653125, 0.391726}, {0.19126, 0.0648455, 0.395906}, {0.194691, 0.0643582, 0.399931}, {0.198123, 0.0638697, 0.403946}, {0.201576, 0.0633816, 0.407784}, {0.20503, 0.0628942, 0.411614}, {0.208496, 0.0624266, 0.415259}, {0.211963, 0.0619619, 0.41889}, {0.215435, 0.0615357, 0.422337}, {0.218907, 0.0611166, 0.425761}, {0.222376, 0.0607522, 0.429006}, {0.225845, 0.0604004, 0.432219}, {0.229307, 0.0601163, 0.435261}, {0.232767, 0.059851, 0.438263}, {0.236216, 0.0596609, 0.441105}, {0.239661, 0.0594965, 0.4439}, {0.243093, 0.0594122, 0.446547}, {0.24652, 0.0593612, 0.44914}, {0.249932, 0.0593934, 0.451599}, {0.253337, 0.059464, 0.453999}, {0.256729, 0.0596127, 0.456279}, {0.260112, 0.0598071, 0.458496}, {0.263479, 0.0600784, 0.460607}, {0.266838, 0.0603978, 0.462651}, {0.270183, 0.0607846, 0.464604}, {0.273518, 0.0612247, 0.466488}, {0.276839, 0.0617276, 0.468292}, {0.28015, 0.0622833, 0.470026}, {0.28345, 0.0628914, 0.471693}, {0.286738, 0.0635538, 0.47329}, {0.290016, 0.0642616, 0.474828}, {0.293282, 0.0650231, 0.476298}, {0.296539, 0.0658224, 0.477719}, {0.299786, 0.0666713, 0.479072}, {0.303026, 0.0675492, 0.480385}, {0.306253, 0.0684785, 0.48163}, {0.309473, 0.0694326, 0.482843}, {0.312682, 0.0704311, 0.483991}, {0.315887, 0.071447, 0.485112}, {0.319082, 0.0725033, 0.486168}, {0.322273, 0.0735724, 0.487205}, {0.325452, 0.0746817, 0.48818}, {0.328628, 0.0758008, 0.48914}, {0.331795, 0.076952, 0.490039}, {0.33496, 0.078109, 0.490927}, {0.338117, 0.079295, 0.491755}, {0.341272, 0.0804847, 0.492576}, {0.344417, 0.0817001, 0.493342}, {0.347562, 0.0829174, 0.494103}, {0.350698, 0.0841571, 0.49481}, {0.353834, 0.0853976, 0.495514}, {0.356964, 0.0866537, 0.496166}, {0.360094, 0.0879106, 0.496816}, {0.363218, 0.0891795, 0.49742}, {0.366342, 0.0904494, 0.498019}, {0.369462, 0.091728, 0.498578}, {0.37258, 0.0930076, 0.49913}, {0.375695, 0.0942933, 0.499648}, {0.378809, 0.0955797, 0.500159}, {0.38192, 0.0968691, 0.500637}, {0.385031, 0.0981585, 0.501106}, {0.38814, 0.0994483, 0.501546}, {0.39125, 0.100738, 0.501977}, {0.394358, 0.102027, 0.502383}, {0.397466, 0.103316, 0.502778}, {0.400574, 0.104603, 0.50315}, {0.403681, 0.105888, 0.50351}, {0.406789, 0.10717, 0.50385}, {0.409896, 0.108451, 0.504179}, {0.413003, 0.109729, 0.504491}, {0.416111, 0.111005, 0.504789}, {0.419219, 0.112277, 0.505072}, {0.422328, 0.113545, 0.505341}, {0.425438, 0.11481, 0.505596}, {0.428549, 0.11607, 0.505836}, {0.431661, 0.117328, 0.506064}, {0.434775, 0.11858, 0.506277}, {0.437889, 0.119828, 0.506479}, {0.441006, 0.121071, 0.506665}, {0.444124, 0.122311, 0.506842}, {0.447244, 0.123544, 0.507002}, {0.450365, 0.124775, 0.507154}, {0.453489, 0.125999, 0.507289}, {0.456614, 0.12722, 0.507416}, {0.459742, 0.128434, 0.507526}, {0.46287, 0.129646, 0.507631}, {0.466003, 0.13085, 0.507716}, {0.469136, 0.132052, 0.507796}, {0.472273, 0.133245, 0.507857}, {0.475411, 0.134437, 0.507914}, {0.478553, 0.13562, 0.507952}, {0.481695, 0.136803, 0.507986}, {0.484842, 0.137976, 0.507999}, {0.487989, 0.139149, 0.508011}, {0.491142, 0.140313, 0.508}, {0.494295, 0.141476, 0.507988}, {0.497453, 0.142629, 0.507953}, {0.500612, 0.143782, 0.507917}, {0.503775, 0.144926, 0.507859}, {0.50694, 0.146069, 0.507798}, {0.510109, 0.147204, 0.507717}, {0.513279, 0.148338, 0.507633}, {0.516455, 0.149464, 0.507528}, {0.519631, 0.150589, 0.507419}, {0.522812, 0.151706, 0.507291}, {0.525995, 0.152821, 0.507157}, {0.529182, 0.15393, 0.507006}, {0.532371, 0.155037, 0.506847}, {0.535564, 0.156138, 0.506672}, {0.538759, 0.157237, 0.506488}, {0.541958, 0.15833, 0.506288}, {0.545159, 0.159421, 0.506079}, {0.548364, 0.160506, 0.505854}, {0.551572, 0.16159, 0.505619}, {0.554783, 0.162668, 0.505369}, {0.557997, 0.163744, 0.505108}, {0.561213, 0.164817, 0.504833}, {0.564433, 0.165886, 0.504546}, {0.567656, 0.166952, 0.504246}, {0.570881, 0.168016, 0.503932}, {0.57411, 0.169077, 0.503606}, {0.577342, 0.170134, 0.503264}, {0.580576, 0.17119, 0.502912}, {0.583813, 0.172243, 0.502544}, {0.587053, 0.173294, 0.502164}, {0.590296, 0.174342, 0.501768}, {0.593541, 0.175389, 0.501362}, {0.596789, 0.176434, 0.500937}, {0.60004, 0.177477, 0.500504}, {0.603293, 0.178518, 0.500051}, {0.606549, 0.179559, 0.49959}, {0.609807, 0.180598, 0.499107}, {0.613067, 0.181636, 0.498618}, {0.616331, 0.182673, 0.498106}, {0.619595, 0.18371, 0.497589}, {0.622863, 0.184746, 0.497047}, {0.626132, 0.185782, 0.496501}, {0.629404, 0.186817, 0.495929}, {0.632677, 0.187852, 0.495355}, {0.635953, 0.188889, 0.494752}, {0.639229, 0.189925, 0.494148}, {0.642508, 0.190963, 0.493514}, {0.645787, 0.192001, 0.492879}, {0.64907, 0.19304, 0.492215}, {0.652352, 0.19408, 0.491548}, {0.655637, 0.195123, 0.490854}, {0.658921, 0.196167, 0.490156}, {0.662208, 0.197213, 0.489432}, {0.665495, 0.198261, 0.488703}, {0.668783, 0.199312, 0.487947}, {0.672071, 0.200365, 0.487185}, {0.675361, 0.201423, 0.486399}, {0.67865, 0.202483, 0.485604}, {0.68194, 0.203547, 0.484787}, {0.68523, 0.204614, 0.483959}, {0.68852, 0.205686, 0.483111}, {0.691809, 0.206762, 0.482251}, {0.695099, 0.207843, 0.48137}, {0.698387, 0.208929, 0.480477}, {0.701675, 0.210021, 0.479564}, {0.704962, 0.211118, 0.478638}, {0.708248, 0.212222, 0.477694}, {0.711533, 0.213331, 0.476734}, {0.714816, 0.214448, 0.475757}, {0.718098, 0.215572, 0.474764}, {0.721377, 0.216702, 0.473755}, {0.724655, 0.217841, 0.472728}, {0.727931, 0.218988, 0.471687}, {0.731204, 0.220144, 0.470627}, {0.734475, 0.221307, 0.469554}, {0.737741, 0.222482, 0.468461}, {0.741005, 0.223664, 0.467356}, {0.744265, 0.224859, 0.466229}, {0.747522, 0.226061, 0.465093}, {0.750774, 0.227279, 0.463933}, {0.754023, 0.228503, 0.462765}, {0.757265, 0.229746, 0.461573}, {0.760505, 0.230994, 0.460374}, {0.763737, 0.232262, 0.459149}, {0.766967, 0.233535, 0.457919}, {0.770187, 0.234832, 0.456663}, {0.773405, 0.236132, 0.455403}, {0.776612, 0.237459, 0.454116}, {0.779817, 0.238788, 0.452826}, {0.783009, 0.240148, 0.451508}, {0.786199, 0.241509, 0.450189}, {0.789376, 0.242903, 0.44884}, {0.792551, 0.244298, 0.447489}, {0.795709, 0.245728, 0.446112}, {0.798867, 0.247161, 0.444732}, {0.802006, 0.248628, 0.443329}, {0.805143, 0.2501, 0.441923}, {0.808262, 0.251608, 0.440493}, {0.811377, 0.253122, 0.43906}, {0.814473, 0.254673, 0.437607}, {0.817565, 0.256233, 0.436148}, {0.820637, 0.257828, 0.434673}, {0.823702, 0.259435, 0.433191}, {0.826748, 0.261076, 0.431695}, {0.829785, 0.262733, 0.430191}, {0.832803, 0.264425, 0.428672}, {0.83581, 0.266135, 0.427147}, {0.838797, 0.267879, 0.425611}, {0.841771, 0.269644, 0.42407}, {0.844725, 0.271443, 0.422519}, {0.847663, 0.273267, 0.420963}, {0.850581, 0.275123, 0.4194}, {0.853482, 0.277008, 0.417833}, {0.856362, 0.278925, 0.416261}, {0.859222, 0.280873, 0.414684}, {0.862062, 0.282852, 0.413103}, {0.864877, 0.284867, 0.411521}, {0.867674, 0.286911, 0.409937}, {0.870443, 0.288995, 0.408353}, {0.873194, 0.291106, 0.40677}, {0.875914, 0.293261, 0.40519}, {0.878616, 0.295441, 0.403613}, {0.881283, 0.29767, 0.402041}, {0.883934, 0.299921, 0.400472}, {0.886545, 0.302226, 0.398912}, {0.889141, 0.30455, 0.397356}, {0.891693, 0.306932, 0.395815}, {0.894232, 0.309331, 0.394278}, {0.896722, 0.311792, 0.392762}, {0.899202, 0.314267, 0.39125}, {0.901627, 0.316808, 0.389764}, {0.904044, 0.31936, 0.388282}, {0.906403, 0.321981, 0.386833}, {0.908755, 0.324611, 0.385387}, {0.911043, 0.327313, 0.383982}, {0.913327, 0.33002, 0.38258}, {0.915543, 0.332803, 0.381226}, {0.917756, 0.33559, 0.379874}, {0.9199, 0.33845, 0.378577}, {0.922038, 0.341317, 0.377284}, {0.924109, 0.344253, 0.376049}, {0.926172, 0.347198, 0.374822}, {0.928169, 0.350208, 0.373656}, {0.930154, 0.353229, 0.372501}, {0.932076, 0.356311, 0.37141}, {0.933983, 0.359406, 0.370335}, {0.93583, 0.362557, 0.369327}, {0.937659, 0.365724, 0.368339}, {0.93943, 0.368941, 0.367417}, {0.941179, 0.372176, 0.366521}, {0.942875, 0.375456, 0.36569}, {0.944547, 0.378756, 0.364892}, {0.946169, 0.382096, 0.364158}, {0.947763, 0.385456, 0.363464}, {0.949311, 0.38885, 0.362834}, {0.950829, 0.392266, 0.362247}, {0.952306, 0.395712, 0.361721}, {0.953749, 0.39918, 0.361244}, {0.955155, 0.402674, 0.360826}, {0.956525, 0.40619, 0.360463}, {0.957861, 0.409728, 0.360153}, {0.959161, 0.413288, 0.359906}, {0.960431, 0.416864, 0.35971}, {0.961663, 0.420462, 0.359581}, {0.96287, 0.424073, 0.359499}, {0.964037, 0.427704, 0.359488}, {0.965181, 0.431348, 0.359519}, {0.966285, 0.43501, 0.359626}, {0.967369, 0.438681, 0.35977}, {0.968412, 0.44237, 0.359995}, {0.969438, 0.446066, 0.360251}, {0.970423, 0.449779, 0.360592}, {0.971395, 0.453496, 0.360959}, {0.972325, 0.457228, 0.361416}, {0.973244, 0.460963, 0.361894}, {0.974121, 0.464712, 0.362463}, {0.97499, 0.468464, 0.363049}, {0.975817, 0.472226, 0.36373}, {0.976638, 0.47599, 0.364423}, {0.977418, 0.479764, 0.365213}, {0.978195, 0.483538, 0.366009}, {0.978929, 0.48732, 0.366906}, {0.979661, 0.491103, 0.367806}, {0.980354, 0.494892, 0.368803}, {0.981044, 0.498681, 0.369807}, {0.981697, 0.502474, 0.3709}, {0.982347, 0.506268, 0.372004}, {0.982963, 0.510064, 0.373192}, {0.983574, 0.513861, 0.374393}, {0.984155, 0.517659, 0.375671}, {0.984729, 0.521458, 0.376966}, {0.985277, 0.525257, 0.378332}, {0.985816, 0.529057, 0.379718}, {0.986331, 0.532856, 0.381169}, {0.986836, 0.536654, 0.382643}, {0.98732, 0.540453, 0.384176}, {0.987794, 0.544251, 0.385735}, {0.988247, 0.548048, 0.387347}, {0.988689, 0.551845, 0.388988}, {0.989114, 0.55564, 0.390677}, {0.989526, 0.559435, 0.392397}, {0.989922, 0.563228, 0.394161}, {0.990308, 0.567019, 0.395957}, {0.990683, 0.570805, 0.397793}, {0.991046, 0.57459, 0.399663}, {0.991397, 0.578372, 0.401567}, {0.991734, 0.582152, 0.403508}, {0.99206, 0.585931, 0.405479}, {0.992372, 0.589708, 0.407489}, {0.992673, 0.593484, 0.409525}, {0.992958, 0.597259, 0.4116}, {0.993235, 0.601032, 0.413699}, {0.9935, 0.6048, 0.415837}, {0.99376, 0.608566, 0.417995}, {0.994007, 0.612327, 0.420195}, {0.99425, 0.616085, 0.422411}, {0.994475, 0.619842, 0.42467}, {0.994694, 0.623599, 0.426942}, {0.994895, 0.627353, 0.429259}, {0.995091, 0.631107, 0.431586}, {0.995276, 0.634855, 0.433957}, {0.995459, 0.638601, 0.436336}, {0.995629, 0.642341, 0.43876}, {0.995798, 0.64608, 0.44119}, {0.995946, 0.649818, 0.443665}, {0.996092, 0.653556, 0.446145}, {0.996218, 0.657292, 0.448672}, {0.996343, 0.661027, 0.4512}, {0.996465, 0.664751, 0.453772}, {0.996586, 0.668475, 0.456346}, {0.996686, 0.672198, 0.458963}, {0.996783, 0.675921, 0.461586}, {0.996859, 0.679645, 0.464249}, {0.996936, 0.683366, 0.466918}, {0.997014, 0.687076, 0.469619}, {0.997087, 0.690786, 0.472328}, {0.997143, 0.694497, 0.475072}, {0.997194, 0.698208, 0.477827}, {0.997229, 0.701919, 0.480613}, {0.997264, 0.705626, 0.483409}, {0.9973, 0.709324, 0.48623}, {0.997329, 0.713023, 0.489063}, {0.997343, 0.716724, 0.491925}, {0.997351, 0.720423, 0.494801}, {0.997351, 0.72412, 0.4977}, {0.997349, 0.727815, 0.500613}, {0.997344, 0.731505, 0.503545}, {0.997328, 0.735196, 0.506496}, {0.9973, 0.738889, 0.509468}, {0.997271, 0.742578, 0.512455}, {0.997242, 0.746262, 0.515458}, {0.997203, 0.749946, 0.51848}, {0.997157, 0.75363, 0.521519}, {0.997103, 0.757313, 0.524578}, {0.997042, 0.760997, 0.527652}, {0.996981, 0.764676, 0.530743}, {0.996919, 0.768351, 0.533846}, {0.99684, 0.772031, 0.536974}, {0.996753, 0.775712, 0.540115}, {0.996671, 0.779386, 0.543273}, {0.996591, 0.783056, 0.546439}, {0.996494, 0.786729, 0.549631}, {0.99639, 0.790403, 0.552833}, {0.996285, 0.794074, 0.556058}, {0.996179, 0.797744, 0.559288}, {0.996064, 0.801412, 0.562544}, {0.995946, 0.805081, 0.565806}, {0.995819, 0.80875, 0.569094}, {0.99569, 0.812418, 0.572387}, {0.995559, 0.816082, 0.575704}, {0.995429, 0.819746, 0.579023}, {0.99528, 0.823413, 0.582374}, {0.99513, 0.827081, 0.585727}, {0.994987, 0.83074, 0.589103}, {0.994842, 0.8344, 0.592481}, {0.994675, 0.838066, 0.595893}, {0.994509, 0.841731, 0.599306}, {0.994355, 0.845386, 0.602736}, {0.994197, 0.849043, 0.606172}, {0.994015, 0.852708, 0.60964}, {0.993836, 0.85637, 0.61311}, {0.993672, 0.860023, 0.616594}, {0.993502, 0.863677, 0.620086}, {0.993311, 0.867339, 0.623607}, {0.993124, 0.870998, 0.627132}, {0.992951, 0.874648, 0.630668}, {0.992769, 0.878302, 0.634216}, {0.992569, 0.881962, 0.637788}, {0.992377, 0.885618, 0.641365}, {0.992197, 0.889266, 0.64495}, {0.992008, 0.892919, 0.64855}, {0.991803, 0.896576, 0.652171}, {0.991608, 0.900229, 0.655797}, {0.991426, 0.903875, 0.659429}, {0.991233, 0.907526, 0.663077}, {0.991027, 0.911181, 0.666742}, {0.990833, 0.914831, 0.670413}, {0.990649, 0.918476, 0.674089}, {0.990455, 0.922126, 0.677782}, {0.990253, 0.925778, 0.681487}, {0.990062, 0.929426, 0.685199}, {0.989878, 0.933071, 0.688916}, {0.989687, 0.936719, 0.692648}, {0.989493, 0.940368, 0.696389}, {0.989307, 0.944015, 0.700139}, {0.989124, 0.94766, 0.703892}, {0.988941, 0.951308, 0.707658}, {0.988757, 0.954955, 0.711429}, {0.988577, 0.958602, 0.715211}, {0.988398, 0.962249, 0.718996}, {0.988226, 0.965895, 0.72279}, {0.988055, 0.96954, 0.726586}, {0.987881, 0.973189, 0.730395}, {0.987706, 0.976839, 0.734207}, {0.987549, 0.980485, 0.738022}, {0.987394, 0.984131, 0.741837}, {0.987224, 0.987784, 0.74567}, {0.987053, 0.991438, 0.749504}}; + +const std::vector CM_INFERNO = +{{0.001462, 0.000466, 0.013866}, {0.00187337, 0.000876862, 0.0162698}, {0.00228975, 0.00129158, 0.018695}, {0.00281712, 0.00179187, 0.021592}, {0.00335402, 0.00229939, 0.0245331}, {0.00399178, 0.00288349, 0.0279416}, {0.00464349, 0.00347797, 0.0314148}, {0.00538907, 0.0041423, 0.0353237}, {0.00615325, 0.00481933, 0.0392879}, {0.00700666, 0.00555724, 0.0435182}, {0.00788377, 0.00630982, 0.0477516}, {0.00884704, 0.0071157, 0.0519967}, {0.00983902, 0.00793838, 0.056243}, {0.0109132, 0.00880916, 0.0604932}, {0.0120228, 0.00969599, 0.0647565}, {0.0132146, 0.0106199, 0.0690501}, {0.0144475, 0.011562, 0.0733469}, {0.0157588, 0.0125386, 0.0776497}, {0.0171189, 0.0135322, 0.0819654}, {0.0185559, 0.0145527, 0.0863014}, {0.0200506, 0.0155884, 0.090654}, {0.0216215, 0.0166442, 0.0950283}, {0.0232584, 0.017716, 0.0994131}, {0.0249682, 0.0188055, 0.103809}, {0.0267556, 0.0199056, 0.108229}, {0.0286152, 0.0210155, 0.11267}, {0.0305648, 0.0221332, 0.117136}, {0.0325849, 0.0232569, 0.121621}, {0.0347068, 0.0243868, 0.126124}, {0.0368955, 0.0255208, 0.130639}, {0.0391841, 0.0266544, 0.135178}, {0.0415271, 0.0277879, 0.139731}, {0.0438973, 0.0289097, 0.144323}, {0.0462797, 0.0300262, 0.148934}, {0.0486872, 0.0311297, 0.15357}, {0.0511038, 0.0322284, 0.158216}, {0.0535506, 0.0333053, 0.162889}, {0.0560061, 0.0343759, 0.16757}, {0.0584975, 0.0354155, 0.172279}, {0.0609969, 0.0364482, 0.176995}, {0.0635404, 0.0374338, 0.181751}, {0.066091, 0.0384119, 0.186514}, {0.068691, 0.0393326, 0.19131}, {0.0712962, 0.0402474, 0.196109}, {0.0739547, 0.0410753, 0.200935}, {0.0766161, 0.0418985, 0.205761}, {0.0793368, 0.0426265, 0.210611}, {0.0820603, 0.0433501, 0.215461}, {0.0848448, 0.0439777, 0.220328}, {0.0876346, 0.0445972, 0.225196}, {0.0904856, 0.045122, 0.230073}, {0.0933449, 0.0456339, 0.234951}, {0.0962638, 0.0460524, 0.239829}, {0.0991943, 0.046453, 0.244706}, {0.102183, 0.0467627, 0.249574}, {0.105187, 0.0470495, 0.254437}, {0.108245, 0.0472493, 0.259283}, {0.111321, 0.0474214, 0.264119}, {0.114448, 0.0475109, 0.268927}, {0.117596, 0.0475683, 0.273719}, {0.120791, 0.0475489, 0.278473}, {0.124007, 0.0474941, 0.283203}, {0.127266, 0.0473699, 0.287886}, {0.130547, 0.0472081, 0.292535}, {0.133865, 0.0469847, 0.297128}, {0.137206, 0.0467231, 0.301676}, {0.140579, 0.0464093, 0.306161}, {0.143975, 0.0460574, 0.310588}, {0.147396, 0.0456619, 0.314948}, {0.150839, 0.0452312, 0.319235}, {0.154302, 0.0447667, 0.323453}, {0.157782, 0.044275, 0.327581}, {0.161277, 0.0437614, 0.331638}, {0.164787, 0.0432296, 0.335591}, {0.168305, 0.0426854, 0.339473}, {0.171835, 0.0421339, 0.343238}, {0.17537, 0.0415784, 0.346936}, {0.178912, 0.0410278, 0.350503}, {0.182456, 0.0404795, 0.354009}, {0.186001, 0.0399508, 0.357372}, {0.189547, 0.0394296, 0.360681}, {0.193089, 0.038952, 0.363838}, {0.19663, 0.0384874, 0.366949}, {0.200164, 0.0380814, 0.369901}, {0.203696, 0.0376889, 0.372815}, {0.207217, 0.037369, 0.375564}, {0.210736, 0.0370614, 0.378286}, {0.21424, 0.0368395, 0.380839}, {0.217743, 0.0366275, 0.383373}, {0.221226, 0.036514, 0.385738}, {0.224708, 0.0364067, 0.388092}, {0.228171, 0.036405, 0.390277}, {0.231632, 0.036408, 0.392455}, {0.235074, 0.0365184, 0.394476}, {0.238514, 0.0366367, 0.396485}, {0.241935, 0.0368584, 0.398352}, {0.245354, 0.0370928, 0.400203}, {0.248753, 0.0374249, 0.401926}, {0.25215, 0.0377744, 0.403627}, {0.25553, 0.038217, 0.405215}, {0.258906, 0.038681, 0.406777}, {0.262267, 0.0392308, 0.408239}, {0.265622, 0.0398054, 0.409672}, {0.268963, 0.040457, 0.411016}, {0.272298, 0.0411313, 0.412329}, {0.275622, 0.0418626, 0.413564}, {0.278939, 0.042619, 0.414765}, {0.282246, 0.0434264, 0.415897}, {0.285547, 0.0442587, 0.416994}, {0.288839, 0.0451331, 0.418031}, {0.292126, 0.0460319, 0.419031}, {0.295404, 0.046965, 0.419978}, {0.298676, 0.0479216, 0.420887}, {0.301942, 0.0489058, 0.421752}, {0.305201, 0.0499118, 0.422577}, {0.308455, 0.0509395, 0.423363}, {0.311703, 0.0519872, 0.42411}, {0.314946, 0.0530517, 0.424822}, {0.318184, 0.0541345, 0.425495}, {0.321418, 0.0552301, 0.426139}, {0.324646, 0.0563416, 0.426743}, {0.327871, 0.0574622, 0.427322}, {0.331091, 0.0585967, 0.42786}, {0.334309, 0.0597378, 0.428378}, {0.337521, 0.0608907, 0.428854}, {0.340732, 0.0620481, 0.429315}, {0.343938, 0.0632157, 0.429733}, {0.347143, 0.0643864, 0.430138}, {0.350343, 0.0655646, 0.4305}, {0.353543, 0.0667445, 0.430852}, {0.356738, 0.0679301, 0.431162}, {0.359933, 0.0691167, 0.431464}, {0.363125, 0.0703078, 0.431723}, {0.366316, 0.0714996, 0.431977}, {0.369505, 0.0726932, 0.432188}, {0.372693, 0.0738869, 0.432395}, {0.375878, 0.0750817, 0.432559}, {0.379063, 0.0762764, 0.432721}, {0.382246, 0.0774712, 0.432842}, {0.385428, 0.0786659, 0.43296}, {0.388609, 0.0798596, 0.433039}, {0.39179, 0.0810531, 0.433113}, {0.394969, 0.0822438, 0.433151}, {0.398148, 0.0834339, 0.433183}, {0.401326, 0.084621, 0.433181}, {0.404505, 0.0858074, 0.433171}, {0.407683, 0.0869909, 0.43313}, {0.410861, 0.0881734, 0.433079}, {0.414038, 0.0893523, 0.433}, {0.417216, 0.09053, 0.43291}, {0.420393, 0.0917043, 0.432793}, {0.423571, 0.0928771, 0.432664}, {0.426749, 0.0940469, 0.43251}, {0.429927, 0.0952147, 0.432342}, {0.433105, 0.0963794, 0.432152}, {0.436283, 0.0975419, 0.431946}, {0.439462, 0.0987014, 0.431719}, {0.442641, 0.0998586, 0.431476}, {0.44582, 0.101013, 0.431213}, {0.448999, 0.102165, 0.430933}, {0.452179, 0.103316, 0.430636}, {0.45536, 0.104463, 0.430319}, {0.45854, 0.105608, 0.429986}, {0.461721, 0.106751, 0.429632}, {0.464902, 0.107892, 0.429264}, {0.468084, 0.109031, 0.428873}, {0.471267, 0.110168, 0.428469}, {0.47445, 0.111302, 0.428041}, {0.477634, 0.112435, 0.427602}, {0.480818, 0.113566, 0.427139}, {0.484002, 0.114695, 0.426665}, {0.487187, 0.115822, 0.426165}, {0.490372, 0.116949, 0.425656}, {0.493558, 0.118074, 0.425119}, {0.496745, 0.119198, 0.424575}, {0.499931, 0.120321, 0.424003}, {0.503118, 0.121443, 0.423424}, {0.506305, 0.122564, 0.422815}, {0.509493, 0.123685, 0.422202}, {0.51268, 0.124805, 0.421556}, {0.515867, 0.125925, 0.420907}, {0.519055, 0.127044, 0.420225}, {0.522244, 0.128163, 0.419541}, {0.525431, 0.129283, 0.418822}, {0.528619, 0.130403, 0.418101}, {0.531807, 0.131523, 0.417347}, {0.534995, 0.132644, 0.41659}, {0.538183, 0.133766, 0.415801}, {0.54137, 0.134888, 0.415007}, {0.544557, 0.136012, 0.414183}, {0.547744, 0.137137, 0.413353}, {0.55093, 0.138263, 0.412493}, {0.554116, 0.139391, 0.411625}, {0.557301, 0.140521, 0.410731}, {0.560485, 0.141653, 0.409826}, {0.563669, 0.142788, 0.408896}, {0.566852, 0.143925, 0.407955}, {0.570034, 0.145064, 0.40699}, {0.573216, 0.146206, 0.406012}, {0.576396, 0.147352, 0.405011}, {0.579575, 0.1485, 0.403997}, {0.582752, 0.149652, 0.402962}, {0.585928, 0.150808, 0.401911}, {0.589103, 0.151967, 0.40084}, {0.592276, 0.153131, 0.399752}, {0.595448, 0.154299, 0.398646}, {0.598617, 0.155471, 0.397521}, {0.601785, 0.156648, 0.396379}, {0.60495, 0.157831, 0.395217}, {0.608114, 0.159018, 0.394041}, {0.611275, 0.160211, 0.392843}, {0.614435, 0.161409, 0.391632}, {0.617591, 0.162614, 0.390398}, {0.620745, 0.163823, 0.389152}, {0.623895, 0.165042, 0.387882}, {0.627044, 0.166264, 0.386602}, {0.630189, 0.167495, 0.385297}, {0.633332, 0.16873, 0.383982}, {0.63647, 0.169977, 0.382641}, {0.639606, 0.171227, 0.381292}, {0.642737, 0.17249, 0.379915}, {0.645867, 0.173755, 0.378533}, {0.64899, 0.175034, 0.37712}, {0.652112, 0.176315, 0.375703}, {0.655227, 0.177613, 0.374255}, {0.658341, 0.178911, 0.372805}, {0.661447, 0.180227, 0.371323}, {0.664552, 0.181544, 0.36984}, {0.667648, 0.18288, 0.368324}, {0.670744, 0.184217, 0.366806}, {0.67383, 0.185573, 0.365258}, {0.676915, 0.186931, 0.363706}, {0.679991, 0.188308, 0.362126}, {0.683065, 0.189688, 0.360542}, {0.686129, 0.191087, 0.35893}, {0.689192, 0.19249, 0.357313}, {0.692245, 0.193912, 0.35567}, {0.695295, 0.195339, 0.35402}, {0.698335, 0.196785, 0.352347}, {0.701371, 0.198237, 0.350665}, {0.704399, 0.199708, 0.34896}, {0.707422, 0.201186, 0.347246}, {0.710435, 0.202682, 0.345512}, {0.713443, 0.204188, 0.343767}, {0.716441, 0.20571, 0.342003}, {0.719434, 0.207244, 0.340228}, {0.722418, 0.208794, 0.338436}, {0.725395, 0.210357, 0.336631}, {0.728362, 0.211936, 0.334811}, {0.731321, 0.213528, 0.332977}, {0.734271, 0.215137, 0.331129}, {0.737213, 0.216761, 0.329267}, {0.740146, 0.218399, 0.327392}, {0.743069, 0.220054, 0.325502}, {0.745984, 0.221723, 0.323601}, {0.748887, 0.223412, 0.321685}, {0.751783, 0.225112, 0.319758}, {0.754666, 0.226834, 0.317815}, {0.757542, 0.228567, 0.315863}, {0.760404, 0.230323, 0.313894}, {0.76326, 0.23209, 0.311918}, {0.766099, 0.233881, 0.309924}, {0.768934, 0.235682, 0.307924}, {0.771751, 0.237509, 0.305906}, {0.774563, 0.239343, 0.303883}, {0.777356, 0.241207, 0.301841}, {0.780145, 0.243078, 0.299796}, {0.782914, 0.244979, 0.297731}, {0.78568, 0.246884, 0.295663}, {0.788423, 0.248823, 0.293577}, {0.791164, 0.250765, 0.291488}, {0.793881, 0.252742, 0.289381}, {0.796596, 0.25472, 0.287272}, {0.799286, 0.256737, 0.285144}, {0.801975, 0.258755, 0.283015}, {0.804638, 0.260808, 0.280868}, {0.807299, 0.262864, 0.27872}, {0.809934, 0.264956, 0.276554}, {0.812566, 0.267053, 0.274387}, {0.815173, 0.269183, 0.272205}, {0.817776, 0.27132, 0.270019}, {0.820354, 0.273488, 0.267819}, {0.822926, 0.275664, 0.265616}, {0.825474, 0.277872, 0.263401}, {0.828014, 0.28009, 0.261181}, {0.830532, 0.282336, 0.25895}, {0.83304, 0.284594, 0.256714}, {0.835527, 0.286879, 0.254468}, {0.838003, 0.289178, 0.252217}, {0.840458, 0.291502, 0.249956}, {0.8429, 0.293842, 0.24769}, {0.845322, 0.296206, 0.245415}, {0.84773, 0.298586, 0.243135}, {0.850119, 0.300988, 0.240847}, {0.852492, 0.303409, 0.238553}, {0.854847, 0.305851, 0.236252}, {0.857184, 0.308312, 0.233945}, {0.859505, 0.310793, 0.231631}, {0.861806, 0.313295, 0.229311}, {0.864092, 0.315814, 0.226985}, {0.866356, 0.318357, 0.224653}, {0.868606, 0.320914, 0.222316}, {0.870833, 0.323496, 0.219971}, {0.873046, 0.326092, 0.217623}, {0.875235, 0.328714, 0.215266}, {0.877412, 0.331347, 0.212907}, {0.879562, 0.334008, 0.210538}, {0.881701, 0.336679, 0.208167}, {0.883812, 0.339379, 0.205788}, {0.885915, 0.342087, 0.203407}, {0.887986, 0.344825, 0.201016}, {0.89005, 0.34757, 0.198624}, {0.892081, 0.350345, 0.196222}, {0.894106, 0.353126, 0.19382}, {0.896097, 0.35594, 0.191407}, {0.898083, 0.358756, 0.188993}, {0.900033, 0.361606, 0.186569}, {0.90198, 0.364458, 0.184145}, {0.903888, 0.367344, 0.181709}, {0.905794, 0.370232, 0.179273}, {0.907661, 0.373153, 0.176827}, {0.909526, 0.376076, 0.17438}, {0.911354, 0.37903, 0.171923}, {0.913176, 0.381987, 0.169465}, {0.914963, 0.384974, 0.166996}, {0.916743, 0.387966, 0.164525}, {0.918489, 0.390986, 0.162045}, {0.920227, 0.394011, 0.159562}, {0.921931, 0.397062, 0.15707}, {0.923626, 0.40012, 0.154574}, {0.925289, 0.403202, 0.15207}, {0.926941, 0.406292, 0.149562}, {0.928563, 0.409404, 0.147045}, {0.930171, 0.412526, 0.144524}, {0.931751, 0.415668, 0.141994}, {0.933316, 0.418821, 0.13946}, {0.934854, 0.421991, 0.136916}, {0.936375, 0.425173, 0.134367}, {0.937871, 0.428372, 0.131811}, {0.939348, 0.431584, 0.129249}, {0.940802, 0.434811, 0.126679}, {0.942236, 0.438051, 0.124102}, {0.943648, 0.441305, 0.121519}, {0.945037, 0.444573, 0.118928}, {0.946406, 0.447853, 0.116331}, {0.947751, 0.451149, 0.113726}, {0.949078, 0.454454, 0.111116}, {0.950378, 0.457776, 0.108498}, {0.951662, 0.461107, 0.105874}, {0.952918, 0.464454, 0.103243}, {0.95416, 0.46781, 0.100608}, {0.955371, 0.471182, 0.0979643}, {0.95657, 0.474561, 0.0953177}, {0.957736, 0.477958, 0.0926645}, {0.958892, 0.48136, 0.0900092}, {0.960014, 0.484781, 0.0873482}, {0.961127, 0.488206, 0.0846858}, {0.962204, 0.49165, 0.0820207}, {0.963274, 0.495097, 0.0793552}, {0.964305, 0.498563, 0.0766907}, {0.965333, 0.502031, 0.0740262}, {0.966319, 0.50552, 0.0713684}, {0.967303, 0.50901, 0.0687111}, {0.968244, 0.512519, 0.0660683}, {0.969184, 0.516029, 0.0634264}, {0.970081, 0.519559, 0.0608095}, {0.970976, 0.52309, 0.0581952}, {0.97183, 0.526639, 0.0556181}, {0.972679, 0.53019, 0.0530473}, {0.973489, 0.533758, 0.0505269}, {0.974293, 0.537329, 0.0480189}, {0.97506, 0.540915, 0.0455793}, {0.975819, 0.544505, 0.0431603}, {0.976542, 0.548108, 0.0408259}, {0.977255, 0.551716, 0.0385465}, {0.977934, 0.555338, 0.0364416}, {0.978601, 0.558964, 0.0344228}, {0.979237, 0.562603, 0.032623}, {0.979859, 0.566247, 0.0309265}, {0.98045, 0.569901, 0.029444}, {0.981026, 0.573562, 0.0280826}, {0.981573, 0.577233, 0.0269288}, {0.982102, 0.58091, 0.0259156}, {0.982606, 0.584596, 0.0251036}, {0.98309, 0.58829, 0.0244539}, {0.983549, 0.591991, 0.0239986}, {0.983986, 0.5957, 0.0237283}, {0.984401, 0.599417, 0.0236445}, {0.984791, 0.603141, 0.0237708}, {0.985161, 0.606871, 0.0240754}, {0.985505, 0.61061, 0.0246171}, {0.985831, 0.614355, 0.0253274}, {0.986128, 0.618108, 0.0263045}, {0.986409, 0.621867, 0.02744}, {0.98666, 0.625634, 0.0288743}, {0.986896, 0.629405, 0.0304554}, {0.9871, 0.633186, 0.0323698}, {0.987291, 0.63697, 0.034418}, {0.987447, 0.640764, 0.0368383}, {0.987593, 0.644561, 0.039378}, {0.987703, 0.648367, 0.0422142}, {0.987803, 0.652176, 0.0451245}, {0.987865, 0.655995, 0.048239}, {0.98792, 0.659815, 0.0513915}, {0.987935, 0.663646, 0.0547297}, {0.987944, 0.667478, 0.0580917}, {0.987911, 0.671319, 0.0616195}, {0.987875, 0.675162, 0.0651598}, {0.987794, 0.679014, 0.0688513}, {0.987712, 0.682868, 0.0725491}, {0.987584, 0.68673, 0.0763823}, {0.987454, 0.690594, 0.0802227}, {0.98728, 0.694466, 0.0841785}, {0.987102, 0.69834, 0.0881459}, {0.986882, 0.702222, 0.0922152}, {0.986656, 0.706104, 0.0962997}, {0.98639, 0.709995, 0.100474}, {0.986116, 0.713887, 0.104668}, {0.985805, 0.717785, 0.108943}, {0.985483, 0.721686, 0.113241}, {0.985125, 0.725593, 0.117613}, {0.984754, 0.729502, 0.122011}, {0.98435, 0.733416, 0.126479}, {0.983932, 0.737332, 0.130976}, {0.983483, 0.741252, 0.135537}, {0.983018, 0.745175, 0.140133}, {0.982523, 0.749101, 0.144789}, {0.98201, 0.75303, 0.149484}, {0.981471, 0.756961, 0.154236}, {0.980912, 0.760895, 0.159031}, {0.980329, 0.76483, 0.163881}, {0.979725, 0.768768, 0.168779}, {0.979098, 0.772707, 0.173728}, {0.978449, 0.776647, 0.178731}, {0.97778, 0.780589, 0.183783}, {0.977088, 0.784531, 0.188897}, {0.976378, 0.788474, 0.194056}, {0.975643, 0.792418, 0.199284}, {0.974891, 0.796362, 0.204554}, {0.974113, 0.800306, 0.209903}, {0.973321, 0.804249, 0.215292}, {0.972504, 0.808191, 0.220766}, {0.971676, 0.812133, 0.226275}, {0.970823, 0.81607, 0.231879}, {0.969962, 0.820007, 0.237515}, {0.969078, 0.823938, 0.243255}, {0.968188, 0.827868, 0.249022}, {0.967274, 0.831792, 0.254907}, {0.966355, 0.835714, 0.260816}, {0.965413, 0.839628, 0.266857}, {0.964468, 0.843541, 0.272916}, {0.96351, 0.84744, 0.279115}, {0.962551, 0.851338, 0.285327}, {0.961585, 0.855219, 0.291691}, {0.960618, 0.859099, 0.298061}, {0.959644, 0.86296, 0.304608}, {0.958671, 0.86682, 0.311163}, {0.957707, 0.870655, 0.317885}, {0.956746, 0.874487, 0.324623}, {0.955807, 0.878289, 0.331523}, {0.954872, 0.882086, 0.33845}, {0.953961, 0.885854, 0.34555}, {0.953061, 0.889613, 0.352683}, {0.952208, 0.893336, 0.35997}, {0.951371, 0.897047, 0.3673}, {0.950591, 0.900717, 0.374783}, {0.949836, 0.904372, 0.382318}, {0.949154, 0.907981, 0.389992}, {0.948511, 0.91157, 0.397723}, {0.947954, 0.915109, 0.405581}, {0.947452, 0.91862, 0.413498}, {0.947051, 0.922079, 0.421525}, {0.946725, 0.925502, 0.42961}, {0.946512, 0.928872, 0.437784}, {0.946394, 0.932197, 0.446009}, {0.9464, 0.935467, 0.4543}, {0.946526, 0.938685, 0.462629}, {0.946782, 0.941847, 0.470999}, {0.947181, 0.944951, 0.479389}, {0.947709, 0.948002, 0.487798}, {0.948404, 0.950987, 0.496201}, {0.949226, 0.953923, 0.5046}, {0.950231, 0.95679, 0.512969}, {0.951353, 0.959613, 0.521321}, {0.952673, 0.962364, 0.529611}, {0.954099, 0.965077, 0.537868}, {0.95573, 0.967718, 0.546038}, {0.957451, 0.970328, 0.55417}, {0.959379, 0.972867, 0.562203}, {0.96138, 0.975382, 0.5702}, {0.96359, 0.977829, 0.57805}, {0.965858, 0.980259, 0.585859}, {0.968326, 0.982625, 0.593527}, {0.970837, 0.984978, 0.601165}, {0.973542, 0.987271, 0.608652}, {0.976275, 0.989556, 0.616116}, {0.979194, 0.991787, 0.623417}, {0.98213, 0.994013, 0.630703}, {0.985242, 0.99619, 0.637817}, {0.988362, 0.998364, 0.644924}}; + +const std::vector CM_PLASMA = +{{0.050383, 0.029803, 0.527975}, {0.0571045, 0.0290993, 0.530606}, {0.0637965, 0.0283991, 0.533232}, {0.0698352, 0.0277757, 0.535727}, {0.0758322, 0.0271583, 0.538212}, {0.0813865, 0.0266059, 0.540589}, {0.0868937, 0.0260615, 0.542952}, {0.0920842, 0.0255709, 0.545223}, {0.0972256, 0.0250895, 0.547479}, {0.102132, 0.0246521, 0.549659}, {0.106988, 0.024226, 0.55182}, {0.111661, 0.0238412, 0.553915}, {0.116285, 0.0234663, 0.555991}, {0.120771, 0.0231199, 0.558012}, {0.125211, 0.0227823, 0.560014}, {0.129544, 0.0224655, 0.561969}, {0.133831, 0.0221573, 0.563904}, {0.138033, 0.0218655, 0.565799}, {0.142191, 0.0215813, 0.567674}, {0.146281, 0.0213089, 0.569515}, {0.15033, 0.0210431, 0.571334}, {0.154323, 0.0207861, 0.573124}, {0.158276, 0.0205346, 0.574893}, {0.162185, 0.0202893, 0.576637}, {0.166055, 0.020048, 0.578358}, {0.16989, 0.0198104, 0.580059}, {0.173688, 0.0195759, 0.581737}, {0.177457, 0.0193439, 0.583397}, {0.181191, 0.0191134, 0.585034}, {0.184903, 0.018884, 0.586656}, {0.188581, 0.0186545, 0.588254}, {0.19224, 0.0184251, 0.589839}, {0.195868, 0.0181946, 0.5914}, {0.199481, 0.0179636, 0.592951}, {0.203064, 0.0177296, 0.594477}, {0.206637, 0.0174945, 0.595994}, {0.210179, 0.0172559, 0.597486}, {0.213713, 0.0170162, 0.598971}, {0.217218, 0.0167736, 0.60043}, {0.220717, 0.0165304, 0.601884}, {0.224189, 0.016281, 0.60331}, {0.227657, 0.0160306, 0.604733}, {0.231099, 0.0157732, 0.606128}, {0.23454, 0.0155152, 0.607521}, {0.237955, 0.0152484, 0.608885}, {0.241369, 0.0149811, 0.610248}, {0.244761, 0.0147052, 0.611582}, {0.248151, 0.014429, 0.612914}, {0.251521, 0.0141443, 0.614218}, {0.25489, 0.013859, 0.615519}, {0.25824, 0.0135657, 0.616792}, {0.261588, 0.0132712, 0.618062}, {0.26492, 0.0129687, 0.619307}, {0.268249, 0.0126649, 0.620546}, {0.271565, 0.0123547, 0.62176}, {0.274877, 0.012043, 0.622968}, {0.278176, 0.0117257, 0.624152}, {0.281472, 0.0114068, 0.625327}, {0.284757, 0.0110833, 0.626481}, {0.288038, 0.0107585, 0.627625}, {0.29131, 0.0104304, 0.628747}, {0.294577, 0.0101006, 0.629858}, {0.297836, 0.00976744, 0.630948}, {0.30109, 0.0094329, 0.632026}, {0.304338, 0.00909613, 0.633084}, {0.307581, 0.00875851, 0.634128}, {0.310817, 0.0084197, 0.635153}, {0.314049, 0.00808089, 0.636163}, {0.317275, 0.00774208, 0.637154}, {0.320496, 0.0074038, 0.638128}, {0.323712, 0.00706601, 0.639084}, {0.326923, 0.0067302, 0.640022}, {0.330131, 0.00639599, 0.640944}, {0.333332, 0.00606514, 0.641844}, {0.336529, 0.00573655, 0.642729}, {0.339722, 0.00541319, 0.643592}, {0.342912, 0.00509278, 0.64444}, {0.346096, 0.00477864, 0.645264}, {0.349277, 0.00446743, 0.646075}, {0.352452, 0.00416549, 0.646859}, {0.355625, 0.00386705, 0.647631}, {0.358792, 0.00358, 0.648374}, {0.361957, 0.00329639, 0.649107}, {0.365117, 0.0030277, 0.649808}, {0.368275, 0.00276248, 0.6505}, {0.371426, 0.00251474, 0.651158}, {0.374576, 0.00226996, 0.65181}, {0.377719, 0.00204721, 0.652423}, {0.380862, 0.00182696, 0.653032}, {0.383998, 0.00163123, 0.653601}, {0.387134, 0.00143705, 0.654168}, {0.390262, 0.00127304, 0.654691}, {0.39339, 0.00111042, 0.655212}, {0.39651, 0.000980112, 0.655689}, {0.399631, 0.000852471, 0.656163}, {0.402744, 0.000759976, 0.656595}, {0.405856, 0.00067213, 0.657021}, {0.408962, 0.000620517, 0.657406}, {0.412066, 0.000575958, 0.657783}, {0.415164, 0.000569315, 0.65812}, {0.41826, 0.000572381, 0.658448}, {0.42135, 0.000614285, 0.658737}, {0.424438, 0.000668986, 0.659014}, {0.42752, 0.000763525, 0.659254}, {0.430599, 0.000874303, 0.659479}, {0.433673, 0.00102557, 0.65967}, {0.436744, 0.00119652, 0.659843}, {0.439809, 0.00140758, 0.659982}, {0.442871, 0.00164281, 0.660102}, {0.445928, 0.00191876, 0.660189}, {0.448981, 0.00222339, 0.660255}, {0.452028, 0.00256833, 0.660291}, {0.455071, 0.00294703, 0.660302}, {0.45811, 0.00336556, 0.660285}, {0.461143, 0.00382307, 0.660242}, {0.464172, 0.00431928, 0.660171}, {0.467195, 0.00486061, 0.660072}, {0.470214, 0.00543959, 0.659948}, {0.473227, 0.00606938, 0.659792}, {0.476235, 0.00673473, 0.659615}, {0.479237, 0.00745752, 0.659403}, {0.482234, 0.00821383, 0.659171}, {0.485225, 0.0090346, 0.658902}, {0.488212, 0.00988647, 0.658615}, {0.49119, 0.0108102, 0.658289}, {0.494165, 0.0117623, 0.657947}, {0.497132, 0.0127928, 0.657563}, {0.500097, 0.0138481, 0.657166}, {0.503051, 0.0149909, 0.656724}, {0.506003, 0.016155, 0.656271}, {0.508944, 0.0174152, 0.655772}, {0.511883, 0.0186927, 0.655265}, {0.514811, 0.0200749, 0.654709}, {0.517738, 0.02147, 0.654146}, {0.520652, 0.0229791, 0.653533}, {0.523564, 0.0244963, 0.652916}, {0.526464, 0.0261363, 0.652245}, {0.529363, 0.0277818, 0.651572}, {0.532248, 0.029555, 0.650846}, {0.535132, 0.0313367, 0.650116}, {0.538003, 0.0332443, 0.649337}, {0.540872, 0.0351666, 0.648552}, {0.543727, 0.0372128, 0.647719}, {0.54658, 0.0392725, 0.646878}, {0.549421, 0.0414096, 0.645992}, {0.552258, 0.0435479, 0.645097}, {0.555083, 0.0456917, 0.64416}, {0.557904, 0.0478377, 0.64321}, {0.560712, 0.0499911, 0.642222}, {0.563515, 0.0521473, 0.64122}, {0.566307, 0.0543104, 0.640181}, {0.569093, 0.0564764, 0.639127}, {0.571869, 0.0586482, 0.63804}, {0.574638, 0.0608234, 0.636935}, {0.577396, 0.0630045, 0.635799}, {0.580147, 0.0651886, 0.634644}, {0.582887, 0.0673774, 0.633461}, {0.585619, 0.0695698, 0.632258}, {0.588342, 0.0717666, 0.631029}, {0.591055, 0.0739668, 0.629779}, {0.59376, 0.0761703, 0.628506}, {0.596454, 0.0783777, 0.62721}, {0.599139, 0.0805884, 0.625894}, {0.601814, 0.0828026, 0.624554}, {0.604481, 0.0850194, 0.623197}, {0.607136, 0.0872401, 0.621815}, {0.609784, 0.089463, 0.620417}, {0.61242, 0.0916894, 0.618993}, {0.615049, 0.0939174, 0.617557}, {0.617664, 0.0961491, 0.616094}, {0.620274, 0.0983823, 0.614621}, {0.622869, 0.100619, 0.613121}, {0.625459, 0.102856, 0.611613}, {0.628033, 0.105097, 0.610077}, {0.630604, 0.107339, 0.608535}, {0.633157, 0.109583, 0.606965}, {0.635708, 0.111828, 0.60539}, {0.63824, 0.114076, 0.603789}, {0.64077, 0.116324, 0.602185}, {0.643283, 0.118576, 0.600553}, {0.645793, 0.120827, 0.598918}, {0.648285, 0.123081, 0.597258}, {0.650775, 0.125336, 0.595597}, {0.653245, 0.127592, 0.593911}, {0.655715, 0.129849, 0.592223}, {0.658164, 0.132107, 0.590513}, {0.660612, 0.134366, 0.588801}, {0.663042, 0.136625, 0.587069}, {0.665469, 0.138885, 0.585335}, {0.667879, 0.141147, 0.583583}, {0.670286, 0.143409, 0.581828}, {0.672676, 0.145671, 0.580056}, {0.675061, 0.147934, 0.578281}, {0.677431, 0.150197, 0.576493}, {0.679796, 0.152461, 0.574701}, {0.682145, 0.154724, 0.572898}, {0.684489, 0.156988, 0.57109}, {0.686819, 0.159253, 0.569272}, {0.689143, 0.161517, 0.56745}, {0.691453, 0.163782, 0.56562}, {0.693757, 0.166047, 0.563786}, {0.696048, 0.168312, 0.561944}, {0.698331, 0.170577, 0.560099}, {0.700602, 0.172841, 0.558247}, {0.702865, 0.175106, 0.556392}, {0.705118, 0.177371, 0.554532}, {0.707361, 0.179636, 0.552669}, {0.709594, 0.1819, 0.550802}, {0.711817, 0.184164, 0.548931}, {0.714032, 0.186429, 0.547058}, {0.716235, 0.188693, 0.545182}, {0.718432, 0.190957, 0.543304}, {0.720616, 0.19322, 0.541423}, {0.722795, 0.195483, 0.539542}, {0.72496, 0.197746, 0.537658}, {0.72712, 0.200009, 0.535773}, {0.729266, 0.202272, 0.533887}, {0.731408, 0.204534, 0.532001}, {0.733536, 0.206796, 0.530113}, {0.735661, 0.209058, 0.528226}, {0.737771, 0.211319, 0.526339}, {0.739879, 0.21358, 0.524453}, {0.74197, 0.215841, 0.522566}, {0.74406, 0.218102, 0.520679}, {0.746134, 0.220362, 0.518794}, {0.748208, 0.222622, 0.516908}, {0.750264, 0.224882, 0.515025}, {0.75232, 0.227142, 0.513142}, {0.75436, 0.229402, 0.511261}, {0.756399, 0.231661, 0.50938}, {0.758423, 0.233921, 0.507502}, {0.760445, 0.23618, 0.505625}, {0.762453, 0.238438, 0.503751}, {0.764459, 0.240697, 0.501877}, {0.76645, 0.242956, 0.500006}, {0.768439, 0.245216, 0.498136}, {0.770415, 0.247474, 0.496269}, {0.772389, 0.249733, 0.494404}, {0.77435, 0.251992, 0.492543}, {0.776307, 0.254251, 0.490683}, {0.778253, 0.25651, 0.488827}, {0.780195, 0.258769, 0.486973}, {0.782126, 0.261029, 0.485123}, {0.784052, 0.263289, 0.483274}, {0.785968, 0.265548, 0.481429}, {0.787879, 0.267808, 0.479585}, {0.789781, 0.270069, 0.477745}, {0.791677, 0.272329, 0.475908}, {0.793564, 0.274591, 0.474074}, {0.795446, 0.276852, 0.472242}, {0.797319, 0.279115, 0.470413}, {0.799186, 0.281377, 0.468587}, {0.801046, 0.283641, 0.466764}, {0.802897, 0.285905, 0.464945}, {0.804743, 0.288169, 0.463128}, {0.806581, 0.290434, 0.461314}, {0.808413, 0.2927, 0.459502}, {0.810236, 0.294967, 0.457695}, {0.812056, 0.297234, 0.45589}, {0.813865, 0.299503, 0.454089}, {0.81567, 0.301772, 0.452289}, {0.817465, 0.304042, 0.450494}, {0.819257, 0.306313, 0.4487}, {0.821039, 0.308586, 0.44691}, {0.822818, 0.31086, 0.445122}, {0.824586, 0.313135, 0.443337}, {0.826353, 0.315411, 0.441554}, {0.828107, 0.317688, 0.439775}, {0.82986, 0.319967, 0.437996}, {0.831601, 0.322247, 0.436223}, {0.83334, 0.324528, 0.434449}, {0.835067, 0.326812, 0.432681}, {0.836794, 0.329096, 0.430912}, {0.838508, 0.331383, 0.429149}, {0.840222, 0.33367, 0.427386}, {0.841923, 0.33596, 0.425627}, {0.843623, 0.338251, 0.423868}, {0.845311, 0.340545, 0.422114}, {0.846998, 0.342839, 0.420359}, {0.848673, 0.345137, 0.418609}, {0.850346, 0.347436, 0.416858}, {0.852009, 0.349738, 0.415111}, {0.853668, 0.352041, 0.413365}, {0.855318, 0.354348, 0.411621}, {0.856964, 0.356655, 0.409878}, {0.858601, 0.358966, 0.408138}, {0.860234, 0.361278, 0.406399}, {0.861857, 0.363594, 0.404663}, {0.863476, 0.365911, 0.402927}, {0.865087, 0.368231, 0.401194}, {0.866692, 0.370554, 0.399461}, {0.868289, 0.37288, 0.397729}, {0.86988, 0.375209, 0.395999}, {0.871464, 0.37754, 0.39427}, {0.873042, 0.379874, 0.392542}, {0.874612, 0.382211, 0.390816}, {0.876176, 0.384551, 0.38909}, {0.877733, 0.386894, 0.387365}, {0.879282, 0.38924, 0.385641}, {0.880826, 0.391589, 0.383918}, {0.882361, 0.393942, 0.382196}, {0.88389, 0.396298, 0.380474}, {0.885411, 0.398658, 0.378754}, {0.886926, 0.401021, 0.377034}, {0.888432, 0.403388, 0.375314}, {0.889934, 0.405757, 0.373595}, {0.891425, 0.408131, 0.371877}, {0.892912, 0.410508, 0.370159}, {0.894387, 0.412889, 0.368441}, {0.89586, 0.415273, 0.366724}, {0.89732, 0.417663, 0.365006}, {0.898778, 0.420054, 0.363289}, {0.900223, 0.422453, 0.361573}, {0.901666, 0.424852, 0.359856}, {0.903095, 0.427258, 0.35814}, {0.904523, 0.429665, 0.356423}, {0.905936, 0.43208, 0.354707}, {0.907348, 0.434496, 0.35299}, {0.908745, 0.43692, 0.351273}, {0.910141, 0.439344, 0.349556}, {0.911522, 0.441777, 0.34784}, {0.912902, 0.444211, 0.346123}, {0.914267, 0.446653, 0.344405}, {0.91563, 0.449095, 0.342688}, {0.916978, 0.451546, 0.34097}, {0.918323, 0.453999, 0.339253}, {0.919654, 0.456459, 0.337534}, {0.920982, 0.458921, 0.335815}, {0.922297, 0.461391, 0.334096}, {0.923607, 0.463864, 0.332376}, {0.924904, 0.466343, 0.330656}, {0.926196, 0.468826, 0.328936}, {0.927476, 0.471315, 0.327214}, {0.92875, 0.473808, 0.325493}, {0.930011, 0.476308, 0.323771}, {0.931266, 0.478812, 0.322048}, {0.93251, 0.481323, 0.320325}, {0.933746, 0.483838, 0.318602}, {0.934972, 0.486358, 0.316878}, {0.936188, 0.488884, 0.315153}, {0.937394, 0.491416, 0.313428}, {0.938591, 0.493953, 0.311702}, {0.939778, 0.496495, 0.309975}, {0.940954, 0.499044, 0.308248}, {0.942122, 0.501598, 0.306521}, {0.943278, 0.504158, 0.304792}, {0.944425, 0.506723, 0.303063}, {0.945561, 0.509295, 0.301334}, {0.946688, 0.511871, 0.299605}, {0.947802, 0.514455, 0.297875}, {0.948909, 0.517042, 0.296144}, {0.950001, 0.519639, 0.294413}, {0.951088, 0.522238, 0.292682}, {0.952158, 0.524847, 0.290949}, {0.953223, 0.527458, 0.289216}, {0.954271, 0.530079, 0.287482}, {0.955314, 0.532702, 0.285748}, {0.956339, 0.535336, 0.284014}, {0.957361, 0.537971, 0.28228}, {0.958362, 0.540617, 0.280545}, {0.959361, 0.543265, 0.27881}, {0.96034, 0.545924, 0.277074}, {0.961317, 0.548584, 0.275339}, {0.962271, 0.551256, 0.273604}, {0.963225, 0.553928, 0.271868}, {0.964155, 0.556613, 0.270133}, {0.965084, 0.559298, 0.268397}, {0.965991, 0.561995, 0.266662}, {0.966895, 0.564694, 0.264927}, {0.967778, 0.567404, 0.263191}, {0.968657, 0.570116, 0.261456}, {0.969515, 0.572839, 0.25972}, {0.970368, 0.575564, 0.257985}, {0.971201, 0.5783, 0.256251}, {0.972028, 0.58104, 0.254516}, {0.972836, 0.583788, 0.252784}, {0.973637, 0.586541, 0.251051}, {0.974419, 0.589302, 0.249319}, {0.975193, 0.592068, 0.247588}, {0.97595, 0.594843, 0.245859}, {0.976697, 0.597623, 0.24413}, {0.977427, 0.600411, 0.242403}, {0.978146, 0.603204, 0.240677}, {0.978849, 0.606005, 0.238953}, {0.979541, 0.608812, 0.23723}, {0.980217, 0.611626, 0.23551}, {0.980879, 0.614447, 0.233791}, {0.981528, 0.617275, 0.232075}, {0.982162, 0.620109, 0.230361}, {0.982783, 0.62295, 0.228649}, {0.983387, 0.625799, 0.226939}, {0.983979, 0.628654, 0.225231}, {0.984552, 0.631517, 0.223527}, {0.985115, 0.634385, 0.221826}, {0.985659, 0.637262, 0.220128}, {0.986192, 0.640144, 0.218433}, {0.986705, 0.643035, 0.216744}, {0.987209, 0.645929, 0.215058}, {0.987691, 0.648835, 0.213378}, {0.988165, 0.651743, 0.2117}, {0.988615, 0.654663, 0.21003}, {0.989058, 0.657585, 0.208362}, {0.989476, 0.660518, 0.206704}, {0.989888, 0.663453, 0.205047}, {0.990273, 0.666401, 0.203402}, {0.990654, 0.66935, 0.201758}, {0.991006, 0.672311, 0.200127}, {0.991355, 0.675274, 0.198498}, {0.991673, 0.678249, 0.196883}, {0.991989, 0.681226, 0.19527}, {0.992274, 0.684216, 0.193673}, {0.992556, 0.687207, 0.192077}, {0.992807, 0.69021, 0.1905}, {0.993054, 0.693215, 0.188925}, {0.993271, 0.696231, 0.18737}, {0.993483, 0.69925, 0.185819}, {0.993665, 0.702281, 0.184287}, {0.993842, 0.705314, 0.18276}, {0.993989, 0.708358, 0.181254}, {0.994129, 0.711405, 0.179755}, {0.994242, 0.714463, 0.178279}, {0.994345, 0.717524, 0.176811}, {0.994422, 0.720595, 0.175367}, {0.994487, 0.723671, 0.173933}, {0.994527, 0.726756, 0.172523}, {0.994554, 0.729846, 0.171127}, {0.994559, 0.732944, 0.169756}, {0.994547, 0.736048, 0.168401}, {0.994514, 0.739159, 0.167071}, {0.994463, 0.742277, 0.165761}, {0.994391, 0.745402, 0.164476}, {0.994301, 0.748534, 0.163216}, {0.994192, 0.751672, 0.16198}, {0.994062, 0.754818, 0.160774}, {0.993914, 0.757969, 0.159592}, {0.993742, 0.761129, 0.158444}, {0.993554, 0.764295, 0.157319}, {0.99334, 0.767469, 0.156231}, {0.99311, 0.770648, 0.155167}, {0.992854, 0.773836, 0.154147}, {0.992584, 0.777028, 0.153149}, {0.992286, 0.780229, 0.152201}, {0.991975, 0.783435, 0.151275}, {0.991634, 0.78665, 0.150405}, {0.991282, 0.789868, 0.149554}, {0.990897, 0.793096, 0.148767}, {0.990504, 0.796327, 0.147997}, {0.990075, 0.799568, 0.147298}, {0.98964, 0.802811, 0.146612}, {0.989165, 0.806066, 0.146003}, {0.988686, 0.809324, 0.145404}, {0.988164, 0.812593, 0.144889}, {0.98764, 0.815863, 0.144381}, {0.987073, 0.819144, 0.143966}, {0.986504, 0.822427, 0.143555}, {0.985894, 0.82572, 0.143242}, {0.985281, 0.829015, 0.142934}, {0.984625, 0.83232, 0.142721}, {0.983965, 0.835627, 0.142517}, {0.983261, 0.838948, 0.142402}, {0.98255, 0.842269, 0.142301}, {0.981803, 0.845599, 0.142289}, {0.981047, 0.848932, 0.142295}, {0.980257, 0.852272, 0.142384}, {0.979456, 0.855616, 0.142494}, {0.978613, 0.858971, 0.142675}, {0.977759, 0.862329, 0.142882}, {0.976875, 0.865694, 0.143159}, {0.975977, 0.869062, 0.143463}, {0.975045, 0.872438, 0.143826}, {0.974098, 0.875817, 0.144216}, {0.97312, 0.879204, 0.144657}, {0.972126, 0.882595, 0.145125}, {0.971105, 0.885991, 0.145634}, {0.970064, 0.889393, 0.146165}, {0.968996, 0.8928, 0.146724}, {0.967908, 0.896212, 0.147301}, {0.966798, 0.899628, 0.147897}, {0.965667, 0.903048, 0.1485}, {0.964517, 0.906473, 0.149108}, {0.963341, 0.909903, 0.149704}, {0.962145, 0.913338, 0.150292}, {0.960929, 0.916778, 0.150847}, {0.9597, 0.920219, 0.151382}, {0.95845, 0.923664, 0.151848}, {0.957189, 0.927111, 0.152279}, {0.955909, 0.930562, 0.152592}, {0.95462, 0.934014, 0.152853}, {0.953317, 0.93747, 0.152923}, {0.952008, 0.940926, 0.152925}, {0.950694, 0.944382, 0.152626}, {0.949378, 0.947839, 0.152244}, {0.948073, 0.951291, 0.151396}, {0.946771, 0.954743, 0.15045}, {0.945512, 0.958182, 0.148786}, {0.94426, 0.961619, 0.147014}, {0.943099, 0.965032, 0.144104}, {0.941946, 0.968443, 0.141086}, {0.940976, 0.971802, 0.136247}, {0.940015, 0.975158, 0.131326}}; + const std::vector CM_COOLWARM = {{0.2298057,0.298717966,0.753683153},{0.2298057,0.298717966,0.753683153},{0.234377079451,0.305541730329,0.759679527588},{0.234377079451,0.305541730329,0.759679527588},{0.238948458902,0.312365494659,0.765675902176},{0.238948458902,0.312365494659,0.765675902176},{0.243519838353,0.319189258988,0.771672276765},{0.243519838353,0.319189258988,0.771672276765},{0.248091217804,0.326013023318,0.777668651353},{0.248091217804,0.326013023318,0.777668651353},{0.252662597255,0.332836787647,0.783665025941},{0.252662597255,0.332836787647,0.783665025941},{0.257233976706,0.339660551976,0.789661400529},{0.257233976706,0.339660551976,0.789661400529},{0.261805356157,0.346484316306,0.795657775118},{0.261805356157,0.346484316306,0.795657775118},{0.266381468353,0.353304408424,0.801637319498},{0.266381468353,0.353304408424,0.801637319498},{0.271104295647,0.360010661976,0.807095127435},{0.271104295647,0.360010661976,0.807095127435},{0.275827122941,0.366716915529,0.812552935373},{0.275827122941,0.366716915529,0.812552935373},{0.280549950235,0.373423169082,0.81801074331},{0.280549950235,0.373423169082,0.81801074331},{0.285272777529,0.380129422635,0.823468551247},{0.285272777529,0.380129422635,0.823468551247},{0.289995604824,0.386835676188,0.828926359184},{0.289995604824,0.386835676188,0.828926359184},{0.294718432118,0.393541929741,0.834384167122},{0.294718432118,0.393541929741,0.834384167122},{0.299441259412,0.400248183294,0.839841975059},{0.299441259412,0.400248183294,0.839841975059},{0.304174287004,0.406944882839,0.845262726698},{0.304174287004,0.406944882839,0.845262726698},{0.309060319067,0.413498272267,0.850127633867},{0.309060319067,0.413498272267,0.850127633867},{0.313946351129,0.420051661694,0.854992541035},{0.313946351129,0.420051661694,0.854992541035},{0.318832383192,0.426605051122,0.859857448204},{0.323718415255,0.433158440549,0.864722355373},{0.323718415255,0.433158440549,0.864722355373},{0.328604447318,0.439711829976,0.869587262541},{0.328604447318,0.439711829976,0.869587262541},{0.33349047938,0.446265219404,0.87445216971},{0.33349047938,0.446265219404,0.87445216971},{0.338376511443,0.452818608831,0.879317076878},{0.338376511443,0.452818608831,0.879317076878},{0.343277523435,0.459353634729,0.884121921624},{0.343277523435,0.459353634729,0.884121921624},{0.348323341412,0.46571114651,0.888346162941},{0.348323341412,0.46571114651,0.888346162941},{0.353369159388,0.47206865829,0.892570404259},{0.353369159388,0.47206865829,0.892570404259},{0.358414977365,0.478426170071,0.896794645576},{0.358414977365,0.478426170071,0.896794645576},{0.363460795341,0.484783681851,0.901018886894},{0.363460795341,0.484783681851,0.901018886894},{0.368506613318,0.491141193631,0.905243128212},{0.368506613318,0.491141193631,0.905243128212},{0.373552431294,0.497498705412,0.909467369529},{0.373552431294,0.497498705412,0.909467369529},{0.378598249271,0.503856217192,0.913691610847},{0.378598249271,0.503856217192,0.913691610847},{0.383662065773,0.510183417286,0.917830673231},{0.383662065773,0.510183417286,0.917830673231},{0.388851871953,0.516298435576,0.921373483082},{0.388851871953,0.516298435576,0.921373483082},{0.394041678133,0.522413453867,0.924916292933},{0.394041678133,0.522413453867,0.924916292933},{0.399231484314,0.528528472157,0.928459102784},{0.399231484314,0.528528472157,0.928459102784},{0.404421290494,0.534643490447,0.932001912635},{0.404421290494,0.534643490447,0.932001912635},{0.409611096675,0.540758508737,0.935544722486},{0.409611096675,0.540758508737,0.935544722486},{0.414800902855,0.546873527027,0.939087532337},{0.414800902855,0.546873527027,0.939087532337},{0.419990709035,0.552988545318,0.942630342188},{0.425198970196,0.559058179765,0.946061457078},{0.425198970196,0.559058179765,0.946061457078},{0.430506888251,0.564882741459,0.94888941918},{0.430506888251,0.564882741459,0.94888941918},{0.435814806306,0.570707303153,0.951717381282},{0.435814806306,0.570707303153,0.951717381282},{0.441122724361,0.576531864847,0.954545343384},{0.441122724361,0.576531864847,0.954545343384},{0.446430642416,0.582356426541,0.957373305486},{0.446430642416,0.582356426541,0.957373305486},{0.451738560471,0.588180988235,0.960201267588},{0.451738560471,0.588180988235,0.960201267588},{0.457046478525,0.594005549929,0.96302922969},{0.457046478525,0.594005549929,0.96302922969},{0.46235439658,0.599830111624,0.965857191792},{0.46235439658,0.599830111624,0.965857191792},{0.467678094682,0.605591231624,0.968546281094},{0.467678094682,0.605591231624,0.968546281094},{0.473070172988,0.611077437616,0.970633588263},{0.473070172988,0.611077437616,0.970633588263},{0.478462251294,0.616563643608,0.972720895431},{0.478462251294,0.616563643608,0.972720895431},{0.4838543296,0.6220498496,0.9748082026},{0.4838543296,0.6220498496,0.9748082026},{0.489246407906,0.627536055592,0.976895509769},{0.489246407906,0.627536055592,0.976895509769},{0.494638486212,0.633022261584,0.978982816937},{0.494638486212,0.633022261584,0.978982816937},{0.500030564518,0.638508467576,0.981070124106},{0.500030564518,0.638508467576,0.981070124106},{0.505422642824,0.643994673569,0.983157431275},{0.505422642824,0.643994673569,0.983157431275},{0.510824324251,0.649396614824,0.985078776376},{0.510824324251,0.649396614824,0.985078776376},{0.516260302541,0.654497610588,0.986407399812},{0.516260302541,0.654497610588,0.986407399812},{0.521696280831,0.659598606353,0.987736023247},{0.521696280831,0.659598606353,0.987736023247},{0.527132259122,0.664699602118,0.989064646682},{0.532568237412,0.669800597882,0.990393270118},{0.532568237412,0.669800597882,0.990393270118},{0.538004215702,0.674901593647,0.991721893553},{0.538004215702,0.674901593647,0.991721893553},{0.543440193992,0.680002589412,0.993050516988},{0.543440193992,0.680002589412,0.993050516988},{0.548876172282,0.685103585176,0.994379140424},{0.548876172282,0.685103585176,0.994379140424},{0.554311869914,0.690097011216,0.995515548235},{0.554311869914,0.690097011216,0.995515548235},{0.559746725569,0.694767728078,0.996075309176},{0.559746725569,0.694767728078,0.996075309176},{0.565181581224,0.699438444941,0.996635070118},{0.565181581224,0.699438444941,0.996635070118},{0.570616436878,0.704109161804,0.997194831059},{0.570616436878,0.704109161804,0.997194831059},{0.576051292533,0.708779878667,0.997754592},{0.576051292533,0.708779878667,0.997754592},{0.581486148188,0.713450595529,0.998314352941},{0.581486148188,0.713450595529,0.998314352941},{0.586921003843,0.718121312392,0.998874113882},{0.586921003843,0.718121312392,0.998874113882},{0.592355859498,0.722792029255,0.999433874824},{0.592355859498,0.722792029255,0.999433874824},{0.597776775494,0.727329724882,0.999776731776},{0.597776775494,0.727329724882,0.999776731776},{0.603162067918,0.731527477353,0.999565278537},{0.603162067918,0.731527477353,0.999565278537},{0.608547360341,0.735725229824,0.999353825298},{0.608547360341,0.735725229824,0.999353825298},{0.613932652765,0.739922982294,0.999142372059},{0.613932652765,0.739922982294,0.999142372059},{0.619317945188,0.744120734765,0.99893091882},{0.619317945188,0.744120734765,0.99893091882},{0.624703237612,0.748318487235,0.99871946558},{0.624703237612,0.748318487235,0.99871946558},{0.630088530035,0.752516239706,0.998508012341},{0.635473822459,0.756713992176,0.998296559102},{0.635473822459,0.756713992176,0.998296559102},{0.640827782373,0.760751506412,0.997845774882},{0.640827782373,0.760751506412,0.997845774882},{0.646112810765,0.764436496529,0.996868462506},{0.646112810765,0.764436496529,0.996868462506},{0.651397839157,0.768121486647,0.995891150129},{0.651397839157,0.768121486647,0.995891150129},{0.656682867549,0.771806476765,0.994913837753},{0.656682867549,0.771806476765,0.994913837753},{0.661967895941,0.775491466882,0.993936525376},{0.661967895941,0.775491466882,0.993936525376},{0.667252924333,0.779176457,0.992959213},{0.667252924333,0.779176457,0.992959213},{0.672537952725,0.782861447118,0.991981900624},{0.672537952725,0.782861447118,0.991981900624},{0.677822981118,0.786546437235,0.991004588247},{0.677822981118,0.786546437235,0.991004588247},{0.683055681561,0.79004262689,0.989768428184},{0.683055681561,0.79004262689,0.989768428184},{0.688188483192,0.793178379298,0.988038104357},{0.688188483192,0.793178379298,0.988038104357},{0.693321284824,0.796314131706,0.986307780529},{0.693321284824,0.796314131706,0.986307780529},{0.698454086455,0.799449884114,0.984577456702},{0.698454086455,0.799449884114,0.984577456702},{0.703586888086,0.802585636522,0.982847132875},{0.703586888086,0.802585636522,0.982847132875},{0.708719689718,0.805721388929,0.981116809047},{0.708719689718,0.805721388929,0.981116809047},{0.713852491349,0.808857141337,0.97938648522},{0.713852491349,0.808857141337,0.97938648522},{0.71898529298,0.811992893745,0.977656161392},{0.71898529298,0.811992893745,0.977656161392},{0.724041371882,0.814910392647,0.975650970647},{0.724041371882,0.814910392647,0.975650970647},{0.728969579569,0.817464135706,0.973187668373},{0.728969579569,0.817464135706,0.973187668373},{0.733897787255,0.820017878765,0.970724366098},{0.738825994941,0.822571621824,0.968261063824},{0.738825994941,0.822571621824,0.968261063824},{0.743754202627,0.825125364882,0.965797761549},{0.743754202627,0.825125364882,0.965797761549},{0.748682410314,0.827679107941,0.963334459275},{0.748682410314,0.827679107941,0.963334459275},{0.753610618,0.830232851,0.960871157},{0.753610618,0.830232851,0.960871157},{0.758538825686,0.832786594059,0.958407854725},{0.758538825686,0.832786594059,0.958407854725},{0.763362780102,0.83509222182,0.955657676557},{0.763362780102,0.83509222182,0.955657676557},{0.768034364353,0.837035219529,0.952488218235},{0.768034364353,0.837035219529,0.952488218235},{0.772705948604,0.838978217239,0.949318759914},{0.772705948604,0.838978217239,0.949318759914},{0.777377532855,0.840921214949,0.946149301592},{0.777377532855,0.840921214949,0.946149301592},{0.782049117106,0.842864212659,0.942979843271},{0.782049117106,0.842864212659,0.942979843271},{0.786720701357,0.844807210369,0.939810384949},{0.786720701357,0.844807210369,0.939810384949},{0.791392285608,0.846750208078,0.936640926627},{0.791392285608,0.846750208078,0.936640926627},{0.796063869859,0.848693205788,0.933471468306},{0.796063869859,0.848693205788,0.933471468306},{0.800600847294,0.850358321561,0.930007560392},{0.800600847294,0.850358321561,0.930007560392},{0.804964758824,0.851666160557,0.926165074431},{0.804964758824,0.851666160557,0.926165074431},{0.809328670353,0.852973999553,0.922322588471},{0.809328670353,0.852973999553,0.922322588471},{0.813692581882,0.854281838549,0.91848010251},{0.813692581882,0.854281838549,0.91848010251},{0.818056493412,0.855589677545,0.914637616549},{0.818056493412,0.855589677545,0.914637616549},{0.822420404941,0.856897516541,0.910795130588},{0.822420404941,0.856897516541,0.910795130588},{0.826784316471,0.858205355537,0.906952644627},{0.831148228,0.859513194533,0.903110158667},{0.831148228,0.859513194533,0.903110158667},{0.835344711353,0.860513997294,0.898970409941},{0.835344711353,0.860513997294,0.898970409941},{0.839351442773,0.861166825655,0.894493763416},{0.839351442773,0.861166825655,0.894493763416},{0.843358174192,0.861819654016,0.89001711689},{0.843358174192,0.861819654016,0.89001711689},{0.847364905612,0.862472482376,0.885540470365},{0.847364905612,0.862472482376,0.885540470365},{0.851371637031,0.863125310737,0.881063823839},{0.851371637031,0.863125310737,0.881063823839},{0.855378368451,0.863778139098,0.876587177314},{0.855378368451,0.863778139098,0.876587177314},{0.859385099871,0.864430967459,0.872110530788},{0.859385099871,0.864430967459,0.872110530788},{0.86339183129,0.86508379582,0.867633884263},{0.86339183129,0.86508379582,0.867633884263},{0.867427635086,0.864376599773,0.86260246202},{0.867427635086,0.864376599773,0.86260246202},{0.871492511259,0.862309379318,0.857016264059},{0.871492511259,0.862309379318,0.857016264059},{0.875557387431,0.860242158863,0.851430066098},{0.875557387431,0.860242158863,0.851430066098},{0.879622263604,0.858174938408,0.845843868137},{0.879622263604,0.858174938408,0.845843868137},{0.883687139776,0.856107717953,0.840257670176},{0.883687139776,0.856107717953,0.840257670176},{0.887752015949,0.854040497498,0.834671472216},{0.887752015949,0.854040497498,0.834671472216},{0.891816892122,0.851973277043,0.829085274255},{0.891816892122,0.851973277043,0.829085274255},{0.895881768294,0.849906056588,0.823499076294},{0.895881768294,0.849906056588,0.823499076294},{0.8995432066,0.847500236,0.8177890744},{0.8995432066,0.847500236,0.8177890744},{0.902848670318,0.844795650588,0.811969833741},{0.906154134035,0.842091065176,0.806150593082},{0.906154134035,0.842091065176,0.806150593082},{0.909459597753,0.839386479765,0.800331352424},{0.909459597753,0.839386479765,0.800331352424},{0.912765061471,0.836681894353,0.794512111765},{0.912765061471,0.836681894353,0.794512111765},{0.916070525188,0.833977308941,0.788692871106},{0.916070525188,0.833977308941,0.788692871106},{0.919375988906,0.831272723529,0.782873630447},{0.919375988906,0.831272723529,0.782873630447},{0.922681452624,0.828568138118,0.777054389788},{0.922681452624,0.828568138118,0.777054389788},{0.925563423,0.825517298071,0.771136307812},{0.925563423,0.825517298071,0.771136307812},{0.928116009667,0.822197148863,0.765141349255},{0.928116009667,0.822197148863,0.765141349255},{0.930668596333,0.818876999655,0.759146390698},{0.930668596333,0.818876999655,0.759146390698},{0.933221183,0.815556850447,0.753151432141},{0.933221183,0.815556850447,0.753151432141},{0.935773769667,0.812236701239,0.747156473584},{0.935773769667,0.812236701239,0.747156473584},{0.938326356333,0.808916552031,0.741161515027},{0.938326356333,0.808916552031,0.741161515027},{0.940878943,0.805596402824,0.735166556471},{0.940878943,0.805596402824,0.735166556471},{0.943431529667,0.802276253616,0.729171597914},{0.943431529667,0.802276253616,0.729171597914},{0.94554029891,0.798605740533,0.723105417298},{0.94554029891,0.798605740533,0.723105417298},{0.9473454036,0.7946955048,0.7169905058},{0.9473454036,0.7946955048,0.7169905058},{0.94915050829,0.790785269067,0.710875594302},{0.94915050829,0.790785269067,0.710875594302},{0.95095561298,0.786875033333,0.704760682804},{0.95095561298,0.786875033333,0.704760682804},{0.952760717671,0.7829647976,0.698645771306},{0.952760717671,0.7829647976,0.698645771306},{0.954565822361,0.779054561867,0.692530859808},{0.956370927051,0.775144326133,0.68641594831},{0.956370927051,0.775144326133,0.68641594831},{0.958176031741,0.7712340904,0.680301036812},{0.958176031741,0.7712340904,0.680301036812},{0.959517658471,0.76697285451,0.674144715039},{0.959517658471,0.76697285451,0.674144715039},{0.960581198424,0.762501018525,0.667963547102},{0.960581198424,0.762501018525,0.667963547102},{0.961644738376,0.758029182541,0.661782379165},{0.961644738376,0.758029182541,0.661782379165},{0.962708278329,0.753557346557,0.655601211227},{0.962708278329,0.753557346557,0.655601211227},{0.963771818282,0.749085510573,0.64942004329},{0.963771818282,0.749085510573,0.64942004329},{0.964835358235,0.744613674588,0.643238875353},{0.964835358235,0.744613674588,0.643238875353},{0.965898898188,0.740141838604,0.637057707416},{0.965898898188,0.740141838604,0.637057707416},{0.966962438141,0.73567000262,0.630876539478},{0.966962438141,0.73567000262,0.630876539478},{0.967544297635,0.730849716188,0.624685478235},{0.967544297635,0.730849716188,0.624685478235},{0.967873848318,0.725846908094,0.618489234784},{0.967873848318,0.725846908094,0.618489234784},{0.968203399,0.7208441,0.612292991333},{0.968203399,0.7208441,0.612292991333},{0.968532949682,0.715841291906,0.606096747882},{0.968532949682,0.715841291906,0.606096747882},{0.968862500365,0.710838483812,0.599900504431},{0.968862500365,0.710838483812,0.599900504431},{0.969192051047,0.705835675718,0.59370426098},{0.969192051047,0.705835675718,0.59370426098},{0.969521601729,0.700832867624,0.587508017529},{0.969521601729,0.700832867624,0.587508017529},{0.969851152412,0.695830059529,0.581311774078},{0.969851152412,0.695830059529,0.581311774078},{0.969682979667,0.690483930737,0.575138361365},{0.969682979667,0.690483930737,0.575138361365},{0.969288569,0.684981747082,0.568975326259},{0.968894158333,0.679479563427,0.562812291153},{0.968894158333,0.679479563427,0.562812291153},{0.968499747667,0.673977379773,0.556649256047},{0.968499747667,0.673977379773,0.556649256047},{0.968105337,0.668475196118,0.550486220941},{0.968105337,0.668475196118,0.550486220941},{0.967710926333,0.662973012463,0.544323185835},{0.967710926333,0.662973012463,0.544323185835},{0.967316515667,0.657470828808,0.538160150729},{0.967316515667,0.657470828808,0.538160150729},{0.966922105,0.651968645153,0.531997115624},{0.966922105,0.651968645153,0.531997115624},{0.966016719839,0.646129741588,0.525890348259},{0.966016719839,0.646129741588,0.525890348259},{0.964911388137,0.640159078059,0.519805598706},{0.964911388137,0.640159078059,0.519805598706},{0.963806056435,0.634188414529,0.513720849153},{0.963806056435,0.634188414529,0.513720849153},{0.962700724733,0.628217751,0.5076360996},{0.962700724733,0.628217751,0.5076360996},{0.961595393031,0.622247087471,0.501551350047},{0.961595393031,0.622247087471,0.501551350047},{0.960490061329,0.616276423941,0.495466600494},{0.960490061329,0.616276423941,0.495466600494},{0.959384729627,0.610305760412,0.489381850941},{0.959384729627,0.610305760412,0.489381850941},{0.958279397925,0.604335096882,0.483297101388},{0.958279397925,0.604335096882,0.483297101388},{0.956653210976,0.598033822718,0.477302292353},{0.956653210976,0.598033822718,0.477302292353},{0.954853405612,0.591622345008,0.47133746349},{0.954853405612,0.591622345008,0.47133746349},{0.953053600247,0.585210867298,0.465372634627},{0.953053600247,0.585210867298,0.465372634627},{0.951253794882,0.578799389588,0.459407805765},{0.951253794882,0.578799389588,0.459407805765},{0.949453989518,0.572387911878,0.453442976902},{0.947654184153,0.565976434169,0.447478148039},{0.947654184153,0.565976434169,0.447478148039},{0.945854378788,0.559564956459,0.441513319176},{0.945854378788,0.559564956459,0.441513319176},{0.944054573424,0.553153478749,0.435548490314},{0.944054573424,0.553153478749,0.435548490314},{0.941727929824,0.54641347702,0.429707070373},{0.941727929824,0.54641347702,0.429707070373},{0.939253771518,0.539581488565,0.423900204929},{0.939253771518,0.539581488565,0.423900204929},{0.936779613212,0.53274950011,0.418093339486},{0.936779613212,0.53274950011,0.418093339486},{0.934305454906,0.525917511655,0.412286474043},{0.934305454906,0.525917511655,0.412286474043},{0.9318312966,0.5190855232,0.4064796086},{0.9318312966,0.5190855232,0.4064796086},{0.929357138294,0.512253534745,0.400672743157},{0.929357138294,0.512253534745,0.400672743157},{0.926882979988,0.50542154629,0.394865877714},{0.926882979988,0.50542154629,0.394865877714},{0.924408821682,0.498589557835,0.389059012271},{0.924408821682,0.498589557835,0.389059012271},{0.921406221227,0.491420417184,0.383408435376},{0.921406221227,0.491420417184,0.383408435376},{0.918281672584,0.48417347218,0.377793925071},{0.918281672584,0.48417347218,0.377793925071},{0.915157123941,0.476926527176,0.372179414765},{0.915157123941,0.476926527176,0.372179414765},{0.912032575298,0.469679582173,0.366564904459},{0.912032575298,0.469679582173,0.366564904459},{0.908908026655,0.462432637169,0.360950394153},{0.908908026655,0.462432637169,0.360950394153},{0.905783478012,0.455185692165,0.355335883847},{0.905783478012,0.455185692165,0.355335883847},{0.902658929369,0.447938747161,0.349721373541},{0.902658929369,0.447938747161,0.349721373541},{0.899534380725,0.440691802157,0.344106863235},{0.899534380725,0.440691802157,0.344106863235},{0.895884594835,0.433074556706,0.338680634518},{0.892137542788,0.425388737098,0.333289272761},{0.892137542788,0.425388737098,0.333289272761},{0.888390490741,0.41770291749,0.327897911004},{0.888390490741,0.41770291749,0.327897911004},{0.884643438694,0.410017097882,0.322506549247},{0.884643438694,0.410017097882,0.322506549247},{0.880896386647,0.402331278275,0.31711518749},{0.880896386647,0.402331278275,0.31711518749},{0.8771493346,0.394645458667,0.311723825733},{0.8771493346,0.394645458667,0.311723825733},{0.873402282553,0.386959639059,0.306332463976},{0.873402282553,0.386959639059,0.306332463976},{0.869655230506,0.379273819451,0.30094110222},{0.869655230506,0.379273819451,0.30094110222},{0.865391332937,0.371127672047,0.295768956416},{0.865391332937,0.371127672047,0.295768956416},{0.861053600294,0.362915763529,0.290628127176},{0.861053600294,0.362915763529,0.290628127176},{0.856715867651,0.354703855012,0.285487297937},{0.856715867651,0.354703855012,0.285487297937},{0.852378135008,0.346491946494,0.280346468698},{0.852378135008,0.346491946494,0.280346468698},{0.848040402365,0.338280037976,0.275205639459},{0.848040402365,0.338280037976,0.275205639459},{0.843702669722,0.330068129459,0.27006481022},{0.843702669722,0.330068129459,0.27006481022},{0.839364937078,0.321856220941,0.26492398098},{0.839364937078,0.321856220941,0.26492398098},{0.835027204435,0.313644312424,0.259783151741},{0.835027204435,0.313644312424,0.259783151741},{0.830186521949,0.304732763553,0.254891428067},{0.830186521949,0.304732763553,0.254891428067},{0.825293810169,0.295748838094,0.250025473933},{0.825293810169,0.295748838094,0.250025473933},{0.820401098388,0.286764912635,0.2451595198},{0.820401098388,0.286764912635,0.2451595198},{0.815508386608,0.277780987176,0.240293565667},{0.815508386608,0.277780987176,0.240293565667},{0.810615674827,0.268797061718,0.235427611533},{0.805722963047,0.259813136259,0.2305616574},{0.805722963047,0.259813136259,0.2305616574},{0.800830251267,0.2508292108,0.225695703267},{0.800830251267,0.2508292108,0.225695703267},{0.795937539486,0.241845285341,0.220829749133},{0.795937539486,0.241845285341,0.220829749133},{0.790561531941,0.231396999059,0.216242038294},{0.790561531941,0.231396999059,0.216242038294},{0.785153304678,0.220851088722,0.211672877008},{0.785153304678,0.220851088722,0.211672877008},{0.779745077416,0.210305178384,0.207103715722},{0.779745077416,0.210305178384,0.207103715722},{0.774336850153,0.199759268047,0.202534554435},{0.774336850153,0.199759268047,0.202534554435},{0.76892862289,0.18921335771,0.197965393149},{0.76892862289,0.18921335771,0.197965393149},{0.763520395627,0.178667447373,0.193396231863},{0.763520395627,0.178667447373,0.193396231863},{0.758112168365,0.168121537035,0.188827070576},{0.758112168365,0.168121537035,0.188827070576},{0.752703941102,0.157575626698,0.18425790929},{0.752703941102,0.157575626698,0.18425790929},{0.746838012212,0.140021019482,0.179996096957},{0.746838012212,0.140021019482,0.179996096957},{0.740957318753,0.122240325271,0.175744199106},{0.740957318753,0.122240325271,0.175744199106},{0.735076625294,0.104459631059,0.171492301255},{0.735076625294,0.104459631059,0.171492301255},{0.729195931835,0.0866789368471,0.167240403404},{0.729195931835,0.0866789368471,0.167240403404},{0.723315238376,0.0688982426353,0.162988505553},{0.723315238376,0.0688982426353,0.162988505553},{0.717434544918,0.0511175484235,0.158736607702},{0.717434544918,0.0511175484235,0.158736607702},{0.711553851459,0.0333368542118,0.154484709851},{0.711553851459,0.0333368542118,0.154484709851},{0.705673158,0.01555616,0.150232812},{0.705673158,0.01555616,0.150232812},}; diff --git a/src/render/engine.cpp b/src/render/engine.cpp index 517af781..e23998b7 100644 --- a/src/render/engine.cpp +++ b/src/render/engine.cpp @@ -1110,6 +1110,14 @@ void Engine::loadDefaultColorMap(std::string name) { const std::vector* buff = nullptr; if (name == "viridis") { buff = &CM_VIRIDIS; + } else if (name == "magma") { + buff = &CM_MAGMA; + } else if (name == "inferno") { + buff = &CM_INFERNO; + } else if (name == "plasma") { + buff = &CM_PLASMA; + } else if (name == "gray") { + buff = &CM_GRAY; } else if (name == "coolwarm") { buff = &CM_COOLWARM; } else if (name == "blues") { @@ -1142,6 +1150,10 @@ void Engine::loadDefaultColorMap(std::string name) { void Engine::loadDefaultColorMaps() { loadDefaultColorMap("viridis"); + loadDefaultColorMap("plasma"); + loadDefaultColorMap("inferno"); + loadDefaultColorMap("magma"); + loadDefaultColorMap("gray"); loadDefaultColorMap("coolwarm"); loadDefaultColorMap("blues"); loadDefaultColorMap("reds"); diff --git a/src/render/mock_opengl/mock_gl_engine.cpp b/src/render/mock_opengl/mock_gl_engine.cpp index 3d0d69ae..7170c579 100644 --- a/src/render/mock_opengl/mock_gl_engine.cpp +++ b/src/render/mock_opengl/mock_gl_engine.cpp @@ -1959,6 +1959,7 @@ void MockGLEngine::populateDefaultShadersAndRules() { registerShaderRule("SHADEVALUE_MAG_VALUE2", SHADEVALUE_MAG_VALUE2); registerShaderRule("ISOLINE_STRIPE_VALUECOLOR", ISOLINE_STRIPE_VALUECOLOR); registerShaderRule("CHECKER_VALUE2COLOR", CHECKER_VALUE2COLOR); + registerShaderRule("CONTOUR_VALUECOLOR", CONTOUR_VALUECOLOR); registerShaderRule("INVERSE_TONEMAP", INVERSE_TONEMAP); // Texture and image things diff --git a/src/render/opengl/gl_engine.cpp b/src/render/opengl/gl_engine.cpp index 65e68a83..eaca91be 100644 --- a/src/render/opengl/gl_engine.cpp +++ b/src/render/opengl/gl_engine.cpp @@ -2515,6 +2515,7 @@ void GLEngine::populateDefaultShadersAndRules() { registerShaderRule("SHADE_CHECKER_CATEGORY", SHADE_CHECKER_CATEGORY); registerShaderRule("SHADEVALUE_MAG_VALUE2", SHADEVALUE_MAG_VALUE2); registerShaderRule("ISOLINE_STRIPE_VALUECOLOR", ISOLINE_STRIPE_VALUECOLOR); + registerShaderRule("CONTOUR_VALUECOLOR", CONTOUR_VALUECOLOR); registerShaderRule("CHECKER_VALUE2COLOR", CHECKER_VALUE2COLOR); registerShaderRule("INVERSE_TONEMAP", INVERSE_TONEMAP); diff --git a/src/render/opengl/shaders/rules.cpp b/src/render/opengl/shaders/rules.cpp index df420ef5..b260679c 100644 --- a/src/render/opengl/shaders/rules.cpp +++ b/src/render/opengl/shaders/rules.cpp @@ -327,6 +327,32 @@ const ShaderReplacementRule ISOLINE_STRIPE_VALUECOLOR ( /* textures */ {} ); + +const ShaderReplacementRule CONTOUR_VALUECOLOR ( + /* rule name */ "CONTOUR_VALUECOLOR", + { /* replacement sources */ + {"FRAG_DECLARATIONS", R"( + uniform float u_modLen; + uniform float u_modThickness; + uniform float u_modDarkness; + )"}, + {"GENERATE_SHADE_COLOR", R"( + /* TODO: get rid of arbitrary constants */ + vec2 gradF = vec2( dFdx(shadeValue), dFdy(shadeValue) ); + float w = 1./( 10. / u_modLen * u_modThickness * length(gradF) ); + float s = u_modDarkness * exp( -pow( w*(fract(abs(shadeValue/u_modLen))-0.5), 8.0 )); + albedoColor *= 1.-s; + )"} + }, + /* uniforms */ { + {"u_modLen", RenderDataType::Float}, + {"u_modThickness", RenderDataType::Float}, + {"u_modDarkness", RenderDataType::Float}, + }, + /* attributes */ {}, + /* textures */ {} +); + const ShaderReplacementRule CHECKER_VALUE2COLOR ( /* rule name */ "CHECKER_VALUE2COLOR", { /* replacement sources */ diff --git a/src/surface_mesh.cpp b/src/surface_mesh.cpp index 6eaca0c5..b16082f9 100644 --- a/src/surface_mesh.cpp +++ b/src/surface_mesh.cpp @@ -330,7 +330,6 @@ void SurfaceMesh::computeTriangleAllVertexInds() { triangleAllVertexInds.data.clear(); triangleAllVertexInds.data.reserve(3 * 3 * nFacesTriangulation()); - size_t iTriFace = 0; for (size_t iF = 0; iF < nFaces(); iF++) { size_t iStart = faceIndsStart[iF]; size_t D = faceIndsStart[iF + 1] - iStart; @@ -347,7 +346,6 @@ void SurfaceMesh::computeTriangleAllVertexInds() { triangleAllVertexInds.data.push_back(vB); triangleAllVertexInds.data.push_back(vC); } - iTriFace++; } } diff --git a/test/src/floating_test.cpp b/test/src/floating_test.cpp index 6d6960ac..36b24132 100644 --- a/test/src/floating_test.cpp +++ b/test/src/floating_test.cpp @@ -24,6 +24,12 @@ TEST_F(PolyscopeTest, FloatingImageTest) { im->setShowFullscreen(true); polyscope::show(3); + // try some options + im->setIsolinesEnabled(true); + polyscope::show(3); + im->setIsolineStyle(polyscope::IsolineStyle::Contour); + polyscope::show(3); + // categorical polyscope::ScalarImageQuantity* im2 = polyscope::addScalarImageQuantity( "im scalar cat", dimX, dimY, vals, polyscope::ImageOrigin::UpperLeft, polyscope::DataType::CATEGORICAL); diff --git a/test/src/point_cloud_test.cpp b/test/src/point_cloud_test.cpp index a07a5dff..f2102c02 100644 --- a/test/src/point_cloud_test.cpp +++ b/test/src/point_cloud_test.cpp @@ -103,6 +103,12 @@ TEST_F(PolyscopeTest, PointCloudScalar) { psPoints->setPointRenderMode(polyscope::PointRenderMode::Quad); polyscope::show(3); + + q1->setIsolinesEnabled(true); + polyscope::show(3); + + q1->setIsolineStyle(polyscope::IsolineStyle::Contour); + polyscope::show(3); q1->updateData(vScalar); polyscope::show(3); diff --git a/test/src/surface_mesh_test.cpp b/test/src/surface_mesh_test.cpp index 266c6c03..3949d865 100644 --- a/test/src/surface_mesh_test.cpp +++ b/test/src/surface_mesh_test.cpp @@ -222,6 +222,13 @@ TEST_F(PolyscopeTest, SurfaceMeshScalarVertex) { auto q1 = psMesh->addVertexScalarQuantity("vScalar", vScalar); q1->setEnabled(true); polyscope::show(3); + + // try some options + q1->setIsolinesEnabled(true); + polyscope::show(3); + q1->setIsolineStyle(polyscope::IsolineStyle::Contour); + polyscope::show(3); + polyscope::removeAllStructures(); }