ISMA303


Random Circles

by Haig. Average Reading Time: less than a minute.

This is a small sketch that helps us understand the potential of the random() function and one can start using randomness in their work quickly.

size(600,600);
smooth();

int circleNum = 50;
noStroke();

for (int i = 0; i<= circleNum; i += 1) {
  fill(random(255), random(255), random(255), random(255));
  ellipse(random(width), random(height), random(width), random(width);
}

Next is an challenge for your home:
Alter the above screen to include only circular ellipse and the random colours are all required to be within the same colour range.

No comments on ‘Random Circles’

Leave a Reply