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

  1. #include "../h/rccl.h"
  2.  
  3. pumatask()
  4. {
  5.     TRSF_PTR z, e , b1, s1, s2, s3, conv1, conv2;
  6.     POS_PTR  p0;
  7.     POS_PTR p1[4], p2[4];
  8.     int convfn();
  9.     int i, j;
  10.  
  11.     conv1 = newtrans("CONV1",convfn);
  12.     conv2 = newtrans("CONV2",convfn);
  13.     z = gentr_rot("Z",  0.,  0., 864., &zun, 0.); /* at the base */
  14.     e = gentr_eul("E" , 0. , 0. , 170. , 0. , 0.,  0.);/* finger tips */
  15.     b1 = gentr_rot("B1", 600. , -400., 500., yunit, 180.);
  16.     s1 = gentr_trsl("S1", 0., 0., 80.);
  17.     s2 = gentr_trsl("S2", 80., 0., 80.);
  18.     s3 = gentr_trsl("S3", 80., 0., 0.);
  19.  
  20.     p0 = makeposition("P0" , z, t6, e, EQ, b1, TL, e);
  21.     p1[0] = makeposition("P10" , z, t6, e, EQ, conv1, b1, TL, e);
  22.     p1[1] = makeposition("P11" , z, t6, e, EQ, conv1, b1, s1, TL, e);
  23.     p1[2] = makeposition("P12" , z, t6, e, EQ, conv1, b1, s2, TL, e);
  24.     p1[3] = makeposition("P13" , z, t6, e, EQ, conv1, b1, s3, TL, e);
  25.     p2[0] = makeposition("P20" , z, t6, e, EQ, conv2, b1, TL, e);
  26.     p2[1] = makeposition("P21" , z, t6, e, EQ, conv2, b1, s1, TL, e);
  27.     p2[2] = makeposition("P22" , z, t6, e, EQ, conv2, b1, s2, TL, e);
  28.     p2[3] = makeposition("P23" , z, t6, e, EQ, conv2, b1, s3, TL, e);
  29.  
  30.  
  31.     movejnts(p0, 100, 1500);
  32.     rtime = 0;
  33.     for (j = 0; j < 6; ++j) {
  34.         for (i = 0; i < 4; ++i) {
  35.             movecart(p1[i], 100, 300);
  36.         }
  37.     }
  38.     movejnts(p0, 100, 1500);
  39.     waitfor(completed);
  40.     rtime = 0;
  41.     for (j = 0; j < 6; ++j) {
  42.         for (i = 0; i < 4; ++i) {
  43.             movejnts(p2[i], 100, 300);
  44.         }
  45.     }
  46.     stop(0);
  47.     movejnts(park, 100, 1500);
  48. }
  49.  
  50. convfn(t)
  51. TRSF_PTR t;
  52. {
  53.     t->p.y = .08 * rtime;
  54. }
  55.