// Last edited on DATE TIME by USER // Processed by remove-cam-lights background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_fosca = texture{ pigment{ color rgb < 1.00, 0.80, 0.10 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_blue = texture{ pigment{ color rgb < 0.10, 0.80, 1.00 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_green = texture{ pigment{ color rgb < 0.10, 1.00, 0.20 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_xadrez = texture{ pigment{ checker color rgb < 0.10, 0.32, 0.60 >, color rgb < 1.00, 0.97, 0.90 > } finish{ diffuse 0.9 ambient 0.1 } scale 0.22 } #include "eixos.inc" #declare roleta = seed(3.14159265358979); #macro castelo(p, castle_x, castle_y, castle_z) #if (p > 0) union { box{ <0,0,0>, texture{ tx_green } } object{ castelo(p-1, castle_x/3, castle_y/3, castle_z/3) translate<0,0,castle_z> } object{ castelo(p-1, castle_x/3, castle_y/3, castle_z/3) translate<2*castle_x/3,0,castle_z> } object{ castelo(p-1, castle_x/3, castle_y/3, castle_z/3) translate<0,2*castle_y/3,castle_z> } object{ castelo(p-1, castle_x/3, castle_y/3, castle_z/3) translate<2*castle_x/3,2*castle_y/3,castle_z> } } #else box{ <0,0,0>, <0,0,0> } #end #end #declare EPS = 0.0001; #declare walk_z = 0.01; #declare walk_thickness = 1/4; #declare muralha_prop = 2/5; #declare muralha_espessura = 1.01; #macro muralha(p, muralha_r, muralha_z) union { difference { box{ <-muralha_r*walk_thickness,0,0>, <+muralha_r*walk_thickness,-muralha_r*muralha_espessura-EPS,walk_z> } #if (p > 1) cylinder{ <0,0,-EPS>, <0,0,walk_z+EPS>, muralha_r*muralha_prop translate<-muralha_r*muralha_prop,0,0> } cylinder{ <0,0,-EPS>, <0,0,walk_z+EPS>, muralha_r*muralha_prop translate<+muralha_r*muralha_prop,0,0> } #end texture{ tx_xadrez } } #if (p > 0) difference { cylinder{ <0,0,0>, <0,0,muralha_z>, muralha_r*muralha_espessura } cylinder{ <0,0,-EPS>, <0,0,muralha_z+EPS>, muralha_r } box{ <-muralha_r*walk_thickness,0,-EPS>, <+muralha_r*walk_thickness,-muralha_r*muralha_espessura-EPS,muralha_z+EPS> } } #local n = int(4*rand(roleta)); object{ muralha(p-1, muralha_r*muralha_prop, muralha_z) rotate<0,0,30> translate<-muralha_r*muralha_prop,0,0> } object{ muralha(p-1, muralha_r*muralha_prop, muralha_z) rotate<0,0,-30> translate<+muralha_r*muralha_prop,0,0> } #else object{ castelo(3, muralha_r, muralha_r, muralha_r) translate<-muralha_r/2,-muralha_r/2,0> } #end } #end union{ object{ eixos(3.00) } object{ muralha(3, 3, 0.1) texture{ tx_blue } } } #include "camlight.inc" #declare centro_cena = < 1.00, -0.80, 1.00 >; #declare raio_cena = 2.5; #declare dir_camera = < 4.00, -3.00, 4.00 >; #declare dist_camera = 16.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)