// Desenho do robô garçom // Last edited on 2020-12-08 11:05:38 by jstolfi #version 3.6; // ====================================================================== // CORES E TEXTURAS background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_plastico = texture{ pigment{ color rgb < 0.80, 0.80, 0.80 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_fosca = texture{ pigment{ color rgb < 1.00, 0.30, 0.10 > } finish{ diffuse 0.9 ambient 0.1 } } // ====================================================================== // DESCRICAO // Partes da cena: #macro cabeca(hz) union{ cylinder{<0,0,0>,<0,0,3.0>,3.0 texture{ tx_plastico }} object{ cylinder{<-1,0,2>,<-1,4,2>,0.5 texture{ tx_plastico }} rotate<0,0,hz>} object{ cylinder{<1,0,2>,<1,4,2>,0.5 texture{ tx_plastico }} rotate<0,0,hz>} } #end #macro pescoco(hz, frente, lado) union{ sphere{<0,0,0>, 1.0 texture{ tx_plastico }} object{ cylinder{<0,0,0>, <0,0,3>, 0.6 texture{ tx_plastico }} rotate} object{ cabeca(hz) translate<0,0,3> rotate} } #end #macro dedo(frente) union{ object{ cylinder{<0,0,0>, <0,0,3.0>, 0.2 texture{ tx_plastico }} rotate<0,frente,0> } } #end #macro mao(dedoa_f, dedob_f, dedoc_f, dedod_f, dedoe_f) union{ object{ cylinder{<0,-0.8,0>, <0,0.8,0>, 1 texture{ tx_plastico }}} object{ dedo(dedoa_f) translate<0,-0.7,1> } object{ dedo(dedob_f) translate<0,-0.2,1> } object{ dedo(dedoc_f) translate<0,0.2,1> } object{ dedo(dedod_f) translate<0,0.7,1> } object{ dedo(dedoe_f) rotate<90,0,90> translate<0,0.8,0>} } #end #macro antebraco(daf, dbf, dcf, ddf, def, giro) union{ sphere{<0,0,0>, 0.7 texture{ tx_plastico }} cylinder{<0,0,0>, <0,0,8>, 0.3 texture{tx_plastico}} object{ mao(daf, dbf, dcf, ddf, def) rotate<0,0,giro> translate<0,0,8>} } #end #macro braco(daf, dbf, dcf, ddf, def, gr, frente) union{ sphere{<0,0,0>, 0.7 texture{tx_plastico}} cylinder{<0,0,0>, <0,0,8>, 0.3 texture{tx_plastico}} object{antebraco(daf, dbf, dcf, ddf, def, gr) rotate translate<0,0,8>} } #end #macro corpo(phz,pf,pl, daf1,dbf1,dcf1,ddf1,def1,gr1,abf1,bf1,bl1, daf2,dbf2,dcf2,dcf2,ddf2,def2,gr2,abf2,bf2,bl2) union{ cylinder{<0,0,0>, <0,0,10>, 4 texture{ tx_plastico }} object{ pescoco(phz, pf, pl) translate<0,0,10> } object{ braco(daf1, dbf1, dcf1, ddf1, def1, gr1, abf1) rotate translate<-4,0,9> } object{ braco(daf2, dbf2, dcf2, ddf2, def2, gr2, abf2) rotate translate<4,0,9> } } #end #include "eixos.inc" #local sep = 10*<+1,+1,00>; // Deslocalmento entre robos. union{ //object{braco(70, 60,50, 50, 15, 15, 45) rotate} //object{mao(90, 60) rotate<40, 0, 0> translate<0,0,0>} //object{ eixos(10) } object{corpo(160,+20,-20, -45,30,20,50,15,45,80,120,090, +45,100,120,40,30,18,200,50,-30,40) translate -sep } object{corpo(200,-20,-20, +70,60,50,50,15,45,20,090,090, +45,120,120,40,30,18,200,50,+20,40) } object{corpo(220,-20,+20, -90,90,90,50,15,45,20,180,120, +90,100,120,40,30,18,200,50,+30,40) translate +sep } } #include "camlight.inc" #declare raio_cena = 28.0; #declare centro_cena = < -3.00, -3.00, +9.00 >; #declare dir_camera = < 7.00, -4.00, 3.00 >; #declare dist_camera = 10*raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)