• fullscreen
  • dots.pde
  • sketch_apr22a.pde
  • void dots(int nr) {
    
      for(int i = 0; i < nr; i++) {
          stroke(255);
          point(random(width), random(height));  
      }
    
    }
    
    float T = 0;
    int nrOfRects = 5;
    PFont font;
    String[] string = new String[20];
    float textT = 0;
    
    void setup() {
      size(100, 100); 
      font = loadFont("font2.vlw");
      textFont(font, 70);
      textAlign(CENTER, CENTER);
      
      string[0] = "C";
      string[1] = "O";
      string[2] = "M";
      string[3] = "E";
      string[4] = " ";
      string[5] = "T";
      string[6] = "O";
      string[7] = " ";
      string[8] = "M";
      string[9] = "E";
      string[10] = " ";
      string[11] = "<3";
      string[12] = " ";
    }
    
    void draw() {
      
      background(0);
      
      T += 2;
      if(T > width) {
         T = 0; 
      }
      
      textT += 1.5;
      if(textT >= 130) {
         textT = 0;
      } 
      
      for(int i = 0; i < nrOfRects; i++) {
        float t = T + i * (width / nrOfRects);
        if(t > width) t -= width;
        stroke(255, 0);
        fill(#FF4444, 150);
        quad(0 + t, 0, width, 0 + t, width - t, height, 0, height - t);
      }
      
      fill(255, 100, 100);
      text(string[(int)(textT / 10)], width / 2, height / 2);
      
    }
    

    code

    tweaks (0)

    about this sketch

    This sketch is running as Java applet, exported from Processing.

    license

    advertisement

    Erik Svedäng

    C O M E T O M E

    Add to Faves Me Likey@! 1
    You must login/register to add this sketch to your favorites.

    for someone special

    You need to login/register to comment.