#version 3.8; global_settings {assumed_gamma 1} camera { location <0, 0, -9> look_at 0 right x*image_width/image_height } sky_sphere {pigment {rgb 1}} light_source {<5, 15, -30> color rgb 1} #declare E = 0.000001; #declare not_0 = 1/257; #macro Convert (Csc, SatBoost, BrightBoost, Color) #switch (Csc) #case (1) #local MyColour = srgb Color; #break #case (2) #local sRGB_Gamma = function(C) {select(C-0.0031308, C*12.92, 1.055*pow(C, 1/2.4)-0.055)} #local SB = SatBoost; // Saturation boost #local VB = BrightBoost; // Brightness ("volume") boost #local RawColour = srgb ; #local SatColour = RawColour-SB; #local MyColour = SatColour*(1+VB)*RawColour.gray/SatColour.gray; #break #else #local MyColour = rgb Color; #end MyColour #end #declare CSC = 2; #local CM = array { <0.00, not_0, not_0, not_0>, <0.25, 0.059, 0.059, 0.059>, <0.25, 0.086, 0.027, 0.059>, <0.35, 0.086, 0.027, 0.059>, <0.35, 0.118, 0.118, 0.078>, <0.45, 0.118, 0.118, 0.078>, <0.45, 0.200, 0.137, 0.110>, <0.50, 0.150, 0.087, 0.060>, <0.57, 0.200, 0.137, 0.110>, <0.57, 0.400, 0.337, 0.310>, <0.60, 0.350, 0.287, 0.260>, <0.63, 0.400, 0.337, 0.310>, <0.63, 0.769, 0.329, 0.298>, <0.70, 0.669, 0.229, 0.198>, <0.75, 0.769, 0.329, 0.298>, <0.75, 0.600, 0.600, 0.600>, <0.85, 0.550, 0.550, 0.550>, <1.00, 0.650, 0.650, 0.650> } #local SatBoost = 0; #local BrightBoost = 0; #local C_gr21_DakotaRed_map1 = //the granite colour_map proper color_map { #if (version >= 3.8) blend_mode 2 #end #local Entries = dimension_size (CM, 1)-1; #for (E, 0, Entries) #local Current = Convert (CSC, SatBoost, BrightBoost, ); [CM[E].x Current] #debug concat ( "[", str (CM[E].x, 0, 3), " rgb <", str (Current.x, 0, 3), " ",str (Current.y, 0, 3), " ",str (Current.z, 0, 3), ">] ", " \n") #end } #debug "\n" #error "End"