Created
November 4, 2014 06:13
-
-
Save edsonsoares/fd9691c4ffa55a9160bb to your computer and use it in GitHub Desktop.
Text Visualization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String[] words; | |
IntDict concordance; | |
int index = 0; | |
void setup () { | |
size (600, 400); | |
background(0); | |
String [] lines = loadStrings ("statement.txt"); | |
String allthetxt = join (lines, " "); | |
printArray(allthetxt); | |
words = splitTokens (allthetxt, " ,.;!?"); | |
printArray(words); | |
concordance = new IntDict(); | |
frameRate(5); | |
} | |
void draw(){ | |
background(0); | |
textSize(64); | |
textAlign(CENTER); | |
text(words[index], width/2, height/2); | |
index++; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment