// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2023-09-14 17:26:58 by stolfilocal // ====================================================================== // CORES E TEXTURAS //#include "textures.inc" background{ color rgb < 0.800, 0.850, 0.900 > } #declare tx_casa = texture{ pigment{ color rgb < 0.40, 0.50, 0.90 > } finish{ diffuse 0.9 ambient 0.1 } scale 1.0 } #declare tx_hiperpeao_chapeu = texture{ pigment{ color rgb < 1.00, 0.97, 0.90 > } finish{ diffuse 0.9 ambient 0.1 } scale 1.0 } #declare tx_hiperpeao = texture{ pigment{ checker color rgb < 0.09, 0.0, 0.06 >, color rgb < 1.00, 0.97, 0.90 > } finish{ diffuse 0.9 ambient 0.1 } scale 1.0 } #declare tx_hiperrainha = texture{ pigment{ checker color rgb < 1.00, 0.17, 0.10 >, color rgb < 1.00, 0.97, 0.90 > } finish{ diffuse 0.9 ambient 0.1 } scale 2.0 } #declare tx_hiperrainha_coroa = texture{ pigment{ color rgb < 1.00, 0.17, 0.10 > } finish{ diffuse 0.9 ambient 0.1 } scale 1.0 } // ====================================================================== #declare casa = union{ cylinder{ < 0.00, 0.00, 0.00 >, < 0.00, 0.00, 0.50 >, 0.4 texture{ tx_casa } } } #declare hiperpeao = union{ cylinder{ < 0.00, 0.00, 0.50 >, < 0.00, 0.00, 2.00 >, 0.3 texture{ tx_hiperpeao } } cylinder{ < 0.00, 0.00, 2.00 >, < 0.00, 0.00, 2.50 >, 0.15 texture{ tx_hiperpeao_chapeu } } sphere{ < 0.00, 0.00, 2.65 >, 0.15 texture{ tx_hiperpeao_chapeu } } } #declare hiperrainha = union{ cone{ < 0.00, 0.00, 0.50 >, 0.3, < 0.00, 0.00, 2.00 >, 0.7 texture{ tx_hiperrainha } } box{ < 0.25, 0.25, 2 >, <-0.25, -0.25, 2.5 > texture{ tx_hiperrainha_coroa } } sphere{ < 0.00, 0.00, 2.75 >, 0.25 texture{ tx_hiperrainha_coroa } } } #macro fileira(RaioI, RaioE, cor) difference { cylinder{ < 0.00, 0.00, -1.00 >, < 0.00, 0.00, 0.00 >, RaioE} cylinder{ < 0.00, 0.00, -2.00 >, < 0.00, 0.00, 2.00 >, RaioI} texture { pigment { rgb ( cor ) } finish { diffuse 0.8 ambient 0.2 } } } #end #include "eixos.inc" #macro tabuleiro(m, n) // object{ hiperpeao translate < 0,2,0 > } // object{ hiperrainha translate < 2,-2,0 > } #declare Ri = 2; #declare Espessura = 1; // object{ fileira(1, Ri, 1) } #declare i = 0; #while(i < m) #declare c = mod(i, 2); // #debug concat("x = ", str(c, 5, 1), "\n") object{ fileira(Ri, Ri + Espessura, (0.4 + 0.6*c)*<1,1,1>) } #declare Ri = Ri + Espessura; #declare l = Ri + Espessura/2 - 1; #declare theta = 0; #declare dtheta = 360/n; #while(theta < dtheta*n) #declare X_casa = l*cos(radians(theta)); #declare Y_casa = l*sin(radians(theta)); object{ casa translate < X_casa, Y_casa,0 > } #if (i = 0) #if (theta = 0) object{ hiperrainha translate < X_casa, Y_casa,0 > } #end #if (theta = (floor(n/2)*dtheta)) object{ hiperrainha translate < X_casa, Y_casa,0 > } #end #end #if (i = m-1) object{ hiperpeao translate < X_casa, Y_casa,0 > } #end #declare theta = theta + dtheta; #end #declare i = i + 1; #end #end #local linhas = 7; #local colunas = 18; // Deve ser par. union{ tabuleiro(linhas, colunas) // light_source { // <0, 10, -3> // color rgb < 200/255, 42/255, 222/255 > // spotlight // radius 100 // falloff 30 // tightness 10 // point_at <0, 0, 0> // } } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 0.00 >; #declare raio_cena = 1.3*linhas + 3; #declare dir_camera = < 15.00, 10.00, 15.00 >; #declare dist_camera = 7*raio_cena; #declare intens_luz = 0.80; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)