Wednesday, November 19, 2008
Tuesday, November 18, 2008
Some work in Process (progress ?!)
Some work I've been recently doing in Processing 1.0. I can't show applets for these, each of them too more than 20 minutes to render! Will talk more about how I did the second one and 4th one in detail later. All this began in C++ and allegro one day... I haven't yet got the effects I wished to program :| but, processing is taking these experiments into a whole new direction!
An example for what I call circulation-fx -
Put this image into data folder int the processing project you created
This is the code that breaks it into beautiful circles -
Don't forget to have an 'out' folder in the project folder and the image in the 'data' folder.
/* Circulation-fx */
/* crappy-test version */
PGraphics buffer,checkbak;
PFont font;
PImage girl;
color blend1, blend2,src,original,test;
/* ******************* configuration variables */
int tolerance = 15, bmax = 100, bsize;
// adjust tolerance and bmax(max size for circles)
int sX, sY;
boolean possible = true;
float stime;
char c;
String s;
void setup(){
noLoop();
background (255,255,255);
/* *************** change the image here ********************** */
girl = loadImage ("surfing.jpg");
size(girl.width,girl.height);
buffer = createGraphics (girl.width,girl.height,P3D);
buffer.beginDraw();
buffer.noStroke();
buffer.background(255);
buffer.textFont(font);
buffer.endDraw();
stime=millis();
loop();
}
void draw(){
buffer.beginDraw();
possible = true;
bsize=2;
sX=int(random(screen.width));
sY=int(random(screen.height));
test = girl.get(sX,sY);
original=blend2=blend1 = girl.get (sX,sY);
while (possible && bsize<= tolerance && abs(blue(blend1)-blue(blend2)) <= tolerance && abs(green(blend1)-green(blend2)) <= tolerance){ bsize+=1; blend1=blend2; } else { possible=false; } if (bsize>bmax)
possible=false;
}
// crappy string hack
c=(char)(random(25)); c=char(c+'a'+1); s=""; s=s+c;
buffer.stroke((int)red(original),(int)green(original),(int)blue(original),
255- ((float)bsize/float(bmax))*200
);
buffer.noFill();
buffer.ellipse( sX,sY,bsize,bsize);
image(buffer,0,0);
if (millis()-stime >= 20000){
stime=millis();
saveFrame("out/frame-#######.png");
}
buffer.endDraw();
}
void mousePressed(){
noLoop();
}
void mouseReleased(){
loop();
}
have a look here too...
Labels: artwork, image processing, processing
Sunday, November 02, 2008
Artwork for The Wall Magazine
Done with this huuuge image in photoshop. It covers an area as big as a projector screen. Some how my laptops 3 gigs of ram helped me do this one smoothly. Sometimes photoshop can be a pain, specially when you're trying to do something like this and resources are less.
Update [July 2009] : These days nothing is there over the wall magazine, so I get a nice view of my work daily in the college :