Descriptions and Samples for the POV-Ray Raytracer by Friedrich A. Lohmüller
    deutsche Version

House Part 1 overview House Part 3

House Part 2

The Construction of a House (inside caved out, Roof).

Objects:    "box", "plane".
Methods: "declare", "union", "difference",

The inside caved out:

This is done by subtracting a box of the house dimensions reduced by the thickness of the walls - here realisized by "difference": Basic house shape minus box in the size of the inside space.


#declare Wall_Texture_1 = 
texture{ pigment{color rgb<1,1,1>*1.1}
         normal {bumps 0.5 scale 0.005} 
         finish {ambient 0.15 diffuse 0.85}
       } // end of texture
#declare Wall_Texture_2 = 
texture{ pigment{color  rgb<1,1,1>*1.1}
         finish {ambient 0.15 diffuse 0.85}
        } // end of texture
//-------------------------------------------

#declare Wd = 0.20 ; //  thickness of the wall

// How to cave out the inside: 
difference{ //-------------------------------
box { <-Hx,0,0>,< Hx,Hy,Hz>   
      texture { Wall_Texture_1} 
    } // end of box -------------------------
plane{ <0,-1,0>,0 
       texture { Wall_Texture_2} 
       rotate<0,0,Roof_Angle>
       translate<0,Hy,0>
     } // end of plane ----------------------
plane{ <0,-1,0>,0 
       texture { Wall_Texture_2} 
       rotate<0,0,-Roof_Angle>
       translate<0,Hy,0>
     } // end of plane ---------------------- 
 // inside caved out    
box { <-Hx+Wd,0.10,Wd>,<Hx-Wd,Hy,Hz-Wd>  
      texture {Wall_Texture_2}  
     }
}// end of difference -----------------------




The Roof:

The roof is made by boxes in the height of the thickness of the roof, rotated by the roof angle and moved to their position at the top of the house.


#declare Roof_Texture =  // -------  
// layered textures !!!  - überlagerte Texturen
texture{ pigment{color rgb<0.55,0.09,0.09>*1.3}
         normal {gradient z scallop_wave 
                             scale<1,1,0.15>}
         finish {ambient 0.15 diffuse 0.85}
       } // end of texture
 
texture{ pigment{ gradient x 
                  color_map{
                  [0.00 color rgbt<1,1,1,1>]
                  [0.90 color rgbt<1,1,1,1>]
                  [0.95 color rgb<1,1,1>*0.1]
                  [1.00 color rgb<1,1,1>*0.1]}
                  scale 0.25}
          finish {ambient 0.15 diffuse 0.85}
       } // end of texture
//---------------------------- end of roof texture
#declare Roof_D = 0.10; // thickness of the roof
#declare Roof_O = 0.20; // overhang 
#declare Roof_L = Hx+0.80;//  try it! 

//-------- parts of the roof: first horizontal, 
//  then sloped and translated upways
box{  // left part of the roof
 <-Roof_L,0,-Roof_O>,<Roof_D/2,Roof_D,Hz+Roof_O>  
 texture {Roof_Texture translate<-0.05,0,0>}  
 rotate<0,0, Roof_Angle>
 translate<0,Hy,0>
}
box{ // right part of the roof
 <-Roof_L,0,-Roof_O>,<Roof_D/2,Roof_D,Hz+Roof_O>  
 texture {Roof_Texture translate<-0.05,0,0>}  
 rotate<0,0, Roof_Angle>
 translate<0,Hy,0> 
 scale<-1,1,1> // mirrowed in x direction!!!
}
//--------------------------------------- end of the roof 




Click here for the complete scene description
for POV-Ray: ".txt" file or ".pov" file


House Part 1 overview House Part 2

© Friedrich A. Lohmüller, 2004     email email: (legacy email redacted)