function finiteDifferences(points) {
    var m = [];
    var p0 = points[0];
    var p1 = points[1];
    var d = m[0] = slope(p0, p1);
    var i = 1;
    for (var n = points.length - 1; i < n; i++) {
      p0 = p1;
      p1 = points[i + 1];
      m[i] = (d + (d = slope(p0, p1))) * 0.5;
    }
    m[i] = d;
    return m;
  }
Compute three-point differences for 'points'
@param {Array} points
@returns {Array}