// MC930 - Trabalho final // Fabio Abreu Hashimoto RA 970640 // Predio do Imecc #include "colors.inc" #include "textures.inc" #include "stones.inc" #include "glass.inc" #include "skies.inc" #declare centro = < -2, 0, 0 >; // CÂMERA camera { location <12, 0, 5> sky z look_at centro //rotate z*30 } // ILUMINAÇÃO light_source { < 50, 0, 30 > color White } light_source { <50, -200, 30 > color White } light_source { <50, 200, 30 > color White } // Blocos Principais #declare chao = texture { pigment { bozo colour_map { [ 0.00 color rgb <0.7, 0.9, 0.3> ] [ 0.33 color rgb <0.6, 0.8, 0.3> ] [ 0.66 color rgb <0.6, 0.95, 0.3> ] [ 1.00 color rgb <0.65, 0.7, 0.3> ] } }//{ color Green } normal { bumps 0.9 scale 0.005 } finish { phong 1} } plane { z, -2 texture { chao } } // ceu plane { x, -25 texture { Bright_Blue_Sky } } #declare textura1 = T_Grnt20 #declare textura2 = T_Stone17 #declare vermelho = pigment { color rgb <0.8,0,0> } #declare vidro = material { texture { pigment { color rgbf <0.1, 0.1, 0.15, 0.9> } normal { bumps , 0.2 scale <0.5, 0.5, 5.0> } finish { ambient 0.1 diffuse 0.2 phong 1.0 phong_size 50.0 specular 0.9 roughness 0.06 reflection 0.15 } } interior { ior 1.1 } } #declare bloco_f1 = box { <-4,-2,-2>, <-0.5,2,2.5> texture { textura1 } } #declare faixasv_f1 = union { #declare n=0; #while (n < 3) // 3 faixas vermelhas box { <-0.5,-2,-1.2+(n*1)>, <-0.4,2,-0.7+(n*1)> texture { vermelho } } #declare n = n+1; #end } #declare faixasp_f1 = union { #declare n=0; #while (n < 3) // 3 faixas brancas #declare i=0; union { box { <-0.5,-2,-0.7+(n*1)>, <-0.45,2,-0.2+(n*1)> texture { textura2 } } #while (i < 5) // 5 janelas box { <-0.45,-1.9+(i*0.78),-0.6+(n*1)>, <-0.4,-1.22+(i*0.78),-0.1+(n*1)> material { vidro } } #declare i = i+1; #end } #declare n = n+1; #end } #declare bloco_f = union { object { bloco_f1 } object { faixasv_f1 } object { faixasp_f1 } } #declare bloco_f2 = box { <-4,-4.4,-2>, <0,-2,2.5> texture { textura1 } } #declare faixasv_f2 = union { #declare n=0; #while (n < 3) // 3 faixas vermelhas box { <0,-4.4,-1.2+(n*1)>, <0.1,-2,-0.7+(n*1)> texture { vermelho } } #declare n = n+1; #end } #declare faixasp_f2 = union { #declare n=0; #while (n < 3) // 3 faixas brancas #declare i=0; union { box { <0,-4.4,-0.7+(n*1)>, <0.05,-2,-0.2+(n*1)> texture { textura2 } } #while (i < 4) // 4 janelas box { <0.05,-4.3+(i*0.575),-0.6+(n*1)>, <0.1,-3.825+(i*0.575),-0.1+(n*1)> material { vidro } } #declare i = i+1; #end } #declare n = n+1; #end } #declare bloco_d = union { object { bloco_f2 } object { faixasv_f2 } object { faixasp_f2 } } #declare bloco_e = object { bloco_d translate <0,6.4,0> } #declare bloco_f3 = box { <-4,-6,-2>, <0,-4.4,3> texture { textura1 } } #declare faixasv_f3 = union { #declare n=0; #while (n < 4) // 4 faixas vermelhas box { <0,-6,-1.8+(n*1)>, <0.1,-4.4,-1.3+(n*1)> texture { vermelho } } #declare n = n+1; #end } #declare faixasp_f3 = union { #declare n=0; #while (n < 4) // 4 faixas brancas #declare i=0; union { box { <0,-6,-1.3+(n*1)>, <0.05,-4.4,-0.8+(n*1)> texture { textura2 } } #while (i < 3) // 3 janelas box { <0.05,-5.9+(i*0.5),-1.3+(n*1)>, <0.1,-5.5+(i*0.5),-0.8+(n*1)> material { vidro } } #declare i = i+1; #end } #declare n = n+1; #end } #declare bloco_d2 = union { object { bloco_f3 } object { faixasv_f3 } object { faixasp_f3 } } #declare bloco_e2 = object { bloco_d2 translate <0,10.4,0> } #declare coluna = box { <-2,-7,-2>, <0,-6,4.5> texture { textura1 } } #declare f_coluna = box { <0,-6.8,-1.8>, <0.1,-6.1,3> texture { textura2 } } #declare coluna_e = union { object { coluna } object { f_coluna } } #declare coluna_d = object { coluna_e translate <0,12.7,0> } // blocos laterais #declare lat_f1 = box { <-2,-2,-2>, <2,2,3> texture { textura1 } } #declare faixaslv_f1 = union { #declare n=0; #while (n < 4) // 4 faixas vermelhas box { <-2.1,-2.1,-1.8+(n*1)>, <2.1,2.1,-1.3+(n*1)> texture { vermelho } } #declare n = n+1; #end } #declare faixaslp_f1 = union { #declare n=0; #while (n < 5) // 5 faixas brancas #declare i=0; union { box { <-2.05,-2.1,-1.3+(n*1)>, <2.05,2.1,-0.8+(n*1)> texture { textura2 } } #while (i < 5) // 5 janelas box { <-2.2,-2+(i*0.82),-1.3+(n*1)>, <2.2,-1.18+(i*0.82),-0.8+(n*1)> material { vidro } } #declare i = i+1; #end } #declare n = n+1; #end } #declare lat_f = union { object { lat_f1 } object { faixaslv_f1 } object { faixaslp_f1 } } #declare lat1 = object { lat_f rotate z*45 translate <-3.2,-6.5,0> } #declare lat2 = object { lat_f rotate z*(-45) translate <-3.2,6.5,0>} #declare frente = union { object { bloco_f } object { bloco_d } object { bloco_e } object { bloco_d2 } object { bloco_e2 } } #declare frente_colunas = union { object { frente } object { coluna_e } object { coluna_d } } #declare porta = union { box { <-0.5, -2, -2>, <-0.45,2,-1.2> texture { pigment { color Gray } } } box { <-0.45,-1.8,-1.8>, <-0.4,-1.2,-1.1> pigment { color Black } } box { <-0.45,1.1,-1.8>, <-0.4,1.8,-1.1> pigment { color Black } } box { <-0.45,-0.9,-1.8>, <-0.4,0.9,-1.1> pigment { color Black } } } #declare frente_lat_col = union { object { frente_colunas } object { lat1 } object { lat2 } object { porta } } #declare frente_lateral = union { object { frente } object { lat1 } object { lat2 } } #declare atras_lateral = object { frente_lateral translate <2,0,0.2> rotate z*180 translate <-2,0,-0.2> translate <-15,0,0> } #declare lateral1 = object { frente translate <2,0,0.2> rotate z*90 translate <-2,0,-0.2> translate <-8,-8,0> } #declare lateral2 = object { frente translate <2,0,0.2> rotate z*(-90) translate <-2,0,-0.2> translate <-8,8,0> } #declare meio = box { <-4,-6,-2>, <-15,6,2.5> texture { textura1 } } #declare imecc = union { object { meio } object { frente_lat_col } object { atras_lateral } object { lateral1 } object { lateral2 } } object { imecc }