Archive for April, 2007

KEF Muon launch

Sunday, April 29th, 2007
UPDATE: A short documentation video of the launch event and installation is now available on the Moving Brands website.

Just returned from Milan yesterday where I have spent the last few days as part of the Moving Brands team creating an audio-responsive installation for the launch of the most amazing (and tallest) speakers I’ve ever seen. Engineered by the high-end audio manufacturer KEF and designed by legendary Ross Lovegrove, these speakers really are quite a sound and sight to behold.

Kef Muon @ Sala del cenacolo, Milano Kef Muon @ Sala del cenacolo, Milano Kef Muon @ Sala del cenacolo, Milano

The incredible Sala del Cenacolo hall at the Milan Science Museum had been chosen as space for the launch event and provided the perfect contrasting backdrop to the minimal design of the speakers and installation.

Sala del Cenacolo, Milano

Our installation is using a gigantic LED screen (built by Creative Technology) of 5 x 10 meters to visualize the music played through the speakers in realtime. We decided on the concept of fluid forms flowing/emanating from the positions of the speakers as well as complimenting the Muon design language. The software was developed in Processing by Chris O’Shea under my supervision and creative direction by David Eveleigh-Evans.

More images on Flickr: Toxi, Chris & David

Meirion Pritchard of Wallpaper Magazine has posted a short (overexposed) video on YouTube:

difference tracker for processing

Sunday, April 29th, 2007

one of my students wants to capture images of people in a museum in order to create a collage of all visitors per day. i wrote a difference tracker for my diploma in 2003 for Processing .68. it did not work anymore with the latest version of Processing. but it took me only half an hour to get it working again.

i want to rewrite it in order to work as java node in x3d and instantviewer for experimenting with people’s silhuettes in 3d..

trackerdiff2007.png

source code: trackerdiff_pde.txt (rename to pde)

1UP

Saturday, April 28th, 2007
I’m now embracing routine.

I’m working on code for a Flash game for Nitrome and enjoying the familiar sights and sounds of London (as well as the nostril full of soot I get on a daily basis). I shall link to the project when it is finished.

I’ve knocked up a quick line intersection demo. Work on Rogue is postponed for a while but I’m still pretty keen to turn it into a proper game.

Animated gifs of wrestling moves
Adaptive Robot
Innovative website
A typography to vector project Which looks rather like my vectoriser
Online Street Fighter
A rather cool lol-cat
Beyond the Red Line Game based on the new Battlestar Galactica
CG Robot Film Huge robots in world war 2 – epic!
A harware genetic algorithm

Flash Vector tutorial deals with collision, intersection, surfaces – with source code too.
Get different urls for the same flash movie with swfaddress
Game Vindicator method for removing hacking in online multi-player games

at second glance

Saturday, April 28th, 2007

at second glance

Most persistence of vision projects I have seen involve moving a strip of leds fast enough that our eye perceives it to be an image. Make magazine has covered many projects of this type.

Jens Wunderling, a student of the Digital Media Class at UDK Berlin, has created at second glance, an alternative approach to POV. Instead of moving the LEDs, Wunderling has them fixed in position, but plays with saccades (our eyes never look straight, but always make fast tiny movement around an area).

So if you happen to glance past the work, you may notice something unusual. On second glance, if you shake your head, you will be able to clearly see the symbol. Created as a “guerilla messaging device, made to place hidden critical messages within the abundant medial environment in the city”.

Developed using Arduino and Processing, the source code of which is available on his site, and 32 ultrabright LEDs.

Watch video
Development blog

More from Jens Wunderling
loopArena at Cybersonica, Building a multitouch, loopArena multitouch

Processing presentation at Workshop IT ComLabs – Graphic Design and Animation, at Bandung Institute of Technology, Bandung Indonesia, by Widianto Nugroho

Friday, April 27th, 2007

Processing presentation at Workshop IT ComLabs – Graphic Design and Animation, at Bandung Institute of Technology, Bandung Indonesia, by Widianto Nugroho

Lovebytes 2007 generative ident

Wednesday, April 25th, 2007
Over at Universal Everything, Matt just published the furry fruits of our most recent combined efforts, an identity generator for this year’s edition of the Lovebytes digital arts festival, suitably themed: Process.

Ms. Caaciwa Senor Vivagisu Mr. Mic

