//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"
#include "glass.inc"    


 
background { SkyBlue }
light_source { <25,100,18> White }
light_source { <5,10,-8> White }
light_source { <7.3,1,8.5> White }
light_source { <6,1.9,21> White }
  //plane { y, -0.01
  //  texture { grama}
  //}


camera {
  location  < 47,7,-15>

  look_at   < 25, 1, 18 >
    	
}

#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 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 tijolos2 =
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 <1,1,2>
   mortar 0.15//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 terra =
  texture {
      pigment {
      bozo
      colour_map {
         [ 0.00 color rgb <0.439, 0.176, 0.21> ]
         [ 0.33 color rgb <0.42, 0.1, 0.20> ]
         [ 0.66 color rgb <0.44, 0.12, 0.2> ]
         [ 1.00 color rgb <0.46, 0.18, 0.22> ]
      }
      }
      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 =
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>
    pigment {Yellow}
  }
   box {
    < 42.00, 0.00, 35 >,
    < 50 , 2.3, 35.2 >
    texture {cinza_rugoso}
  }
   box {
    < 42.00, 2.3, 35 >,
    < 50, 2.5, 35.2>
    pigment {Yellow}
  }
}


#declare muro_lateral_esquerda =
union {
  box {
    < 0.00, 0.00, 0.00 >,
    < .2, 1.80, 35.2 >
    texture {cinza_rugoso}
  }
  box {
    < 0.00, 1.80, 0.00 >,
    < .2, 2, 35.2>
    pigment {Yellow}
  }
}

#declare muro_lateral_direita =
union{
   box{
    < 50.00, 0.00, 0 >,
    < 50.2, 1.8, 24 >
    texture {cinza_rugoso}
  }
  box {
    < 50.00, 1.80, 0 >,
    < 50.2, 2, 24>
    pigment {Yellow}
  }
   box{
    < 50.00, 0.00, 24 >,
    < 50.2, 2.3, 35.2 >
    texture {cinza_rugoso}
  }
  box {
    < 50.00, 2.3, 24.00 >,
    < 50.2, 2.5, 35.2>
    pigment {Yellow}
  }
}


           
#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 =
difference {
 box {<-2,-0.1,-2>
      <52,-.01,37>
      texture {grama}
      }
 box {<44.2,-0.2,16>
      <50,.02,35>
      texture {grama}
      }

}

     
#declare portao2 =
  box  {
       <21.45, 0 ,0.3>
       <24.95, 2, 0.4 >
       texture {textura_do_telhado}
       }


#declare piscina =
  box { <31, 0.03, 32>
        <41, -1, 27>
      texture {Water}
      }

#declare solar =
union{
difference{
 box {
    < 50.0, -1.5, 35 >,
    < 44.0, 1.5, 24 >
    pigment {Gray}

 }
  box {
    < 50.0, -1.6, 35.1 >,
    < 44.2, 1.3, 23.9 >
    pigment {Gray}

  }
}
box {< 44, 0, 24 >,
    < 44.2, .2, 16 >
    pigment {Gray}

   }
box {< 50, -1.40, 35 >,
    < 44.2, -1.5, 24 >
    pigment {Red}

   }
box {< 50, 0, 35 >,
    < 44.2, -1.5, 16 >
    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 { tijolos2 }
  }
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}
     }

}


#declare teto_churras =
box {
    	< 0, 0, 35>,
    	< 4,0.2, 27>
    	texture {textura_do_telhado}
}



#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 =

//union {
 intersection {
 
        object {casa_auxiliar2}
        object {casa_auxiliar1}
        }
        
    
        
        
 // object {muro_auxiliar2}
                      
//}

#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 <aux*.45,aux2*0.6,0> }
  #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 <aux3*.45,0,0> }
  #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}
      }

}

//Ultima aula 
 
#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>
    	pigment {Yellow}
      }
}                 
   
#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>
    	pigment {Yellow}
      }
}  

#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>
    	pigment {Yellow}
      }
}  
   
   
        
#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>
                pigment {Red}

        } 
               
        box { <21,0,28>       //churrasqueira
              <28,0.01,35>
                pigment {Red}

        }
       
        box { <.2,0,.2>        //lateral esquerda
              <2,0.01,35>
                pigment {Red}

        } 
         box { <16,0,33>      //enfrente canteirinho
              <21,0.01,34.2>
                pigment {Red}

        }
        difference{
       
         box { <2,0,6>
              <16,0.05,9>       //em frente casa
                pigment {Red}

         }                     
         object {todas_colunas}
        }         
        difference{
                
         box { <13,0,9>       //lateral  direita
              <16,0.05,33>
                pigment {Red}

          }      
         object {todas_colunas}
        }  
        box { <2,0,9>
              <13,0.15,33>
                pigment {Red}

        }

}      

#declare   canteirinho =

union{
 difference {
   box { <16,0,35>
         <21,.8,34.2>
         pigment {Gray}

        }
        
   box { <16.1,0,35>
         <20.9,.8,34.3>
         pigment {Brown}
                     
                    
        }  
         
    }
      
   box { <16.1,0,35>
         <20.9,.78,34.3>
         texture  {terra}
                     
                    
        }   
}        
            


              
          
#declare telhado_churrasqueira = 
object {

  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>
}
   
   
#declare muro_auxiliar =

  box { <21, 0, 35> <28, 3.5, 35.2>  texture {tijolos} } 


#declare muro_auxiliar2 =

 box { <21, 2.5, 35> <28, 0, 35.2>  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 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>}
	pigment {Yellow}
      }


#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>}
	pigment {Yellow}
      }



#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> <11.1, 2.45,21.85> pigment {White}  }

#declare janela =
union{
difference { box { <13.1, 1.6, 20.55> <12.1, 2.45,21.85> pigment {Yellow}  }
             box { <13.2, 1.75, 20.7> <12.0, 2.3,21.7> pigment {Yellow}  }
           }
box { <13, 1.75, 20.7> <12.5, 2.3,21.85> texture {T_Glass2}  }
}



























//Uniao da cena com os respectivos objetos
union { 
object{telhado_casa_1}
object{telhado_casa_2}
object{todas_colunas}
object { chao_piso} 
object {canteirinho}


object  {telhado_churrasqueira}
                     

object {pilares}    
object {portao2}
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 {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}

difference {
	object {casa}
	object {buraco_janela}
	object {buraco_janela translate <0,0,9> }
      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,14.2>}
	object {buraco rotate <0,90,0> translate <12.93,1.1,17.2>}
	object {buraco rotate <0,90,0> translate <12.93,1.1,25.2>}
	}	

object {janela}
object {janela translate <0,0,9>}			
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,14.2>}
object {porta rotate <0,90,0> translate <12.93,1.1,17.2>}
object {porta rotate <0,90,0> translate <12.93,1.1,25.2>}