Sunday, 23 July 2017

Simple Processing Generative Art/Drawing 3







To Generate Above drawing
Note : Play with fill to get different color

float r = 0;

void setup() {
  size(400,400);
  background(10);
  smooth();
  noStroke();
}
void draw() {
  translate(width/2, height/2);
  fill(255);
  rotate(r);
  float circle_size = random(5, 15);
  fill(0,random(r,255),random(r,255));
  ellipse(100 + r, 10, circle_size, circle_size);
  r = r + 0.2;
  println(r);
  if(r>150)
    r=0;
}

No comments:

Post a Comment