/* @pjs globalKeyEvents=true; */ String[] alphabet = {"a", "b", "c", "d", "e", "f", "g", "h" , "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "x", "y", "z", "poem", "idea", "yes", "oh", "!", "?", "&", "try", "whee", "oooh", "wow", "what if"}; String letter; void setup() { size(800, 600); smooth(); } void draw() { fill(255, 1); rect(0, 0, width, height); float x = random(-width, width+50); float y = random(-height, height+50); int size = int(random(20, 400)); fill(0); textSize(size); letter = alphabet[int(random(alphabet.length))]; if ((random(100) > 80) && (letter.length() == 1)) { letter = letter.toUpperCase(); } text(letter, x, y); } void keyPressed() { save("palimpsest.png"); }