I was juggling several ideas for this final project like painting with light or building an interactive playlist you can share with people, but boy, did I have trouble figuring that out. I haven’t let go of those dreams completely, just momentarily, and decided to work with a concept I call “poetic data” — subverting how data is being used these days to target you with ads or to spy on you. Recently, the NY Times selected and published submissions of haikus about New York livin’. I created a generator that would mashup some of the published haikus I liked often nonsensically but still capture the human heart behind each carefully crafted line.
Instructions: Hold down and move around your mouse to see the haikus (fast-paced on purpose, but maybe too fast so I’m going to work on a variable for the speed). Release to see an animation of your mouse path (I explored PGraphics a bit).
-Ashley
int frames = 20; PGraphics pg[] = new PGraphics[frames]; //a PGraphics collection of 20 frames PFont myFont; int y = 300; //Haikus consist of three lines of 5, 7, then 5 syllables. String[] firstLn = { "Beware the puddle", "Our eyes avoid but", "Mistrust grips the heart", "If build and destroy", "Coffee by myself", "The New Yorker is", "The City's timeless", "We can spend the night", "Hidden among the", "As we leave for work", "I know you, don't I" }; String[] secondLn = { "of indeterminate depth", "If we looked we would see that", "Thought we travel in large packs", "Are music notes, our island", "The wind whispers names of friends", "Not kind, they say. I say, he", "But still, don't let it fool you", "together, but I expect", "Sleepwalking, caffeine zombies", "Youngsters head home from parties", "You were me five years ago" }; String[] thirdLn = { "that swallows boots whole", "We might just be friends", "we are still alone", "Is a symphony", "Yet alone I sit", "Just left it at home", "It's never the same", "bagels in morning", "A morning person", "Eras intersect", "Dreaming of New York" }; void setup(){ size(600,600); background(0,0,100); for(int i = 0; i < frames; i++) { pg[i] = createGraphics(width,height); pg[i].beginDraw(); pg[i].background(0,0,100); pg[i].stroke(255,150); //color of stroke pg[i].strokeWeight(5); //thickeness of stroke pg[i].endDraw(); } noStroke(); fill(#ffffff); myFont = createFont("Futura", 16, true); newHaiku(); } void writeLine(String[] words) { int n = int(random(words.length)); text(words[n], 300, y); y = y + 40; } void newHaiku() { background(0,0,100); y = 50; writeLine(firstLn); writeLine(secondLn); writeLine(thirdLn); textFont(myFont); } void draw(){ //background(0,0,100); int currentFrame = frameCount % frames; //0-19 frames if(mousePressed){ pg[currentFrame].beginDraw(); pg[currentFrame].line(mouseX,mouseY,pmouseX,pmouseY); pg[currentFrame].endDraw(); } image(pg[currentFrame],0,0); if (mousePressed){ newHaiku(); } }