// Last edited on 2003-12-07 14:39:46 by stolfi // Exemplo de arquivo de descricao de cena para POV-ray // ====================================================================== #include "colors.inc" #include "skies.inc" #declare ctr = < 0.00, 1.50, 0.00 >; // #declare camDir = < 0.00, -7.00, 1.00 >; #declare camDir = < 2.00, -7.00, 1.00 >; camera { location ctr + 0.65*camDir right -1.00*x up 0.75*y sky z look_at ctr } // ====================================================================== // FONTES DE LUZ light_source { 10 * < +20.0, +15.0, +40.0 > // Posição da lâmpada. color rgb 1.2 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { 10 * < -20.0, 15.0, +40.0 > // Posição da lâmpada. color rgb 0.8 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { 10 * < 30.0, 15.0, -40.0 > // Posição da lâmpada. color rgb 0.6 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } // ====================================================================== // DESCRIÇÃO DA CENA background{ color rgb < 1, 1, 1 > } //plane { <0, 0, 1>, -0.1 // pigment {rgb <0.3,0.6,1>} //} sky_sphere {S_Cloud3} #declare gerador = seed (12837); #declare limpata = 50; #declare i = 0; #while (i < limpata) #declare ad = rand(gerador); #declare am = rand(gerador); #declare aa = rand(gerador); #declare ba = rand(gerador); #declare dedo = union{ cone{ <0,0,0>, 0.1 <0.3,0,0>,0 pigment{Yellow} } } #declare mao = union{ cylinder { <0,0,0>, <0.4,0,0>, 0.1 pigment {Yellow} } sphere{ <0.4,0,0>, 0.1 pigment {Red} } object{ dedo rotate -ad*60*y translate <0.4,0,0> } } #declare antebraco= union{ cylinder{ <0,0,0> <0.5,0,0> 0.1 pigment {Yellow} } sphere{ <0.5,0,0>, 0.1 pigment{Red} } object{ mao rotate -am*90*y translate <0.5,0,0> } } #declare braco = union{ cone { <0,0,0>,0.2 <0.1,0,0>,0.1 pigment {Yellow} } sphere{ <0.1,0,0>, 0.1 pigment{Red} } object{ antebraco rotate -aa*90*y rotate -ba*15*z translate <0.1,0,0> } } //O objeto finalmente object {braco translate <0.6,0.3*i,0> } #declare i = i+1; #end #declare i=0; #while (i < limpata) #declare ad = rand(gerador); #declare am = rand(gerador); #declare aa = rand(gerador); #declare ba = rand(gerador); #declare dedo = union{ cone{ <0,0,0>, 0.1 <0.3,0,0>,0 pigment{Yellow} } } #declare mao = union{ cylinder { <0,0,0>, <0.4,0,0>, 0.1 pigment {Yellow} } sphere{ <0.4,0,0>, 0.1 pigment {Red} } object{ dedo rotate -ad*60*y translate <0.4,0,0> } } #declare antebraco= union{ cylinder{ <0,0,0> <0.5,0,0> 0.1 pigment {Yellow} } sphere{ <0.5,0,0>, 0.1 pigment{Red} } object{ mao rotate -am*90*y translate <0.5,0,0> } } #declare braco = union{ cone { <0,0,0>,0.2 <0.1,0,0>,0.1 pigment {Yellow} } sphere{ <0.1,0,0>, 0.1 pigment{Red} } object{ antebraco rotate -aa*90*y rotate -ba*15*z translate <0.1,0,0> } } //O objeto finalmente object {braco translate <0.6,0.3*i,0> scale<-1,1,1> } #declare i = i+1; //Corpo cylinder {<0,0,0> <0,limpata*0.3+0.2,0> 0.6 pigment{Yellow} } //Cabeca sphere {<0,0,0> 0.6 pigment {Yellow} } #end