//------------------------------------------------------------------------------ // Persistence of Vision Ray Tracer Scene Description File // File: BE_ColorMapGradient.pov // Vers: 3.8 // Desc: A little facility to visualise granite color_maps. Use in combination // with Granite_21 macro. // Date: June 2021 // Auth: Bill "Bald Eagle" Walker // Some adaptations by Thomas de Groot //------------------------------------------------------------------------------ // +w128 +h480 +am2 +a0.1 +bm2 +bs8 +wt7 // for stochastic render: // +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}} //------------------------------------------------------------------------------ //#local Granite_file = "DakotaRedGranite.inc" #local Granite_file = "SaintAndreGreenGranite.inc" #include Granite_file //------------------------------------------------------------------------------ #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 //------------------------------------------------------------------------------ #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