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 f1 extends f_xj
{
public double func(double x[]) 
{
//çözümü istenen fonksiyon	
double ff;
int artieksi=-1;
double L=1.0;;
double W=1.0;
double toplam=0;
for(int n=1;n<200;n++)
{   artieksi*=-1;
	toplam+=(artieksi+1)/n*Math.sin(n*Math.PI*x[0]/L)*Math.sinh(n*Math.PI*x[1]/L)/Math.sinh(n*Math.PI*W/L);
}
toplam*=(2.0/Math.PI);
return toplam; //minimum değil maxsimum istendiğinden - ile çarptık
}
}

  public class Plot3DT2
  {
  public static void main(String[] args) throws RemoteException, VisADException
  { f1 fa=new f1();
    //Plot3D.func(fa,0.0,1.0,0.0,1.0);
    Plot3D.contour(fa,0.0,1.0,0.0,1.0,100,100,100,"x","y","f(x,y)");
    //Plot3D.contour(fa,0.0,2.0,0.0,1.0,100,100);
  }
  }