class Noise{ float a = 0.0; float inc = TWO_PI/120.0; float a2 = 0.0; float inc2 = TWO_PI/255.0; float b=1; float x; float y; float z=1; float z2=1; float c=1; Noise(){ } void blur() { int index,R,G,B,left,right,top,bottom; int a=16; loadPixels(); for(int j=0;j0) left=-1; else left=width-1; if(j==(width-1)) right=-width+1; else right=1; if(i>0) top=-width; else top=(height-1)*width; if(i==(height-1)) bottom=-(height-1)*width; else bottom=width; // Calculate the sum of n neighbors R=(pixels[left+index]>>a) & 255; // left middle R+=(pixels[right+index]>>a) & 255; // right middle R+=(pixels[index]>>a) & 255; // middle middle R+=(pixels[index+top]>>a) & 255; // middle top R+=(pixels[index+bottom]>>a) & 255; // middle bottom R=(R/5); G=(pixels[left+index]>>a/2) & 255; // left middle G+=(pixels[right+index]>>a/2) & 255; // right middle G+=(pixels[index]>>a/2) & 255; // middle middle G+=(pixels[index+top]>>a/2) & 255; // middle top G+=(pixels[index+bottom]>>a/2) & 255; // middle bottom G=(G/5); B=pixels[left+index] & 255; // left middle B+=pixels[right+index] & 255; // right middle B+=(pixels[index] & 255); // middle middle B+=pixels[index+top] & 255; // middle top B+=pixels[index+bottom] & 255; // middle bottom B=(B/5); pixels[index]=(R<