The theme couldn’t have been more fitting this time, since even though the project had to be turned over quite quickly, it yet again involved an interesting process and journey till the final execution (Not even mentioning Processing as tool used ;) . Initially inspired by some of my old experiments with hairy aesthetics and driven by the idea of generating a large(ish) population of (at least 20,000) unique, cuddly, cute monsters, we started thinking how to best allow enough variations to emerge and ensure every generated monster “feels” like an individual…

We looked at some “classic” examples by Jared Tarbell using a templated approach and also some of the more interesting recent spin-off’s dealing with online identity inspired by this and another of Jared’s experiments

Hairy potato Monster process Monster process

Yet, being someone who prefers using code (over predefined assets) for as many parts of a project as possible, I started with my usual approach of isolating and defining a set of suitable design parameters and then went on choosing value ranges for each: head shape (radius, subdivisions, curvaceousness), eyes (count, shape, pupils, direction), colour ways (head vs. hair), hair properties (position, spread, density, curl, gravity, gradient etc.)… Not all of the parameters listed in the sketch were actually used in the end, because most of them are interdependent in some form and having too few or too many such parameters would possibly limit the number of possible outcomes or alternatively explode that “search space” beyond your control and you’ll end up spending most of your time literally searching for an optimal “region of interest” in which your chosen parameters work nicely together and complement each other. That case is then pretty much the inversion of the Pareto principle if you spend 80% of your time getting 20% right…

In any way, I like thinking about design as this space of opportunities and this parametric approach allows me to separate the design process from the design model. It also allows me to test parameter combinations at their extreme values and so narrow down the “search space” of possible design outcomes created by these parameters and align it with my expectations. The approach is based on defining designs as choices and can be far more powerful and flexible when it comes to art direction requests and/or automation. In many cases it helped me avoiding to change any real code last minute and so possibly introduce new bugs.

Since we wanted to create true characters we needed to define and assign another important parameter to each monster: Names. Each name is generated using a few very basic rules, sometimes resulting in hilarious outcomes and unexpectedly suitable names…

Our basic rule of naming is consonant-vowel-consonant, plus a few more extra rules as filters applied on top, e.g.:

* Not every letter (but both vowels and consonants) can be doubled up
* There’s usage limit of every letter per name
* Monsters do have gender. Female names end with “a” or “i”, males are ignorant about that aspect…
* Letter “q” is always followed by “u”
* Names vary in length between 3 and 11 chars
* etc.

In hindsight, some of these rules definitely seem to be enforcing (unintentionally) a White-European naming convention… No offence, please! (Here am too wondering if spammers are using similar non-list based name generators for their products. Well, do you?!)

Last but not least, there’re currently 20,000 postcards circulating around the globe and I’d absolutely appreciate if proud owners of these cards could contribute pictures of them to this specially created flickr group… Thank you kindly!

Processing in Eclipse – Schneller Schreiben

Wednesday, April 25th, 2007

So, nach dem wir soweit sind das unsere Processing Sketche auch in Eclipse laufen, nun zu den Vorteilen von Eclipse. Beim Tippen kann ich mir mit der Tastenkombination ctrl+Space mögliche Routinen oder Funktionen anzeigen lassen und mit Return bestätigen. Wenn ich also “for” schreibe und dann ctrl+Space und Enter schreibt mir Eclipse folgendes:

for (int i = 0; i length; i++) {
   
}

Wenn ich das dann in der for Schleife wiederhole bekomme ich das:

for (int i = 0; i length; i++) {
    for (int j = 0; j
length; j++) {
       
    }
}

Auch auf die Processing Methoden kann ich zugreifen. “MousePr” und ctrl+Space liefert mir:

@Override
public void mousePressed() {
    // TODO Auto-generated method stub
    super.mousePressed();
}

Habe ich jetzt bestimmte Strukturen die ich immer wieder verwenden will kann ich mir unter Window -> Preferences -> Java -> Editor -> Templates ein neues Template anlegen. Will ich in mein Sketch z.B. immer bestimmte Libraries importieren legen ich mir ein neues Template an, in dem dann z.B. folgendes steht:

import processing.core.*;
import processing.opengl.*;
import javax.media.opengl.GL;

und nenne es importOpenGL. Das ganze abspeichern und wenn ich jetzt in meinem Sketch “import” eingebe, ctrl+Space klicke, dann kann ich das neue Template auswählen.

