import java.applet.*;
import java.awt.*;

//******************************************
public class Fig005 extends Jcalcomp
//******************************************
{
//========================================== 
  public  Fig005()
//==========================================
  {
	  super(600,300,75.,-30.,-8.);
  }
//========================================== 
  public void init()
//==========================================
  {
	setLayout( null );
  }
//==========================================
  public void paint( Graphics g )
//==========================================
  {
	double n;
	int i,j;
	char flg[]=new char[140];
	double wid=4.0;
	double xcur,ycur;
	double	x[]= new double[140],
			y[]= new double[140],
			f[]= new double[140],
			setlvl[]=new double[21];
	int		stclr[]=new int[21],
			stlsy[]=new int[21];
	double r0=7.,r1=30.;
	double h1;
	int x_max=10,y_max=10,f_max=10;
	int x_max1=x_max+1,y_max1=y_max+1,f_max1=f_max+1;

    g.setColor( Color.yellow );
	double dx=Math.PI/x_max;
	double dy=(r1-r0)/y_max;
	for(i=0;i<=x_max;i++)
	{
		double costheta=Math.cos(dx*i);
		double sintheta=Math.sin(dx*i);

		for(j=0;j<=y_max;j++)
		{
			double r=r0+dy*j;
			x[i*x_max1+j]=r*costheta;
			y[i*x_max1+j]=r*sintheta;
			f[i*x_max1+j]=(y[i*y_max1+j])*(1.-(r0*r0)/(r*r));
			flg[i*x_max1+j]='F';
		}
	}
	for(i=0;i<=20;i++)
	{
		if(i<10)setlvl[i]=(double)i;
		else setlvl[i]=(double)i*2-10;
		stclr[i]=i*10;
	}
	mshplt(g, 
			0,0,
			x,y,flg,
			x_max,y_max,x_max1,y_max1,f_max1,20.,15.);

 	contor(g,
			-1,
			x, y, f,
			flg,setlvl,
			stclr,stlsy,20,
			x_max,y_max,
			x_max1,y_max1,f_max1,f_max1,
			20.,15.);
  }
}
