import visad.*;
import visad.java3d.DisplayImplJ3D;
import visad.java2d.DisplayImplJ2D;
import java.rmi.RemoteException;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;

class fa extends f_xj
{
int n;
public double func(double x[]) 
{

//çözümü istenen fonksiyon	
double ff=0;
int n=x.length;
for(int i=0;i<n;i++)
{ff+=-Math.sin(x[i])*Math.pow(Math.sin((i+1)*x[i]*x[i]/Math.PI),20);}
return ff; //maksimum testi
}
}


  public class Plot3DT5 extends JApplet
  {
  public static void main(String arg[]) throws RemoteException, VisADException
  { fa f=new fa();
    Plot3D.func(f,0.0,5.0,0.0,5.0);
    //Plot3D.plot3D_RGB(f,-p,p,-p,p,100,100,80,"x","y","z=f(x,y)");
  }
  }
