// Carro espacial // Last edited on 2021-02-03 15:15:09 by jstolfi // ====================================================================== // CORES E TEXTURAS background{ color rgb < 0.75, 0.80, 0.85 > } #declare t1 = texture{ pigment{ color rgb < 0.00, 0.00, 0.50 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare t2 = texture{ pigment{ color rgb < 0.00, 0.50, 0.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare t3 = texture{ pigment{ color rgb < 0.50, 0.00, 0.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare t4 = texture{ pigment{ color rgb < 0.00, 0.50, 0.50 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare t5 = texture{ pigment{ color rgb < 0.50, 0.00, 0.50 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare t6 = texture{ pigment{ color rgb < 0.50, 0.50, 0.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #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_espelho = texture{ pigment{ color rgb < 1.00, 0.85, 0.30 > } finish{ diffuse 0.2 reflection 0.7*< 1.00, 0.85, 0.30 > ambient 0.1 } } #declare tx_vidro = texture{ pigment{ color rgb < 0.85, 0.95, 1.00 > filter 0.70 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 } } #declare tx_xadrez = texture{ pigment{ checker color rgb < 0.10, 0.32, 0.60 >, color rgb < 1.00, 0.97, 0.90 > } finish{ diffuse 0.9 ambient 0.1 } scale 2.0 } // ====================================================================== // DESCRI��O DA CENA #macro rotaate(vv, angx, angy) #local ax = angx * 3.141592 / 180.0; #local ay = angy * 3.141592 / 180.0; #local xx = vv.x * cos(ax) - vv.y * sin(ax); #local yy = vv.x * sin(ax) + vv.y * cos(ax); #local v2 = ; #local yy = v2.y * cos(ay) - v2.z * sin(ay); #local zz = v2.y * sin(ay) + v2.z * cos(ay); #local v3 = ; v3 #end #macro mat(B, i0, j0) #local X = array[4][4]; #local i = 0; #while(i < 4) #local j = 0; #while(j < 4) #local X[i][j] = B[i+i0][j+j0]; #local j = j+1; #end #local i = i+1; #end X #end #macro retalhos() union{ #local B = array[7][13]; #local i = 6; #while(i >= 0) #local j = 0; #while(j < 13) #local vv = <-2, 0, 0>; #local v2 = rotaate(vv, 5 + i*(85/6), -j*(180/12)); #local B[i][j] = v2; #local j = j+1; #end #local i = i-1; #end #local j = 0; #while(j < 13) #local B[3][j] = ( B[4][j]+B[2][j]) / 2; #local j = j+1; #end #local i = 0; #while(i < 7) #local B[i][0] = ; #local B[i][3] = ( B[i][2]+B[i][4]) / 2; #local B[i][6] = ( B[i][5]+B[i][7]) / 2; #local B[i][9] = ( B[i][8]+B[i][10]) / 2; #local B[i][12] = ; #local i = i+1; #end object{retalho(mat(B, 0, 0), 0.001, tx_fosca, t1)} object{retalho(mat(B, 3, 0), 0.001, tx_fosca, t2)} object{retalho(mat(B, 3, 3), 0.001, tx_fosca, t3)} object{retalho(mat(B, 3, 6), 0.001, tx_fosca, t4)} object{retalho(mat(B, 3, 9), 0.001, tx_fosca, t5)} object{retalho(mat(B, 0, 9), 0.001, tx_fosca, t6)} } #end #declare chao = box{ <-20,-20,-1>, <+20,+20,0> } #include "eixos.inc" #include "retalho-simples.inc" // Aqui est� a cena, finalmente: union{ object{ retalhos() rotate<0,90,0>} } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 6.0; #declare dir_camera = < 1.00, 1.00, 1.00 >; #declare dist_camera = 5*raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)