processing bubbles
here comes another completly useless processing sketch by me this time starring bubbles
ok, it's not that useless i changed the transparency of the bubbles according to the speed so slower bubbles seem to be more distant from the viewer than faster ones.
this generates a nice and simple parallax effect.
read more ...Digital Caleidoscop
i made a digital caleidoscop using processing sketch click here to see it in action. I had to use openGL for this sketch so i'm not sure if it works as an applet on all plattforms. Download the code and run it as an app if the applet doesn't show anything.
read more ...processing.js in dashboard widget
I managed to get processing.js - a javascript based processing clone - to run in an apple dashboard widget.
read more ...blooming tree in processing
because spring is getting near, and everyone is googling for flowers and bees (i have about 10 hits a day all coming from google searching "ascii flower bee"),
i made a processing-sketch showing a blooming tree
every time the applet is started it grows it unique tree
read more ...Boids Demo
I just wrote a boids-demo in processing.
the boids obey the 3 rules defined by Craig Reynolds.
click here to see some boids flying around
read more ...how to detect presentmode in processing
in processing sketches can be run in "present" mode. which means a frame is generated in fullscreen mode and the code of the sketch is centered on the screen.
to change the size of the actual sketch depending on wether presend mode is active or not
the following code can be used
void setup() {
for ( int i = 0; i < args.length; i ++ ) {
if ("--present".equals(args[i])) {
present = true;
break;
}
}
if (present) {
size(screen.width,screen.height, OPENGL);
} else {
size(600,600, OPENGL);
}
// do your normal setup stuff here
}
read more ...3d Particle effect demo
i used the makeTexture method from my firefly sketch to make a 3d particle demo
click here to download the sourcecode.
read more ...Digital Fireflies
I made another processing sketch that showes something glowing
click here to see some fireflies whirrl
arround
Rotating Stereo Cubes
I made my first 3d processing sketch that generates a stereo image for cross eyed viewing
click here to see the cubes rotate
read more ...window resizing in processing
The following processing code shows how to resize a processing window from your code. the resizeApp methdo calculates the difference between the frame size and the size of the actual drawing area and adds it to the new size. then the application-frame is resized.
void setup() {
size(320,200);
}
int col = 0;
void draw() {
background(col);
stroke(255,0,0);
line(0,0,width, height);
line(0,height,width,0);
}
void mousePressed() {
if (col == 0) {
resizeApp( 640, 400 );
col = 255;
} else {
resizeApp( 320, 200 );
col = 0;
}
}
void keyPressed() {
exit();
}
void resizeApp( int w, int h ) {
int delta = frame.getHeight()-height;
resize( w, h );
frame.setSize( w, h + delta );
}
read more ...