// * import java.applet.*; import java.awt.*; import java.awt.event.*; import Mitsui.*; //Mitsui_Itoの入っているパッケージMitsuiを呼び出す。 public class toukousen3 extends Applet { Mitsui_and_Ito m = new Mitsui_and_Ito(); public void init(){ Graphics g=getGraphics(); m.setGraphics(g); m.setScreenSize(getSize().width,getSize().height); m.setColor(Color.red); //[a,b]x[c,d] m.setArea(-1.2,1.2,-1.2,1.2); } public void paint(Graphics g) { //0, 1, -1, x, yを表示 g.setColor(Color.red); int nx=100,ny=100; double xmin=-1.0,xmax=1.0,ymin=-1.0,ymax=1.0; double x,y; double [][]u=new double[nx+1][ny+1]; double dx = (xmax-xmin)/nx; double dy = (ymax-ymin)/ny; for (int i=0;i<=nx;i++ ){ x = xmin + i * dx; for (int j=0;j<=ny;j++ ) { y = ymin + j * dy; u[i][j] = x*x-y*y; } } // 等高線描画 for (double h=-1.0;h<=1.0;h+=0.1) { if (h < 0.0) m.setColor(Color.blue); else m.setColor(Color.red); m.contln(xmin, xmax, ymin, ymax, u, nx, ny, h); /** m.contln(xmin, xmax, ymin, ymax, u, nx, ny, h);は    Mitsui_and_Itoから下のcontlnを呼び出している。([xmin,xmax]×[ymin,ymax]) public void contln(double xmin, double xmax, double ymin, double ymax, double [][]u, int nx, int ny, double h) { int i, j; double dx = (xmax-xmin)/nx, dy=(ymax-ymin)/ny; double x[] = new double[nx+1]; double y[] = new double[ny+1]; for (i=0;i<=nx;i++) x[i] = xmin + i * dx; for (j=0;j<=ny;j++) y[j] = ymin + j * dy; for (i=0;i