for loop with variables
// creates a cloud of circles
// try changing the number of ellipses, the diameter, color and the transparancy
float xpos, ypos, diameter;
size(400,400);
smooth();
noStroke();
for(int counter=0; counter<2000; counter++) {
xpos = random(width);
ypos = random(height);
diameter = 20;
fill(255, random(50,100));
ellipse(xpos,ypos, diameter, diameter);
}
// try changing the number of ellipses, the diameter, color and the transparancy
float xpos, ypos, diameter;
size(400,400);
smooth();
noStroke();
for(int counter=0; counter<2000; counter++) {
xpos = random(width);
ypos = random(height);
diameter = 20;
fill(255, random(50,100));
ellipse(xpos,ypos, diameter, diameter);
}

0 Comments:
Post a Comment
<< Home