Lines Matching refs:ks
64 double ks[4];
87 integrate_spiro(const double ks[4], double xy[2])
92 double th1 = ks[0];
93 double th2 = .5 * ks[1];
94 double th3 = (1./6) * ks[2];
95 double th4 = (1./24) * ks[3];
100 double k0 = ks[0] * ds;
101 double k1 = ks[1] * ds;
102 double k2 = ks[2] * ds;
103 double k3 = ks[3] * ds;
451 compute_ends(const double ks[4], double ends[2][4], double seg_ch)
461 integrate_spiro(ks, xy);
466 th_even = .5 * ks[0] + (1./48) * ks[2];
467 th_odd = .125 * ks[1] + (1./384) * ks[3] - th;
470 k0_even = l * (ks[0] + .125 * ks[2]);
471 k0_odd = l * (.5 * ks[1] + (1./48) * ks[3]);
475 k1_even = l2 * (ks[1] + .125 * ks[3]);
476 k1_odd = l2 * .5 * ks[2];
480 k2_even = l3 * ks[2];
481 k2_odd = l3 * .5 * ks[3];
498 compute_ends(s->ks, ends, s->seg_ch);
501 try_ks[j] = s->ks[j];
529 r[i].ks[0] = 0.;
530 r[i].ks[1] = 0.;
531 r[i].ks[2] = 0.;
532 r[i].ks[3] = 0.;
803 printf("s[%d].ks[%d] += %f\n", i, k, dk);
805 s[i].ks[k] += dk;
808 s[i].ks[0] = 2.0*mod_2pi(s[i].ks[0]/2.0);
848 spiro_seg_to_otherpath(const double ks[4],
852 double bend = fabs(ks[0]) + fabs(.5 * ks[1]) + fabs(.125 * ks[2]) +
853 fabs((1./48) * ks[3]);
864 integrate_spiro(ks, xy);
873 th_even = (1./384) * ks[3] + (1./8) * ks[1] + rot;
874 th_odd = (1./48) * ks[2] + .5 * ks[0];
888 ksub[0] = .5 * ks[0] - .125 * ks[1] + (1./64) * ks[2] - (1./768) * ks[3];
889 ksub[1] = .25 * ks[1] - (1./16) * ks[2] + (1./128) * ks[3];
890 ksub[2] = .125 * ks[2] - (1./32) * ks[3];
891 ksub[3] = (1./16) * ks[3];
892 thsub = rot - .25 * ks[0] + (1./32) * ks[1] - (1./384) * ks[2] + (1./6144) * ks[3];
899 ksub[0] += .25 * ks[1] + (1./384) * ks[3];
900 ksub[1] += .125 * ks[2];
901 ksub[2] += (1./16) * ks[3];
939 spiro_seg_to_otherpath(s[i].ks, x0, y0, x1, y1, bc, 0, (nsegs == n) && (i == n - 1));
949 compute_ends(s[i].ks, ends, s[i].seg_ch);
952 compute_ends(s[i - 1].ks, ends, s[i - 1].seg_ch);
984 double ks[] = {1, 2, 3, 4};
991 integrate_spiro(ks, xynom);
1001 integrate_spiro(ks, xy);
1010 ks[0], ks[1], ks[2], ks[3], xy[0], xy[1], ch, th);
1018 print_seg(const double ks[4], double x0, double y0, double x1, double y1)
1020 double bend = fabs(ks[0]) + fabs(.5 * ks[1]) + fabs(.125 * ks[2]) +
1021 fabs((1./48) * ks[3]);
1032 integrate_spiro(ks, xy);
1041 th_even = (1./384) * ks[3] + (1./8) * ks[1] + rot;
1042 th_odd = (1./48) * ks[2] + .5 * ks[0];
1058 ksub[0] = .5 * ks[0] - .125 * ks[1] + (1./64) * ks[2] - (1./768) * ks[3];
1059 ksub[1] = .25 * ks[1] - (1./16) * ks[2] + (1./128) * ks[3];
1060 ksub[2] = .125 * ks[2] - (1./32) * ks[3];
1061 ksub[3] = (1./16) * ks[3];
1062 thsub = rot - .25 * ks[0] + (1./32) * ks[1] - (1./384) * ks[2] + (1./6144) * ks[3];
1069 ksub[0] += .25 * ks[1] + (1./384) * ks[3];
1070 ksub[1] += .125 * ks[2];
1071 ksub[2] += (1./16) * ks[3];
1090 printf("%% ks = [ %g %g %g %g ]\n",
1091 segs[i].ks[0], segs[i].ks[1], segs[i].ks[2], segs[i].ks[3]);
1092 print_seg(segs[i].ks, x0, y0, x1, y1);