// MC930 - Trabalho final // Fabio Abreu Hashimoto RA 970640 // Predio do Imecc #include "colors.inc" #include "textures.inc" #include "stones.inc" #include "skies.inc" #include "glass.inc" #declare centro = < -2, 0, 0 >; // CÂMERA camera { location <13, 0, 5> sky z look_at centro } // ILUMINAÇÃO light_source { < 50, 0, 30 > color White } light_source { <50, -200, 30 > color White } light_source { <50, 200, 30 > color White } // elementos decorativos // grama #declare grama = 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> ] } } normal { bumps 0.25 scale 0.005 } finish { phong 1} } #declare chao = plane { z, -1.900001 texture { grama } } // ceu plane { x, -25 texture { pigment { color SummerSky } } } plane { x,-24 texture { T_Cloud3 } scale y*20 scale z*10 } #declare textura2 = pigment { color Gray95 } #declare vermelho = pigment { color Scarlet } #declare terra = texture { pigment { bozo colour_map { //[ 0.00 color rgb <0.85, 0.56, 0.24> ] //[ 0.33 color rgb <0.55, 0.47, 0.14> ] [ 0.00 color rgb <0.45, 0.29, 0.14> ] [ 1.00 color rgb <0.72, 0.45, 0.2> ] } } normal { bumps 0.98 scale 0.005 } finish { phong 1} } #declare textura1 = texture { pigment { bozo colour_map { [ 0.00 color rgb <0.55, 0.55, 0.55> ] [ 0.33 color rgb <0.95, 0.95, 0.95> ] [ 0.66 color rgb <0.65, 0.65, 0.65> ] [ 1.00 color rgb <0.75, 0.75, 0.75> ] } } normal { bumps 0.95 scale 0.005 } finish { phong 1} } #declare vidro = material { texture { pigment { color rgbf <0.3, 0.3, 0.35, 0.9> } normal { bumps , 0.1 scale <0.5, 0.5, 5.0> } finish { ambient 0.3 diffuse 0.3 phong 1.0 phong_size 10.0 specular 0.9 roughness 0.06 reflection 0.1 } } interior { ior 1.1 } } #declare caminho = bicubic_patch { type 1 flatness 0.1 u_steps 3 v_steps 3 <-0.45, -1, -1.9> <1, -1.8, -1.9> <3, -1.9, -1.9> <7, -2, -1.9> <-0.45, -0.5, -1.9> <0.5, -1.5, -1.55> <2, -0.5, -1.4> <7, -1.5, -1.9> <-0.45, 0.5, -1.9> <0.5, 1.5, -1.45> <2, 0.5, -1.5> <7, 1.5, -1.9> <-0.45, 1, -1.9> <1, 1.8, -1.9> <3, 1.9, -1.9> <7, 2, -1.9> texture { terra } } #declare prisma = prism { linear_sweep linear_spline -19, // sweep the following shape from here ... -0.5, // ... up through here 4, // the number of points making up the shape ... <-2,2.5>, <-1,2.5>, <-1.5,3.7>,<-2,2.5> rotate z*(-90) //translate <-4.5,0,0> //pigment { Green } // triangle { <-0.5,-2,2.5>, <-0.5,-1,2.5> , <0,-1.5,3.7> } // triangle { <-0.5,-2,2.5>, <-1.5,-2,2.5>, <0,-1.5,3.7> } // triangle { <-1.5,-2,2.5>, <-1.5,-1,2.5>, <0,-1.5,3.7> } // triangle { <-1.5,-1,2.5>, <-0.5,-1,2.5>, <0,-1.5,3.7> } } #declare prismas = union { object { prisma translate <0,-1,0> texture { textura1 } } object { prisma translate <0,-2,0> texture { textura1 } } object { prisma translate <0,-3,0> texture { textura1 } } object { prisma texture { textura1 } } } // blocos principais #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) // 4 faixas brancas #declare i=0; #declare j=0; union { box { <-2.05,-2.05,-1.3+(n*1)>, <2.05,2.05,-0.8+(n*1)> texture { textura2 } } #while (i < 4) // 5 janelas box { <-2.1,-2+(i*0.82),-1.3+(n*1)>, <2.1,-1.28+(i*0.82),-0.8+(n*1)> material { vidro } } #declare i = i+1; #end #while (j < 4) // 5 janelas box { <-2+(j*0.82),-2.1,-1.3+(n*1)>, <-1.28+(j*0.82),2.1,-0.8+(n*1)> material { vidro } } #declare j = j+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 { prismas } merge { object { chao } object { caminho } } } object { imecc }