int IMGHEIGHT; int IMGWIDTH; PImage[] images = new PImage[5]; float[] weight=new float [5]; void setup() { IMGHEIGHT=450; IMGWIDTH=600; frameRate(4); images[0] = loadImage("5a.jpg"); images[1] = loadImage("5b.jpg"); images[2] = loadImage("5c.jpg"); images[3] = loadImage("5d.jpg"); images[4] = loadImage("5e.jpg"); size(IMGWIDTH,IMGHEIGHT); //noLoop(); } void draw() { weight[0]=random(150); weight[1]=random(100); weight[2]=random(150); weight[3]=random(150); weight[4]=random(100); int cols; int rows; int sub; int i; float r; float g; float b; float sumR; float sumG; float sumB; float totalWeight; loadPixels(); for (rows=0;rows