// 29 January 2000 #macro ColReset() #declare CB = array [11] #declare CB[0] = 0; #declare CB[1] = 0; #declare CB[2] = 0; #declare CB[3] = 0; #declare CB[4] = 0; #declare CB[5] = 0; #declare CB[6] = 0; #declare CB[7] = 0; #declare CB[8] = 0; #declare CB[9] = 0; #declare CB[10] =0; #declare CV = array [11] #declare CV[0] = rgb <0,0,0>; #declare CV[1] = rgb <0,0,0>; #declare CV[2] = rgb <0,0,0>; #declare CV[3] = rgb <0,0,0>; #declare CV[4] = rgb <0,0,0>; #declare CV[5] = rgb <0,0,0>; #declare CV[6] = rgb <0,0,0>; #declare CV[7] = rgb <0,0,0>; #declare CV[8] = rgb <0,0,0>; #declare CV[9] = rgb <0,0,0>; #declare CV[10] = rgb <0,0,0>; #declare Scale=0.1; #end #macro Tex(Patt) pigment { #switch (Patt) #case (1) gradient y #break #case (2) granite #break #case (3) crackle #break #case (4) wrinkles #break #case (5) bozo #break #case (6) leopard #break #end color_map { #local Count=0; #while (Count <0.5,1,0.75> } #declare B1 = box { 0, <0.05,0.01,0.001> pigment { White }} box{<-.5,0,0> <-.2,1,0.02> texture { Tex(1) } translate <-1.55,1.15,0> } object { C1 texture { Tex(2) scale Scale } rotate y*55 translate <0,1.3,0> } object { C1 texture { Tex(3) scale Scale } rotate y*70 translate <1.1,1.3,0> } object { C1 texture { Tex(4) scale Scale } rotate y*30 translate <-1.6,0,0> } object { C1 texture { Tex(5) scale Scale } rotate y*40 translate <-.2,0,0> } object { C1 texture { Tex(6) scale Scale } rotate y*70 translate <1.1,0,0> } text { ttf "timrom.ttf" "gradient y" 1, 0 pigment { White } finish { ambient 2} scale <0.13,0.13,0.01> rotate z*90 translate <-1.9,2.2,0> } text { ttf "timrom.ttf" "granite" 1, 0 pigment { White } finish { ambient 2} scale <0.15,0.15,0.01> translate <0.1,2.5,0> } text { ttf "timrom.ttf" "crackle" 1, 0 pigment { White } finish { ambient 2} scale <0.15,0.15,0.01> translate <1.2,2.5,0> } text { ttf "timrom.ttf" "wrinkles" 1, 0 pigment { White } finish { ambient 2} scale <0.15,0.15,0.01> translate <-1.6,-0.3,0> } text { ttf "timrom.ttf" "bozo" 1, 0 pigment { White } finish { ambient 2} scale <0.15,0.15,0.01> translate <-.2,-0.3,0> } text { ttf "timrom.ttf" "leopard" 1, 0 pigment { White } finish { ambient 2} scale <0.15,0.15,0.01> translate <1.2,-0.3,0> } text { ttf "timrom.ttf" concat("pattern scale = ",str(Scale,4,3)) 1, 0 pigment { White } finish { ambient 2} scale <0.15,0.15,0.01> translate <0,1.1,0> } #declare Count = 0; #while (Count } text { ttf "timrom.ttf" concat(str(CB[Count],3,2)," rgb ",str(CV[Count].x,3,2),", ",str(CV[Count].y,3,2),", ",str(CV[Count].z,3,2)) 1, 0 pigment {White} finish{ambient 2} scale <0.12,0.12,0.02> translate <-1.6,1.1+0.14*Count,0.3> } #declare Count = Count+1; #end text { ttf "timrom.ttf" "color_map values" 1, 0 pigment { White } finish { ambient 2} scale <0.13,0.13,0.01> translate <-1.4,2.6,0> } text { ttf "timrom.ttf" "0" 1, 0 pigment { White } finish { ambient 2} scale <0.13,0.13,0.01> translate <-1.65,1.1,0> } text { ttf "timrom.ttf" "1" 1, 0 pigment { White } finish { ambient 2} scale <0.13,0.13,0.01> translate <-1.65,2.1,0> } // write out the color_map to file"Povtemp" #fopen Map "Povtemp" write #write( Map, concat("\ncolor_map {\n") ) #declare Count = 0; #while (Count]\n")) #declare Count = Count+1; #end #write ( Map, concat("}\n") ) #fclose Map #end