// Last edited on 2009-11-24 11:19:57 by stolfilocal // Processed by remove-cam-lights #macro eixo(ponta,cor,nome) union{ sphere{ <0,0,0>, 0.02 } cylinder{ <0,0,0>, 0.91*ponta, 0.02 } cone{ 0.90*ponta, 0.06, ponta, 0.00 } texture{ pigment{ color rgb cor } finish{ ambient 0.5 diffuse 0.5 } } } #end #macro eixos(tamanho) union{ object{ eixo( , <1.0,0.2,0.2>, "X") } object{ eixo( <0,tamanho,0>, <0.0,0.8,0.0>, "Y") } object{ eixo( <0,0,tamanho>, <0.3,0.3,1.0>, "Z") } } #end background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_plastico = texture{ pigment{ color rgb < 0.10, 0.80, 1.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_fosca = texture{ pigment{ color rgb < 1.00, 0.80, 0.10 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_fosca_preta = texture{ pigment{ color rgb < 0.00, 0.00, 0.00 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_fosca_branca = texture{ pigment{ color rgb < 1.00, 1.00, 1.00 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_fosca_vermelha = texture{ pigment{ color rgb < 1.00, 0.00, 0.00 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_fosca_verde = texture{ pigment{ color rgb < 0.00, 1.00, 0.00 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_fosca_azul = texture{ pigment{ color rgb < 0.00, 0.00, 1.00 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_fosca2 = texture{ pigment{ color rgb < 1.00, 0.10, 0.10 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_espelho = texture{ pigment{ color rgb < 1.00, 0.90, 0.70 > } finish{ diffuse 0.1 reflection 0.8*< 1.00, 0.90, 0.70 > ambient 0.1 } } #declare tx_vidro = texture{ pigment{ color rgb < 0.97, 0.98, 1.00 > filter 0.70 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 } } #macro mamao() blob { sphere{ <0, 3, 0.0>, 1, 1 texture {tx_fosca} } sphere{ <0, 3, 0.75>, 1.75, 1 texture {tx_fosca}} cylinder{ <0,2.95,1.5>, <0,3.05,1.5>, 0.75, 1 texture {tx_fosca_verde}} cylinder{ <0,3,0>, <0,3,-0.5>, 0.75, 1 texture {tx_fosca}} sphere{ <0, 3, 2.2>, 0.5, -1 } threshold 0.5 } #end #macro mamao_centro() blob { sphere{ <0, 0, 0.0>, 1, 1 texture {tx_fosca} } sphere{ <0, 0, 0.75>, 1.75, 1 texture {tx_fosca}} cylinder{ <0,-0.05,1.5>, <0,0.05,1.5>, 0.75, 1 texture {tx_fosca_verde}} cylinder{ <0,0,0>, <0,0,-0.5>, 0.75, 1 texture {tx_fosca}} sphere{ <0, 0, 2.2>, 0.5, -1 } threshold 0.5 } #end #macro dedo3(raio) blob { cylinder{ <0, 0, 0>, <0, 1, 0>, raio, 1} sphere{ <0,0,0>, raio + raio*0.5, 1} sphere{ <0,1,0>, raio + raio*0.5, 1} threshold 0.5 texture{ tx_fosca } } #end #macro dedo2(alfa2,raio) union { blob { cylinder{ <0, 0, 0>, <0, 1.5, 0>, raio, 1} sphere{ <0,0,0>, raio + raio*0.5, 1} sphere{ <0,1.5,0>, raio + raio*0.5, 1} threshold 0.5 texture{ tx_fosca } } object{ dedo3(raio) rotate alfa2*x translate <0,1.5,0> } } #end #macro dedo(alfa1, alfa2, comprimento, raio) union { blob { cylinder{ <0, 0, 0>, <0, comprimento, 0>, raio, 1} sphere{ <0,0,0>, raio + raio*0.5, 1} sphere{ <0,comprimento,0>, raio+ raio*0.5, 1} threshold 0.5 texture{ tx_fosca } } object{ dedo2(alfa2, raio) rotate alfa1*x translate <0,comprimento,0> } } #end #macro mao(c) union { blob { cylinder{ <0, 0.6, 0>, <0, 3.3, 0>, 0.4, 1} cylinder{ <0, 0.4, 0.4>, <0, 3.4, 0.4>, 0.4, 1} cylinder{ <0, 0.2, 0.8>, <0, 3.5 0.8>, 0.4, 1} cylinder{ <0, 0, 1.2>, <0, 3.5 1.2>, 0.4, 1} cylinder{ <0, 0, 1.6>, <0, 3.5, 1.6>, 0.4, 1} cylinder{ <0, 0, 2>, <0, 3.5, 2.0>, 0.4, 1} cylinder{ <0, 0, 2.4>, <0, 3.5, 2.4>, 0.4, 1} cylinder{ <0, 0.1, 2.8>, <0, 3.5, 2.8>, 0.4, 1} cylinder{ <0, 0.2, 3.2>, <0, 3.4, 3.2>, 0.4, 1} cylinder{ <0, 0.3, 3.6>, <0, 3.3, 3.6>, 0.4, 1} threshold 0.5 texture{ tx_fosca } } object{ dedo(c*45, c*45, 1.5, 0.3) rotate 90*x rotate 90*z translate <0, 0.3, 3.6>} object{ dedo(c*45, c*45, 1.5, 0.3) rotate 90*x rotate 90*z translate <0, 1.3, 3.6>} object{ dedo(c*45, c*45, 1.5, 0.3) rotate 90*x rotate 90*z translate <0, 2.3, 3.6>} object{ dedo(c*45, c*45, 1.5, 0.3) rotate 90*x rotate 90*z translate <0, 3.3, 3.6>} object{ dedo2(c*45, 0.3) rotate 90*x rotate 90*z rotate 30*x translate <0, 0, 1.2> } } #end #macro anao() blob{ sphere{ <0, 0, 0>, 3, 1 texture{tx_fosca_branca} } sphere{ <1.3, -0.5, 0.5>, 0.3, 1 texture{tx_fosca_vermelha} } sphere{ <1.3, 0.5, 0.5>, 0.3, 1 texture{tx_fosca_preta} } sphere{ <1.5, 0.0, 0.0>, 0.3, 2 texture{tx_fosca_verde} } cylinder{<1.3, -0.5, -0.5>, <1.3, 0.5, -0.5>, 0.3, 1 texture{tx_fosca_azul} } threshold 0.5 } #end #macro mamao_ou_anao(F) blob{ sphere{ <0, 0, 0>, 3, (1-F)*1 texture{tx_fosca_branca} } sphere{ <1.3, -0.5, 0.5>, 0.3, (1-F)*1 texture{tx_fosca_vermelha} } sphere{ <1.3, 0.5, 0.5>, 0.3, (1-F)*1 texture{tx_fosca_preta} } sphere{ <1.5, 0.0, 0.0>, 0.3, (1-F)*2 texture{tx_fosca_verde} } cylinder{<1.3, -0.5, -0.5>, <1.3, 0.5, -0.5>, 0.3, (1-F)*1 texture{tx_fosca_azul} } sphere{ <0, 0, 0.0>, 1, F*1 texture {tx_fosca} } sphere{ <0, 0, 0.75>, 1.75, F*1 texture {tx_fosca}} cylinder{ <0,-0.05,1.5>, <0,0.05,1.5>, 0.75, F*1 texture {tx_fosca_verde}} cylinder{ <0,0,0>, <0,0,-0.5>, 0.75, F*1 texture {tx_fosca}} sphere{ <0, 0, 2.2>, 0.5, F*-1 } threshold 0.5 } #end union { // eixos(4) // ERRO CORRIGIDO: usava "1 + cos(2*pi*clock) / 2" em vez de "(1 + cos(2*pi*clock)) / 2" object{ mao((1 + cos(2*pi*clock)) / 2) scale 0.5 translate -2*x } object{ mamao_ou_anao((1 + cos(2*pi*clock)) / 2) } } // Original camera parameters: // #local cam_ctr = <0,0,0> // #local cam_loc = <10.0,0.00,0> // #local cam_vec = <10.0,0.00,0> // #local cam_sky = z #include "camlight.inc" camlight(<-1.5,0,1>,4.900,<10,10,7>,15.000,z,1.2)