// A Thanksgiving Self-Referential Code """""Poem"""""" // Because it's really in quotes. // Really. // Partially inspired by something. // November 24, 2005 String[] code; float[] z; PFont f; float athousand = 1024.0f; // You come and go. float spacing = 256.0f; // Go oh. float speed = 4.0f; // What you get void setup() { size(200,200,P3D); framerate(30); // Not my rival. code = loadStrings("selfreference_v2.pde"); z = new float[code.length]; f = loadFont("Georgia-Bold-16.vlw"); // This much is true reset(); } // Is what you see void draw() { // Your music. background(102); // True // Ooo textAlign(CENTER); // Ooo textFont(f); for (int i = 0; i < code.length; i++) { if ((z[i] > -athousand) && (z[i] < athousand)) { pushMatrix(); translate(width/2,height/2,z[i]); text(code[i],0,0); // Your choice popMatrix(); } // I need all the love that I can't get. z[i] += speed; if (z[code.length-1] > athousand) { reset(); speed = constrain(speed*2,0,128); } } } void reset() { for (int i = 0; i < code.length; i++) { z[i] = -athousand - spacing*i; } }