/** * brooklyn01 * * image processing * * Matthew Conroy (www.madandmoonly.com) * **/ PImage img; PImage edgeImg; void setup (){ size(530, 530); img = loadImage("bridge01.jpg"); // Load the original image img.loadPixels(); edgeImg = createImage(img.width, img.height, RGB); noLoop(); } void draw(){ float rand1=random(1); float rand2=random(1); float radstep=10+30*rand1*rand1; float radfact=0.001+0.01*random(1); float radshift=random(1)*PI; float t=0; float value1=0.0,value2=0.0; float rbound=150+100*random(1); float change=0.0; float[] rotateArray= new float[40]; value1=1.0*random(1)-1.0*random(1); value2=1.0*random(1)-1.0*random(1); for(int i=0; i<40; ++i) { if ((i%2)==0) { change=change+value1; } else { change=change+value2; } rotateArray[i]=change; } for (int y = 0; y < img.height; y++) { for (int x = 0; x < img.width; x++) { float xt=x-img.width*0.5; float yt=y-img.height*0.5; t=atan2(yt,xt); float r = sqrt(xt*xt+yt*yt); if (r