In Templates kann man Variablen verwenden. Wenn ich das Grundgerüst eines Sketches als Template erstellen will, weiß ich ja noch nicht wie die Klasse heißt und ob und wenn ja in welchem Package sich die Klasse befindet. Folgendes Template beinhaltet die Grundstruktur eines OpenGl Sketches. Die beiden Variablen ${enclosing_package} und ${primary_type_name} sorgen dafür, dass Klassen- und Packagename immer richtig ausgefüllt werden.

package ${enclosing_package};

import processing.core.*;
import processing.opengl.*;
import javax.media.opengl.GL;

public class ${primary_type_name} extends PApplet {

    static public void main(String args[]) {
        PApplet.main(new String[] { /* “–present”, */ “${enclosing_package}.${primary_type_name}” });
    }

    public void setup() {
        size(500, 500, OPENGL);
    }

    public void draw() {

    }
}

Das ganze nenne ich dann sketchOpenGl und schwuppdiwupp mit ein paar Klicks hab ich eine neues Sketch ohne Tippfehler und fertig zum Einsatz.

Um eine neue Methode zu schreiben reicht es aus, den Aufruf dafür zuschreiben. Wenn ich folgendes schreibe:

int x=sign(3.4f);

wird es mir erstmal als Fehler rot unterstrichen da die Methode noch nicht existiert. Drücke ich jetzt Apfel+1 dann werden mir mehrere Vorschläge unterbreitet das Problem zu lösen. Wenn ich dann “create methode sign(float)” auswähle wird, wer hätte das gedacht, eine neue Methode angelegt:

private int sign(float f) {
    // TODO Auto-generated method stub
    return 0;
}

Zwischen den umrandeten Feldern kann ich mittels Tab springen und mit den Pfeiltasten z.B. von privat zu public wechseln.

Processing in Eclipse – Libraries und Data

Sunday, April 22nd, 2007

So im zweiten Teil der Serie Processing in Eclipse geht’s darum wie ich Libraries und Daten so wie in Processing in meinen Sketch bekomme. Ich werde das ganze am Beispiel der Candy Lib und einer SVG Datei erklären.

Zuerst erstellen wir mal ein neues Projekt wie in Teil 1 beschrieben. Dann laden wir die Candy Library und die Xml Library in unser Projekt. Das funktioniert im Prinzip wie bei dem core.jar Package von processing. Also rechte Maustaste auf den Projekt Ordner und Build Path -> Add External Archives auswählen. Abschließend noch import processing.candy.* und import processing.xml.*; zu den import Statements hinzufügen.

import processing.core.*;
import processing.candy.*;
import processing.xml.*;
public class Test extends PApplet {

}

Als nächstes legen wir den Ordner an aus dem die SVG Datei in unseren Sketch geladen wird. Dazu mit der Maus auf unserer Package (das mit dem Paket Icon) klicken und New -> Folder auswählen. Der Folder muss den Namen data bekommen. Unsere SVG Datei können wir jetzt einfach per drag’n drop in den Ordner packen.

Von hier an läuft dann wieder alles wie in Processing.

import processing.core.*;
import processing.candy.*;
import processing.xml.*;
public class Test extends PApplet {

    SVG m;

    public void setup(){
      size(400,400);
      // The file “moo.svg” must be in the data folder
      // of the current sketch to load successfully
      m = new SVG(this, “moo.svg”);
    }

    public void draw(){
      m.draw();
      m.draw(200, 200);
    }
}

User Libraries

Wenn die Anzahl der Projekte wächst und man immer wieder die selben Libraries einbindet, macht es Sinn sich für bestimmte Anwendungen User Libraries (UL) einzurichten. In eine UL kann ich einzelne oder mehrere Libraries packen und diese dann einen Projekt hinzufügen. Nehmen wir an ich habe viele Projekte in denen ich OpenGL und Surfaces einsetzte. Jedesmal muss ich meinem Projekt die Packages core.jar, opengl.jar, jogl.jar und surface.jar hinzufügen. Ich kann aber auch unter Projekt -> Properties -> Java Build Path -> Add Library eine neue UL anlegen. Dazu User Library auswählen und Next > klicken. Dann auf User Library -> New und dem ganzen einen Namen geben. Danach kann ich mit Add JARs verschiedene Libraries hinzufügen. Wenn ich das ganze dann abschließe wird die neue UL meinem aktuellen Projekt hinzufügen. Eine einmal erstellte UL kann ich aber auch jedem anderem Projekt anhängen. Ein weiterer Vorteil ist, dass wenn einmal eine neue Version einer Library erscheint, der Pfad für das neue jar File nur noch einmal in der UL angepasst werden muss und dann für alle Projekte übernommen wird.

