To Generate above pattern.
Note : change translate parameter to get different result that is the difference between this and previous one
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