Skip to content

Instantly share code, notes, and snippets.

@REAS
Created September 4, 2014 15:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save REAS/5c677b1bf148756a115b to your computer and use it in GitHub Desktop.
Save REAS/5c677b1bf148756a115b to your computer and use it in GitHub Desktop.
Embedded Loops for the Buckeyes
size(600, 600);
background(255);
strokeWeight(8);
strokeCap(SQUARE);
int offsetRange = 100;
int rowHeight = 10;
for (int y = 0; y < 600; y += rowHeight) {
float offset = random(0, offsetRange);
for (int x = 0; x <=400; x += 20) {
line(x+offset, y, x+offset, y+rowHeight);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment