int cx, cy;

int wx, wy;

float wxf,wyf;

int lx=200;

float rpy;

int gp=10;

 

void setup() {

  background(255, 0, 0);

  frameRate(10);

  size(600, 600);

  float wxf=width;

  float wyf=height;

  wx=width;

  wy=height;

  stroke(255);

  cx=wx/2;

  cy=wy/2;

  strokeWeight(5);

  stroke(255);

  line(cx, 0, cx+lx, wy);

  line(cx, 0, cx-lx, wy);

  rpy=lx/(wyf+70);

  //rpy=0.5;

//println(rpy);

  for (int l=0;l<1000;l++) {

    stroke(random(0, 255), random(0, 255), random(0, 255), 100);

    float z=random(0, lx);

    line(cx, 0, cx+z, wy);

    line(cx, 0, cx-z, wy);

  }

  //line (cx,0,cx+150,100);

  //line (cx+150,100,cx+50,100);

  //line (cx+50,100,cx+150,160);

  //line (cx+150,160,cx+50,160);

  //line (cx+50,160,)

 

  //line (cx,0,cx-150,100);

  //line (cx-150,100,cx-50,100);

  strokeWeight(gp);

}

 

void draw() {

 

  for (int l=0;l<50;l++) {

    float mc=200.0/255.0;

 

    int yy=int(random(0, wy/gp));

    int xx=int(random(-yy*rpy, yy*rpy));

    if (l%12!=0) {

      float mxc=gp*yy*mc;

      stroke(random(0,mxc),random(0,mxc),random(0,mxc));

      //stroke(0, 0, (20*yy*mc));

    }

    else {

      stroke((gp*yy*mc), (gp*yy*mc), 0);

    }

    point (cx+xx*gp, yy*gp);

  }

}

 


Commenti

Aggiungi un commento

Plain text

  • Nessun tag HTML consentito.
  • Indirizzi web o e-mail vengono trasformati in link automaticamente
  • Linee e paragrafi vanno a capo automaticamente.