//Leandro Brioschi de Oliveira //MC 930 21-12-2000 Exercicio Pov_Ray - Professor Stolfi #include "colors.inc" #include "textures.inc" #include "stones.inc" #include "metals.inc" #include "woods.inc" #include "skies.inc" background { SkyBlue } light_source { <18, 15, -15> White } //plane { y, -0.01 // texture { grama} //} camera { location < -15,20, -10> look_at <25, 1, 17 > } #declare textura_do_telhado = texture { pigment { color rgb <0.602, 0.338, 0.300> } finish { ambient 0.4 diffuse 0.35 specular 0.15 roughness 0.1 } normal { average normal_map { [ 1.8 gradient x ramp_wave scale 0.20 ] [ 1 gradient z sine_wave scale 0.15 ] } } scale 1.2 } #declare Q229_WhitePlaster = texture { pigment { color rgb <0.969, 0.969, 0.962> } finish { ambient 0.55 diffuse 0.4 specular 0.15 roughness 0.1 } } #declare Q229_Roof = object { union { difference { box { <-4.5, 0, 0> <5, 2, 7> } plane { x, 0 rotate -z*65 translate -4.5*x } plane { -x, 0 rotate z*65 translate 5*x } plane { -y, 0 translate y*1.8 } plane { z, 0 rotate x*65 } plane { -z, 0 rotate -x*65 translate z*7 } } box { <-4.3, -0.2, 0.2> <4.8, 0, 6.8> texture { Q229_WhitePlaster } } difference { box { <-4.5, 0, 0> <0.75, 2, 5> } plane { x, 0 rotate -z*65 translate -4.5*x } plane { -x, 0 rotate z*65 translate 0.75*x } plane { z, 0 rotate x*65 } translate -z*2 } box { <-4.3, -0.2, 0.2> <0.55, 0, 5> translate -z*2 texture { Q229_WhitePlaster } } difference { box { <-4.5, 0, 2> <0.75, 2, 7> } plane { x, 0 rotate -z*65 translate -4.5*x } plane { -x, 0 rotate z*65 translate 0.75*x } plane { -z, 0 rotate -x*65 translate z*7 } translate z*2 } box { <-4.3, -0.2, 2> <0.55, 0, 6.8> translate z*2 texture { Q229_WhitePlaster } } texture { textura_do_telhado rotate y*90 } //scale 1.15 } } #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> ] } }//{ color Green } normal { bumps 0.9 scale 0.005 } finish { phong 1} } #declare tijolos = texture { brick //---------- Mortar Texture texture { pigment { color rgb <0.894, 0.871, 0.849> } finish { ambient 0.45 diffuse 0.4 specular 0.2 roughness 0.05 crand 0.1 } } //---------- Brick Texture texture { pigment { bozo colour_map { [ 0.00 color rgb <0.944, 0.721, 0.499> ] [ 0.33 color rgb <0.923, 0.585, 0.240> ] [ 0.66 color rgb <0.805, 0.385, 0.201> ] [ 1.00 color rgb <0.901, 0.672, 0.201> ] } turbulence 1 } finish { ambient 0.45 diffuse 0.35 specular 0.2 roughness 0.05 crand 0.15 } normal { average normal_map { [ 1 bozo 0.6 turbulence 0.75 ] [ 1 crackle 0.4 ] } scale 0.1 } } brick_size <2.35, 1, 1> mortar 0.275 //0.4 scale 0.125 } #declare cinza_rugoso = texture { pigment { bozo colour_map { [ 0.00 color rgb <0.7, 0.7, 0.7> ] [ 0.33 color rgb <0.71, 0.74, 0.7> ] [ 0.66 color rgb <0.75, 0.73, 0.7> ] [ 1.00 color rgb <0.76, 0.71, 0.7> ] } } normal { bumps 0.9 scale 0.005 } finish { phong 1} } #declare muro_da_frente = box { < 0.00, 0.00, 0.00 >, < 8.0, 2.00, 0.20 > texture {cinza_rugoso} } #declare muro_do_fundo = box { < 0.00, 0.00, 35 >, < 50 , 2.00, 35.2 > texture {cinza_rugoso} } #declare muro_lateral_esquerda = box { < 0.00, 0.00, 0.00 >, < .2, 2.00, 35 > texture {cinza_rugoso} } #declare muro_lateral_direita = box { < 50.00, 0.00, 35.00 >, < 50.2, 2.50, 0 > texture {cinza_rugoso} } #declare teto_casa = prism { conic_sweep linear_spline 0, // height 1 1, // height 2 5, // the number of points making up the shape... <2,12>,<2.5,3.5>,<2,28>,<12,28>,<40,40> rotate <180, 0, 0> translate <0, 1, 0> scale <1, 4, 1> pigment { gradient y scale .2 } } #declare grama_basica = box {<-2,-0.1,-2> <52,0,37> texture {grama} } #declare portao2 = box { <17, 0 ,0.2> <20, 2, 0.3 > pigment { Brown} } #declare piscina = box { <31, 0.03, 32> <41, -1, 27> texture {Water} } #declare solar = box { < 50.0, 0, 35 >, < 44.0, 1.5, 24 > pigment {Gray} } #declare corrimao_solar = union{ cylinder {<44.1,1.5,34.02> <44.05,2.3,34> .1 pigment {Gray} } cylinder {<44.1,1.5,29> <44.1,2.3,29> .1 pigment {Gray} } cylinder {<44.1,1.5,24.1> <44.1,2.3,24.1> .1 pigment {Gray} } cylinder {<44.1,2.2,34.02> <44.1,2.2,24.2> .02 pigment {Gray} } cylinder {<44.1,1.8,34.02> <44.1,1.8,24.2> .02 pigment {Gray} } cylinder {<44.2,1.8,24.1> <50.1,1.8,24.1> .02 pigment {Gray} } cylinder {<44.2,2.2,24.1> <50.1,2.2,24.1> .02 pigment {Gray} } blob { threshold .65 cylinder { <42.22,0.9,34.02> <44.1,2.2,34.02> .02 13 pigment {Gray} } //lower pinky cylinder { <42.22,0.2,34.02> <42.22,0.9,34.02> .02 13 //upper pinky pigment { Gray } } cylinder { <42.22,0.5,34.02> <44.1,1.8,34.02> .02 13 //upper pinky pigment { Gray } } } } #declare escada_solar = union { box { < 33.0, 0, 35 >, < 32.7, 1.5, 34 > pigment {Yellow} } box { < 32.7, 0, 35 >, < 32.4, 1.3, 34 > pigment {Yellow} } box { < 32.4, 0, 35 >, < 32.1, 1.1, 34 > pigment {Yellow} } box { < 32.1, 0, 35 >, < 31.8, 0.8, 34 > pigment {Yellow} } box { < 31.8, 0, 35 >, < 31.5, 0.5, 34 > pigment {Yellow} } box { < 31.5, 0, 35 >, < 31.2, 0.2, 34 > pigment {Yellow} } } #declare pilar_churras = box { < 21, 0, 28 >, < 21.5, 2.5, 28.5 > texture {tijolos} } #declare pilar2_churras = box { < 21.5, 2.5, 28.1>, < 27.5,2.2, 28.4> texture {cinza_rugoso} } #declare pilares = union {object {pilar_churras} object {pilar2_churras} object {pilar_churras translate <6.5,0,0>} } #declare murinho_churras = union{ box { < 21, 0, 28.5>, < 21.3,0.6, 31.5> texture {tijolos} } box { < 20.98, 0.6, 28.5>, < 21.32,0.62, 31.5> pigment {Yellow} } } #declare churrasqueira = union { prism { conic_sweep linear_spline 0, // height 1 1, // height 2 5, // the number of points making up the shape... <-.5,-.35>,<.5,-.35>,<.5,.35>,<-.5,.35>,<-.5,-.35> rotate <180, 0, 0> scale <1, .5, 1> translate <26, 1.8, 34.65> texture { tijolos } } difference{ box {<25.5,0,34.3> <26.5,1.3,35> texture {tijolos} } box {<25.6,0.9,34.3> <26.4,1.3,34.9> pigment {Black} } } box {<25.5,1,34.3> <21,0.97,35> pigment {Black} } box {<25.5,0,34.3> <21,0.97,35> pigment {White} } } #declare teto_churras = box { < 0, 0, 35>, < 4,0.2, 27> texture {textura_do_telhado} } #declare casa = box { < 2,0, 2>, < 12,2.5,28> texture {tijolos} } #declare area_marmore_piscina = box { < 28,0, 35>, < 44,0.025,24> pigment {Yellow} } #declare coluna_portao = union { box {<0,0,0> <.30,2.20,0.30> pigment {Yellow} } box {<-.1,2.2,-.05> <.4,2.35,0.35> pigment {Yellow} } box {<-.2,2.35,-.1> <.5,2.5,0.4> pigment {Yellow} } } #declare detalhe_1 = box { <.05,.1,0> <.25,2.1,.03> texture {cinza_rugoso} } #declare detalhe_2 = cylinder { <0.05,0.1,-0.1> <0.05,0.1,0.031> 0.05 texture {cinza_rugoso} // open } #declare coluna_final = difference { object {coluna_portao} difference {object {detalhe_1} union {object {detalhe_2 } object {detalhe_2 translate <.2,0,0>} object {detalhe_2 translate <.2,2,0> } object {detalhe_2 translate <0,2,0> } } } } #declare i=1; #declare j=1; #declare raio = 1/20; #declare detalhe = union{ #while (i<5) difference{ difference{ cylinder { <0,0,0> <0,0,0.03> #declare raiomaior= raio*i; raiomaior pigment {Gray} } cylinder { <0,0,-.1> <0,0,0.4> #declare raiomenor= raiomaior-0.03; raiomenor pigment {Gray} } } box {<0,-1,-.1> <.4,1,1> pigment {Gray} } translate <0,-(raiomenor*j-raio),0> #if (i=2) scale <-1,1,1>#end} #declare j=i; #declare i=i*2; #end } #declare detalhe2= union{ object {detalhe} object {detalhe scale <-1,-1,1> translate <0,-.96,0> } object {detalhe scale <1,-1,1> translate <0,.13,0>} object {detalhe scale <-1,1,1> translate <0,1.09,0> } } #declare detalhe3 = union { object {detalhe2} object {detalhe2 scale <-1,1,1> translate <.4,0,0>} } #declare detalhe4 = cylinder { <-.23,1.30,0.03> <-.23,-1.10,0.03> 0.03 pigment {Gray} } #declare detalhe5 = union { object {detalhe3} object {detalhe4} object {detalhe4 translate <.86,0,0>} } #declare detalhe_portao = #declare aux=1; #declare aux2=0; union { #while (aux2<4) #while (aux<3) object {detalhe5 scale <.5,.25,1> translate } #declare aux=aux+1; #end #declare aux2=aux2+1; #declare aux=1; #end } #declare base_portao = box { <0, 0, 0>, <.92, 1.7, 0.6> pigment { Gray } } #declare basizinha = box { <0, 0, 0>, <.92, 0.03, 0.03> pigment { Gray } } #declare base_portao_negativa = box { <0, 0, -.1>, <.92, 1.7, 0.7> pigment { Gray } } #declare superior_portao = cylinder { <0.46, 1.7 , 0.0> <0.46, 1.7 , 0.6> 0.46 pigment { Gray } } #declare superior_portao2= cylinder { <0.46, 1.7 , 0.015> <0.46, 1.7 , 0.045> 0.46 pigment { Gray } } #declare arco = difference { difference { object {superior_portao2} cylinder { <0.46, 1.7 , -0.1> <0.46, 1.7 , 0.1> 0.43 pigment { Gray } } } object {base_portao_negativa} } #declare portao = union { difference {object {superior_portao} object {base_portao_negativa} } object {base_portao} } #declare portao_final = union { intersection{ object {portao} object {detalhe_portao translate <-.31,.3,0> } } object {arco} object {basizinha} } #declare detalhe_muro = #declare aux3=1; union { #while (aux3<18) object {detalhe5 scale <.5,.25,1> translate } #declare aux3=aux3+1; #end } #declare coluna_cima = union { box {<.3,1.8,0.05> <8,1.6,0.25> pigment {Yellow} } box {<.3,1,.05> <8,0.8,0.25> pigment {Yellow} } box {<.3,.8,.05> <8,0,0.25> texture {cinza_rugoso} } } #declare coluna_cima2 = union{ box {<0,1.8,0.05> <4.6,1.6,0.25> pigment {Yellow} } box {<0,1.6,.05> <4.6,0,0.25> texture {cinza_rugoso} } } #declare coluna_cima3 = union{ box {<0,1.8,0.05> <24.85,1.6,0.25> pigment {Yellow} } box {<0,1.6,.05> <24.85,0,0.25> texture {cinza_rugoso} } } //Uniao da cena com os respectivos objetos union { //object {casa} object {teto_churras rotate <0,0,21> translate <21.67,2.5,0>} object {teto_churras scale <-1,0,0> rotate <0,0,-21> translate <29.2, 2.5,0>} object {pilares} object {pilares translate <0,0,3> } object {murinho_churras} object {solar} object {escada_solar translate <11,0,0> } object {piscina} object {muro_do_fundo } object {muro_lateral_esquerda } object {muro_lateral_direita } object {difference {object {area_marmore_piscina} object {piscina} } } object {grama_basica} object {corrimao_solar} object {coluna_final} object {coluna_final translate <8,0,0> } object {coluna_final translate <9.25,0,0>} object {coluna_final translate <21.55,0,0>} object {coluna_final translate <24.85,0,0>} object {portao_final translate <8.3,0.15,0>} object {detalhe_muro translate <0,1.27,.15> } object {coluna_cima} object {detalhe_muro translate <9.25,1.27,.15> } object {coluna_cima translate <9.25,0,0>} object {coluna_cima2 translate <16.95,0,0>} object {coluna_cima3 translate <25.15,0,0>} } object {churrasqueira}