import processing.opengl.*; int num = 30; LivingLetter[] allLetters; String vokale = "aeiou"; String theText; void setup () { size(450, 450, OPENGL); PFont font = loadFont("light.vlw"); theText = "SETI aufgeben. Wenn das Erkennen von intelligenten Signalen und Artefakten ja selbst das Erkennen von Intelligenz überhaupt nur so ungeheuren Schwierigkeiten bahaftet ist, sollen da die Leute, die sich mit SETI befassen, nicht besser aufgeben und als Tankwarte arbeiten. So weit will Wolfram nicht gehen. Er sagt nur, dass SETI sehr viel schwieriger sein wird, als alle gedacht haben. Dass die SETI-Forscher gegenwärtig nach strukturierten Radio- und optischen Signalen Ausschau halten, liegt nicht daran, dass es das Beste ist, was sie tun können. Es ist das Einzige, was sie tun können. Zwei SETI-Pioniere, Guiseppe Cocconi und Philip Morrision, haben alles gesagt: Die Wahrscheinlichkeit eines Erfolges gleich null."; theText += theText; num = min(1500, theText.length() -1); allLetters = new LivingLetter[num]; build_text( theText, font ); } void draw () { background( 255 ); move_text(); } void move_text () { for (int i = 0; i < num; i++) { LivingLetter me = allLetters[i]; for (int j = 0; j < num; j++) { LivingLetter other = allLetters[j]; if ( i != j ) { float vx = other._x - me._x; float vy = other._y - me._y; float d = sqrt(vx + vy); // Anderer Buchstabe in der Nähe if (d < 30) { if (d == 0) d = 0.0001; vx = -vx/d/30000; vy = -vy/d/30000; // ist es ein Vokal? if (me.isVokal && !other.isVokal || !me.isVokal && other.isVokal && me.myOrd != other.myOrd) { vx = -vx; vy = -vy; } me._x += vx; me._y += vy; if (me.isVokal && !other.isVokal) { other._rotation += (vx < 0 ? -1 : 1 ) * 0.0001; } } if (d < 3) { if (me.myOrd == other.myOrd) { me._scale += (8 - me._scale)/1000; } else { me._scale += (0.2 - me._scale)/1000; } } } } me.display(); } } void build_text ( String s, PFont f ) { float xpos = 0; float ypos = 0; for (int i = 0; i < num; i++ ) { LivingLetter letter = new LivingLetter( s.substring(i, i+1), xpos, ypos, f ); allLetters[i] = letter; if (xpos > width + 100) { ypos += 30; xpos = 0; } else { xpos += letter._width; } } } class LivingLetter{ float _x, _y, _scale, _width,_rotation; String myChar; PFont myFont; boolean isVokal; int myOrd; LivingLetter ( String c, float x, float y, PFont f ) { _x = x; _y = y; _rotation = 0; _scale = 1; myChar = c; myFont = f; myOrd = c.charAt(0); isVokal = match( vokale, myChar ) != null; display(); } void display () { pushMatrix(); textFont( myFont ); fill(0,200); textSize( 20 * _scale ); translate( _x, _y ); rotate( _rotation ); text( myChar, 0, 0 ); popMatrix(); _width = textWidth( myChar ); } }