Advertisement
xeromino

rotTypo

May 1st, 2014
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.94 KB | None | 0 0
  1. // based upon: P_3_0_01.pde
  2. //
  3. // Generative Gestaltung, ISBN: 978-3-87439-759-9
  4. // First Edition, Hermann Schmidt, Mainz, 2009
  5. // Hartmut Bohnacker, Benedikt Gross, Julia Laub, Claudius Lazzeroni
  6. // Copyright 2009 Hartmut Bohnacker, Benedikt Gross, Julia Laub, Claudius Lazzeroni
  7. //
  8. // http://www.generative-gestaltung.de
  9.  
  10.  */
  11.  
  12.  
  13. PFont font;
  14. String letter = "S";
  15. float theta, sz;
  16.  
  17.  
  18. void setup() {
  19.   size(400, 400);
  20.   background(0);
  21.   fill(255);
  22.  
  23.   font = createFont("Arial", 60);
  24.   textFont(font);
  25.   textAlign(CENTER, CENTER);
  26. }
  27.  
  28. void draw() {
  29.   fill(0, 10);
  30.   noStroke();
  31.   rect(0, 0, width, height);
  32.   //background(255);
  33.   fill(255);
  34.   translate(width/2, height/2);
  35.   pushMatrix();
  36.   rotate(theta*3);
  37.   sz = map(sin(theta), -1, 1, 100, 1200);
  38.   textSize(sz);
  39.   text(letter, 50, 0);
  40.   popMatrix();
  41.   theta += 0.0523;
  42.  
  43.   //if (frameCount%3==0 && frameCount>100 && frameCount<100+121) saveFrame("image-###.gif");
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement