// MC930 - Laboratorio 2 - Forrobóticca // Martim Carbone - RA:002193 #include "colors.inc" camera { location < 0, -20.00, 3.5 > // Posição do observador. // right -1.0*x // Largura RELATIVA da imagem. // up 0.75*y // Altura RELATIVA da imagem. sky z // Qual direção é "para cima"? look_at < 0.00, 0.00, 3.5 > // Para onde a câmera está apontando. } // Fontes de luminosidade light_source { <2, -8, 7> color rgb <1, 1, 1>} light_source { <6, 3, 1.5> color rgb <1, 1, 1>} light_source { <0, 6, 6> color rgb <1, 1, 1>} // Cor de fundo background{ color rgb < 1, 1, 1 > } #declare cabeca = union{ difference { sphere { <0, 0, 6>, 1.5 scale <0, 0, 1.5> texture{ pigment { color rgb < 0.00, 0.00, 1.00 > }} } box {<-2, -2, 12>, <2, 2, 10> texture{ pigment { color rgb < 0.00, 0.00, 1.00 > }}} } // olho esquerdo sphere { <0.4, -0.2, 6.2>, 0.4 texture{ pigment {Yellow}} translate <0, -1, 3> } // olho direito sphere { <-0.4, -0.2, 6.2> 0.4 texture{ pigment {Yellow}} translate <0, -1, 3> } // boca box { <-0.4, -1.5, 6> <0.4, -1.4, 6.1> texture{ pigment {Yellow}} translate <0,0,1.5> } translate 3*z rotate -30*z // O robo está "olhando" para o lado :p } #declare pescoco = cylinder {<0, 0, 7.25>,<0, 0, 5.75>, 0.5 texture{ pigment {Orange}} translate 3*z} #declare tronco = intersection { sphere {<0, -2, 2.75>, 4 texture{ pigment {Yellow}}} sphere {<0, 2, 2.75>, 4 texture{ pigment {Yellow}}} scale <0,0,1.5> } #declare braco_dir = cylinder {<3.25, 0, 2.75>, <6, 0, 6>, 0.5 texture{ pigment {Blue}}} #declare braco_esq = cylinder {<-3.25, 0, 2.75>, <-6, 0, 6>, 0.5 texture{ pigment {Blue}}} #declare perna_esq = cylinder {<-1, 0, -0.9>, <-4, 0,-5>, 0.5 texture{ pigment {Blue}}} #declare perna_dir = cylinder {<1, 0, -0.9>, <4, 0,-5>, 0.5 texture{ pigment {Blue}}} #declare pe_esq = // difference { box {<-4, 0.25, -5>, <-4.5, -1.5, -5.5> texture{ pigment {Green}}} // bo #declare pe_dir = box {<4, 0.25, -5>, <4.5, -1.5, -5.5> texture{ pigment {Green}}} union{ object{cabeca} object{pescoco} object{tronco} object{braco_dir} object{braco_esq} object{perna_esq} object{perna_dir} object{pe_esq} object{pe_dir} }