docs: double psfunc2(double x, double t1, int dim, int type, int css) {
      // type:  the type of curve 
      // css:   the class of index
      double beta;
      beta = 0.0;
  
      dim++;
  
      if (type == 21) {
        double xy = 2 * (x - 0.5);
        beta = xy - Math.pow(t1, 0.5 * (nvar + 3 * dim - 8) / (nvar - 2));
      }
  
      if (type == 22) {
        double theta = 6 * Math.PI * t1 + dim * Math.PI / nvar;
        double xy = 2 * (x - 0.5);
        beta = xy - Math.sin(theta);
      }
  
      if (type == 23) {
        double theta = 6 * Math.PI * t1 + dim * Math.PI / nvar;
        double ra = 0.8 * t1;
        double xy = 2 * (x - 0.5);
        if (css == 1) {
          beta = xy - ra * Math.cos(theta);
        } else {
          beta = xy - ra * Math.sin(theta);
        }
      }
  
      if (type == 24) {
        double theta = 6 * Math.PI * t1 + dim * Math.PI / nvar;
        double xy = 2 * (x - 0.5);
        double ra = 0.8 * t1;
        if (css == 1) {
          beta = xy - ra * Math.cos(theta / 3);
        } else {
          beta = xy - ra * Math.sin(theta);
        }
      }
  
      if (type == 25) {
        double rho = 0.8;
        double phi = Math.PI * t1;
        double theta = 6 * Math.PI * t1 + dim * Math.PI / nvar;
        double xy = 2 * (x - 0.5);
        if (css == 1) {
          beta = xy - rho * Math.sin(phi) * Math.sin(theta);
        } else if (css == 2) {
          beta = xy - rho * Math.sin(phi) * Math.cos(theta);
        } else {
          beta = xy - rho * Math.cos(phi);
        }
      }
  
      if (type == 26) {
        double theta = 6 * Math.PI * t1 + dim * Math.PI / nvar;
        double ra = 0.3 * t1 * (t1 * Math.cos(4 * theta) + 2);
        double xy = 2 * (x - 0.5);
        if (css == 1) {
          beta = xy - ra * Math.cos(theta);
        } else {
          beta = xy - ra * Math.sin(theta);
        }
      }
  
      return beta;
    }