Processing mit Eclipse – Hallo Welt

Friday, April 20th, 2007

Wenn man eine weile mit processing gearbeitet hat kommt man irgendwann an den Punkt, an dem man sich wünscht man hätte an bisschen mehr Übersicht über seine Klassen, bestimmte Codeschnippsel die man häufiger einsetzt wären immer verfügbar und Autovervollständigung wäre auch nicht schlecht. An diesem Punkt kommt Eclipse auf den Plan. Eclipse ist eine Entwicklungsumgebung für JAVA und somit steht einer Nutzung als IDE für processing nichts im Weg.

Die meisten Dinge, die man mit processing machen kann sind auch mit eclipse möglich. Manches wie die Erstellung von .vlw Fontdateien muss man weiterhin in processing machen.

Als erstes legen wir in eclipse ein neues Projekt an (File -> New -> Project). In den nun erscheinenden Fenster wählen wir „Java Project” und klicken „Next >”. Dann geben wir dem Projekt einen Namen. Die restlichen Einstellungen kann man so stehen lassen. Im Package Explorer auf der linken Seite sehen wir jetzt unser Projekt in dem schon die JRE System Library eingebunden ist. Um Processing nutzen zu können müssen wir noch das processing.core Packet einbinden. Dazu mit der rechten Maustaste auf das Ordnersymbol und folgendes auswählen: Build path -> Add External Archives. Dann aus processesingInstallationsOrdner/lib die Datei core.jar auswählen. Jetzt noch schnell einen Sourcefolder angelegt (rechte Maustaste auf das Projekt -> New -> Source Folder) und los gehts.

In dem Sourcefolder legen wie nun eine neue Klasse an (rechte Mautaste auf den Ordner -> New -> Class). Der Klasse geben wir noch einen Namen und klicken „Finish”. Wer will kann auch noch ein Package Namen eingeben für den Anfang gehts aber auch ohne. Wenn wir die neue Klasse öffnen sollte da folgendes stehen:

public class Test {

}

Um in dieser Klasse processing nutzen zu können müssen wir das package processing.core importieren und die PApplet Klasse mit unsere Klasse erweitern:

import processing.core.*;

public class Test extends PApplet {

}

Danach kann man anfangen seinen Code wie in processing zu schreiben. Man muss lediglich vor alle processing eigenen Methoden wie „setup()” „draw()” „keyPressed()” public schreiben damit’s funktioniert.

import processing.core.*;

public class Test extends PApplet {

    float a = 100;

    public void setup() {
        size(200, 200);
        stroke(255);
        frameRate(30);
    }

    public void draw() {
        background(51);
        a = a – 1;
        if (a < 0) {
            a = height;
        }
        line(0, a, width, a);
    }
}

Zum Starten im Package Explorer mit der Maustaste auf die Klasse und Run As -> Java Applet.

Wind Earth Software Reseach ///////////////////////////////////////////

Wednesday, April 18th, 2007

Projet : WindEarth & WindDraws

J’ai bien avancé l’interface en processing, pas mal de problèmes malgré tout. Mais le rendu graphique est vraiment intéressant… Au début je cherchais à utiliser une map monde vectorielle… Mais une fois tous les points des 4421 stations météo posés suivant leurs latitude / longitude le résultat est suffisant.
Cette application que j’ai programmé, je vais la relier à mes ventilos pour leur fournir un random analogique temps réel.
Hihihiiii… trop bien….
En plus, je me suis bien fait chier pour que ça soit stable…
Bon j’ai encore un peu de travail graphique à faire… mais c’est déjà pas mal & sobre, il me semble ?
Bientôt des versions téléchargeables !

See : Software movie
Wind Earth screenshot

Darkgame

Tuesday, April 17th, 2007

