// MC930 - Laboratorio 2 - Forrobóticca // Last edited on 2003-10-14 21:52:21 by stolfi // Martim Carbone - RA:002193 #include "colors.inc" #declare ctr = < 0.00, 0.00, 3.5 >; #declare camdir = < 15, -10.00, 9 >; camera { location ctr + 1.5*camdir // Posição do observador. right -0.60*x // Largura RELATIVA da imagem. up 0.80*y // Altura RELATIVA da imagem. sky z // Qual direção é "para cima"? look_at ctr // Para onde a câmera está apontando. } // Fontes de luminosidade light_source { 10*<2, -8, 7> color rgb 1.2*<1, 1, 1>} light_source { 10*<6, -3, 1.5> color rgb 0.8*<1, 1, 1>} light_source { 10*<-4, -6, 6> color rgb 0.4*<1, 1, 1>} // Cor de fundo background{ color rgb < 0.6, 0.7, 0.8 > } #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} }