//Pedro Feniman 083991 // ====================================================================== // CORES E TEXTURAS background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_plastico1 = texture{ pigment{ color rgb < 0, 1, 0 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_plastico2 = texture{ pigment{ color rgb < 0.2, 0.2, 0.2 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } // ====================================================================== // DESCRIÇÃO DA CENA #declare raio = 2.000; // Partes da cena: #declare caixinha1= box { < -0.2 ,-0.2, 0> <0.2, 0.8, 0.2> texture{ tx_plastico1 } } #declare pa = union{ object{ caixinha1 } object{ caixinha1 rotate <90, 0, 0> translate < 0, 0, 0.2 >} } #declare bola = sphere{ < 0,1,1 >, 0.45 texture{ tx_plastico2 } } #declare cilindro = cylinder{ < 0, 1, 1 >, < 0, 1, 4 >, 0.2 texture{ tx_plastico2 } } #declare apoio = torus{ 0.5, 0.2 //raio maior e menor rotate -90*z translate <0, 1, 4.5 > texture{ tx_plastico2 } } #declare caixa= box { < -0.2 ,-0.2, 0> <0.1, 0.8, 0.2> texture{ tx_plastico1 } } #macro mexer(objeto1, objeto2, angulo1, angulo2, dy1, dy2, dz1, dz2) union{ object{ cilindro } object{ bola } object{ apoio } object{ caixa translate < 0,0.8,4.4 >} object {objeto1 rotate <-90, 0, 0> translate < 0, 0, 0.9 > rotate translate <0, dy1, dz1>} object {objeto2 rotate <180, 0, 0> translate < 0, 1.8, 1.1 > rotate translate <0, dy2, dz2>} } #end union{ object{ mexer(pa, pa, 0, 0, 0, 0, 0, 0)} object{ mexer(pa, pa, 20, -20, 0.2, -0.1, -0.2, 0.5) translate <0 ,-3 ,0> } object{ mexer(pa, pa, 40, -40, 0.55, -0.1, -0.4, 0.9) translate<0 ,-6 ,0> } } #include "camlight.inc" #declare centro_cena = < -4.00, -2, 2 >; #declare raio_cena = 7.0; #declare dir_camera = < 9.00, -1.00, 2.00 >; #declare dist_camera = 25.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)