code: private void initGridLines() {
          gridLines = new Line[base.getDimension() - 1][linesSlicing.length];
  
          int i2 = 0;
  
          for (int i = 0; i < base.getDimension() - 1; i++) {
              if (i2 == index) {
                  i2++;
              }
  
              for (int j = 0; j < gridLines[i].length; j++) {
                  double[] originBase = new double[base.getDimension()];
                  double[] endBase = new double[base.getDimension()];
  
                  System.arraycopy(origin, 0, originBase, 0, base.getDimension());
                  System.arraycopy(origin, 0, endBase, 0, base.getDimension());
  
                  endBase[i2] = base.getCoordinateSpace()[i2 + 1][i2];
                  originBase[index] = linesSlicing[j];
                  endBase[index] = linesSlicing[j];
  
                  if (j == 0 || j == gridLines[i].length - 1) {
                      gridLines[i][j] = new Line(originBase, endBase);
                  } else {
                      gridLines[i][j] = new Line(Line.Style.DOT, Color.lightGray, originBase, endBase);
                  }
              }
              i2++;
          }
      }
docs: Initialize grid lines.