Dra­w­i­n­g with Con­d­i­t­i­o­n­s & Loops I

by Travis Low
  • Show Sketch
/** @peep sketchcode */
 
size(1000, 1000);
 
noFill();
strokeWeight(2);
for ( int x = 100;x < 920; x+= 20){
 
  rect(x, x, 20, 20);  
 
 // from bot L to top R
  rect(x, 1000 - x, 20, 20);
 
  //down the middle 
  rect(499, x, 20,20);
 
  triangle(x, x, 499, 499, 0, 999);
 
  quad(1000-x, 0+x, 900, 900, 800, 800, 999, 999);
 
  if (x % 20 == 0);
  ellipse( x + 10, 100, 40, 40);
 
}

Comments

Nobody has said anything yet.