// Daniel Camillo Collier Farias RA:059878 // ====================================================================== // CORES E TEXTURAS 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.32, 0.60 >, color rgb < 1.00, 0.97, 0.90 > } finish{ diffuse 0.9 ambient 0.1 } scale 2.0 } // ====================================================================== // DESCRIÇÃO DA CENA // Partes da cena: #declare valores = array[10] { 10, 8, 7, 1, 3, 9, 1, 0, 0, 2} #declare valores2 = array[15] { 15, 9, 17, 3, 0, 10, 1, 0, 1111, 7, 10, 11, 11, 0, 100} #declare argola = union { difference { union { torus {0.2, 0.2} scale <2, 0, 2> } cylinder{ <0,-1,0>, <0,1,0>, 0.7} } scale<0.5, 0.8, 0.5> texture {tx_fosca} } #macro bit(b, defeito) union { difference{ cylinder { <0,-1,-0.7>, <0,1,0.7>, 0.1} box{ <-0.2,0,-1>, <0.2,2,1>} box{ <-0.2,-0.8,-1>, <0.2,-1.6,1>} } difference{ cylinder { <0,-1,-0.7>, <0,1,0.7>, 0.1} box{ <-0.2,0,-1>, <0.2,2,1>} box{ <-0.2,-0.8,-1>, <0.2,-1.6,1>} scale -1*y } box {<-0.15,0.8,-1>, <0.15,1,0.5>} #if(defeito=0) #if(b=0) union { argola translate <0, 0.65, -0.55> } #else union { argola translate <0, -0.65, -0.55> } #end #end } #end #macro fileira(n, valor) union { #local i=0; #while(i } #local i=i+1; #end } #end #macro abaco(m, n, valores) union { #local i = 0; #while(i } #local i = i+1; #end box {<-0.2, 1, 0.5>,<0.2,-1.8*n+1,0.7>} box {<-0.2, 1, -0.8*m>,<0.2,-1.8*n+1,-0.8*m-0.2>} box {<-0.2, -n*1.8+1, 0.5> <0.2, -n*1.8+0.8, -m*0.8>} } #end #declare chao = box{ <-20,-20,-11>, <+20,+20,-10> } #include "eixos.inc" // Aqui está a cena, finalmente: union{ object{ chao translate < 0,0,-5 > texture{ tx_xadrez }} //corpo(head_rot, ombrod_z_rot,ombrod_x_rot,cotovelod_rot, ombroe_z_rot,ombroe_x_rot,cotoveloe_rot, virilhad_y_rot, virilhad_x_rot, joelhod_rot, ped_rot, virilhae_y_rot, virilhae_x_rot, joelhoe_rot, pee_rot) //union { //corpo(0,0,0,-90,0,0,-90,0,0,0,0,0,0,0,0) //translate -4*y //} //union { //corpo(0,0,-60,-90,0,-60,-90,-90,0,90,0,0,0,0,0) //} union { abaco(5,5,valores) translate 3*x } union { abaco(15,10,valores2) translate <-5, 8, 3> } texture{ tx_plastico } } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 12.0; #declare dir_camera = < 1, 0, 0.5 >; #declare dist_camera = 16.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)