//======================================================
// Numerical Analysis package in java
// PlotS class to plot 3D function 
// with real time function generation (function input as 
// String variable uses ContourPlot class  
// Dr. Turhan Coban
// EGE University, Engineering School, Mechanical Eng. Div.
// turhan.coban@ege.edu.tr
// =====================================================
import java.io.*;
import java.awt.Color;
import static java.lang.Math.*;

public class Plot3DCS
{ ce5 x0;  // write function f3D compile it as a java file
  ce3DC x1;  // plot function f3D by using ContourPlot class
  String ss;
  double a[];
  int N,ipt,ir,ig,ib;
  
  public Plot3DCS(String s,double ai[],int N)
  {
	  ce5 x0=new ce5(s);
	  ss=s; 
	  a=new double[4];
	  for(int i=0;i<4;i++) {a[i]=ai[i];}
      this.N=N;
  }
     
  public void plot()
  { x1=new ce3DC(a,N,ss);}
  
  public static void func(String s,double a[],int N)
  {Plot3DCS ps=new Plot3DCS(s,a,N);
   ps.plot();
  }
  public static void func(String s,double a[])
  {Plot3DCS ps=new Plot3DCS(s,a,20);
   ps.plot();
  }
}