#include "colors.inc" #include "textures.inc" #declare board = array[3][3] { {1, 0, 2}, {1, 3, 2}, {1, 0, 2}, } sky_sphere { pigment { Bright_Blue_Sky scale 0.5 } } global_settings { radiosity { pretrace_start 0.08 pretrace_end 0.04 count 35 nearest_count 5 error_bound 1.8 recursion_limit 3 low_error_factor 0.5 gray_threshold 0.0 minimum_reuse 0.015 brightness 1 adc_bailout 0.01/2 } } camera { location <4, 2.9, 7> sky <0,-1,0> look_at <4, 2.9, 0> } light_source { <-100, -300, 400> colour White } #declare Wood1 = texture { pigment { wood turbulence 0.04 octaves 3 scale <0.05, .05, 1> color_map { [0.0, 0.1 color rgb <0.88, 0.60, 0.40> color rgb <0.88, 0.60, 0.40>] [0.1, 0.9 color rgb <0.88, 0.60, 0.40> color rgb <0.80, 0.50, 0.35>] [0.9, 1.0 color rgb <0.80, 0.50, 0.35> color rgb <0.80, 0.50, 0.35>] }}} difference { box { <0, 0, 1.5>, <8, 6, 2> } #declare xp = 0; #while(xp < 3 ) #declare yp = 0; #while(yp < 3 ) #if (board[yp][xp] != 8) #declare x2 = xp + 1; #if (yp = 1) #declare x2 = 2 * xp; #end #declare p = ; sphere { p, 0.35 } // cylinder { p + -10 * z, p + 10 * z, 0.2 } #end #declare yp = yp + 1; #end #declare xp = xp + 1; #end cylinder { <3, 2, 2.05>, <5, 2, 2.05>, 0.12 } cylinder { <3, 4, 2.05>, <5, 4, 2.05>, 0.12 } cylinder { <3, 2, 2.05>, <2, 3, 2.05>, 0.12 } cylinder { <3, 2, 2.05>, <5, 4, 2.05>, 0.12 } cylinder { <5, 2, 2.05>, <3, 4, 2.05>, 0.12 } cylinder { <5, 2, 2.05>, <6, 3, 2.05>, 0.12 } cylinder { <3, 4, 2.05>, <2, 3, 2.05>, 0.12 } cylinder { <5, 4, 2.05>, <6, 3, 2.05>, 0.12 } box { <-1, 0, -1>, <9, 2, 3> rotate <45,0,0> translate <0, 6, 1> } box { <-1, 0, -1>, <9, 2, 3> rotate <45,180,0> translate <8, -1, 3> } box { <-1, 0, -1>, <7, 2, 3> rotate <45,0,90> translate <-1, 0, 0> } box { <-1, 0, -1>, <7, 2, 3> rotate <45,0,-90> translate <9, 5, 0> } texture { Wood1 scale 10 rotate <90,0,90> } } #declare xp = 0; #while(xp < 3 ) #declare yp = 0; #while(yp < 3 ) #declare x2 = xp + 1; #if (yp = 1) #declare x2 = 2 * xp; #end #declare p = ; #if (board[yp][xp] = 3) sphere { p, 0.3 texture { Ruby_Glass } } #end #if (board[yp][xp] = 2) sphere { p, 0.3 texture { Dark_Green_Glass } } #end #if (board[yp][xp] = 1) sphere { p, 0.3 texture { Silver_Texture } } #end #declare yp = yp + 1; #end #declare xp = xp + 1; #end