Created
October 6, 2017 17:07
-
-
Save brysonian/d6071f0e22c2b250752902c6e8c2a0da to your computer and use it in GitHub Desktop.
Inset Boxes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int inset = 20; | |
int cellCount = 7; | |
void setup() { | |
size(500, 500); | |
noFill(); | |
} | |
void draw() { | |
background(255); | |
stroke(0); | |
for (int i=1; i <= cellCount; i++) { | |
int x = inset * i; | |
int y = inset * i; | |
rect(x, y, width - x * 2, height - y * 2); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment