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

Airplane - part III overview Airplane - part V

How to Make an Airplane

Adding Windows (1)

   

part IV

        Step 2: How to Add Windows to this Airplane Body.

For Doing this we have to cave out the solid body of our airplane by difference and therefore we must define the thickness of the skin and what size the kernel has. Here we are taking just the same dimensions like the outside of the body subtracted by the thickness of the skin:

//-------------------------------------------------------
#local Skin  = 0.05; // the thickness of the skin
#local G     = 0.005; // the thickness of the windows
#local R_W   = 0.35; // radius of the passenger's Windows
//-------------------------------------------------------

Then we have to subtract a kernel by these dimensions from the solid body. For getting holes for passenger windows in the outside shape we need to subtract some cylinders and for the cockpit windows we will subtract some (handmade dimensioned) prism.

//-----------------------------------------------------------------
#declare Windows_Cut_Cockpit = //prisms for cutting out the windows
union{
prism { -R1-G, R1-2*G, 5 //side window 1
       < 0.50, 0.50>,< 1.30, 0.70>,< 1.00, 1.33>,
       < 0.40, 1.30>,< 0.50, 0.50>
       rotate<-90,0,0>scale<1,1,-1> }//turns prism in z direction! 

prism { -R1-G, R1-2*G, 6  //side window 2
       < 1.35, 0.72>,< 1.95, 0.99>,< 1.76, 1.17>,
       < 1.52, 1.37>,< 1.05, 1.33>,< 1.35, 0.72>
       rotate<-90,0,0>scale<1,1,-1> }//turns prism in z direction! 

prism {  -R1-0.1 ,R1+0.1 , 5 // right side font glass
       <-0.65, 1.02>,<-0.04, 1.10>,<-0.04, 1.40>,
       <-0.70, 1.39>,<-0.65, 1.02>
       rotate<-90,-90,0>} //turns prism in x direction! 

prism {  -R1-0.1 ,R1+0.1 , 5 // left side font glass
       <-0.65, 1.02>,<-0.04, 1.10>,<-0.04, 1.40>,
       <-0.70, 1.39>,<-0.65, 1.02>
       rotate<-90,-90,0> //turns prism in x-direction! 
       scale<1,1,-1>}    // mirrored at the xy plane 

 } // end of union
//-------------------------------------------------------------------
#declare Windows_Cut_Passenger = // cylinders for cutting out the 
 union{                                   // passenger windows
   cylinder{ <0,0,-1.1*R1>,<0,0,1.1*R1>, R_W  
            }
   cylinder{ <0,0,-1.1*R1>,<0,0,1.1*R1>, R_W
             translate<-1.50, 0, 0>}
   cylinder{ <0,0,-1.1*R1>,<0,0,1.1*R1>, R_W
             translate<-3.00, 0, 0>}
 } // end of union
//-------------------------------------------------------------------
airplane window holes

        This image shows what we need to subtract for the window holes

Airplane - part III overview Airplane - part V

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