Code from the workshop will be online here: workshops/080310_khio. Check out Kuler for RGB color goodness.
Inspiration for media architecture:

Code from the workshop will be online here: workshops/080310_khio. Check out Kuler for RGB color goodness.
Inspiration for media architecture:
The following Processing example shows how to set up a separate thread for loading images into a sketch. I wrote it up in response to this post on the Processing forums, figuring it will be useful to some of my students too.
We’re making good progress at the HyperWerk digital fabrication workshop, see the new Fabbing @ HyperWerk Flickr group for details.
I’m at HyperWerk in Basel, Switzerland teaching a workshop in parametric design for the next two weeks. Files will be uploaded to the following address:
http://workshop.evolutionzone.com/workshops/080218_hyperwerk/
Task for the day:
Turns out Java has no mechanism for discovering the names of disk volumes. You can use java.io.File.listRoots() to get the root paths for multiple disks, but you can’t auto-discover their names.
Here’s a quick hack that will work on Windows. It uses Runtime.getRuntime().exec() to run “cmd /c dir
import java.io.*;
void setup() {
println("Testing getVolName");
String path="D:";
println("Volume name for "+path+" is: "+
"'"+getDiskVolumeName(path)+"'");
}
public static String getDiskVolumeName(String path) {
String volname="Unknown";
String check="Volume in drive "+path.charAt(0)+" is ";
try {
Process p=Runtime.getRuntime().exec("cmd /c dir "+path);
//p.waitFor();
BufferedReader reader=new BufferedReader(
new InputStreamReader(p.getInputStream()));
String line=reader.readLine();
while(line!=null) {
if(line.indexOf(check)!=-1)
volname=line.substring(line.indexOf(check)+check.length());
// System.out.println(line);
line=reader.readLine();
}
}
catch(Exception e1) {
println("Failure: "+e1.toString());
}
return volname;
}
I am teaching a 3-day workshop in Digital Architecture at the Oslo School of Architecture & Design (AHO) this week, as part of a course by Søren Sørensen. The workshop will give an introduction to Processing, with a focus on synthesis of spatial form. If time permits we’ll also look briefly at Rhinoscript.
Be sure to look at the page I have prepared with links related to computational architecture. Code will be uploaded to:
http://workshop.evolutionzone.com/workshops/080211_aho.
Rishaug & Watz [NO] at Generator.x 2.0 (video by pablosanz)
I just finished a set of concerts with Alexander Rishaug, starting in Berlin at CTM.08 / Generator.x 2.0: Audio-Visual. This week we did two more gigs, first at VJ picks DJ in Bergen and finally on our home turf at Kabinett #3 in Oslo. For an impression of the set you can have a look at the clip above, posted by Pablo Sanz. For a short interview you can take a look at WatchBerlin's coverage of the concert and exhibition opening.
It was great to play with Alexander and develop our collaboration further, his cinematic soundscapes are a treat to work with. Audience responses seem to indicate that we’re doing something right, so hopefully we’ll find more chances to play together in the near future.
Fan Fan, Knut Karlsen, Natacha Ruivo: Quick Chick - a Processing game
Over on Fan Fan’s blog I just found documentation of one of the funniest games the students made: “Quick Chick” starring Billy the Chick who must dodge poisonous falling apples and thorny flowers while making his way home before dark.
Quick Chick is a classic scrolling-landscape type game with obstacle avoidance and good gameplay. Graphically it’s so smooth you’d swear it was done in Flash (it’s JAVA2D). And the graphics are some of the cutest I’ve ever seen in a Processing sketch.

Sample code to use mouse wheel events in Processing.
Here is a simple example showing how to use unlekkerLib to output and input 3D geometry in STL format.
// STLBoxes.pde - demonstrates how to use unlekkerLib to
// import / export STL geometry data.
//
// Marius Watz - http://workshop.evolutionzone.com/
import unlekker.data.*;
STL stl;
public void setup() {
size(400,400, P3D);
frameRate(25);
sphereDetail(12);
}
public void draw() {
translate(width/2,height/2);
if(frameCount==10) outputSTL();
else if(frameCount==11) readSTL();
if(frameCount<12) return;
background(0);
noStroke();
lights();
rotateY(radians(frameCount));
rotateX(radians(frameCount*0.25f));
fill(0,200,255, 128);
stl.draw();
}
public void readSTL() {
stl=new STL(this,"Boxes.stl");
stl.normalize(400); // scale object
stl.center(); // center it around world origin
}
public void outputSTL() {
float rad;
stl=(STL)beginRaw("unlekker.data.STL","Boxes.stl");
for(int i=0; i<200; i++) {
pushMatrix();
translate(random(-200,200),0,-random(400));
rotateX(((float)(int)random(6))*radians(30));
rotateY(((float)(int)random(6))*radians(30));
rad=random(5,25);
if(random(100)>5) box(rad,random(50,200),rad);
else sphere(rad);
popMatrix();
}
endRaw();
}