// Fabio Negrello - exercicio 05 // ultima modificacao 09/11/00 background{ color rgb < 1, 1, 1 > } #declare luz=1.65; light_source { < 90.00, 90.00, 0.00 > color rgb < luz, luz, luz > } light_source { < -100.00, 500.00, 0.00 > color rgb < luz/8, luz/8, luz/8 > } camera { location < 27.00, 24.00, 0.00 > //location < 20.00, 5.00, 20.00 > // visao lateral //location < 0.00, 40.00, 0.00 > //visao superior //location < 7.00, 10.00, -10.00 > //look_at < 0.00, 0.00, 0.00 > //centro //look_at < 7.00, 5.00, 0.00 > //corredor //look_at < 0,5,0> look_at < 0.00, 0.00, 0.00 > } #declare bcomp = 9.5; #declare blarg = 5; #declare balt = 6; #declare jlarg = (bcomp/17); #declare dist_centro = (0.65*bcomp); #declare rc = (2*dist_centro)/3; // raio do hexagono central #declare lc = rc/cos(pi/6); // lado do hexagono #declare Firebrick = color red 0.556863 green 0.137255 blue 0.137255; #declare bloco = box { <0,0,0> texture { pigment { Firebrick } } } #declare jacima = box { <0,0,0> texture { pigment { color rgb<1,1,1> } } } #declare pacima = union { box { <-jlarg/5,0,0> translate <0,0,-jlarg/5> texture { pigment { color rgb<1,1,1> } } } box { <-jlarg/5,0,0> translate <0,0,blarg+jlarg/5> texture { pigment { color rgb<1,1,1> } } } box { <0,0,-jlarg/5> translate <-jlarg/5,0,0> texture { pigment { color rgb<1,1,1> } } } box { <0,0,-jlarg/5> translate //+jlarg/5 texture { pigment { color rgb<1,1,1> } } } } #declare janela = union { box { <0,0,0> texture { pigment { color rgb<1,1,1> } } } box { <0,0,0> translate texture { pigment { color rgb<1,1,1> } } } box { <0,0,0> translate <0,balt/3,0> texture { pigment { color rgb<1,1,1> } } } box { <0,0,0> translate <0,2*(balt/3),0> texture { pigment { color rgb<1,1,1> } } } box { <0,0,0> texture { pigment { color rgb<0,0,0> } } translate <0,0,-jlarg/20> } } #declare base_centro = prism { //linear_sweep //linear_spline 0, // sweep the following shape from here ... balt, // ... up through here 7, // the number of points making up the shape ... , <0,lc>, <-rc,lc/2>, <-rc,-lc/2>, <0, -lc>, } #declare base_topo = object { base_centro scale<1/2,1/4,1/2> } #declare calt = 9.5*balt/10; #declare clarg = blarg/3; #declare ccomp = (dist_centro - rc); #declare jan_corr_larg = calt/10; #declare vidraca = color red 0.1 green 0.1 blue 0.1; #declare janela_corredor_frente = box { <0,0,-clarg-0.1*jan_corr_larg> texture { pigment { vidraca } } } #declare janela_corredor_atras = box { <0,0,-0.1*jan_corr_larg> texture { pigment { vidraca } } } #declare corredor = box { <0,0,0> translate texture { pigment { color rgb<1,1,1> } } } #declare janelas_corredor_frente = union { object {janela_corredor_frente translate <0,4*calt/5,0> translate } object {janela_corredor_frente translate <0,3*calt/5,0> translate } } #declare janelas_corredor_atras = union { object {janela_corredor_atras translate <0,4*calt/5,0> translate } object {janela_corredor_atras translate <0,3*calt/5,0> translate } } #declare borda_topo = difference { object { base_centro scale<1,1/10,1> translate <0,balt,0> } object { base_centro scale<0.95,2,0.95> } } #declare LimeGreen = color red 0.196078 green 0.8 blue 0.196078; #declare gramado = box { <-200,-1,-200> <200,0,200> texture { pigment { LimeGreen } } } #declare h=blarg/2; #declare b=blarg*cos(pi/6); #declare calcada_larg = 0.10*bcomp; #declare cdist = (dist_centro+bcomp+(bcomp*0.05))+calcada_larg; #declare calcada = difference { prism { //linear_sweep //linear_spline -1, // sweep the following shape from here ... 0.05, // ... up through here 13, // the number of points making up the shape ... , <(cdist/2)+b, (cdist*cos(pi/6))-h>, <(cdist/2)-b, (cdist*cos(pi/6))+h>, <-(cdist/2)+b, (cdist*cos(pi/6))+h>, <-(cdist/2)-b, (cdist*cos(pi/6))-h>, <-cdist,blarg/2>,<-cdist,-blarg/2>, <-(cdist/2)-b, -(cdist*cos(pi/6))+h>, <-(cdist/2)+b, -(cdist*cos(pi/6))-h>, <(cdist/2)-b, -(cdist*cos(pi/6))-h>, <(cdist/2)+b, -(cdist*cos(pi/6))+h>, , texture { pigment { color rgb<1,1,1> } } } #declare cdist=cdist-calcada_larg; prism { //linear_sweep //linear_spline -2, // sweep the following shape from here ... 0.1, // ... up through here 13, // the number of points making up the shape ... , <(cdist/2)+b, (cdist*cos(pi/6))-h>, <(cdist/2)-b, (cdist*cos(pi/6))+h>, <-(cdist/2)+b, (cdist*cos(pi/6))+h>, <-(cdist/2)-b, (cdist*cos(pi/6))-h>, <-cdist,blarg/2>,<-cdist,-blarg/2>, <-(cdist/2)-b, -(cdist*cos(pi/6))+h>, <-(cdist/2)+b, -(cdist*cos(pi/6))-h>, <(cdist/2)-b, -(cdist*cos(pi/6))-h>, <(cdist/2)+b, -(cdist*cos(pi/6))+h>, , } } #declare calcada_meio = box { <0,-1,-calcada_larg/2>, texture { pigment { color rgb<1,1,1> } } } #declare estrutura_entrada = box { <0,0,0> } #declare entrada = union { difference { object {estrutura_entrada texture { pigment { color rgb<0.7,0.7,0.7> } } translate <0,0,-blarg/4> rotate <0,30,0> } object {estrutura_entrada texture { pigment { color rgb<1,1,1> } } scale <2,8/10,9/10> translate<0,0.15,0> translate <0,0,-blarg/4> rotate <0,30,0> } } light_source { // color rgb < luz/4, luz/4, luz/4 > rotate <0,30,0> } } object {calcada} object {gramado} #declare nblocos = 6; #declare nb = 0; #while (nb } #declare nj = nj + 1; #end object{ jacima translate } #declare nj=0; #while (nj < njanelas) object {janela translate<(nj *2*jlarg)+jlarg,0,jlarg/5+blarg> } #declare nj = nj + 1; #end object{ jacima translate } object { pacima translate <0,balt,0> } translate rotate <0,nb*(360/nblocos),0> } union { object {corredor} object {janelas_corredor_frente #if ((nb / 2)=0) translate <4*ccomp/5,0,0> #else translate #end } object {janelas_corredor_atras #if ((nb / 2)=0) translate #else translate <4*ccomp/5,0,0> #end } translate <0,0,-clarg/2> rotate <0,nb*(360/nblocos),0> } object {calcada_meio rotate <0,30+nb*(360/nblocos),0> } object {entrada rotate <0,nb*(360/nblocos),0> } #declare nb = nb + 1; #end object { base_centro pigment {Firebrick} } object { base_topo translate <0,balt,0> pigment { color rgb<1,1,1>} } object { borda_topo pigment { color rgb<1,1,1>} }