Descriptions and Examples for the POV-Ray Raytracer by Friedrich A. Lohmüller
    POV-Ray Examples - How To Make Objects for POV-Ray
Italiano Italiano
Français français
Deutsch Deutsch

Home
- POV-Ray Tutorial
  - POV-Ray Examples
   Index of Content
  - Geometry
  - Architecture
  - Engineering
    - Ladder
    - Pylons
    - Railing
    - Bridge
    - Tubes
    - Tube Fork
    - Tube Stopcock
    - Chain
    - Coil of Wire
    - Torpedo
    - Cruise Missile
    - Rocket
    - Wheel
    - Truck
    - Propeller
    - Airplane
      - 1. Body (1)
      - 2. Body (2)
      - 3. Windows (1)
      - 4. Windows (2)
      - 5. Wings (1)
      - 6. Propellers
    - Canoe
    - Guitar Body
    - 7-Segment Display
    - Ribbon Cable
    - Cable Harness
                                       


Airplane
Construction of the Body (1)

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

airplane body
Dimensions of the 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( ... )"
Continue with part 2
 
top

© Friedrich A. Lohmüller, 2006
www.f-lohmueller.de