// Last edited on DATE TIME by USER // Processed by remove-cam-lights background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_plastico = texture{ pigment{ color rgb < 0.10, 0.80, 1.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_fosca = texture{ pigment{ color rgb < 1.00, 0.80, 0.10 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_espelho = texture{ pigment{ color rgb < 1.00, 0.85, 0.30 > } finish{ diffuse 0.2 reflection 0.7*< 1.00, 0.85, 0.30 > ambient 0.1 } } #declare tx_vidro = texture{ pigment{ color rgb < 0.85, 0.95, 1.00 > filter 0.70 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 } } #declare tx_xadrez = texture{ pigment{ checker color rgb < 0.10, 0.02, 0.50 >, color rgb < 1.00, 0.97, 0.90 > } finish{ diffuse 0.9 ambient 0.1 } scale 2.0 } #declare raio = 2.000; #declare bolinha = sphere{ < 0,0,0 >, 0.80 } #declare bolota = sphere{ < 0,0,0 >, 1.50 } #declare bola = sphere{ < 0.00, 0.00, 0.00 >, raio texture{ tx_plastico } } #declare pino = cylinder{ < -2.00, +2.00, -1.00 >, < +2.00, -2.00, +1.00 >, 0.75 texture{ tx_fosca } } #declare furo = cylinder{ < -1.00, -2.00, -2.00 >, < +1.00, +2.00, +2.00 >, 0.75*raio texture{ tx_fosca } } #declare furo2 = cylinder{ < -1.00, -2.00, -2.00 >, < +1.00, +2.00, +2.00 >, 0.25*raio texture { tx_xadrez } } #declare chao = box{ <-20,-20,-1>, <+20,+20,0> } #declare caixa = box{ <0, 0, 0> , < 2, 1, 4> } #declare botao_bola = cylinder { < 0, 0, 0>, < 0, 0.075, 0>, 0.05 } #declare botao_quadrado = box { <0, 0, 0>, <0.05, 0.05, 0.05> } #include "eixos.inc" #macro torre(raio, altura, pos_ini_x, pos_ini_y) union{ cylinder { < pos_ini_x , pos_ini_y, 0 > , < pos_ini_x , pos_ini_y, altura > , raio } cone { < pos_ini_x, pos_ini_y, altura >, raio*1.1 , < pos_ini_x, pos_ini_y, altura + altura*0.2> , 0 } } #end #macro muro(raio_maior, raio_menor, altura, pos_ini_x, pos_ini_y) difference{ cylinder{ < pos_ini_x , pos_ini_y, 0 > , < pos_ini_x , pos_ini_y, altura> , raio_maior } cylinder{ < pos_ini_x , pos_ini_y, -0.1 > , < pos_ini_x , pos_ini_y, altura + 0.1> , raio_menor } } #end #declare roleta = seed(51) ; #macro castelo( raio_max, altura_min, altura_max, muro_espessura, pos_x, pos_y ) #if (raio_max > 1 ) #local raio = raio_max/3; #local plus_x = (raio_max )*rand(roleta); #local plus_y = sqrt(raio_max*raio_max - plus_x*plus_x) ; #local minus_x = (-(raio_max )*rand(roleta)); #local minus_y = -sqrt(raio_max*raio_max - minus_x*minus_x) ; #local torre_pos_x = raio_max*rand(roleta); #local torre_pos_y = sqrt(raio_max*raio_max - torre_pos_x*torre_pos_x); union { difference { union { object{ muro(raio_max, raio_max - muro_espessura, altura_max, pos_x, pos_y) texture { tx_plastico } } object{ torre(0.7, altura_max, torre_pos_x + pos_x, torre_pos_y + pos_y ) texture { tx_plastico } } } union{ cylinder { < plus_x, plus_y, -0.1 >, < plus_x, plus_y, altura_max*2 > , raio } cylinder { < minus_x, minus_y, -0.1 >, < minus_x, minus_y, altura_max*2 > , raio } } } object { castelo(raio, altura_min, altura_max, muro_espessura, plus_x, plus_y, ) } object { castelo(raio, altura_min, altura_max, muro_espessura, minus_x, minus_y, ) } } #else box { < 0, 0, 0>, < 0, 0, 0> } #end #end union{ object{ eixos(3.00) } object{ castelo(6, 0, 1, 0.3, 0, 0) } } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 0.00 >; #declare raio_cena = 10.0; #declare dir_camera = < 21.00, 14.00, 17.00 >; #declare dist_camera = 16.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)