// Last edited on 2003-12-07 19:32:13 by stolfi // MC930 A, S2 2003 // Autor: Leonel Aguilar Gayard // RA 009103 // Data 28/10/2003 // Tema: Maneração de dados #include "colors.inc" #include "metals.inc" #include "textures.inc" #include "finish.inc" // ====================================================================== #declare ctr = <0, 0, 0>; #declare camDir = <15, -40, 20>; camera { location ctr + 0.80*camDir right -1.00*x up 0.75*y sky z look_at ctr } // ====================================================================== // FONTES DE LUZ light_source { 50 * < +30.0, +10.0, +90.0 > // Posição da lâmpada. color rgb 1.2 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { 50 * < +10.0, -10.0, +10.0 > // Posição da lâmpada. color rgb 0.6 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { 50 * < 0, -10, 10> // Posição da lâmpada. color rgb 0.4 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } // --------------------------------------------------------------------------------- // AQUI TERMINA O ARQUIVO DO PROFESSOR E COMECA O MEU EXERCICIO background { color White } // #declare semente = seed(31415926535); // #declare semente = seed(12347890679); #declare semente = seed(1); #declare corpo = sphere { <0,0,0>, 3 } #declare i = 0; union { #while ( i < 10 ) #declare mao = union { object { sor { 5, <0.0, -0.5>, <0.5, 4.0>, <1.0, 5.0>, <3.0, 10.0>, <4.0, 11.0> pigment { Flesh } } scale 0.5 rotate 90 * x translate <0, 0, -2> } sphere { <0,0,0>, 0.3 pigment { Flesh } } } #declare anteantebraco = union { #declare r = rand(semente); object { mao rotate r*45 // a mao roda entre zero e 45 graus translate <0, 0, 5> } cylinder { <0, 0, 0>, <0, 0, 5>, 0.5 texture { Dark_Wood } } #declare j = 0; // declarando os cilios #while ( j < 20 ) #declare r2 = rand(semente); // cilios do lado esquerdo e direito do anteantebraco cylinder { <0,0,0>, <1,0,0>, 0.04 translate <0,0, 0.5 + 0.19 * j> rotate (r2 * 10 - 5) * x } cylinder { <0,0,0>, <1,0,0>, 0.04 translate <0,0, 0.5 + 0.19 * j> rotate 90 * z rotate (r2 * 10 - 5) * x } #declare j = j + 1; #end sphere { <0,0,0>, 0.5 texture { Tom_Wood } } } #declare antebraco = union { #declare r = rand(semente); #declare r2 = rand(semente); #declare r3 = rand(semente); object { anteantebraco rotate <45 * r, 30 * r2, 20 * r3> translate <0,0,3> } sphere { <0,0,0>, 0.5 texture { Pine_Wood } } cylinder { <0,0,0>, <0,0,3>, 0.6 pigment { Flesh } } } #declare pata = union { #declare r = rand(semente); #declare r2 = rand(semente); #declare r3 = rand(semente); object { antebraco rotate <10 + 10 * r, 10 + 15 * r2, 10 + 10 * r3> } object { lathe { bezier_spline 8, <1,0> <0,1> <0,2> <1,3> <1,3> <0,4> <0,5> <1,6> } pigment { Flesh } rotate 90 * x translate <0,0,-6> scale 0.7 } } // patas esquerdas object { pata rotate -90 * y translate <-3, 10 - 2 * i , 0> } // patas direitas object { pata rotate -90 * z rotate 90 * y translate <3, 10 - 2 * i, 0>} #declare i = i + 1; #end object { sphere { <0,0,0>, 3 pigment { color Brown } } scale <1, 5, 1> } }