// Last edited on DATE TIME by USER // Processed by remove-cam-lights #declare tinta_amarela = texture { pigment { color rgb <1,0.7,0> } finish { diffuse 0.3 specular 0.3 roughness 0.005 ambient 0.2 reflection 0.2} } #declare tinta_verde = texture { pigment { color rgb <0.63,0.74,0.67> } finish { diffuse 0.3 specular 0.3 roughness 0.005 ambient 0.2 reflection 0.2} } #declare tinta_prata = texture { pigment { color rgb <0.6, 0.6, 0.6> } finish { diffuse 0.3 specular 0.3 roughness 0.005 ambient 0.2 reflection 0.2} } #declare tinta_azul = texture { pigment { color rgb <0.42, 0.67, 0.86> } finish { diffuse 0.3 specular 0.3 roughness 0.005 ambient 0.2 reflection 0.2} } #declare tinta_vermelha = texture { pigment { color rgb <1, 0, 0> } finish { diffuse 0.3 specular 0.3 roughness 0.005 ambient 0.2 reflection 0.2} } #declare tinta_marrom = texture { pigment { color rgb <0.36, 0.13, 0.0> } finish { diffuse 0.3 specular 0.3 roughness 0.005 ambient 0.2 reflection 0.2} } #declare tinta_branca = texture { pigment { color rgb <1, 1, 1> } finish { diffuse 0.3 specular 0.3 roughness 0.005 ambient 0.2 reflection 0.2} } #declare tinta_preta = texture { pigment { color rgb <0, 0, 0> } finish { diffuse 0.3 specular 0.3 roughness 0.005 ambient 0.2 reflection 0.2} } plane{ y,0 translate - 5*y pigment { uv_mapping image_map {jpeg "Imagem.jpg"} } } background{ color rgb <0.42, 0.67, 0.86>} #declare ponto_p = <0,0,0>; #declare ve = <0,0,1>; #declare num_max_subarvores = 5; #declare num_min_subarvores = 1; #declare L_max = 0.9; #declare L_min = 0.4; #declare angulo_max = 55; #declare angulo_min = 30; #declare rnum = seed(2); #macro fruto() sphere { <0,0,0>,0.7 texture {tinta_vermelha} } #end #macro galho (ponto_p, ve, L, r) #local roty = 0; #local rotz = 0; #local i = 0; #local num_subarvores = 0; #local compr = 0; #local ponto_q = ponto_p + L * ve; #if ((r < 0.01) | ((ponto_q.x > 2) & (ponto_q.y > 2) & (ponto_q.z > 2)) ) object{fruto() scale L * 0.5 rotate <0,0,90> translate <0,r,0>} #else union { object { union { cylinder{ ponto_p, ponto_q, r * 0.5 } object { sphere { ponto_p, r * 0.5} translate L * y } } texture {tinta_marrom} } #declare random = rand(rnum); #declare num_subarvores = floor(random * (num_max_subarvores - num_min_subarvores )) + num_min_subarvores; #if (i=1) #declare num_subarvores = num_subarvores * 2; #end #declare i = 0; #while (i < num_subarvores) #if (i = 0) #declare compr = L; #else #declare compr = (rand(rnum)*(L_max - L_min) + L_min)*L; #end #declare roty = rand(rnum) * 360; #declare rotz = rand(rnum) * (angulo_max - angulo_min) + angulo_min; object { galho (ponto_p, v, L * 0.6, r * 0.5) rotate rotz*z rotate roty*y translate <0,compr,0> } #declare i = i + 1; #end } #end #end object {galho (ponto_p, v, 2, 0.2) } // Original camera parameters: // #local cam_ctr = <0.00,2.00,0.00> // #local cam_vec = (<0.00,1.00,-6.00>-<0.00,2.00,0.00>) // #local cam_sky = y #include "camlight.inc" camlight(<0.00,2.00,0.00>,<10,10,10>,20.0,y,1.0)