Eddo Stern just posted the video we shot of his installation Darkgame. This is phase two of what looks to be a very intense game. I’m impressed with the game’s development roadmap, but I’ll let Eddo talk more about it when he’s ready. It should be very cool.

DSC00747.JPG
DSC00745.JPG

php and mysql in different time zones

Friday, April 13th, 2007

Just a quick code tip for working with dates in mysql and php.

I’m building a script to regularly mirror my last.fm recent tracks to a mysql database of my own. I’m interested in experimenting with daily and hourly statistics.

One problem that has taken me some head scratching has been the fact that the last.fm recentracks web service gives me the date a given track was played in a timestamp of my current timezone (+02:00 , Europe/Paris, as I’ve just learnt), but my web server is on a different timezone (-05:00, America/Los_Angeles), so when I try to insert a date in the database, even though I’m giving it a timestamp, it gets interpreted as being 7 hours less than it actually is. So a track played at let’s say 31 Mar 2007, 23:55 would be stored as having been played at 31 Mar 2007, 16:55. Not good.

Not wanting to fiddle with configurations or anything beyond my knowledge, I discovered that I could set the timezone in both php and mysql for a given script or db query.

Setting the timezone in php

If you want to know which timezone your server is in, you can guess it with


date_default_timezone_get();

Which should give you a string like “America/Los_Angeles” or any other of the supported timezones list

If it is different than your desired timezone, look for the one you want in the list and before doing any time operation, call:


// set your timezone as gmt +02:00
date_default_timezone_set("Europe/Paris");

From then on, all your php code should understand timestamps and dates in that timezone.

Then for mysql use CONVERT_TZ

Even though it is corrected in php, you’ll have to do it also when inserting information on you mysql db, because it will interpret timestamps again in its time zone. You can guess which is it by having a look at the system time zone variable.

In my case, after trying some hacky alternatives I discovered CONVERT_TZ in one of the latest comments in this post

From the mysql manual


CONVERT_TZ(dt,from_tz,to_tz)

CONVERT_TZ() converts a datetime value dt from the time zone given by from_tz to the time zone given by to_tz and returns the resulting value.

You have to pass it the timestamp, current timezone (’SYSTEM’ is the server time zone) and target timezone and it happily converts between them.

So now my query would look like this:


$query = "INSERT INTO recenttracks (artist, name, url, date, type)
	VALUES ( '$lastFmTrack->artist',
	'$lastFmTrack->name',
	'$lastFmTrack->url',
	CONVERT_TZ(FROM_UNIXTIME(’$lastFmTrack->playDate’), ‘SYSTEM’, ‘+02:00?), 
	‘$lastFmTrack->type’)”;


Basically that’s it. Hope it is useful for someone.

Mind you, I’m nothing of an expert in php or mysql, this is just a method which worked for me. Corrections are welcome.

tags: , , , , ,

Wind + Snow & Hot Air

Thursday, April 12th, 2007

I’ll be giving two public talks next week. On Tuesday, I’ll be speaking at The School of the Art Institute of Chicago where I’ll be focusing more on the Atelier Hypermédia and our work with coding as plastic medium. I’ll also try to find some time to talk about Plot and our postulate on slow real-time systems.

And on Friday, I’ll be speaking at Gosia Koscielak Studio and Gallery where I’ll probably do more of the abstractmachine dog and poney show.

Muon launch in Milan

Thursday, April 12th, 2007

Muon

If you are in Milan for the Salone del Mobile, be sure to put a visit to this on your schedule…

The launch of Muon, an incredible two-metre tall speaker system, in one of the most fascinating locations in Milan, the Sala del Cenacolo. This exhibition is the extraordinary result of the convergence of two masters. The Loudspeakers, made from super-formed aluminium, are remarkable reflective sound sculptures created by the advanced research centre of KEF, the British-based world leader in sound technology and designed by Ross Lovegrove, considered one of the most innovative designers of the 21st century.

I’ve been working with Moving Brands, who have been commissioned to create an architectural scale audio responsive experience for the launch. You really must see this in person if you can. More information on this when I return.

April 19th – 23rd
12.00 noon 9:00 pm
(Invitation only launch on 18th).

Address: Leonardo da Vinci, National Museum of Science and Technology, Sala del Cenacolo – second cloister, Via San Vittore 21 Milano (Area Magenta) Click here for map.

Press release (via Dezeen blog)