ImageDots imageA; /******************************************/ void setup() { background(0); size(256, 512); //framerate(31); imageA = new ImageDots(); imageA.imgsrc = "tritych.jpg"; //imageA.imgsrc = "demon_frag.jpg"; imageA.cycles = 16; imageA.ripples = 12; imageA.mod = 6; imageA.phaseRate = 1; imageA.imageArray(); imageA.makePix(); } /******************************************/ void loop() { imageA.makePixRipples(); } /******************************************/ class ImageDots { BImage img; String imgsrc; int pixBlockRows; int pixBlockCols; int pixWidth; int xpix,ypix,yOffset; boolean ready; float phase; float cycles; float distance; float numPoints; float amplitude,ripples,mod; float pointIncrement,phaseRate; float cS,cC,n; int debug = 0; color pixArray[][] = new color[1200][400]; color pixArrayInv[][] =new color[1200][400]; /******************************************/ void imageArray() { img = loadImage(imgsrc); xpix = int(img.width); ypix = int(img.height); try { for (int rows=0; rows " + debug); } yOffset = ypix-1; numPoints = ypix; distance = ypix-1; pointIncrement = float((Math.PI*2)/numPoints*cycles); } /******************************************/ void makePix() { for (int rows=0; rows=0) { stroke(pixArrayInv[cols][int(n)+1]); } else { } point(xpix-cols, rows + distance); } } } }