home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Raytrace & Morphing / SOS-RAYTRACE.ISO / programm / raytrace / polyray / dat / animate / ufo / launch1.inc < prev    next >
Encoding:
Text File  |  1993-05-01  |  1.9 KB  |  61 lines

  1. //
  2. // This file builds the UFO and the launch pad
  3. //
  4.  
  5. // Get the basic shape definition for a UFO
  6. include "ufo.inc"
  7.  
  8. // Define the key positions of the UFO over the course of the animation
  9. define start_pos1 [<0, -1, 0>, <0, -1, 0>, <0, 2, 0>, <0, 5, 0>]
  10. define end_pos1   [<0, -1, 0>, <0, 2, 0>, <0, 5, 0>, <0, 5, 100>]
  11. define pos0 start_pos1[segment]
  12. define pos1 end_pos1[segment]
  13.  
  14. // Define the location and orientation of the UFO
  15. define UFO_Location1
  16.    start_pos1[segment] + increment * (end_pos1[segment] - start_pos1[segment])
  17. define UFO_Orientation1
  18.    transform {
  19.       scale <1,1,1>/50        // Make it unit size
  20.       rotate <0, 0, 0>      // Orient the UFO, then
  21.       translate UFO_Location1 // move it into position
  22.       }
  23.  
  24. // Change the orientations of the barrels for the ufo.
  25. define Gun_Orientation1_1 transform { rotate <90, 30, 0> }
  26.  
  27. // Now make a UFO with a gun assembly hanging off the top and bottom
  28. if (complexity == 1)
  29. object {
  30.    UFO_Body +
  31.    object {
  32.       // Mounting rod for the gun barrels.
  33.         Rod { scale <1, Mounting_Rod_Length, 1> }
  34.       // The twin gun barrels
  35.       + Gun_Barrels { Gun_Orientation1_1 }
  36.       translate Gun_Assembly_Location1
  37.       Gun_Texture }
  38.    UFO_Orientation1
  39.    }
  40. else
  41. object {
  42.    disc <0, 0, 0>, <0, 1, 0>, 50 
  43.    UFO_Orientation1
  44.    Gun_Texture
  45.    }
  46.  
  47. // Launch pad for the UFO - this should be lots more complex...
  48. define key_block object { box <4.5, 0, -0.2>, <5.5, 1.25, 0.2> steely_blue }
  49. object {
  50.      object { cylinder <0, -10, 0>, <0, 1, 0>, 1.5 }
  51.    + object { cylinder <0, -1, 0>, <0, 1, 0>, 5 }
  52.    + object { disc <0, 1, 0>, <0, 1, 0>, 1.5, 5 }
  53.    + key_block
  54.    + key_block { rotate <0, 60, 0> }
  55.    + key_block { rotate <0,120, 0> }
  56.    + key_block { rotate <0,180, 0> }
  57.    + key_block { rotate <0,240, 0> }
  58.    + key_block { rotate <0,300, 0> }
  59.    matte_grey
  60.    }
  61.