home *** CD-ROM | disk | FTP | other *** search
/ Between Heaven & Hell 2 / BetweenHeavenHell.cdr / 500 / 471 / rccl205 < prev    next >
Text File  |  1987-03-02  |  1KB  |  65 lines

  1. #include "../h/rccl.h"
  2. #include "../h/umac.h"
  3.  
  4. pumatask()
  5. {
  6.     TRSF_PTR z, e, conv, or, fl;
  7.     POS_PTR  pm;
  8.     int convfn();
  9.     int i;
  10.  
  11.     conv = newtrans("CONV",convfn);
  12.     z = gentr_trsl("Z",  0.,  0., 864.);
  13.     e = gentr_eul("E" , 0. , 0. , 170. , 0. , 0.,  0.);/* finger tips */
  14.     or = gentr_eul("OR", 000. , 600., 500.,    0., 0., 90.);
  15.     fl = gentr_rot("FL", 0. , 0., 0., yunit, 180.);
  16.  
  17.     pm = makeposition("PM" , z, t6, e, EQ, conv, or, fl, TL, e);
  18.  
  19.     movecart(pm, 300, 1500);
  20.     for (; ; ) {
  21.         printf("cart ");QUERY(i);
  22.         if (i == 'y') {
  23.             for (i = 0; i < 8; ++i) {
  24.                 movecart(pm, 100, 500);
  25.                 movecart(pm, 100, 500);
  26.             }
  27.         }
  28.         printf("jnts ");QUERY(i);
  29.         if (i == 'y') {
  30.             for (i = 0; i < 8; ++i) {
  31.                 movejnts(pm, 100, 500);
  32.                 movejnts(pm, 100, 500);
  33.             }
  34.         }
  35.         printf("mixt ");QUERY(i);
  36.         if (i == 'y') {
  37.             for (i = 0; i < 8; ++i) {
  38.                 movejnts(pm, 100, 500);
  39.                 movecart(pm, 100, 500);
  40.             }
  41.         }
  42.         printf("quit ");QUERY(i);
  43.         if (i == 'y') {
  44.             break;
  45.         }
  46.     }
  47.     movecart(park, 300, 1500);
  48. }
  49.  
  50.  
  51.  
  52. convfn(t)
  53. TRSF_PTR t;
  54. {
  55.     extern int rtime;
  56.     double time;
  57.  
  58.     double omega = .125;
  59.     double radius = 200.;
  60.  
  61.     time = rtime / 1000.;
  62.     t->p.x = radius * cos(omega * time * PIT2);
  63.     t->p.z = radius * sin(omega * time * PIT2);
  64. }
  65.