// Last edited on 2023-12-30 13:40:54 by stolfi #version 3.7; global_settings { assumed_gamma 2.2 } #include "direcao_do_sol.inc" #include "parametros.inc" background{ color rgb < 0.75, 0.75, 0.85 > } #declare tx_templo = texture{ pigment{ color rgb < 0.50, 0.50, 0.50 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_painel = texture{ pigment{ color rgb < 1, 0, 0 > } finish{ diffuse 0.2 ambient 0.8 } } #declare tx_chao = texture{ pigment{ color rgb < 0.40, 0.60, 0.40 > } finish{ diffuse 0.9 ambient 0.1 } } #declare templo = union{ cylinder{<-0.7,-0.7,0>, <-0.7,-0.7,0.6>, 0.1 texture{tx_templo}} cylinder{<-0.7,+0.7,0>, <-0.7,+0.7,0.6>, 0.1 texture{tx_templo}} cylinder{<+0.7,-0.7,0>, <+0.7,-0.7,0.6>, 0.1 texture{tx_templo}} cylinder{<+0.7,+0.7,0>, <+0.7,+0.7,0.6>, 0.1 texture{tx_templo}} difference { box{<-1,-1,-1>, <1,1,1> texture{tx_templo}} union{ box{<-1,-1,-1>, <1,1,1> rotate<+45, 00,0> translate<0, -1, 1.2> texture{tx_templo}} box{<-1,-1,-1>, <1,1,1> rotate<-45, 00,0> translate<0, +1, 1.2> texture{tx_templo}} box{<-1,-1,-1>, <1,1,1> rotate< 00,+45,0> translate<-1, 0, 1.2> texture{tx_templo}} box{<-1,-1,-1>, <1,1,1> rotate< 00,-45,0> translate<+1, 0, 1.2> texture{tx_templo}} } } } #declare paineis = union{ cylinder{<-0.7,-0.7,0.3>, <-0.7,-0.7,0.5>, 0.15 texture{tx_painel}} cylinder{<-0.7,+0.7,0.3>, <-0.7,+0.7,0.5>, 0.15 texture{tx_painel}} cylinder{<+0.7,-0.7,0.3>, <+0.7,-0.7,0.5>, 0.15 texture{tx_painel}} cylinder{<+0.7,+0.7,0.3>, <+0.7,+0.7,0.5>, 0.15 texture{tx_painel}} box{<-0.3,0,0>, <0.3,0.1,0.4> rotate<+45, 00,0> translate<0, 0.6, 0.1> texture{tx_painel}} box{<-0.3,-0.1,0>, <0.3,0,0.4> rotate<-45, 00,0> translate<0, -0.6, 0.1> texture{tx_painel}} box{<0,-0.3,0>, <0.1,0.3,0.4> rotate<0, -45,0> translate<+0.6, 0, 0.1> texture{tx_painel}} box{<-0.1,-0.3,0>, <0,0.3,0.4> rotate<0, +45,0> translate<-0.6, 0, 0.1> texture{tx_painel}} } #macro templocompleto() union{ object{templo} object{paineis} } #end object{ templocompleto() } box{ <-100,-100,-1>, <100,100, -0.02 > texture{tx_chao} } #local dir_norte = < 0.0, cos(radians(lat)), sin(radians(lat)) >; #local dir_sol = direcao_do_sol(lat, lon, mes, hora); #include "eixos.inc" #local cmp_eixos = 1.0; // object{ eixos(cmp_eixos) } #declare cmin = < -0.9, -0.9, 0.0 >; #declare cmax = < +0.9, +0.9, +0.9 >; #declare centro_cena = (cmin + cmax)/2; #include "gaiola.inc" // object{ gaiola(cmin,cmax) } // object{ gaichao(cmin,cmax) } #include "camsol.inc" #declare raio_cena = 0.65*vlength(cmax-cmin); #declare intens_luz = 1.20; // #declare vista = 3; camsol(centro_cena, raio_cena, vista, dir_norte, dir_sol, intens_luz)