import java.awt.*; import java.awt.image.*; import java.applet.*; /* */ public class Es2_Im extends Applet{ int w,h; Image img; Graphics mg; public void init(){ setBackground(new Color(128,0,255)); w = getSize().width; h = getSize().height; img = createImage(new MemoryImageSource(w,h,fillPix(w,h),0,w)); } double C(double x, double y){ return Math.cos((x*x + y*y)/200);//provare anche 600,6000 } public void paint(Graphics g){ g.drawImage(img,0,0,this); } public int[] fillPix(int w, int h){ int X = (w + (int)(0.807 * h))/2; int Y = h/2; int[] pix = new int[w*h]; for(int x = 0; x < w; x++){ for(int y = 0; y