/** * It takes a minute for the poem to load. */ PFont f; // A variable to hold onto a font String[] otherside; // The array to hold all of the text int counter = 0; // We will use spaces and punctuation as delimiters String delimiters = " .?!;:[]"; void setup() { size(500,500); // Load the font f = loadFont( "Harrington-25.vlw" ); String url = "http://www.teknevision.com/ICM_POEM/on_the_other_side.txt"; String[] rawtext = loadStrings(url); // Join the big array together as one long string String everything = join(rawtext, "" ); otherside = splitTokens(everything,delimiters); frameRate(2); } void draw() { background(25); // Pick one word from Other side String theword = otherside[counter]; // Display the text textFont(f); fill(25,100,175); text(theword,random(100, 300), random(200, 300)); // Move onto the next word counter = (counter + 1) % otherside.length; }