function getPointAtCubicSegmentLength(x1, y1, c1x, c1y, c2x, c2y, x2, y2, t) {
  const t1 = 1 - t;
  return {
    x: (t1 ** 3) * x1
      + 3 * (t1 ** 2) * t * c1x
      + 3 * t1 * (t ** 2) * c2x
      + (t ** 3) * x2,
    y: (t1 ** 3) * y1
      + 3 * (t1 ** 2) * t * c1y
      + 3 * t1 * (t ** 2) * c2y
      + (t ** 3) * y2,
  };
}
Returns a {x,y} point at a given length, the total length and
the minimum and maximum {x,y} coordinates of a C (cubic-bezier) segment.

@param {number} x1 the starting point X
@param {number} y1 the starting point Y
@param {number} c1x the first control point X
@param {number} c1y the first control point Y
@param {number} c2x the second control point X
@param {number} c2y the second control point Y
@param {number} x2 the ending point X
@param {number} y2 the ending point Y
@param {number} t a [0-1] ratio
@returns {{x: number, y: number}} the cubic-bezier segment length