code: function getPointOnBezier(startX, startY, cpX, cpY, endX, endY, distance){
      var bestT = 0;
      var bestAccuracy = 1000;
      var stepSize = 0.001;
      for(var t = 0; t<1; t+=stepSize){
        var currentPoint = getQuadraticCurvePoint(startX, startY, cpX, cpY,
            endX, endY, t);
        var currentDistance = getDistanceBetweenPoints(startX, startY,
            currentPoint.x, currentPoint.y);
        if(Math.abs(currentDistance-distance) < bestAccuracy){
          bestAccuracy = Math.abs(currentDistance-distance);
          bestT = t;
        }
      }
      return getQuadraticCurvePoint(startX, startY, cpX, cpY, endX, endY, bestT);
    }
docs: /* Function to get a point on a bezier curve a certain distance away from
  its source. Needed since the position on a beziercurve is given to the
  formula as a percentage (t).