//***************************************************************// //* *// //* Leandro Brioschi de Oliveira *// //* MC 930 Projeto final - Pov_Ray - Professor Stolfi *// //* *// //* Plano cartesiano: *// //* x orientado para direita e esquerda *// //* y orientado para altura (abaixo, acima) *// //* z orientado para dentro e fora da tela *// //* y orientado para altura (abaixo, acima) *// //* *// //***************************************************************/ #include "colors.inc" // Arquivos de referencia do programa #include "textures.inc" #include "stones.inc" #include "metals.inc" #include "woods.inc" #include "skies.inc" #include "glass.inc" #include "finish.inc" light_source { <25,10,-18> White fade_power .5} // pontos de luz espalhados de forma light_source { <49,1.2,34> White fade_power .5} // a se obter uma renderização mais light_source { <13.5,2,30> White} // clara possível light_source { <7.3,1,8.5> White fade_power .5} light_source { <6,1.9,21> White} camera { // posicionamento da camera location < 51,9,-18> // na diagonal forntal da casa look_at <18, 1, 30> /* location camera alternativa 2 location < -1,9,-18> look_at <32, 1, 30> */ } plane { y,50 // Céu ao fundo com texturização texture { // azul e efeitos para nuvens pigment { SkyBlue } finish { ambient 0.8 diffuse 1} } texture { pigment { bozo turbulence 0.1 color_map { [0 White] [1 White filter 1] } } finish { ambient 1 diffuse 0 } scale <1500, 475, 612> rotate <5, 45, 0> } rotate x*14} #declare textura_do_telhado = texture { // textura usada no telhado pigment { color rgb <0.851, 0.500, 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 textura_do_portao = texture { // textura usada no portao pigment { P_WoodGrain12B color_map { M_Wood18B }} 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 } // textura usada ao redor das portas #declare detalhe_muro_portas = // e envolta dos muros texture { pigment { bozo colour_map { [0.50 color rgb <0.999, 0.976, 0.756>] [1.00 color rgb <0.999, 0.976, 0.702>] } } normal { bumps 0.1 scale 0.005 } finish { phong 1} } #declare concreto = texture { // textura usada na coluna da churrasqueira pigment { // rampa da garagem e calçada da rua bozo colour_map { [ 0.00 color rgb <0.850, 0.850, 0.850> ] [ 0.33 color rgb <0.885, 0.885, 0.885> ] [ 0.66 color rgb <0.835, 0.835, 0.835> ] [ 1.00 color rgb <0.815, 0.815, 0.815> ] } turbulence 1 } finish { ambient 0.4 diffuse 0.35 crand 0.1 } normal { average normal_map { [ 1 bozo 0.6 turbulence 0.75 ] [ 0.1 crackle 0.1 ] } scale 0.5 } } #declare grama = // Textura com efeito de grama para texture { // chao 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 = // Textura de tijolos para a casa muros e colunas 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 textura_aoredor_piscina = // Textura colocada ao redor da piscina texture { // e sobre os murinhos brick //---------- Mortar Texture texture { pigment { color rgb <0.404, 0.401, 0.409> } finish { ambient 0.45 diffuse 0.4 specular 0.2 roughness 0.05 crand 0.1 } } //---------- Brick Texture texture { pigment { bozo color_map {[0.00 color rgb <0.999,0.996,0.405>] [0.20 color rgb <0.860,0.681,0.337>] [0.66 color rgb <0.999,0.997,0.615>] [1.00 color rgb <0.400,0.400,0.337>] } 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 <5, 4, 4> mortar 0.127 //0.4 scale 0.125 } #declare tijolos2 = // Textura de tijolos com variacao do parametro texture { // Bricksize que altera o formato do tijolo em brick // um dos eixos //---------- 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 <1,1,2> mortar 0.15//0.4 scale 0.125 } #declare textura_chao = // Textura para cimulacao da lajota do chao texture { // com efeito de brilho mudança no parametro brick // finish //---------- Mortar Texture texture { pigment { color rgb <0.794, 0.771, 0.749> } 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.700, 0.000, 0.100> ] [ 0.33 color rgb <0.670, 0.002, 0.150> ] [ 0.5 color rgb <0.424, 0.001, 0.000> ] [ 1.00 color rgb <0.670, 0.003, 0.149> ] } turbulence 1 } finish {specular 15 roughness 0.007} normal { average normal_map { [ 1 bozo 0.6 turbulence 0.75 ] [ 1 crackle 0.4 ] } scale 0.1 } } brick_size <3, 3, 3> mortar 0.275 //0.4 scale 0.125 } #declare cinza_rugoso = // Textura criada para os muros texture { // com leve aspecto rugoso 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 piche = // Textura aplicada a rua texture { pigment { granite colour_map { [ 0.00 color rgb <0.149, 0.149, 0.149> ] [ 0.33 color rgb <0.152, 0.152, 0.152> ] [ 0.66 color rgb <0.138, 0.149, 0.149> ] [ 1.00 color rgb <0.149, 0.015, 0.015> ] } } normal { bumps 0.9 scale 0.005 } finish { phong 1} } #declare terra = // Textura de terra para o canteirinho texture { pigment { bozo colour_map { [ 0.00 color rgb <0.602, 0.340, 0.295> ] [ 0.33 color rgb <0.605, 0.338, 0.296> ] [ 0.66 color rgb <0.601, 0.342, 0.302> ] [ 1.00 color rgb <0.593, 0.336, 0.300> ] } } normal { bumps 0.9 scale 0.005 } finish { phong 1} } //*******************************************************************************// // Descrição dos objetos que irao compor a cena, // // muros, colunas janelas telhados, e os respectivos // // detalhes menores // // // //*******************************************************************************// #declare muro_da_frente = box { < 0.00, 0.00, 0.00 >, < 8.0, 2.00, 0.20 > texture {cinza_rugoso} } #declare muro_lateral_esquerda = union { box { < 0.00, 0.00, 3.00 >, < .2, 1.60, 35.2 > texture {cinza_rugoso} } box { < 0.00, 1.60, 3 >, < .2, 1.8, 35.2> texture{detalhe_muro_portas} } } #declare muro_lateral_direita = union{ box{ < 50.00, 0.00, 3 >, < 50.2, 1.6, 24 > texture {cinza_rugoso} } box { < 50.00, 1.6, 3 >, < 50.2, 1.8, 24> texture{detalhe_muro_portas} } box{ < 50.00, -1.5, 24 >, < 50.2, 2.3, 35.2 > texture {cinza_rugoso} } box { < 50.00, 2.3, 24.00 >, < 50.2, 2.5, 35.2> texture{detalhe_muro_portas} } } #declare portao2 = box { <25.10, 0 ,0.3> <28.45, 2, 0.4 > texture {textura_do_portao} } #declare piscina = box { <31, 0.03, 32> <41, -1, 27> texture {Water} } #declare rampa_auxiliar = union{ difference { box { <44, -.75, -4 >, < 44.2, .75, 4 > texture {cinza_rugoso} } plane { y, 0 rotate x*10.62 } texture {cinza_rugoso} } difference { box {< 50, -.75, -4 >, < 50.2, .75, 4 > texture {cinza_rugoso} } plane { y, 0 rotate x*10.62 } texture {cinza_rugoso} } } #declare grama_basica = difference { box {<-165,-0.1,1> <165,-.01,47> texture {grama} } box {<44.2,-0.2,16> <50,.02,35> texture {grama} } object {piscina} box {< 50.0, -1.5, 35 >, < 44.0, 1.5, 24 > pigment {Gray} } object {rampa_auxiliar translate <0,-.75,20>} } #declare rua= union{ box {<-65,-0.01,1> <100,-.13,0.88> texture {concreto} } box {<-65,-0.14,-40> <100,-.13,.88> texture {piche} } } #declare rampa_garagem = union{ difference { box {< 50, -.75, -4 >, < 44.2, .75, 4 > texture {concreto} } plane { y, 0 rotate -x*10.62 scale -y } texture {concreto } } object {rampa_auxiliar} } #declare buraco_janela_solar = box {< 44.3, .4, 32 >, < 43.9, 1.1, 30 > pigment {Gray} } #declare janela_solar = union{ box {< 44.05, .4, 32 >, < 44.15, 1.1, 30 > texture {T_Glass2} } box {< 44.15, .4, 30.68 >, < 44.16, 1.1, 30.66 > pigment {Cyan} } box {< 44.15, .4, 31.35 >, < 44.16, 1.1, 31.33 > pigment {Cyan} } } #declare solar = union{ difference{ box { < 50.0, -1.5, 35 >, < 44.0, 1.5, 24 > pigment {Gray} } box { < 50.1, -1.6, 35.1 >, < 44.2, 1.3, 23.9 > texture {detalhe_muro_portas} } object {buraco_janela_solar} object {buraco_janela_solar translate <0,0,-4> } } box {< 44, 0, 24 >, < 44.2, .2, 16 > pigment {Gray} } box {< 50, -1.40, 35 >, < 44.2, -1.5, 24 > texture {textura_chao} } object {rampa_garagem translate < 0,-.75 ,20>} object {janela_solar} object {janela_solar translate <0,0,-4>} } #declare corrimao_solar = union{ cylinder {<44.1,1.5,34.02> <44.05,2.3,34> .1 pigment {color rgb <0.451,0.451,0.451>} } cylinder {<44.1,1.5,29> <44.1,2.3,29> .1 pigment {color rgb <0.451,0.451,0.451>} } cylinder {<44.1,1.5,24.1> <44.1,2.3,24.1> .1 pigment {color rgb <0.451,0.451,0.451>} } cylinder {<44.1,2.2,34.02> <44.1,2.2,24.2> .02 pigment {color rgb <0.451,0.451,0.451>} } cylinder {<44.1,1.8,34.02> <44.1,1.8,24.2> .02 pigment {color rgb <0.451,0.451,0.451>} } cylinder {<44.2,1.8,24.1> <50.1,1.8,24.1> .02 pigment {color rgb <0.451,0.451,0.451>} } cylinder {<44.2,2.2,24.1> <50.1,2.2,24.1> .02 pigment {color rgb <0.451,0.451,0.451>} } blob { threshold .65 cylinder { <42.22,0.9,34.02> <44.1,2.2,34.02> .02 13 pigment {color rgb <0.451,0.451,0.451>} } cylinder { <42.22,0.2,34.02> <42.22,0.9,34.02> .02 13 pigment { color rgb <0.451,0.451,0.451>} } cylinder { <42.22,0.5,34.02> <44.1,1.8,34.02> .02 13 pigment { color rgb <0.451,0.451,0.451>} } } } #declare escada_solar = union { box { < 33.0, 1.48, 35 >, < 32.7, 1.5, 34 > texture {textura_aoredor_piscina} } box { < 32.68, 1.3, 35 >, < 32.7, 1.5, 34 > texture {textura_aoredor_piscina} } box { < 33.0, 0.00, 35 >, < 32.7, 1.48, 34 > texture {cinza_rugoso} } box { < 32.7, 1.28, 35 >, < 32.4, 1.3, 34 > texture {textura_aoredor_piscina} } box { < 32.38, 1.1, 35 >, < 32.4, 1.3, 34 > texture {textura_aoredor_piscina} } box { < 32.4, 0.00, 35 >, < 32.7, 1.28, 34 > texture {cinza_rugoso} } box { < 32.38, 1.08, 35 >, < 32.1, 1.10, 34 > texture {textura_aoredor_piscina} } box { < 32.08, .8, 35 >, < 32.1, 1.1, 34 > texture {textura_aoredor_piscina} } box { < 32.1, 0.00, 35 >, < 32.4, 1.08, 34 > texture {cinza_rugoso} } box { < 32.1, 0.78, 35 >, < 31.8, 0.8, 34 > texture {textura_aoredor_piscina} } box { < 31.78, 0.8, 35 >, < 31.8, 0.5, 34 > texture {textura_aoredor_piscina} } box { < 31.8, 0.00, 35 >, < 32.1, 0.78, 34 > texture {cinza_rugoso} } box { < 31.8, 0.48, 35 >, < 31.5, 0.5, 34 > texture {textura_aoredor_piscina} } box { < 31.48, 0.5, 35 >, < 31.5, 0.2, 34 > texture {textura_aoredor_piscina} } box { < 31.8, 0, 35 >, < 31.5, 0.48, 34 > texture {cinza_rugoso} } box { < 31.5, 0.18, 35 >, < 31.2, 0.2, 34 > texture {textura_aoredor_piscina} } box { < 31.2, 0.00, 35 >, < 32.5, 0.18, 34 > texture {cinza_rugoso} } box { < 31.2, 0.0, 35 >, < 31.18, 0.2, 34 > texture {textura_aoredor_piscina} } } #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 {concreto} } #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> texture {textura_aoredor_piscina} } } #declare tijolim_chamineh = box { <-.05, -.05, -.05> <.05, .05, .05> texture {tijolos2}} #declare chamineh = union{ difference{ box { <-.2, -1.3, -.2> <.2, 1.0, .2> texture {tijolos2} } box { <-.1, -1.4, -.1> <.1, 1.1, .1> texture {tijolos2} } } object {tijolim_chamineh translate <-.15,1.05, .15>} object {tijolim_chamineh translate <-.15,1.05,-.15>} object {tijolim_chamineh translate < .15,1.05,-.15>} object {tijolim_chamineh translate < .15,1.05, .15>} box { <-.23, 1.1, -.23> <.23, 1.12, .23> pigment {Gray}} } #declare churrasqueira = union { difference{ prism { conic_sweep linear_spline 0, 1, 5, <-.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 { tijolos2 } } object {chamineh} } difference{ box {<25.5,0,34.3> <26.5,1.3,35> texture {tijolos2}} 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}} object {chamineh translate <26, 2.8, 34.65>} } #declare casa_auxiliar = box { < 2.15,-0.14, 9.10>, < 12.95,6.1,32.95> pigment {White} } #declare casa_auxiliar1 = difference{ box { <1, 0.15, 8.3> <13.6, 5.35, 35> texture {textura_do_telhado} } cylinder {<.7,14.8,0> <.7,14.8,40> 11.5 } cylinder {<13.9,14.8,0> <13.9,14.8,40> 11.5 } texture {textura_do_telhado} } #declare casa_auxiliar2 = difference { box { < 2,0.15, 9>, < 13,6,33> texture {tijolos2} } object {casa_auxiliar} } #declare casa = intersection { object {casa_auxiliar2} object {casa_auxiliar1} } #declare area_marmore_piscina = box { < 28,0, 35>, < 44,0.025,24> texture {textura_aoredor_piscina} } #declare coluna_portao = union { box {<0,0,0> <.30,2.20,0.30> texture{detalhe_muro_portas} } box {<-.1,2.2,-.05> <.4,2.35,0.35> texture{detalhe_muro_portas} } box {<-.2,2.35,-.1> <.5,2.5,0.4> texture{detalhe_muro_portas} } } #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> texture{detalhe_muro_portas} } box {<.3,1,.05> <8,0.8,0.25> texture{detalhe_muro_portas} } 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> texture{detalhe_muro_portas} } box {<0,1.6,.05> <4.6,0,0.25> texture {cinza_rugoso} } } #declare coluna_cima2_2 = union{ box {<0,1.8,0.05> <8.1,1.6,0.25> texture{detalhe_muro_portas} } box {<0,1.6,.05> <8.1,0,0.25> texture {cinza_rugoso} } } #declare coluna_cima3 = union{ box {<0,1.8,0.05> <21.55,1.6,0.25> texture{detalhe_muro_portas} } box {<0,1.6,.05> <21.55,0,0.25> texture {cinza_rugoso} } } #declare colunas_externas = box { <2,0.,6> <2.3,2.3,6.3> texture {tijolos} } #declare murinhos = union{ box { < 2.3, 0, 6>, < 7,0.65, 6.15> texture {tijolos} } box { < 2.3, 0.65, 6>, < 7,0.67, 6.16> texture {textura_aoredor_piscina} } } #declare murinhos2 = union{ box { < 16, 0, 6.3>, < 15.85,0.65, 9.86> texture {tijolos2} } box { < 16, 0.65 6.3>, < 15.84,0.67, 9.86> texture {textura_aoredor_piscina} } } #declare murinhos3 = union{ box { < 16, 0, 10.16>, < 15.85,0.65, 11.66> texture {tijolos2} } box { < 16, 0.65, 10.16>, < 15.84,0.67, 11.66> texture {textura_aoredor_piscina} } } #declare todas_colunas = #declare var =3.86; union { object {colunas_externas translate <0,0,0> } object {colunas_externas translate <5,0,0> } object {colunas_externas translate <8.7,0,0> } object {colunas_externas translate <13.7,0,0> } object {colunas_externas translate <13.7,0,1*var> } object {colunas_externas translate <13.7,0,2*var > } object {colunas_externas translate <13.7,0,3*var > } object {colunas_externas translate <13.7,0,4*var > } object {colunas_externas translate <13.7,0,5*var > } object {colunas_externas translate <13.7,0,6*var > } object {colunas_externas translate <13.7,0,27> } object {murinhos} object {murinhos translate <8.7,0,0>} object {murinhos2} object {murinhos2 translate <0,0,2*var>} object {murinhos2 translate <0,0,3*var>} object {murinhos2 translate <0,0,4*var>} object {murinhos2 translate <0,0,6*var>} object {murinhos3} object {murinhos3 translate <0,0,2.5>} object {murinhos3 translate <0,0,4*var>} object {murinhos3 translate <0,0,4*var+2.5>} } #declare chao_piso = union{ box { <2,0,33> //muro de tras <16,0.01,35> texture {textura_chao} } box { <21,0,28> //churrasqueira <28,0.01,35> texture {textura_chao} } box { <.2,0,3.2> //lateral esquerda <2,0.01,35> texture {textura_chao} } box { <16,0,33> //enfrente canteirinho <21,0.01,34.2> texture {textura_chao} } difference{ box { <2,0,6> <16,0.05,9> //em frente casa texture {textura_chao} } object {todas_colunas} } difference{ box { <13,0,9> //lateral direita <16,0.05,33> texture {textura_chao} } object {todas_colunas} } box { <2,0,9> <13,0.15,33> texture {textura_chao} } } #declare canteirinho = union{ difference { box { <16,0,35> <21,.8,34.2> pigment {Gray} } box { <16.1,0,35> <20.9,.9,34.3> pigment {Brown} } } box { <16.1,0,35> <20.9,.78,34.3> texture {terra} } } #declare detalhe_telhado = object { difference{ difference{ box { <0, 0.13, 0> <9, 1, .05> texture {T_Wood2} } plane { y, 0 rotate z*11.3 scale -1*y translate 1.86*y } plane { y, 0 rotate -z*11.3 scale -1*y } texture {T_Wood2} } difference{ box { <-.1, -.1, -.1> <9.1, .9, 8.8> texture {T_Wood2} } plane { y, 0 rotate z*11.3 scale -1*y translate 1.73*y } plane { y, 0 rotate -z*11.3 scale -1*y translate -.13*y } texture {T_Wood2} } } translate <0,-.1,0> } #declare telhado_churrasqueira = difference{ object { union { object {detalhe_telhado} difference { difference{ box { <0, 0, 0> <9, 1, 8.2> texture {textura_do_telhado} } plane { y, 0 rotate z*11.3 scale -1*y translate 1.86*y } plane { y, 0 rotate -z*11.3 scale -1*y } texture {textura_do_telhado} } difference{ box { <-.1, -.1, -.1> <9.1, .9, 8.8> texture {textura_do_telhado} } plane { y, 0 rotate z*11.3 scale -1*y translate 1.76*y } plane { y, 0 rotate -z*11.3 scale -1*y translate -.1*y } texture {textura_do_telhado} } } } translate <20,2.5,27> } object {chamineh} } #declare muro_auxiliar = box { <21, 0, 34.99> <28, 3.5, 35.21> texture {tijolos} } #declare muro_auxiliar2 = box { <21, 2.5, 34.99> <28, 0, 35.21> texture {tijolos} } #declare muro_auxiliar3 = difference{ box { <-.1, -.1, -.1> <9.1, .9, 8.8> texture {textura_do_telhado} } plane { y, 0 rotate z*11.3 scale -1*y translate 1.76*y } plane { y, 0 rotate -z*11.3 scale -1*y translate -.1*y } texture {textura_do_telhado} } #declare muro_churras = union { intersection { object {muro_auxiliar} object {muro_auxiliar3 translate <20,2.5,27>} } object {muro_auxiliar2} } #declare muro_do_fundo = difference{ union{ box { < 0.00, 0.00, 35 >, < 42 , 1.80, 35.2 > texture {cinza_rugoso} } box { < 0.00, 1.80, 35 >, < 42, 2, 35.2> texture{detalhe_muro_portas} } box { < 42.00, -1.5, 35 >, < 50 , 2.3, 35.2 > texture {cinza_rugoso} } box { < 42.00, 2.3, 35 >, < 50, 2.5, 35.2> texture{detalhe_muro_portas} } } object {muro_churras} } #declare telhado_casa_1 = difference { difference{ box { <1, 3.1, 5> <17, 0, 34> texture {textura_do_telhado} } plane { y, 0 rotate x*9.92 scale -1*y translate 1.43*y } plane { y, 0 rotate -z*9.92 scale -1*y translate 2.13*y } plane { y, 0 rotate z*9.92 scale -1*y translate 5.27*y } } difference { box { <0.9, 3.1, 4.9> <17.1, -.1, 34.1> texture {textura_do_telhado} } plane { y, 0 rotate x*9.92 scale -1*y translate 1.38*y } plane { y, 0 rotate -z*9.92 scale -1*y translate 2.08*y } plane { y, 0 rotate z*9.92 scale -1*y translate 5.19*y } } box { <-1, 3.2, 9> <13, -.1, 34.2> texture {textura_do_telhado} } texture {textura_do_telhado} } #declare telhado_casa_2 = difference { difference{ box { <1, 3.3, 8.4> <13.6, 5.6, 34> texture {textura_do_telhado} } cylinder {<.6,14.8,0> <.6,14.8,40> 11.4 } cylinder {<14,14.8,0> <14,14.8,40> 11.4 } texture {textura_do_telhado} } difference{ box { <1, 3.2, 8.3> <13.6, 5.35, 35> texture {textura_do_telhado} } cylinder {<.7,14.8,0> <.7,14.8,40> 11.5 } cylinder {<13.9,14.8,0> <13.9,14.8,40> 11.5 } texture {textura_do_telhado} } } #declare coroa_porta = difference { union {box { <-.85, -1.1, -.08> <.85, 1.1,.08> } difference {cylinder {<0,-1.1,-.08> <0,-1.1,0.08> 2.46} box { <-3.7, -1.2, -.09> <3.7, 1.1,.09> } } } union { box { <-.7, -1.2, -.09> <.7, 1.12,.09> } difference {cylinder {<0,-1.1,-.09> <0,-1.1,0.09> 2.31} box { <-3.7, -10.1, -1.04> <3.7, 1.1,1.04>} } } box { <-3.7, -10.1, -1> <3.7,-1.1 ,1> } box { <-3.7, -2, -1> <-.85,2,1> } box { <.85, -2, -1> <3.7,1.4,1>} texture{detalhe_muro_portas} } #declare buraco = difference { union {box { <-.85, -1.1, -.08> <.85, 1.1,.08> } difference {cylinder {<0,-1.1,-.08> <0,-1.1,0.08> 2.46} box { <-3.7, -1.2, -.09> <3.7, 1.1,.09> } } } box { <-3.7, -10.1, -1> <3.7,-1.1 ,1> } box { <-3.7, -2, -1> <-.85,2,1> } box { <.85, -2, -1> <3.7,1.4,1>} texture{detalhe_muro_portas} } #declare porta_madeira = union { box { <-.7, -1.1, -.03> <.7, 1.11,.03> } difference {cylinder {<0,-1.1,-.03> <0,-1.1,0.03> 2.31} box { <-3.7, -10.1, -.04> <3.7, 1.1,.04> } } texture {T_Wood5} } #declare porta = union{ object {porta_madeira} object {coroa_porta} } #declare buraco_janela = box { <13.1, 1.6, 20.55> <12.1, 2.45,21.85> pigment {White} } #declare janela = union{ difference { box { <13.1, 1.6, 20.55> <12.9, 2.45,21.85> texture{detalhe_muro_portas} } box { <13.2, 1.75, 20.7> <12.0, 2.3,21.7> texture{detalhe_muro_portas} } } box { <13, 1.75, 20.7> <12.5, 2.3,21.85> texture {T_Glass4} } } // ************ Parte da Grade da varanda ************// #declare i=1; #declare j=1; #declare raio = 1/20; #declare espiral = union{ #while (i<5) difference{ difference{ cylinder { <0,0,-.016> <0,0,.016> #declare raiomaior= raio*i; raiomaior pigment {Gray} } cylinder { <0,0,-.25> <0,0,0.25> #declare raiomenor= raiomaior-0.03; raiomenor pigment {Gray} } } box {<0.01,-1,-.6> <.4,1,1> pigment {Gray} } #if (i=2) scale <-1,1,1> translate <0,-(raio),0> #end #if (i=4) translate <0,raio,0> #end } #declare i=i*2; #end } #declare vara_grade = box {<-.01,-.5,-.01> <.01,.5,.01> pigment {Gray}} #declare vara_grade_2 = union{ box {<-.01,-.5,-1.35> <.01,-.52,1.35> pigment {Gray}} box {<-.01,.5,-1.35> <.01,.52,1.35> pigment {Gray}} } #declare detalhe_grade = object { union{ object {espiral} object {espiral scale <-1,-1,1> translate <0,.47,0> } union {object {espiral} object {espiral scale <-1,-1,1> translate <0,.47,0> } scale <-1,1,1> translate <.4,0,0> } } translate <-.2,-.2,0> rotate <0,90,0> scale <.625,.625,.625> } #declare grade = union { object { detalhe_grade translate <0,-.25,0> } object { detalhe_grade scale <1,-1,1> translate <0,0.25,0> } object {vara_grade translate <0,0,-.26>} object {vara_grade translate <0,0,.26>} } #declare grade_pronta = difference { union { object {grade} object {vara_grade_2} #declare grad = 1; #while (grad<4) object {grade translate <0,0,.54*grad>} #declare grad=grad+1; #end #declare grad=1; #while (grad<4) object {grade translate <0,0,-.54*grad>} #declare grad=grad+1; #end } box {<-1,-1,1.35><1,1,2> pigment {Gray}} box {<-1,-1,-1.35><1,1,-2> pigment {Gray}} } #declare parte_da_frente = union{ object {coluna_final} object {coluna_final translate <8,0,0> } object {coluna_final translate <9.25,0,0>} object {coluna_final translate <25.05,0,0>} object {coluna_final translate <28.35,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_2 translate <16.95,0,0>} object {coluna_cima3 translate <28.65,0,0>} object {portao2} } //************************************************************************// // // // Uniao de todos os objetos para a criacao da cena // // // //************************************************************************// union { object {telhado_casa_1} object {telhado_casa_2} object {todas_colunas} object {chao_piso} object {canteirinho} object {parte_da_frente translate <0,0,3> } object {telhado_churrasqueira} object {pilares} object {pilares translate <0,0,3> } object {murinho_churras} object {solar} object {escada_solar translate <11,0,0> } object {piscina} difference {object {muro_do_fundo } object {muro_churras} } object {muro_churras} object {muro_lateral_esquerda } object {muro_lateral_direita } object {difference {object {area_marmore_piscina} object {piscina} } } object {grama_basica} object {rua} object {corrimao_solar} object {churrasqueira} difference { object {casa} object {buraco_janela translate <0,0,1>} object {buraco_janela translate <0,0,10> } object {buraco translate <4,1.1,9.07> } object {buraco translate <10.8,1.1,9.07> } object {buraco rotate <0,90,0> translate <12.93,1.1,11.2>} object {buraco rotate <0,90,0> translate <12.93,1.1,15.2>} object {buraco rotate <0,90,0> translate <12.93,1.1,18.2>} object {buraco rotate <0,90,0> translate <12.93,1.1,26.2>} } object {janela translate <0,0,1>} object {janela translate <0,0,10>} object {porta translate <4,1.1,9.07> } object {porta translate <10.8,1.1,9.07> } object {porta rotate <0,90,0> translate <12.93,1.1,11.2>} object {porta rotate <0,90,0> translate <12.93,1.1,15.2>} object {porta rotate <0,90,0> translate <12.93,1.1,18.2>} object {porta rotate <0,90,0> translate <12.93,1.1,26.2>} object {grade_pronta translate <2.01,.57,7.65>} }