code: function resample(coordinates) {
      var i = 0,
          n = coordinates.length,
          j,
          m,
          resampled = n ? [coordinates[0]] : coordinates,
          resamples,
          origin = arc.source();
  
      while (++i < n) {
        resamples = arc.source(coordinates[i - 1])(coordinates[i]).coordinates;
        for (j = 0, m = resamples.length; ++j < m;) resampled.push(resamples[j]);
      }
  
      arc.source(origin);
      return resampled;
    }
docs: Resample coordinates, creating great arcs between each.