Rotating Stereo Cubes

Nikolaus Gradwohl2009-03-14T09:18:00+01:00

I made my first 3d processing sketch that generates a stereo image for cross eyed viewing

click here to see the cubes rotate

rotating cube

read more ...

window resizing in processing

Nikolaus Gradwohl2009-03-08T19:50:00+01:00

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() {

int col = 0;

void draw() {
  line(0,0,width, height);

void mousePressed() {
  if (col == 0) {
    resizeApp( 640, 400 );
    col = 255;
  } else {
    resizeApp( 320, 200 );
    col = 0;

void keyPressed() {

void resizeApp( int w, int h ) {
  int delta = frame.getHeight()-height;
   resize( w, h );
   frame.setSize( w, h + delta );
read more ...

processing ical-flowers-2.0

Nikolaus Gradwohl2009-02-15T08:15:00+01:00

I made a new version of the ical flowers sketch i wrote in dezember. This time it doesn't only show a flower for every event in my calender, it also shows

  • the current weather (using the rubyweather library)
  • the current temperature outside
  • the min/max temperature outside
  • the current temperature inside ( using my arduino i2c thermometer sketch)
  • the sky color changes depending on the current time

ical-flowers screen1

ical-flowers screen2

the system consists of a ruby-proxy, an arduino sketch and a processing sketch.

the ruby proxy starts a web-server on port 2000. It fetches the current weather using the rubyweather gem, fetches the events from the configured caldav calenders, and fetches the current temperature from the arduino using ruby-serial

the arduino sketch is basicaly the same as in this blog post. the only change is that the arduino only sends the temperature when the host sends a 'C' over the serial line

the processing sketch finally fetches the data via http from the proxy and displays it ( using my icap4p library. the screen is updated every 1/2 hour using the method described here

the code can be downloaded here

it's published under the LGPL

have fun :-)

read more ...

abstract art generator

Nikolaus Gradwohl2009-02-06T18:29:00+01:00

my latest processing-sketch is a generator for abstract art.

just click on the applet to generate a new image

abstract art generator

read more ...

Processing links

Nikolaus Gradwohl2009-02-05T18:02:00+01:00 the mother of all processing sites :-) a language and a microcontroller board that that go very well with processing a mobile phone edition of porcessing a site showing how to visualize data using processing a site collection processing sketches a processing meta blog a collection of black'n'white monsters - coded in processing (one of them has been written by me :-) ) my own site

two really great art collections using processing

some artists using processing


make things talk

visualizing data

Processing: A Programming Handbook for Visual Designers and Artists

read more ...

extra low framerates in Processing

Nikolaus Gradwohl2009-01-29T04:45:00+01:00

when you want to write a processing sketch, that doesn't redraw several times a second, but updates the main method only once in a while (for example once per hour or minute) the following code can be used to start a thread that triggers a redraw after a delay. Just make sure the setup method calls the noLoop() methode and than start the thread calling start( millisecondsToWait );

void setup() {
  noLoop(); // <- turn off the processing loop

  start( 20 * 1000 ); // <- start the thread

void draw() {
  background( 255 );
  // draw some random circles
  for ( int i =0; i< 10; i++) {
    color c = color(random( 255 ));
    fill( c );
    stroke( c );
    int radius = int(random( 100 )+ 40);
    ellipse( random( width ), random( height ), radius, radius );     

void start( final int mil ) { //<- mil has to be final to be accessible in run() 
   new Thread() { 
   public void run() {
     while( true ) {     
        delay( mil );
read more ...

Random numbers with MobileProcessing

Nikolaus Gradwohl2009-01-25T08:14:00+01:00

I wrote my first sketch in MobileProcessing. MobileProcessing is a processing dialect, that can be used to write apps for java-capable mobile phones.

The application can be used to generate random numbers. every key-event shows a new random number.

  a random number generator by
  <a href="">Guru</a>

PFont font;
int rnd = 0;

void setup() {  
  textFont( font );
  textAlign( CENTER );
  rnd = random(0,100000);

void draw() {
  text( "\n\n\n"+rnd, 0, 0, width, height );

void keyPressed() {
  rnd = random(0,100000);
read more ...

Processing sketch on fire

Nikolaus Gradwohl2009-01-18T07:50:00+01:00

I just made another little demo in processing. in fact i rewrote a little demo i did 15 years ago in pascal on a dos-box


read more ...

Training Bike Visualization

Nikolaus Gradwohl2008-12-08T14:58:00+01:00

i wrote a processing sketch to visualize and record sessions on a training bike. To calculate the rotation-speed of my training bike i hooked up 2 reed-switches to my arduino and taped them to my training bike. Than i sticked a rare earth magnet on each pedal.

the processing sketch draws a small figure on a bike which is animated at the same speed as the bike.

the sketch also records the timestamps to a log file for later analysis.

training bike

read more ...

processing ical-flowers

Nikolaus Gradwohl2008-12-06T22:42:00+01:00

I just made a processing sketch using my ical4p library. The programm draws a flower for every event in a given ical-file. The more events the calender has, the more beautifull the flower-garden is :-)


read more ...