Exercise 21

drawing circles with a While loop
try changing the increment that i is increased by.


size(400, 400);
colorMode(HSB);
// choose a random background color using Hue, Saturation and Brightness
background(random(255), random(50, 100), random(50, 100));
noFill();
stroke(255, 100);

float i = 0;
while (i < 100) {
  ellipse(100 + i*2, 100 + i*2, 100+i, 100-i*2);
  // ellipse(width/2 + i, height/2-i, 100+i*5, 100-i*5);
  i = i + 1;
}
print("end");

Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *