#include "colors.inc" #include "stones.inc" #include "textures.inc" // Trabalho 2 de MC930 // ====================================================================== // CÂMERA camera { location < 30.00, 12.00, 15.00 > // Posição do observador. right -0.75*x // Largura RELATIVA da imagem. up 1.00*y // Altura RELATIVA da imagem. sky z // Qual direção é "para cima"? look_at < 0.00, 0.00, 0.00 > // Para onde a câmera está apontando. } // Nota: os parâmetros "right" e "up" devem ter a mesma proporção // que os parâmetros ${WIDTH} e ${HEIGHT} no Makefile. // ====================================================================== // FONTES DE LUZ light_source { 10 * < +50.0, +30.0, +50.0 > // Posição da lâmpada. color rgb 1.2 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { 10 * < +50.0, -10.0, +10.0 > // Posição da lâmpada. color rgb 0.8 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } // ====================================================================== // DESCRIÇÃO DA CENA background{ color rgb < 0.75, 0.80, 0.85 > } ////////////Declaração das cores #declare ciano_espelhado = texture { pigment { Blue filter 0.5} finish { ambient 0.1 diffuse 0.35 reflection 0.25 specular 1 roughness 0.001 } } /////////// A cena segue abaixo: #declare m=1; #while (m<=2) #if (m = 2) #declare c=-7.2; #else #declare c=0; #end //Este é o prédio com janelas union { box { <2-c, 2, 0>, // Near lower left corner <-2-c, -2, 10> // Far upper right corner texture { T_Stone7 } } //Janelas #declare G=seed(666); #declare i=1; #declare j=1; #declare k=1; #declare l=1; #while (l <= 2) #while (k <= 2) #while (j <= 5) #while (i <= 5) sphere { #declare a=rand(G)/2; #if (a < 0.1) #declare a = 0.2; #end #if (a > 0.3) #declare a = 0.2; #end #if (k = 1) #declare b = -2; #end #if (k = 2) #declare b = 2; #end #if (l = 1) < b -c, (i-3)/1.2, 1.8*j >, a #else < (i-3)/1.2 -c, b, 1.8*j >, a #end texture { ciano_espelhado } } #declare i=i+1; #end //i #declare j=j+1; #declare i=1; #end //j #declare i=1; #declare j=1; #declare k=k+1; #end //k #declare i=1; #declare j=1; #declare k=1; #declare l=l+1; #end //l } //O corredor da frente difference { box { < 2 -c, 0.5, 0>, // Near lower left corner < 5.2 -c, -0.5, 1> // Far upper right corner texture {ciano_espelhado} // rotate y*20 // Equivalent to "rotate <0,20,0>" } box { < 2 -c, 0.4, 0>, // Near lower left corner < 5.2 -c, -0.4, 0.9> // Far upper right corner } } //O arco do corredor difference { torus { 2.0, 0.2 // major and minor radius translate (-5 +c)*y rotate 90*z texture { pigment { color Blue } } } box { <4-c, 4,-1> <0-c, 0, 0> } } difference { torus { 2.0, 0.2 // major and minor radius translate (-4 +c)*y rotate 90*z texture { pigment { color Red } } } box { <4-c, 4,-1> <0-c, 0, 0> } } difference { torus { 2.0, 0.2 // major and minor radius translate (-3 +c)*y rotate 90*z texture { pigment { color Green } } } box { <4-c, 4,-1> <0-c, 0, 0> } } #declare m=m+1; #end //Plano onde o prédio descansa plane { <0, 0, 1>, 0 texture { Jade } }