/********************************** papillon.inc ********************************/
/* This file is part of the source code for the openbridge project                                                   */
/* Copyright (c) 2003 Cyrille Berger (cberger.net) *************************************/

//*PMRawBegin
#include "colors.inc"
#include "woods.inc"
//*PMRawEnd

#declare tour = union {
   //*PMName tour
   
   cylinder {
      //*PMName grandepoutre
      <0, 0, 0>, <0, 0, 50>, 1
      //*PMRawBegin
      texture { T_Wood34 }
      //*PMRawEnd
      rotate x*(-80)
      translate z*4
      rotate y*45
   }
   
   cylinder {
      //*PMName grandepoutre
      <0, 0, 0>, <0, 0, 50>, 1
      //*PMRawBegin
      texture { T_Wood34 }
      //*PMRawEnd
      rotate x*(-80)
      translate z*4
      rotate y*135
   }
   
   cylinder {
      //*PMName grandepoutre
      <0, 0, 0>, <0, 0, 50>, 1
      //*PMRawBegin
      texture { T_Wood34 }
      //*PMRawEnd
      rotate x*(-80)
      translate z*4
      rotate y*225
   }
   
   cylinder {
      //*PMName grandepoutre
      <0, 0, 0>, <0, 0, 50>, 1
      //*PMRawBegin
      texture { T_Wood34 }
      //*PMRawEnd
      rotate x*(-80)
      translate z*4
      rotate y*(-45)
   }
   
   union {
      //*PMName plancher
      
      box {
         //*PMName rembarde
         <-4, 4.5, -4>, <-3.9, 3, 4>
      }
      
      box {
         //*PMName rembarde
         <-4, 4.5, -4>, <-3.9, 3, 4>
         rotate y*90
      }
      
      box {
         //*PMName rembarde
         <-4, 4.5, -4>, <-3.9, 3, 4>
         rotate y*180
      }
      
      box {
         //*PMName rembarde
         <-4, 4.5, -4>, <-3.9, 3, 4>
         rotate y*(-90)
      }
      
      box {
         //*PMName plancher
         <4, 4.5, 4>, <-4, 5, 0>
         scale 1
         rotate <0, 0, 0>
         translate <0, 0, 0>
      }
      
      box {
         //*PMName plancher
         <4, 4.5, 4>, <1.7, 5, -4>
         scale 1
         rotate <0, 0, 0>
         translate <0, 0, 0>
      }
      
      box {
         //*PMName plancher
         <-1.7, 4.5, 4>, <-4, 5, -4>
         scale 1
         rotate <0, 0, 0>
         translate <0, 0, 0>
      }
      
      box {
         //*PMName plancher
         <4, 4.5, -2>, <-4, 5, -4>
         scale 1
         rotate <0, 0, 0>
         translate <0, 0, 0>
      }
      //*PMRawBegin
      texture { T_Wood35 }
      //*PMRawEnd
   }
   
   union {
      box {
         <3.8, 1, 2>, <1.8, 4.5, 3.999>
         //*PMRawBegin
         texture { T_Wood33 }
         //*PMRawEnd
      }
      
      box {
         <-3.8, 1, 2>, <-1.8, 4.5, 3.999>
         //*PMRawBegin
         texture { T_Wood33 }
         //*PMRawEnd
      }
      
      cylinder {
         <2, 2, 3>, <-2, 2, 3>, 1
         
         pigment {
            checker 
            color rgb <0.984314, 1, 0>
            color rgb <0.933333, 0.670588, 0>
            scale <0.01, 1, 1>
         }
      }
   }
   
   union {
      //*PMName poutrelles
      
      box {
         <-0.5, -0.5, -9>, <0.5, 0.5, 9>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <8.5, 45, 0>
      }
      
      box {
         <-0.5, -0.5, -8.5>, <0.5, 0.5, 8.5>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <7.8, 40, 0>
         hollow
      }
      
      box {
         <-0.5, -0.5, -7.6>, <0.5, 0.5, 7.6>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <7, 35, 0>
         hollow
      }
      
      box {
         <-0.5, -0.5, -6.8>, <0.5, 0.5, 6.8>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <6.5, 30, 0>
         hollow
      }
      
      box {
         <-0.5, -0.5, -6>, <0.5, 0.5, 6>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <5.8, 25, 0>
         hollow
      }
      
      box {
         <-0.5, -0.5, -5.5>, <0.5, 0.5, 5.5>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <5.2, 20, 0>
         hollow
      }
      
      box {
         <-0.5, -0.5, -4.8>, <0.5, 0.5, 4.8>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <4.6, 15, 0>
         hollow
      }
      
      box {
         <-0.5, -0.5, -4>, <0.5, 0.5, 4>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <4, 10, 0>
         hollow
      }
      
      box {
         <-0.5, -0.5, -4>, <0.5, 0.5, 4>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <3.4, 5, 0>
         hollow
      }
   }
   
   union {
      //*PMName poutrelles
      
      box {
         <-0.5, -0.5, -9>, <0.5, 0.5, 9>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <8.5, 45, 0>
      }
      
      box {
         <-0.5, -0.5, -8.5>, <0.5, 0.5, 8.5>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <7.8, 40, 0>
         hollow
      }
      
      box {
         <-0.5, -0.5, -7.6>, <0.5, 0.5, 7.6>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <7, 35, 0>
         hollow
      }
      
      box {
         <-0.5, -0.5, -5.5>, <0.5, 0.5, 5.5>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <5.2, 20, 0>
         hollow
      }
      
      box {
         <-0.5, -0.5, -4.8>, <0.5, 0.5, 4.8>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <4.6, 15, 0>
         hollow
      }
      
      box {
         <-0.5, -0.5, -4>, <0.5, 0.5, 4>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <4, 10, 0>
         hollow
      }
      
      box {
         <-0.5, -0.5, -4>, <0.5, 0.5, 4>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <3.4, 5, 0>
         hollow
      }
      rotate y*90
   }
   
   union {
      //*PMName poutrelles
      
      box {
         <-0.5, -0.5, -9>, <0.5, 0.5, 9>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <8.5, 45, 0>
      }
      
      box {
         <-0.5, -0.5, -8.5>, <0.5, 0.5, 8.5>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <7.8, 40, 0>
         hollow
      }
      
      box {
         <-0.5, -0.5, -7.6>, <0.5, 0.5, 7.6>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <7, 35, 0>
         hollow
      }
      
      box {
         <-0.5, -0.5, -6.8>, <0.5, 0.5, 6.8>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <6.5, 30, 0>
         hollow
      }
      
      box {
         <-0.5, -0.5, -6>, <0.5, 0.5, 6>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <5.8, 25, 0>
         hollow
      }
      
      box {
         <-0.5, -0.5, -5.5>, <0.5, 0.5, 5.5>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <5.2, 20, 0>
         hollow
      }
      
      box {
         <-0.5, -0.5, -4.8>, <0.5, 0.5, 4.8>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <4.6, 15, 0>
         hollow
      }
      
      box {
         <-0.5, -0.5, -4>, <0.5, 0.5, 4>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <4, 10, 0>
         hollow
      }
      
      box {
         <-0.5, -0.5, -4>, <0.5, 0.5, 4>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <3.4, 5, 0>
         hollow
      }
      rotate y*180
   }
   
   union {
      //*PMName poutrelles
      
      box {
         <-0.5, -0.5, -9>, <0.5, 0.5, 9>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <8.5, 45, 0>
      }
      
      box {
         <-0.5, -0.5, -8.5>, <0.5, 0.5, 8.5>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <7.8, 40, 0>
         hollow
      }
      
      box {
         <-0.5, -0.5, -7.6>, <0.5, 0.5, 7.6>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <7, 35, 0>
         hollow
      }
      
      box {
         <-0.5, -0.5, -5.5>, <0.5, 0.5, 5.5>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <5.2, 20, 0>
         hollow
      }
      
      box {
         <-0.5, -0.5, -4.8>, <0.5, 0.5, 4.8>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <4.6, 15, 0>
         hollow
      }
      
      box {
         <-0.5, -0.5, -4>, <0.5, 0.5, 4>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <4, 10, 0>
         hollow
      }
      
      box {
         <-0.5, -0.5, -4>, <0.5, 0.5, 4>
         //*PMRawBegin
         texture { T_Wood34 }
         //*PMRawEnd
         translate <3.4, 5, 0>
         hollow
      }
      rotate y*(-90)
   }
   rotate x*180
   translate y*48
}
