IdeaMonk

thoughts, ideas, code and other things...

Sunday, November 23, 2008

Playing with Python

Winter has arrived... the time has come to sit with coffee mugs. This time i'm playing around with Python. Hope to make a great web apps on Google App Engine after doing some django too. I'm referring the free book "Dive into Python". Besides that, the humble folks at #python on irc.freenode.net are always ready to help out anyone getting constricted by the python ;)
Here's my setup for learning -


Two Terminator split shells, one with book and one with vim(molokai theme) & python interpretor

Take a look at list of free-ebooks to get started -

http://diveintopython.org/
http://gnosis.cx/TPiP/
(txt processing)
http://www.swaroopch.com/byteofpython/
http://homepage.mac.com/s_lott/books/python.html
http://homepage.mac.com/s_lott/books/oodesign.htm
http://www.greenteapress.com/thinkpython/

there are some amazing examples and practice questions lying out there. You think you've done all that then move straight to - http://www.pythonchallenge.co

Labels: ,

Wednesday, November 19, 2008

Another processing adventure


Labels: , ,

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 -

/* 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();
}
Don't forget to have an 'out' folder in the project folder and the image in the 'data' folder.
have a look here too...

Labels: , ,

Sunday, November 16, 2008

Trying out Ubuntu 8.10 - the Intrepid Ibex

:-) That't not OS X, that my Ubuntu. Just installed as a tryout, Oops! it's not detecting my nVidia graphics card. Everything else os working fine but what without graphics :(, as usual I started digging google for answers, and suddenly after 2 minutes, a pleasant notice comes - "New Hardware drivers available". And I am left with nothing much to do, all is taken care by the OS itself, another reboot and here you go 1280x800 at its best. And I haven't gone back to windows since last 10 hrs. You thought installing linux apps was tough... you thought going through ./configure , make , make install routine was too complicate ? Were you ever disappointed to see dependency warnings when you tried to install a new media player or something cool like Compiz Fusion? Then you're welcome back if you have lost all the hopes on linux. For, you haven't a taste of the Synaptic Package manager!

And now, thanks to the huge repository, you don't even have to google for any software that comes for ubuntu, just type its name, if its in the repository, ubuntu will teach you how to install it! If you're not done with that, get hold of Ultimatix and get everything done at click of the mouse. I knew ubuntu didnt have full GCC installed, gcc worked but g++ didn't, and guess what all I was told to do is "sudo apt-get install g++" and ...done! Clean n clear installation with all the dependency issues etc out of my view! Checkout gnome-look.org for great looks... have fun with metacity themes. Don't forget to add Compiz - Fusion for amazing effects ;)
This OS is damn sexy, gives sense of infinite freedom and truly inspires creativity!

Labels:

Tuesday, November 11, 2008

I did something awful tonight!

Before you read the whole story - Better watch something AWFUL :-)
Even after 4 continuous hours of doing maths, I am still filled with great enthusiasm to do something really awful tonight. Among the good things I did was to try our processing 1.0. It reminds me of the old days when I started with GW-BASIC and did some random graphics demos. I did the same in processing. But wait, thats not awful. After that I even tried the Image processing effects and basic animations... but eve thats not so awful. I did these -


But the blockbuster processing script was yet to come up... suddenly amidst creating a random color sprinkler shit, I came around something awful... go have a look yourself... words are less to describe it. Watch it at your own risk... watch it as it starts to spin your mind...

watch something awful tonight, have fun... comments are welcome
you need java to get entertained!

Labels:

Saturday, November 08, 2008

Twitteriffic!

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 :

Labels: ,