int res = 1; // video resolution int totalPixels; // total for array setup int[][] vPixels; // video pixel array int xPix, yPix; // pixel to be modified int r,g,b; // red, green, blue int sns; // sensitivity of bitmapping float[] xArray; // array for total brightness in each column of pixels float[] yArray; // array for total brightness in each row of pixels boolean newFrame; cell[] myCells; BFont Meta; class cell{ float xpos; // xposition float ypos; // yposition cell(float xp, float yp) { xpos = xp; ypos = yp; } void moveToY (float posY, float damping) { float dif = ypos - posY; if (abs(dif) > 1) { ypos -= dif/damping; } } void moveToX (float posX, float damping) { float dif = xpos - posX; if (abs(dif) > 1) { xpos -= dif/damping; } } void drawCell(){ fill(200,0,0); rect(xpos, ypos, 1,1); //textFont(Meta, 12); //fill(0,0,200); //text("test", xpos, ypos); } } void setup() { size(320, 240); noStroke(); Meta = loadFont("Meta.vlw.gz"); vPixels = new int[height][width]; myCells = new cell[width]; for(int i=0; i sns && g > sns && b > sns){ fill(255,255,255); rect(xPix, yPix, res, res); } else{ fill(r,r,r); rect(xPix, yPix, res, res); myCells[i].drawCell(); myCells[i].moveToX(xPix,30); myCells[i].moveToY(yPix,30); } } } }