code: function (nbPoints, pathIndex) {
                      var pointCap = Array();
                      for (var i = 0; i < nbPoints; i++) {
                          pointCap.push(path[pathIndex]);
                      }
                      return pointCap;
                  }
docs: cap