// Templo de Pífio - exerc 5 // Abimael Marques de Mello - RA 890001 // 09.jun.2001 // Last edited on 2001-06-12 20:31:19 by stolfi #include "colors.inc" background {color rgb <0.8,0.8,1>} camera { location < 3.5, -3, 3> right < -0.8, 0, 0> up < 0, 0, 0.6> sky < 0, 0, 1> look_at < 1, 0, 0> } light_source { <5, -10, 15> color White } #declare tinta_Azul = texture { pigment { color rgb < 0, 0, 1 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare branco = texture { pigment { color rgb < 1, 1, 1 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare azul2 = texture { pigment { color rgb < 0, 1, 1 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare amarelo = texture { pigment { color rgb < 1, 1, 0 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare marrom = texture { pigment { color rgb < 1, 0.8, 0.8 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_Verde = texture { pigment { color rgb < 0, 1, 0 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_Vermelho = texture { pigment { color rgb < 1, 0, 0 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } // Os tres cilindros e somente para mostrar os eixos das coordenada #declare cilX_vermelho = cylinder { < -3, 0, 0 >, < 3, 0, 0 >, 0.01 texture { tinta_Vermelho } } #declare cilY_azul = cylinder { < 0,-3, 0 >, < 0, 3, 0 >, 0.01 texture { tinta_Azul } } #declare cilZ_verde = cylinder { < 0, 0, -3 >, < 0, 0, 3 >, 0.01 texture { tinta_Verde} } #declare gerador = seed(123456); #declare i = 0 #while(i < 4) #declare r = 0.2 + 0.1*i; cylinder { < 0.2, 0.6, r>, < 0.2, 0.6, r+0.1>, 0.11 texture { branco } } #declare i = i + 1; #end #declare coluna = union { cylinder { < 0.2, 0.6, 0.0>, < 0.2, 0.6, 0.2>, 0.12 texture { azul2 } } cylinder { < 0.2, 0.6, 0.2>, < 0.2, 0.6, 0.65>, 0.1 texture { amarelo } } sphere { <0.2, 0.6, 0.65> 0.1 texture {amarelo}} } #declare fileira = union { #declare i = 0; #while (i<5) object{coluna translate <0.4*i, 0, 0>} #if (i=3) cylinder { < 0.2, 0.6, 0.3>, < 0.2, 0.6, 0.35>, 0.12 texture { branco } } #end #declare i = i + 1 #end } union { //object {cilX_vermelho} //object {cilY_azul} //object {cilZ_verde} object {fileira} object {fileira translate < 0, -1.2, 0>} box {<2, 0.5, 0.7>, <0, -0.5, 0> texture {marrom}} union{box {<2, 0.15, 0.45>, <2, -0.2, 0> texture {branco}} cylinder { < 2, 0.0, 0.5>, < 2.02, 0.0, 0.5>, 0.15 texture { branco } } } }