home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / demos / gpc / objects / hind.geo < prev    next >
Encoding:
Text File  |  1991-02-13  |  4.2 KB  |  193 lines

  1. % Groups of Helicopter Parts %
  2.  
  3. % The Body %
  4.  
  5. % Mi24 "Hind" Attack  Helicopter %
  6. % Mi24 Body %
  7. BEGIN_STRUCTURE 70;
  8.     % Update position %
  9.     CONCAT_MATRIX3  4 3 PRECONCAT;
  10.     CONCAT_MATRIX3  5 3 POSTCONCAT;
  11.     CONCAT_MATRIX3  3 34 REPLACE;
  12.     % Centering transformation %
  13.     TRANSLATE3      34 -350. 0. 0.      PRECONCAT;
  14.     APPLY_TO_LOCAL3 34                  REPLACE  ;
  15.  
  16.     CALL_STRUCTURE 40 ;
  17.     CALL_STRUCTURE 41 ;
  18.     CALL_STRUCTURE 42 ;
  19.     CALL_STRUCTURE 43 ;
  20.     CALL_STRUCTURE 44 ;
  21.     CALL_STRUCTURE 45 ;
  22.     CALL_STRUCTURE 46 ;
  23.     CALL_STRUCTURE 47 ;
  24.     CALL_STRUCTURE 48 ;
  25.     CALL_STRUCTURE 49 ;
  26.     CALL_STRUCTURE 50 ;
  27.     CALL_STRUCTURE 51 ;
  28.     CALL_STRUCTURE 56 ;
  29.     CALL_STRUCTURE 57 ;
  30.     CALL_STRUCTURE 58 ;
  31.     CALL_STRUCTURE 59 ;
  32.     CALL_STRUCTURE 60 ;
  33.     CALL_STRUCTURE 64 ;
  34.     CALL_STRUCTURE 65 ;
  35.     CALL_STRUCTURE 66 ;
  36. END_STRUCTURE;
  37.  
  38.  
  39. % The Attached missles %
  40. BEGIN_STRUCTURE 71;
  41.     CALL_STRUCTURE 52 ;
  42.     CALL_STRUCTURE 53 ;
  43.     CALL_STRUCTURE 54 ;
  44.     CALL_STRUCTURE 55 ;
  45. END_STRUCTURE;
  46.  
  47. % The moving rotors %
  48. BEGIN_STRUCTURE 72;
  49.     % >>> Main Rotor <<< %
  50.     % Update position    %
  51.     CONCAT_MATRIX3  36   35            PRECONCAT;
  52.     
  53.     % Build matrix       %
  54.     CONCAT_MATRIX3  34    0            REPLACE;
  55.     TRANSLATE3       0  268.08 0. 0.   PRECONCAT;
  56.     CONCAT_MATRIX3  35    0            PRECONCAT;
  57.     TRANSLATE3       0 -268.08 0. 0.   PRECONCAT;
  58.     APPLY_TO_LOCAL3  0                 REPLACE;
  59.     
  60.     % Display Main Rotor %
  61.     CALL_STRUCTURE 35 ;
  62.     CALL_STRUCTURE 36 ;
  63.     CALL_STRUCTURE 37 ;
  64.     CALL_STRUCTURE 38 ;
  65.     CALL_STRUCTURE 39 ;
  66.  
  67.     % >>> Tail Rotor <<< %
  68.     % Update position    %
  69.     CONCAT_MATRIX3  62   61            PRECONCAT;
  70.  
  71.     % Build matrix       %
  72.     CONCAT_MATRIX3  34    0              REPLACE;
  73.     TRANSLATE3       0  706.70 0.  70.62 PRECONCAT;
  74.     CONCAT_MATRIX3  61    0              PRECONCAT;
  75.     TRANSLATE3       0 -706.70 0. -70.62 PRECONCAT;
  76.     APPLY_TO_LOCAL3  0                   REPLACE;
  77.  
  78.     % Display Tail Rotor %
  79.     CALL_STRUCTURE 61 ;
  80.     CALL_STRUCTURE 62 ;
  81.     CALL_STRUCTURE 63 ;
  82. END_STRUCTURE ;
  83.  
  84.  
  85. % The moving missles %
  86.  
  87. % >>>> Missle #1 <<<< %
  88. BEGIN_STRUCTURE 73;
  89.     % Update position    %
  90.     CONCAT_MATRIX3    6   52            PRECONCAT;
  91.     APPLY_TO_LOCAL3  52                   REPLACE;
  92.     
  93.     % Display Missle #1 %
  94.     CALL_STRUCTURE 52 ;
  95.  
  96.     % Display Plume %
  97.     % Place and Orient %
  98.     LOCAL_TRANSFORMATION3
  99.         {    1.0    0.0     0.0  349.0 }
  100.         {    0.0    1.0     0.0  167.2 }
  101.         {    0.0    0.0     1.0  -43.0 }
  102.         {    0.0    0.0     0.0    1.0 }
  103.         PRECONCAT
  104.     ;
  105.     % Scale %
  106.     CONCAT_MATRIX3    7 73              PRECONCAT;
  107.     APPLY_TO_LOCAL3  73                 PRECONCAT;
  108.     
  109.     CALL_STRUCTURE 68;
  110.     
  111.  
  112. END_STRUCTURE;
  113.  
  114. % >>>> Missle #2 <<<< %
  115. BEGIN_STRUCTURE 74;
  116.     % Update position    %
  117.     CONCAT_MATRIX3    6   53            PRECONCAT;
  118.     APPLY_TO_LOCAL3  53                   REPLACE;
  119.     
  120.     % Display Missle #2 %
  121.     CALL_STRUCTURE 53 ;
  122.  
  123.     % Display Plume %
  124.     % Place and Orient %
  125.     LOCAL_TRANSFORMATION3
  126.         {    1.0    0.0     0.0  349.0 }
  127.         {    0.0    1.0     0.0 -167.2 }
  128.         {    0.0    0.0     1.0  -43.0 }
  129.         {    0.0    0.0     0.0    1.0 }
  130.         PRECONCAT
  131.     ;
  132.     % Scale %
  133.     CONCAT_MATRIX3    8 74              PRECONCAT;
  134.     APPLY_TO_LOCAL3  74                 PRECONCAT;
  135.     
  136.     CALL_STRUCTURE 68;
  137.     
  138.  
  139. END_STRUCTURE;
  140.  
  141. % >>>> Missle #3 <<<< %
  142. BEGIN_STRUCTURE 75;
  143.     % Update position    %
  144.     CONCAT_MATRIX3    6   54            PRECONCAT;
  145.     APPLY_TO_LOCAL3  54                   REPLACE;
  146.     
  147.     % Display Missle #3 %
  148.     CALL_STRUCTURE 54 ;
  149.  
  150.     % Display Plume %
  151.     % Place and Orient %
  152.     LOCAL_TRANSFORMATION3
  153.         {    1.0    0.0     0.0  349.0 }
  154.         {    0.0    1.0     0.0  150.0 }
  155.         {    0.0    0.0     1.0  -43.0 }
  156.         {    0.0    0.0     0.0    1.0 }
  157.         PRECONCAT
  158.     ;
  159.     % Scale %
  160.     CONCAT_MATRIX3    9 75              PRECONCAT;
  161.     APPLY_TO_LOCAL3  75                 PRECONCAT;
  162.     
  163.     CALL_STRUCTURE 68;
  164.  
  165. END_STRUCTURE;
  166.  
  167. % >>>> Missle #4 <<<< %
  168. BEGIN_STRUCTURE 76;
  169.     % Update position    %
  170.     CONCAT_MATRIX3    6   55            PRECONCAT;
  171.     APPLY_TO_LOCAL3  55                   REPLACE;
  172.     
  173.     % Display Missle #4 %
  174.     CALL_STRUCTURE 55 ;
  175.  
  176.     % Display Plume %
  177.     % Place and Orient %
  178.     LOCAL_TRANSFORMATION3
  179.         {    1.0    0.0     0.0  349.0 }
  180.         {    0.0    1.0     0.0 -150.0 }
  181.         {    0.0    0.0     1.0  -43.0 }
  182.         {    0.0    0.0     0.0    1.0 }
  183.         PRECONCAT
  184.     ;
  185.     % Scale %
  186.     CONCAT_MATRIX3   10 76              PRECONCAT;
  187.     APPLY_TO_LOCAL3  76                 PRECONCAT;
  188.     
  189.     CALL_STRUCTURE 68;
  190.  
  191. END_STRUCTURE;
  192.  
  193.