#version 3.7; global_settings { assumed_gamma 1.0 } #include "colors.inc" sky_sphere {pigment {rgb <1, 1, 1>*0.2}} camera { location <0, 0, -80> // position & direction of view look_at <0, 0, 0> right x*image_width/image_height // horizontal size of view up y // vertical size of view } light_source {<25, 25, -50> color White} // define textures with numbers from 1 - 10, and use these numbers as textures in pigment map for wood #declare Num = array [10]; #for (N, 0, 9) #declare Num[N] = text {ttf "arialbd.ttf" chr(48+N) 100, 0 translate <0, 0, -50>} #end #declare T = array [10]; #for (N, 0, 9) #declare Current = CHSV2RGB(); #declare T[N] = pigment { pigment_pattern { object {Num[N]} // 1, 0} warp {repeat x} warp {repeat y} } pigment_map { [0.0 rgbft Current] //[0.9 rgbft Current] [1.0 rgb 0] } scale 0.2 } #end /* #for (N, 0, 9) box {<0.1, 5*N, 0>, <50, 5*(N+1), 0.2> texture {T[N]} } #end */ #declare NR_wood_grain = pigment { //pigment_pattern { wood warp {cylindrical orientation y dist_exp 1} warp {turbulence 1.25} scale <0.5, 30, 1> warp {turbulence 0.25} scale <1, 10, 1> warp { black_hole <0, 0.5, 0>, 1 falloff 2 strength 1.5 repeat 7 turbulence 2 inverse } // } // end pigment pattern } #declare NR_Wood = texture { //texture { pigment_pattern {NR_wood_grain} texture_map { #for (N, 0, 0.9, 0.1) [N T[N*10]] [N+0.1 T[N*10]] #debug concat ( " N = ", str (N, 3, 1), " N*10 = ", str (N*10, 3, 1), "\n") #end } //ramp_wave //} //normal {function {NR_wood_normal(x,y,z).grey*FloorNormal}} //finish {diffuse 0.6 specular 0.1 roughness 0.005} } box {<-25, -25, 0.1>, <25, 25, 0.2> texture {NR_Wood scale 10} }