Random Loops

by Rhys Hobbs
  • Show Sketch
/** @peep sketchcode */
size(400, 400); //size of the sketch
background(0);  //black background colour
stroke(255,60); //grayscale colour, opacity level
for (int i = 0; i < width; i++) 
// int "i" starts at 0. As long as it is less
// than the width of the drawing, add to new number.
// eg, 0, 1, 2, 3, 4... until 399 is reached (<400) 
{ 
  float r = random(width/40); //random number of width/40
  strokeWeight(r); //stroke weight is random float above
  noFill(); //no fill of ellipse
  ellipse(random(width), 200, i - width/2, i - width/2);
} //x-pt random width, y-pt 200,

Comments

Nobody has said anything yet.