// +w128 +h480 +am3 +a0.01 +ac0.90 +r3 +wt7 #version 3.8; global_settings{ assumed_gamma 1.0 } camera { orthographic location <0.0, 0.5, -2> right x*image_width/image_height up y look_at <0, 0.5, 0> } //light_source { <0, 0.5, -5> rgb 1 } sphere { 0, 1000 pigment {rgb 1} finish {emission 1 diffuse 0}} //------------------------------------------------------------------------------ #declare not_0 = 1/265; // The colours used for the Dakota Red Granite pigment map #declare Map1_entries = 18; #declare A_Granite_map1 = array mixed [Map1_entries][2] { {0.00, }, {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 C_Granite_map1 = //the granite colour_map proper color_map { #if (version >= 3.8) blend_mode 2 #end #for (J, 0, Map1_entries-1, 1) #local Entry = A_Granite_map1[J][1]; [A_Granite_map1[J][0] rgb Entry] #end } #declare W = 1; box { <-W, 0, 0>, pigment { gradient -y color_map {C_Granite_map1} } finish {emission 1.0 diffuse 0} } #local UsedEntry = -0.1; #local Boundaries = union { #for (J, 0, Map1_entries-1, 1) #local Entry = A_Granite_map1[J][0]; #if (Entry != UsedEntry) cylinder {<-W, 1-Entry, -0.001>, <0, 1-Entry, -0.001>, 0.001} text { internal 1 str(Entry, 0, 2) 0.1, 0 scale 0.03 translate <-0.12, 1-Entry, -0.1> } #local UsedEntry = Entry; #end #end pigment {rgb <0, 1, 0>} finish {emission 1.0 diffuse 0} } Boundaries //------------------------------------------------------------------------------ // The mask used for the Dakota Red Granite pigment_pattern #declare Mask_entries = 14; #declare A_Granite_mask = array mixed [Mask_entries][2] { {0.00, }, {0.25, }, {0.25, <0.100, 0.100, 0.100>}, {0.35, <0.100, 0.100, 0.100>}, {0.35, <0.250, 0.250, 0.250>}, {0.45, <0.250, 0.250, 0.250>}, {0.45, <0.500, 0.500, 0.500>}, {0.57, <0.500, 0.500, 0.500>}, {0.57, <0.600, 0.600, 0.600>}, {0.63, <0.600, 0.600, 0.600>}, {0.63, <0.700, 0.700, 0.700>}, {0.75, <0.700, 0.700, 0.700>}, {0.75, <0.900, 0.900, 0.900>}, {1.00, <0.900, 0.900, 0.900>} } #local UsedEntry = -0.1; #local mask_boundaries = //the granite mineral boundaries union { #for (J, 0, Mask_entries-1, 1) #local Entry = A_Granite_mask[J][0]; #if (Entry != UsedEntry) cylinder {<0, 1-Entry, -0.001>, , 0.001} text { internal 1 str(Entry, 0, 2) 0.1, 0 scale 0.03 translate <0.07, 1-Entry, -0.1> } #local UsedEntry = Entry; #end #end pigment {rgb 1} finish {emission 1.0 diffuse 0} } mask_boundaries