- xyz[len*3+0] = l->x;
- xyz[len*3+1] = l->y;
- xyz[len*3+2] = (i->currentz*ZSTEP);
- gluTessVertex(i->tesselator, &xyz[len*3], &xyz[len*3]);
- len++;
+ if(l->type == gfx_splineTo) {
+ int j;
+ double c = sqrt(abs(l->x-2*l->sx+lastx) + abs(l->y-2*l->sy+lasty))/2;
+ int steps = (int)c;
+ if(steps<1) steps = 1;
+ //printf("c=%f d1=%f (%f/%f) d2=%f (%f/%f)\n", c,d1,l->x-l->sx,l->y-l->sy,d2,lastx-l->sx,lasty-l->sy);
+ //printf("%f %f %f\n", lastx, l->sx, l->x);
+ //printf("%f %f %f\n", lasty, l->sy, l->y);
+ for(j=1;j<=steps;j++) {
+ //printf("%d\n", j);
+ double t = (double)j / (double)steps;
+ xyz[len*3+0] = lastx*(1-t)*(1-t) + 2*l->sx*(1-t)*t + l->x*t*t;
+ xyz[len*3+1] = lasty*(1-t)*(1-t) + 2*l->sy*(1-t)*t + l->y*t*t;
+ xyz[len*3+2] = z;
+ gluTessVertex(i->tesselator, &xyz[len*3], &xyz[len*3]);
+ len++;
+ }
+ //printf("%d\n", len);
+ } else {
+ xyz[len*3+0] = l->x;
+ xyz[len*3+1] = l->y;
+ xyz[len*3+2] = z;
+ gluTessVertex(i->tesselator, &xyz[len*3], &xyz[len*3]);
+ len++;
+ }
+ lastx = l->x;
+ lasty = l->y;