home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / p / ply15dat.zip / PLANE.PI < prev    next >
Text File  |  1992-09-19  |  3KB  |  102 lines

  1. // Simple aircraft - The animation rolls it about one axis, then another.
  2. //
  3. // If scan conversion is used, there is a noticable problem with shading
  4. // due to the distinction between the top and bottom of polygons.
  5. //
  6.  
  7. start_frame 0
  8. total_frames 119
  9. outfile "plane"
  10.  
  11. viewpoint {
  12.    from <0, 0, -100>
  13.    up    <0, 1, 0>
  14.    at    <0, 0, 0>
  15.    resolution 160, 100
  16.    aspect 1.6
  17.    angle 25
  18.    }
  19.  
  20. include "..\..\colors.inc"
  21.  
  22. background midnight_blue
  23. light < 100, 30, -200>
  24.  
  25. define rect
  26. object {
  27.    polygon 4, < 0.5, 0.01, -0.5>, < 0.5, 0.01,  0.5>,
  28.               <-0.5, 0.01,  0.5>, <-0.5, 0.01, -0.5>
  29.    }
  30.  
  31. define Missile
  32. object {
  33.      object { cylinder <0, 0, 0>, <11, 0, 0>, 1 }
  34.    + object { cone <11, 0, 0>, 1, <13, 0, 0>, 0 }
  35.    + object { polygon 3, <0,  1,  0>, <0,  3,  0>, < 2,  1,  0> }
  36.    + object { polygon 3, <0, -1,  0>, <0, -3,  0>, < 2, -1,  0> }
  37.    + object { polygon 3, <0,  0,  1>, <0,  0,  3>, < 2,  0,  1> }
  38.    + object { polygon 3, <0,  0, -1>, <0,  0, -3>, < 2,  0, -1> }
  39.    + object { polygon 3, <9,  1,  0>, <9,  3,  0>, <11,  1,  0> }
  40.    + object { polygon 3, <9, -1,  0>, <9, -3,  0>, <11, -1,  0> }
  41.    + object { polygon 3, <9,  0,  1>, <9,  0,  3>, <11,  0,  1> }
  42.    + object { polygon 3, <9,  0, -1>, <9,  0, -3>, <11,  0, -1> }
  43.    }
  44.  
  45. define left_wing
  46. object {
  47.      object { polygon 4, <10, 0, 0>, <30, 0,  0>, <18, 0, 20>, <10, 0, 20> }
  48.    + object { polygon 3, <30, 0, 0>, <27, 0,  5>, <58, 0, 0> }
  49.    }
  50.  
  51. define right_wing
  52. object {
  53.      object { polygon 4, <10, 0, 0>, <30, 0,  0>, <18, 0,-20>, <10, 0,-20> }
  54.    + object { polygon 3, <30, 0, 0>, <27, 0, -5>, <58, 0, 0> }
  55.    }
  56.  
  57. define left_stab
  58. object { polygon 4, <1, 0, 0>, <6, 0, 0>, <3, 0, 8>, <-2, 0, 8> }
  59.  
  60. define right_stab
  61. object { polygon 4, <1, 0, 0>, <6, 0, 0>, <3, 0,-8>, <-2, 0,-8> }
  62.  
  63. define engine
  64. object {
  65.      object { cylinder <0, 0, 0>, <30, 0, 0>, 2 }
  66.    + object { cone <25, 0, 0>, 0, <30, 0, 0>, 2 }
  67.    + object { cone <0, 0, 0>, 2, <-2, 0, 0>, 3 }
  68.    }
  69.  
  70. define fuselage
  71. object {
  72.      object { cylinder <0, 0, 0>, <80, 0, 0>, 3 }
  73.    + object { cone <80, 0, 0>, 3, <100, 0, 0>, 0 }
  74.    scale <1, 1.5, 1>
  75.    }
  76.  
  77. // Define the orientation of the aircraft
  78. if (frame < 60) {
  79.    define orient <-10, -6*frame-50, 0>
  80.    }
  81. else {
  82.    define orient <-10+6*(frame-60), -50, 0>
  83.    }
  84.  
  85. // Put together an aircraft
  86. object {
  87.      fuselage { shiny_red }
  88.    + engine { translate <0,-2, 3> shiny_yellow }
  89.    + engine { translate <0,-2,-3> shiny_yellow }
  90.    + left_wing  { translate <5, 1, 2> matte_blue }
  91.    + right_wing { translate <5, 1,-2> matte_blue }
  92.    + missile { translate <15, 1, 23> shiny_green }
  93.    + missile { translate <15, 1,-23> shiny_green }
  94.    + left_stab  { translate <0, 0, 3> matte_white }
  95.    + right_stab { translate <0, 0,-3> matte_white }
  96.    + left_stab  { rotate <-60, 0, 0> translate <0, 2, 2> matte_white }
  97.    + right_stab { rotate < 60, 0, 0> translate <0, 2,-2> matte_white }
  98.    translate <-50, 0, 0>
  99.    scale <0.6, 0.6, 0.6>
  100.    rotate orient
  101.    }
  102.