int counter = 0;
 
 
void setup() {
  background(150);
  size(800,800);
  smooth();
  stroke(0, 8);
  float r = 1.5;
  strokeWeight(r);
  strokeCap(SQUARE);
 
 
 
}
 
void draw() {
  PFont font;
  font = loadFont("Arial-BoldMT-12.vlw");
  textFont(font);
  fill(255, 71);
  text("A", 205,338);
  text("B", 230,763);
  text("C", 680,363);
  text("D", 130, 463);
  text("E", 280, 463);
  text("F", 580, 63);
  text("G", 705, 163);
  text("H", 630, 588);
  text("I", 530, 613);
  text("J", 80,738);
  text("K", 80,88);
  text("L", 455,138);
  text("M", 230,63);
  text("N", 180, 238);
  text("O", 505, 413);
  text("P", 105, 163);
  text("Q", 730, 738);
  text("R", 180, 588);
  text("S", 630, 238);
  text("T", 405, 213);
  text("U", 365, 688);
  text("V", 580, 763);
  text("W", 105, 663);
  text("X", 730, 88);
  text("Y", 705, 663);
  text("Z", 5, 13);
 
  counter++;
  delay(100);
  //String[] text = loadStrings("/script.txt"); //load the script as string
  //String[] text = loadStrings("/metamorphosis_port.txt"); //load Kafka's Metamorphosis in Portuguese as string
  //String[] text = loadStrings("/metamorphosis.txt"); //load Kafka's Metamorphosis as string
  //String[] text = loadStrings("/gadsby_e_v_wright.txt"); //load Wright's Gadsby as string
  String[] text = loadStrings("/gadsby_e_v_wright_port.txt"); //load Wright's Gadsby as string
  //String[] text = loadStrings("/huck.txt"); //load huck finn as string
  //String[] text = loadStrings("/huck_port.txt"); //load huck finn as string
  //String[] text = loadStrings("/raven.txt"); //load huck finn as string
  //String[] text = loadStrings("/raven_port.txt"); //load huck finn as string
  boolean started = false; //don't parse lines until the ***Start line
 
 
    for (int i = 0; i < text.length; i++) {
    //--------
    if (text[i].startsWith("*** START")) { //start parsing text
      started = true;
    }
    else if (text[i].startsWith("*** NNOOOD")) { //stop parsing text
      started = false;
    }
    else if (started == true) { // if we're in the useful region, list of characters and punctuation to
        // ignore between letters. WHITESPACE is all the whitespac characters
        String separators = WHITESPACE + ",;.':?()\"-"; //let these be the separators
      String[] words = splitTokens(text[i], separators); //to parse the "text" into a new string called "words"
 
      noFill();
      background(150);
 
 
      int c = floor(counter/2);
      println(c);
      for (int j = 0; j < c && j < words.length; j++) {  // evaluate each letter in the string of words
        String word = words[j].toLowerCase(); //change all letters to lower case
 
 
          beginShape();
        for (int k = 0; k < word.length(); k++) {
          char letter = word.charAt(k);
 
          createVertexFromLetter(letter);
        }
        endShape();
        //noLoop();
        //println(frameCount);
      }
 
 
 
 
    }
    //--------
 
  }
}