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

Door macro overview House Part 2

House Part 1

The Construction of a House (Basic house shape).

Objects: "box", "plane".
Methods: "declare", "intersection", "inverse"

The construction in details:

To keep this construction as flexible as possible we declare all important dimensions of the house as variables (see the first image). For easy changing of the roof angle it is also declared separately. This angle is used at many locations in the construction: by cutting off the gable from the walls as well as during the positioning of the parts of the roof.

//------ the dimensions of the house:
#declare Hx = 2.00; // half width in x direction
#declare Hy = 3.50; // total height of the house
#declare Hz = 4.00; // length in z direction
#declare Roof_Angle = 38;  
#declare Wall_D = 0.20; // thickness of the wall  
//------------------------------------------------

The gable by subtraction two planes:

The walls are made by a box with the outlines of the house.
From this box we subtract two planes (more precisely: half-spaces) sloped in roof angle and moved to the top of the house to cut away the walls at the gable.

// The house shape 
// with the gable cut out

difference{ //-------------------------------------
box { <-Hx,0,0>,< Hx,Hy,Hz>   
      texture { pigment{color rgb<1,1,1>}
                finish {ambient 0.15 diffuse 0.85}
              } // end of texture
    } // end of box ------------------------------ 

plane{ <0,-1,0>,0 
       texture { pigment{color rgb<1,1,1>}
                 finish {ambient 0.15 diffuse 0.85}
               } // end of texture
       rotate<0,0,Roof_Angle>
       translate<0,Hy,0>
     } // end of plane ---------------------------- 

plane{ <0,-1,0>,0 
       texture { pigment{color rgb<1,1,1>}
                 finish {ambient 0.15 diffuse 0.85}
               } // end of texture
       rotate<0,0,-Roof_Angle>
       translate<0,Hy,0>
     } // end of plane ---------------------------- 

}// end of difference ------------------------
//------------------------------------------- end
Click here for the complete scene description
for POV-Ray:
".txt" file or ".pov" file





Door macro overview House Part 2

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