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

Airplane - part I overview Airplane - part III

How to Make an Airplane

Construction of the Body (1)

   

part II

        Step 1: How to Make the Body of an Airplane.

First we have to define the dimensions of the elements of the body. See the following image:

airplane body

#local R1  = 2.00;  // radius of the body outside Radius 
#local R2  = 1.25;  // radius nose top y          Radius_Nose_TopY 
#local R3  = 4.00;  // length nose                Length_Nose
#local R4  = 2.50;  // length forehead part       Length_Forehead
#local R5  = 9.50;  // length of tail part        Length_Tail
//-------------------------------------------------------------------

Then we define a macro for the shape of the body using csg:

//--------------------------------------------------------------------
#macro Body(Radius, Radius_Nose_TopY, Length_Nose, Length_Forehead, 
            Length_Tail)
union{
intersection{                                 //  nose lower part (1)
 sphere { <0,0,0>,1  scale <Length_Nose, Radius, Radius>}
 box    { <0,-1,-1>,<1,0,1> scale <Length_Nose, Radius, Radius>} 
 }// -------------- end of intersection    

intersection{                             // nose - forehead part (2)
 sphere { <0,0,0>,1  scale < Length_Forehead, Radius, Radius>}
 box    { <0,0,-1>,<1,1,1>  scale < Length_Forehead, Radius, Radius>} 

 }// -------------- end of intersection    
intersection{                            // nose front upper part (3)
 sphere { <0,0,0>,1  scale <Length_Nose, Radius_Nose_TopY, Radius>}
 box    { <0,0,-1>,<1,1,1> scale <Length_Nose, Radius, Radius>} 
 }// -------------- end of intersection    

intersection {                        // the tail of the airplane (4)
 sphere { <0,0,0>,1    scale < Length_Tail, Radius, Radius> }
 box    { <-1,-1,-1>,<0,1,1> scale < Length_Tail, Radius, Radius>} 
 }// -------------- end of intersection    
}// end of union
#end // ---------------------------------- end of macro "Body( ... )"

Airplane - part I overview Airplane - part III

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