constructor(points) {
    this.n = points.length;
    this.p = [];

    // The binomial coefficient
    const c = [1];
    let i;
    let j;
    for (i = 1; i < this.n; ++i) {
      c.push(0);
      for (j = i; j >= 1; --j) {
        c[j] += c[j - 1];
      }
    }

    // the i-th control point times the coefficient
    for (i = 0; i < this.n; ++i) {
      this.p.push({x: c[i] * points[i].x, y: c[i] * points[i].y});
    }
  }
Generates a bezier-curve from a series of points
@param Array array of control points ([{x: x0, y: y0}, {x: x1, y: y1}])