code: public void removePoint(int index) {
          int numKnots = x.length;
          if (numKnots <= 2)
              return;
          float[] nx = new float[numKnots - 1];
          float[] ny = new float[numKnots - 1];
          int j = 0;
          for (int i = 0; i < numKnots - 1; i++) {
              if (i == index)
                  j++;
              nx[i] = x[j];
              ny[i] = y[j];
              j++;
          }
          x = nx;
          y = ny;
      }
docs: Remove point
  
  @param index Index.