Brush up version : Typography (Rotate) | Works | Basic Werk

Typography (Rotate)

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 Z

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 z

/*
 *  Title: Typography1 Rotate Type
 *  Built With Processing
 *
 *  Created by Shin Nakamura  (Basic Werk)
 *  Copyright 2011 Tokyo JAPAN. All rights reserved.
 *
 */

PFont font;
int i = 0;
float rad = -90;
String[] lines = {"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","Z"};
float r,g,b;
boolean clrFlag = false;
final int tSize = 28;

void setup() {
  size(500,500);
  background(10,5,39);
  smooth();
  font = loadFont("Helvetica-28.vlw");
  r = 0;
  g = 99;
  b = 199;
  frameRate(30);
}

void draw() {
  translate(width/2, height/2);
  rotate(radians(rad));
  textAlign(CENTER);
  textFont(font);
  float cr = random(tSize, height * 0.75);
  cr -= cr % tSize;
  fill(r,g,b,map(cr,0,height * 0.75,99,255));
  text(lines[i % 26],0,cr);
  rad += 7;
  i++;
  if (i > 259) {
    if (clrFlag) {
      r = 0;
      g = 99;
      b = 199;
      clrFlag = false;
    } else {
      r = 199;
      g = 99;
      b = 0;
      clrFlag = true;
    }
    i = 0;
  }
}

void keyPressed() {
  if (key == ' ') {
    noLoop(); //stop
    print(i);
  }

  if (keyCode == ENTER) {
    loop(); //resume
  }

  if (key == 's') {
    save("SN_P5_Typography1_" + year() + month() + day()
      + hour() + minute() + second() + ".png"); //save image
  }
}

 

 

§24 · Posted By · 6月 16, 2011 · Design · Tags: · [Print]