code: function(length, points) {
  
                  var result = {},
                      //顶点索引
                      pointIndex = null;
  
                  for (var i = 0, j; i < length; i++) {
  
                      var point1 = null,
                          point2 = null;
  
                      //计算当前点
  
                      j = (i + 1) % length;
  
                      //保存当前处理的顶点索引
                      pointIndex = j;
  
                      point1 = points[i + ',' + j];
  
                      //计算下一个点
                      i = j;
                      j = (i + 1) % length;
  
                      point2 = points[i + ',' + j];
  
                      result[pointIndex] = {
                          points: [{
                              x: point1.x,
                              y: point1.y
                          }, {
                              x: point2.x,
                              y: point2.y
                          }],
  
                          center: {
                              x: (point1.x + point2.x) / 2,
                              y: (point1.y + point2.y) / 2
                          }
                      };
  
                      //还原i值
                      i = (pointIndex + length - 1) % length;
  
                  }
  
                  return result;
  
              }
docs: /*
  对getCenterPoints()接口获取到的数据做处理， 计算出各个顶点对应的平移线数据
  @param length 集合中点的个数
  @param points 点集合， 该集合应该是getCenterPoints()接口返回的数据