// Last edited on 2019-07-17 11:37:36 by stolfilocal // Processed by remove-cam-lights background{ color rgb < 0.20, 0.40, 0.60 > } #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_alt = texture{ pigment{ color rgb < 0.10, 0.40, 0.20 > transmit 0.91 } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_alt2 = texture{ pigment{ color rgb < 0.70, 0.40, 0.50 > transmit 0.81 } 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_xadrez = texture{ pigment{ checker color rgb < 0.50, 0.32, 0.60 >, color rgb < 1.00, 0.97, 0.90 > } finish{ diffuse 0.9 ambient 0.1 } scale 3.0 } #declare raio = 1.500; #macro busca_tempo(clk,nq,tk) #end #macro interpola_quadros(np,na,q,k0,t0,k1,t1,tt,A) #local i=0; #while(i < np) #local k = 0; #while(k < na) #declare A[i][k]=interpola_quadros(t0,Q[k0][i][k],t1,Q[k1][i][k],tt); #local k = k+1; #end #local i = i+1; #end #end #macro parte1() #union{ cylinder {P[0][0], P[0][1], 0.5 texture {tx_plastico} } sphere {P[0][2], 0.5 texture {tx_fosca}} } #end #macro parte2() #union{ cylinder {P[1][0], P[1][1], 0.5 texture {tx_plastico} } sphere {P[1][2], 0.5 texture {tx_fosca}} } #end #macro parte3() #union{ object{cylinder {P[2][0], P[2][1], 0.5 texture {tx_plastico} } translate <0,0,0> } object{sphere {P[2][2], 0.5 texture {tx_fosca}} translate <0,0,0> } } #end #macro parte4() #union{ cylinder {P[3][0], P[3][1], 0.5 translate <0,5,-5>texture {tx_plastico} } sphere {P[3][2], 0.5 translate <0,5,-5>texture {tx_fosca}} } #end #macro parte5() #union{ cylinder {P[4][0], P[4][1], 0.5 translate <0,+5,-11>texture {tx_plastico} } sphere {P[4][2], 0.5 translate <0,5,-11> texture {tx_fosca}} } #end #macro base() box{<-4,-5,0.5>, <4,5,5.5> texture {tx_plastico}} #end #macro articula1() union{ parte1() } #end #macro articula2(a) union{ object{articula1() rotate translate <0,4,0>} parte2() } #end #macro articula3(a,b) union{ object{articula2(a) rotate translate <0,0,-5>} parte3() } #end #macro articula4(a,b,c) union{ object{articula3(a,b) rotate translate <0,5,0>} parte4() } #end #macro articula5(a,b,c,d) union{ object{articula4(a,b,c) rotate translate <0,0,-6>} parte5() } #end #macro perna(a,b,c,d,e) object{articula5(a,b,c,d) rotate } #end #declare P = array[5][3] { {<0,-0.5,0>, <0,-2.5, 0>, <0, 0, 0>}, {<0,0.5,0>, <0, 3.5, 0>, <0, 0, 0>}, {<0,0,-4.5>, <0, 0,-0.5>, <0, 0, 0>}, {<0,-0.5,5>, <0, -4.5, 5>, <0, -5, 5>}, {<0,-5,5.5>, <0, -5, 10.5>, <0, -5, 11>} }; #macro dragao() union { base() object{perna(60,20,-30,0,-30) translate<-3.5,-4.5,0>} object{perna(60,20,-30,0,-30) translate<3.5,-4.5,0>} object{perna(60,20,-30,0,-30) translate<-3.5,0,0>} object{perna(60,20,-30,0,-30) translate<3.5,0,0>} object{perna(60,20,-30,0,-30) translate<-3.5,4.5,0>} object{perna(60,20,-30,0,-30) translate<3.5,4.5,0>} } #end #include "eixos.inc" object { eixos(4.00) } dragao() #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, -5.00 >; #declare raio_cena = 30.0; #declare dir_camera = < 7.00, 8.00, -4.00 >; #declare dist_camera = 4*raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)