Simple Abstract Sketch

edited May 2016 in Share Your Work

I have created a quick, abstract sketch. The URL is bleubox.altervista.org/lemonFlower.html. More of my sketches are shown here: bleubox.altervista.org/productions.html. If anybody would like to modify the code of the program (below) and have it displayed as a variation on the website (I would also credit the person who created the modified program, unless they wish to remain anonymous), they can post their modified code in this discussion, and how they would like to be credited.

float xt, yt; float n; float nt; float angle = 0; void setup() { size(600, 600); } void draw() { translate(300, 300); rotate(n); xt = (0 + noise(nt) * 10) + cos(angle) * (50); yt = (0 + noise(nt) * 10) + sin(angle) * (50); stroke(#FAD577); point(xt, yt); stroke(#FAD577, 100); line(xt, yt, 0, 0); angle += 0.01; n += 0.005; nt += 0.1; } void mousePressed() { save("lemonFlower.tif"); }

Tagged:

Comments

  • beautiful....!

  • Thanks!

  • edited May 2016
    float xt, yt;
    //float n;
    float nt;
    
    // index for array
    int angle = 0;
    
    PVector pv;
    color col; 
    float f = 10.0;
    
    // array
    float[] arrC = new float[100*10*10*int(TWO_PI)];
    float[] arrS = new float[100*10*10*int(TWO_PI)];
    
    int TWO_PI100 = int(TWO_PI*100);
    
    void setup() {
      // size(600, 600);
      fullScreen();
      pv=new PVector(random(width), random(height));
      col=color(random(255), random(255), random(255));
    
      float angle2=0.0;
      for (int angle=0; angle<=TWO_PI*100; angle += 1) {
        arrC[angle] = cos(angle2) * (50);
        arrS[angle] = sin(angle2) * (50);
        angle2+=.01;
      }
      background(0);
      noCursor();
      stroke(col, 100);//stroke(col); OR stroke(col,100);
    
      println("setup() is done");
    }
    
    void draw() {
    
      while (angle<TWO_PI100)
        drawOne();
    
      //  if (angle>TWO_PI + .08 && random(100)>95) {
      //if (angle>=TWO_PI100) {
      angle=0; 
      pv.x=random(width);
      pv.y=random(height);
      col=color(random(255), random(255), random(255));
      f=random(11);
      nt=1;
      //n=0;
      stroke(col, 100);//stroke(col); OR stroke(col,100);
      //}
    }
    
    void drawOne() {
      xt =  pv.x+(0 + noise(nt) * f) *  arrC[int(angle)];
      yt =  pv.y+(0 + noise(nt) * f) *  arrS[int(angle)];
    
      line(xt, yt, pv.x, pv.y);
      angle += 1;
      nt += 0.1;
    }
    
    void mousePressed() {
      save("lemonFlower2.tif");
    }
    
  • to be published without my name

  • Thank you. I have added it to the site.

  • thanks!

  • Great games!

    Kf

  • Thanks. I am working on another program that simulates an airplane.

Sign In or Register to comment.