forwardDiffBezier static method
void
forwardDiffBezier()
Implementation
static void forwardDiffBezier(double c0, double c1, double c2, double c3,
List<Vec2D> points, int count, int offset) {
double f = count.toDouble();
double p0 = c0;
double p1 = 3.0 * (c1 - c0) / f;
f *= count;
double p2 = 3.0 * (c0 - 2.0 * c1 + c2) / f;
f *= count;
double p3 = (c3 - c0 + 3.0 * (c1 - c2)) / f;
// ignore: parameter_assignments
c0 = p0;
// ignore: parameter_assignments
c1 = p1 + p2 + p3;
// ignore: parameter_assignments
c2 = 2 * p2 + 6 * p3;
// ignore: parameter_assignments
c3 = 6 * p3;
for (int a = 0; a <= count; a++) {
points[a][offset] = c0;
// ignore: parameter_assignments
c0 += c1;
// ignore: parameter_assignments
c1 += c2;
// ignore: parameter_assignments
c2 += c3;
}
}