Simple Isometric graphics with processing

Posted by Nikolaus Gradwohl Wed, 20 May 2009 03:08:00 GMT

I found a very simple way to generate isometric graphics in processing.

isometric

click here to see it as an applet (and get the source)

the trick is to rotate the image by 45 deg and scale it with scale(1, 0.5).

this way the graphic can be draw as always, only the z coordinate has to be substracted from the x and the y coordinate

...
void draw() {
  pushMatrix();
  translate( width/2, height/2 );
  scale( 1, 0.5 );
  rotate( radians( 45 ) );
  translate( -width/2, -height/2 );
  background(255);

  line( x1 - z1, y1 - z1, x2 - z2, y2 - z2 );   

  popMatrix();
}
...

Tags  | 1 comment | no trackbacks

Tweet This! submit to reddit Digg!

ttslib for processing

Posted by Nikolaus Gradwohl Sat, 16 May 2009 18:31:00 GMT

i have written another library for processing. This time its a wrapper around the freetts library

now processing sketches can have a voice too.

click here to go to the project page.

i cannot present an applet as an example this time, because freetts doesn't work in applets. So i show the example.

import guru.ttslib.*;

TTS tts;

void setup() {
  size(100,100);
  smooth();
  tts = new TTS();
}

void draw() {
  background(255);
  fill(255);
  ellipse( 35, 30, 25, 35 );
  ellipse( 65, 30, 25, 35 );
  fill(0);
  ellipse( 40, 35, 10, 10 );
  ellipse( 60, 35, 10, 10 );
  noFill();
  arc(50,50,50,50,0,PI);

}

void mousePressed() {
  tts.speak("Hi! I am a speaking Processing sketch");
}

Tags ,  | 2 comments | no trackbacks

Tweet This! submit to reddit Digg!

aimllib for processing

Posted by Nikolaus Gradwohl Fri, 15 May 2009 03:43:00 GMT

I have written an AIML processing library, that uses the chatterbean library by Hélio Perroni Filho. AIML is a xml based markuplanguage for creating agents and bots that respond to natrual language.

click here for a simple example (the example is also included in the library)

the library is released under the GPL

lets add some brain to those sketches :-)

Tags ,  | no comments | no trackbacks

Tweet This! submit to reddit Digg!

Tunnel effect in processing using copy

Posted by Nikolaus Gradwohl Sat, 09 May 2009 05:48:00 GMT

i worte a little tunnel effect using the copy command and a transparent rectangle in processing. i use no perlin noise in this sketch, just a plain random and copy command that scales the image and a transparent rect, to make the older pixel fade out. (don't ask me why it has to be 19 pixel less then width, but when i use 20 it gets dragged to the lower right corner)

copy(10, 10, width-19, height-19,0,0,width, height ); 
fill(0,10);
rect(0,0,width, height );

click here to see it in action

tunnle effect

Read more...

Tags  | 1 comment | no trackbacks

Tweet This! submit to reddit Digg!

Processing at the OCWD#2

Posted by Nikolaus Gradwohl Sat, 09 May 2009 04:34:00 GMT

on saturday the 2.May i was invited as a speaker to the second Osliper Computer-Workshop-Day. This time the workshop was about processing and arduino. read the summary by Franz on his blog (in German), to see some of the examples we made.

like the first OCWD (which was about python, django and pylons) it was really a whole lot of fun, and i'm looking forward to the next ones

Tags  | no comments | 1 trackback

Tweet This! submit to reddit Digg!

Skyline Generator

Posted by Nikolaus Gradwohl Mon, 04 May 2009 18:18:00 GMT

I worte a little skyline generator in processing.

click here to generate your own. Press any key to recreate the skyline if you don't like it

skyline

Tags  | no comments | no trackbacks

Tweet This! submit to reddit Digg!

accessing GIS data from Processing

Posted by Nikolaus Gradwohl Sun, 03 May 2009 17:50:00 GMT

I wrote a processing sketch to show how to access a wms service for showing a map. i use geoserver as a wms provider and the map shown in the screenshots is from http://thematicmapping.org/.

the map can be dragged with the mouse and zoomed with the scroll wheel

worldmap worldmap zoomed

Read more...

Tags , ,  | 4 comments | 1 trackback

Tweet This! submit to reddit Digg!