Lines Matching defs:p1
120 Point p1 = points.at(i);
121 Point dx = Point(p1[X] - p0[X], 0);
122 fit.appendNew<CubicBezier>(p0+_beta*dx, p1-_beta*dx, p1);
152 Point p1 = points.at(i);
153 Point dx = Point(p1[X] - p0[X], 0);
155 fit.appendNew<CubicBezier>(p0, p1-0.75*dx, p1);
157 fit.appendNew<CubicBezier>(p0+0.75*dx, p1, p1);
159 fit.appendNew<CubicBezier>(p0+_beta*dx, p1-_beta*dx, p1);
229 Point p1 = points[i+1];
233 fit.append(calc_bezier(p0, p1, p2, p3));
240 CubicBezier calc_bezier(Point p0, Point p1, Point p2, Point p3) const {
241 // create interpolating bezier between p1 and p2
250 double dt0 = powf(distanceSq(p0, p1), 0.25);
251 double dt1 = powf(distanceSq(p1, p2), 0.25);
265 Point tan1 = (p1 - p0) / dt0 - (p2 - p0) / (dt0 + dt1) + (p2 - p1) / dt1;
266 Point tan2 = (p2 - p1) / dt1 - (p3 - p1) / (dt1 + dt2) + (p3 - p2) / dt2;
273 // So we have to make sure that B'(0) = tan1 and B'(1) = tan2, and we already know that b0=p1 and b3=p2
274 // tan1 = B'(0) = 3 (b1 - p1) --> p1 + (tan1)/3 = b1
277 Point b0 = p1;
278 Point b1 = p1 + tan1 / 3;