import java.awt.*; import java.awt.image.*; import javax.swing.*; public class ZPanel extends JPanel { BufferedImage src; BufferedImage dst; ConvolveOp convolve; int width, height; // image width and height int kwidth=21, kheight=21; // convolution kernel width and height float astrength=3, istrength=2; // activator and inhibitor strengths public ZPanel(int width, int height) { this.width=width; this.height=height; src = new BufferedImage(width,height,BufferedImage.TYPE_INT_RGB); dst = new BufferedImage(width,height,BufferedImage.TYPE_INT_RGB); WritableRaster raster = src.getRaster(); int arrayLength = width*height; int[] randomImage=new int[arrayLength]; for (int i=0; i