//import processing.opengl.*; // TIPS - // setStrength - Determines size of Blob // // STEPS - // 1) V Get vector forces to move metaballs, defaults to perlin noise movements // 2) ~ Get multiple metaballs into an arraylist, without arraylist blowing up w/ metaball objects // 3) ~ Keep moving to keep the amoeba alive, expands both color & metaball strength // 4) ~ Ripple wind dormant state // 5) ~ Fade up from underneath ground effect // 6) ~ Add varying types, 'personalities' // 7) ~ Play with varing forces to create more emergent properties // 8) ~ Retain history?? MetaSystem ms; int Metanum = 1; // # of Metaballs to create //Vector3D a = new Vector3D(0.0,random(0,0.125)); //Vector3D v = new Vector3D(random(0,0.2),0.0); //Vector3D l = new Vector3D(random(0,width),2); //------------------------------------------------------------ // setup() //------------------------------------------------------------ void setup() { //for(int i = 0; i < Metanum; i++) { //} size(640, 480); ms = new MetaSystem(); } void draw() { background(0); /* if (keyPressed) { if (key == 'a') { ms.addBall(); } if (key == 'r') { ms.removeBall(); } */ smooth(); ms.run(); //filter(BLUR, 4); //fastblur(8); } // ================================================== // Super Fast Blur v1.1 // by Mario Klingemann // // ================================================== void fastblur(PImage img,int radius) { if (radius<1){ return; } int w=img.width; int h=img.height; int wm=w-1; int hm=h-1; int wh=w*h; int div=radius+radius+1; int r[]=new int[wh]; int g[]=new int[wh]; int b[]=new int[wh]; int rsum,gsum,bsum,x,y,i,p,p1,p2,yp,yi,yw; int vmin[] = new int[max(w,h)]; int vmax[] = new int[max(w,h)]; int[] pix=img.pixels; int dv[]=new int[256*div]; for (i=0;i<256*div;i++){ dv[i]=(i/div); } yw=yi=0; for (y=0;y>16; gsum+=(p & 0x00ff00)>>8; bsum+= p & 0x0000ff; } for (x=0;x>16; gsum+=((p1 & 0x00ff00)-(p2 & 0x00ff00))>>8; bsum+= (p1 & 0x0000ff)-(p2 & 0x0000ff); yi++; } yw+=w; } for (x=0;x