code: function calculateBezier(t, p0, p1, p2, p3) {
    var mt = 1 - t;
    return mt * mt * mt * p0 + 3 * mt * mt * t * p1 + 3 * mt * t * t * p2 + t * t * t * p3;
  }
docs: Calculate the bezier value for one dimension at distance 't'