// MC930 - Exemplo de main.pov para o trabalho final // Last edited on 2000-12-14 09:07:40 by mc726 // MONUMENTO #include "colors.inc" #include "textures.inc" #declare centro_do_monumento = < 0.00, 0.00, 1.50 >; #declare cor_tijolo = texture { pigment { color rgb < 1.00, 0.30, 0.10 > } finish { ambient 0.10 diffuse 0.90 } normal { granite 0.50 } } #declare cor_predio = texture { pigment { color Gray } finish { ambient 0.10 diffuse 0.90 } normal { granite 0.50 } } #declare gomo = union { box { < 0.00, -1.00, -3.00 >, < 0.20, -0.70, 1.80 > texture { cor_tijolo } } box { < 0.00, -0.60, -3.00 >, < 0.20, -0.50, 1.80 > texture { cor_predio } } box { < 0.00, -0.40, -3.00 >, < 0.20, -0.30, 1.80 > texture { cor_predio } } box { < 0.00, -0.20, -3.00 >, < 0.20, -0.10, 1.80 > texture { cor_predio } } box { < 0.00, -0.70, 0.30 >, < 0.20, 0.00, 0.40 > texture { cor_predio } } box { < 0.00, -0.70, 1.00 >, < 0.20, 0.00, 1.10 > texture { cor_predio } } } #declare dif_janelas = box { < -0.10 , -3.50 , -2.00 > < 0.30, 3.50, 1.80 > pigment { color Gray } } #declare dif_lateral = box { < -2.50, -0.40, -2.00 > < 2.50, 0.40, 2.50 > pigment { color Gray} } #declare quad_miolo = box { < -0.15, -0.15, 2.50 > < 0.15, 0.15, 2.70 > texture { pigment { Silver } finish { ambient .1 diffuse .4 specular 1 roughness 0.001 reflection .5 metallic } } } #declare parte_predio = union { // retira a parte das janejas de cada parte do predio difference { difference { difference { difference { difference { difference { superellipsoid { < 0.02, 0.10 > texture { cor_predio } scale < 3.50, 3.50, 2.00 > } object { dif_lateral translate < 0.00, 3.10, 0.00 > } } object { dif_lateral translate < 0.00, - 3.10, 0.00 > } } object { dif_janelas rotate < 0.00, 0.00, 90.00 > translate < 0.00, -3.50, 0.00 > } } object { dif_janelas rotate < 0.00, 0.00, 90.00 > translate <0.00, 3.30, 0.00 > } } object { dif_janelas translate < 3.30, 0.00, 0.00 > } } object { dif_janelas translate < -3.50, 0.00, 0.00 > } } // coloca as janelas na frente e atras de cada parte do predio object { gomo translate < -3.50, -1.50, 0.00 > } object { gomo translate < 3.30, -1.50, 0.00 > } object { gomo translate < -3.50, 0.50, 0.00 > } object { gomo translate < 3.30, 0.50, 0.00 > } object { gomo translate < -3.50, 1.50, 0.00 > } object { gomo translate < 3.30, 1.50, 0.00 > } object { gomo translate < -3.50, 2.50, 0.00 > } object { gomo translate < 3.30, 2.50, 0.00 > } object { gomo translate < -3.50, 3.50, 0.00 > } object { gomo translate < 3.30, 3.50, 0.00 > } object { gomo translate < -3.50, -2.50, 0.00 > } object { gomo translate < 3.30, -2.50, 0.00 > } object { gomo translate < -3.50, -0.50, 0.00 > } object { gomo translate < 3.30, -0.50, 0.00 > } //coloca as janelas nas laterais do predio object { gomo rotate < 0.00, 0.00, -90.00 > translate < -2.50, 3.50, 0.00 > } object { gomo rotate < 0.00, 0.00, -90.00 > translate < -2.50, -3.30, 0.00 > } object { gomo rotate < 0.00, 0.00, 90.00 > translate < 2.50, 3.30, 0.00 > } object { gomo rotate < 0.00, 0.00, 90.00 > translate < 2.50, -3.50, 0.00 > } //janelas do meio mais fundo object { gomo rotate < 0.00, 0.00, 90.00 > translate < 0.50, 2.70, 0.10 > } object { gomo rotate < 0.00, 0.00, 90.00 > translate < 0.50, -2.90, 0.10 > } object { gomo rotate < 0.00, 0.00, 90.00 > translate < -2.50, 2.70, 0.10 > } object { gomo rotate < 0.00, 0.00, 90.00 > translate < -2.50, -2.90, 0.10 > } object { gomo rotate < 0.00, 0.00, -90.00 > translate < 2.50, -2.70, 0.10 > } object { gomo rotate < 0.00, 0.00, -90.00 > translate < 2.50, 2.90, 0.10 > } object { gomo rotate < 0.00, 0.00, -90.00 > translate < -0.50, -2.70, 0.10 > } object { gomo rotate < 0.00, 0.00, -90.00 > translate < -0.50, 2.90, 0.10 > } box { < -0.10, 2.90, -3.00 >, < 0.10, 2.60, 1.90 > texture { cor_predio } } box { < -0.10, -2.90, -3.00 >, < 0.10, -2.60, 1.90 > texture { cor_predio } } box { < -2.50, 2.60, 1.80 > < 2.50, 2.90, 2.00 > texture { cor_predio } } box { < -2.50, -2.90, 1.80 > < 2.50, -2.60, 2.00 > texture { cor_predio } } } #declare parte_miolo = prism { conic_sweep linear_spline 0, // height 1 1, // height 2 5, // the number of points making up the shape... <4,4>,<-4,4>,<-4,-4>,<4,-4>,<4,4> rotate < 180, 0, 0 > translate < 0.00, 1.00, 0.00 > scale < 1, 4, 1 > texture { cor_predio } } #declare dif_miolo = box { < -4.00, -4.00, 0.50>, < 4.00, 4.00, 2.15 > pigment { color Gray } } #declare dif_teto_miolo = box { < -1.80, -1.80, 2.60 > < 1.80, 1.80, 2.75 > pigment { color Gray } } #declare miolo = union { difference { difference { difference { object { parte_miolo rotate < 90.00, 0.00, 0.00 > translate < 0.00, 0.00, 0.75 > } object { dif_miolo } } object { dif_miolo scale <1.00, 1.00, 2.00 > translate < 0.00, 0.00, 1.75 > } } object { dif_teto_miolo } } object { quad_miolo translate < -1.00, -1.40, 0.00 > rotate < 0.00, 0.00, 45.00 > } object { quad_miolo translate < -1.00, -0.40, 0.00 > } object { quad_miolo translate < -1.00, 0.40, 0.00 > } object { quad_miolo translate < -1.00, 1.20, 0.00 > } object { quad_miolo translate < 1.00, -1.50, 0.00 > rotate < 0.00, 0.00, -60.00 > } object { quad_miolo translate < 1.00, -0.40, 0.00 > } object { quad_miolo translate < 1.00, 0.40, 0.00 > } object { quad_miolo translate < 1.00, 1.20, 0.00 > } } #declare parte_anexo = box { < 0.00, 0.00, -3.00 > < 0.50, 1.25, 2.50 > texture { cor_tijolo } } #declare dif_anexo = box { < -3.50, 0.00, 0.00 > < 3.50, 2.00, 2.00> pigment { color rgb < 1.00, 0.30, 0.10 > } rotate < -20.00, 0.00, 0.00 > } #declare pilar_centro_anexo = box { < 0.00, 0.00, -3.00 > < 0.50, 0.60, 0.85 > texture{ cor_tijolo } } #declare parte_centro_anexo = box { < -0.50, 0.00, 0.00 > < 4.50, 0.40, 1.75 > texture{ cor_predio } } #declare parte_detalhe_centro_anexo = box { < 0.00, 0.50, 0.00 > < 0.10, 0.60, 1.75 > texture{ cor_predio } } #declare parte_detalhe_centro_anexo_2 = box { < 0.00, 0.50, 0.75 > < 4.00, 0.60, 0.95 > texture{ cor_predio } } #declare detalhe_centro_anexo = union { object { parte_detalhe_centro_anexo_2 translate < 0.00, 0.00, 0.00 > } object { parte_detalhe_centro_anexo translate < 0.20, 0.00, 0.00 > } object { parte_detalhe_centro_anexo translate < 0.40, 0.00, 0.00 > } object { parte_detalhe_centro_anexo translate < 0.60, 0.00, 0.00 > } object { parte_detalhe_centro_anexo translate < 0.80, 0.00, 0.00 > } object { parte_detalhe_centro_anexo translate < 1.00, 0.00, 0.00 > } object { parte_detalhe_centro_anexo translate < 1.20, 0.00, 0.00 > } object { parte_detalhe_centro_anexo translate < 1.40, 0.00, 0.00 > } object { parte_detalhe_centro_anexo translate < 1.60, 0.00, 0.00 > } object { parte_detalhe_centro_anexo translate < 1.80, 0.00, 0.00 > } object { parte_detalhe_centro_anexo translate < 2.00, 0.00, 0.00 > } object { parte_detalhe_centro_anexo translate < 2.20, 0.00, 0.00 > } object { parte_detalhe_centro_anexo translate < 2.40, 0.00, 0.00 > } object { parte_detalhe_centro_anexo translate < 2.60, 0.00, 0.00 > } object { parte_detalhe_centro_anexo translate < 2.80, 0.00, 0.00 > } object { parte_detalhe_centro_anexo translate < 3.00, 0.00, 0.00 > } object { parte_detalhe_centro_anexo translate < 3.20, 0.00, 0.00 > } object { parte_detalhe_centro_anexo translate < 3.40, 0.00, 0.00 > } object { parte_detalhe_centro_anexo translate < 3.60, 0.00, 0.00 > } object { parte_detalhe_centro_anexo translate < 3.80, 0.00, 0.00 > } } #declare centro_anexo = union { object { parte_centro_anexo } object { pilar_centro_anexo translate < 1.00, 0.00, 0.00 > } object { pilar_centro_anexo translate < 2.50, 0.00, 0.00 > } object { detalhe_centro_anexo } translate <0.00, -0.50, 0.00 > } #declare parte_inclinada_anexo = box { < -0.10, 0.00, 0.00 > < 0.60, 1.40, 0.10> texture { cor_predio } rotate < -20.00, 0.00, 0.00 > } #declare anexo_lateral = union { difference { union { object { parte_anexo translate < 2.25, 8.50, 0.00 > } object { parte_anexo translate < -2.75, 8.50, 0.00 > } object { centro_anexo translate < -2.00, 8.50, 0.00 > } } object { dif_anexo translate < 0.00, 8.25, 2.50 > } } object { parte_inclinada_anexo translate < 2.25, 8.50, 2.40 > } object { parte_inclinada_anexo translate < -2.75, 8.50, 2.40 > } } #declare predio_principal = union { union { difference { object { parte_predio translate < 0.00, -4.50, 0.50 > } box { < -3.75, -8.25, -3.25 > < 3.75, -0.75, 0.00 > pigment { color Gray } } } box { < -3.00, -7.50, -3.00 > < 3.00, -1.50, 0.00 > texture{ cor_predio } } } union { difference { object { parte_predio translate < 0.00, 4.50, 0.50 > } box { < -3.75, 0.00, -3.25 > < 3.75, 8.25, 0.00 > pigment { color Gray} } } box { < -3.00, 1.50, -3.25 > < 3.00, 7.50, 0.00 > texture { cor_predio } } } object { miolo translate < 0.00, 0.00, 0.65 > scale < 0.80, 1.00, 1.00 > } } #declare parte_teto_predio_pequeno_1_1 = box{ < 0.20, 0.20, 2.00> < 6.80, 1.00, 2.50 > texture{ cor_tijolo } } #declare parte_teto_predio_pequeno_1_2 = box{ < 0.30, 0.20, 2.50> < 6.70, 0.90, 2.60 > texture { cor_predio } } #declare parte_teto_predio_pequeno_1 = union { object { parte_teto_predio_pequeno_1_1 } object { parte_teto_predio_pequeno_1_2 } } #declare parte_teto_predio_pequeno_2 = box{ < 0.20, 1.30, 2.00> < 6.80, 2.40, 2.20 > texture {cor_predio } } #declare parte_teto_predio_pequeno_3 = box{ < 0.20, 2.40, 2.00> < 6.80, 3.50, 2.10 > texture {cor_predio } } #declare parte_teto_predio_pequeno_4 = box{ < 0.20, 1.00, 2.00> < 6.80, 1.30, 2.40 > texture {cor_predio } } #declare parte_teto_predio_pequeno_5 = box{ < 0.20, 3.50, 2.00> < 6.80, 4.00, 2.05 > texture {cor_predio } } #declare parte_teto_predio_pequeno_6 = box{ < 0.20, 0.10, 2.00> < 6.80, 0.20, 2.50 > texture {cor_predio } } #declare teto_predio_pequeno = union { object { parte_teto_predio_pequeno_1 } object { parte_teto_predio_pequeno_2 } object { parte_teto_predio_pequeno_3 } object { parte_teto_predio_pequeno_4 } object { parte_teto_predio_pequeno_5 } object { parte_teto_predio_pequeno_1 translate < 0.00, 3.80, 0.00 > } object { parte_teto_predio_pequeno_6 } object { parte_teto_predio_pequeno_6 translate < 0.00, 4.70, 0.00 > } } #declare predio_pequeno = union { object { teto_predio_pequeno scale < 1.00, 1.00, 1.00 > } box { < 0.00, 0.00, 0.00 > < 7.00, 5.00, 2.00 > texture{ pigment { brick pigment{ color Gray }, pigment{ color rgb < 1.00, 0.30, 0.10 > } } scale < 0.25, 0.25, 0.25 > } } } #declare monumento = union { object { predio_principal translate < 0.00, 0.00, 2.00 > } object { anexo_lateral translate < 0.00, 0.00, 2.00 > } object { predio_pequeno translate < -11.50, 2.00, 0.00 > } object { predio_pequeno translate < 4.50, 2.00, 0.00 > } object { predio_pequeno translate < -11.50, -7.00, 0.00 > } object { predio_pequeno translate < 4.50, -7.00, 0.00 > } } object { monumento } // PAVIMENTO #declare cor_chao = texture { pigment { color < 0.00, 1.00, 0.00 > } finish { ambient 0.10 diffuse 0.90 } normal { granite 0.50 } } #declare pavimento = plane {z,0 texture { cor_chao } // pigment { color Black } scale 10 } object { pavimento } // EIXOS #declare eixos_cartesianos = union { cylinder { <-10,0,0>, <10,0,0>, 0.05 pigment { color rgb <1,0,0> } } cylinder { <0,-10,0>, <0,10,0>, 0.05 pigment { color rgb <0,1,0> } } cylinder { <0.00,0.00,-10>, <0.00,0.00,10>, 0.05 pigment { color rgb <0,0,1> } } } //object { eixos_cartesianos } // FUNDO background{ color rgb < 1.00, 1.00, 1.00 > } // CaMeRA #declare centro_da_cena = centro_do_monumento + < 1.00, 1.00, -1.00 > ; #declare raio_da_cena = 7.00 ; #declare direcao_da_camera = vnormalize( < 1.00, 1.00, 1.00 > ); #declare dist_da_camera = 6.00 * raio_da_cena; #declare pos_da_camera = centro_da_cena + dist_da_camera * direcao_da_camera; camera { location pos_da_camera right < -0.64, 0.00, 0.00 > up < 0.00, 0.48, 0.00 > sky z look_at centro_da_cena } // ILUMINAÇÃO #declare direcao_da_luz = vrotate(direcao_da_camera, < 10, 10, 10 >); #declare intens_da_luz = 1.00; light_source { < 100.00, 0.00, 1.00 > color rgb 2 * < 1, 1, 1 > } light_source { < -100.00, 0.00, 1.00 > color rgb 2 * < 1, 1, 1 > } light_source { < 0.00, 100.00, 1.00 > color rgb 2 * < 1, 1, 1 > } light_source { < 0.00, -100.00, 1.00 > color rgb 2 * < 1, 1, 1 > } light_source { 20 * raio_da_cena * direcao_da_luz color rgb intens_da_luz * < 1, 1, 1 > }