home *** CD-ROM | disk | FTP | other *** search
- #include "../h/rccl.h"
- #include "../h/umac.h"
-
-
- pumatask()
- {
- TRSF_PTR z, e , b1, conv;
- POS_PTR p0, p1;
- int convfn();
- int q;
- double iy;
-
- conv = newtrans("CONV",convfn);
- z = gentr_rot("Z", 0., 0., 864., zunit, 0.); /* at the base */
- e = gentr_eul("E" , 0. , 0. , 170. , 0. , 0., 0.);/* finger tips */
- b1 = gentr_rot("B1", 600. , 128., 800., yunit, 180.);
-
- b1->fn = hold;
- p0 = makeposition("P1" , z, t6, e, EQ, b1, TL, e);
- p1 = makeposition("P1" , z, t6, e, EQ, conv, b1, TL, e);
-
- setmod('c');
- setvel(300, 100);
- move(p1);
- for (; ; ) {
- move(p1);
- waitfor(completed);
- if (p1->end == LIMIT) {
- printf("limit reached\n");
- }
- printf("more "); QUERY(q); if (q == 'n') break;
- printf("enter Z increment ");
- scanf("%f", &iy);
- b1->p.z += iy;
- }
- setmod('j');
- move(park);
- }
-
- convfn(t)
- TRSF_PTR t;
- {
- double time;
-
- time = rtime / 20000.;
- t->p.y = 400. * cos(time * PIT2);
- }
-