Last active
October 23, 2015 02:14
-
-
Save jonesfish/40cf0ade6f05425e27f7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| // v1 | |
| boolean white = true; | |
| int spacing = 20; | |
| size(400,300); | |
| noStroke(); | |
| for (float x = 0; x<width; x+=spacing){ | |
| if (white){ | |
| fill(255); | |
| }else{ | |
| fill(0); | |
| } | |
| rect(x, 0, spacing, height); | |
| white = !white; | |
| } | |
| // v2 | |
| /* | |
| int count = 0; | |
| int spacing = 20; | |
| size(400,300); | |
| noStroke(); | |
| for (float x = 0; x<width; x+=spacing){ | |
| if (count % 2 == 0){ | |
| fill(255); | |
| }else{ | |
| fill(0); | |
| } | |
| rect(x, 0, spacing, height); | |
| count++; | |
| } | |
| */ | |
| // v3 | |
| /* | |
| int count = 0; | |
| int spacing = 20; | |
| size(400,300); | |
| noStroke(); | |
| for (float x = 0; x<width; x+=spacing){ | |
| if (count % 3 == 0){ | |
| fill(255); | |
| }else{ | |
| fill(0); | |
| } | |
| rect(x, 0, spacing, height); | |
| count++; | |
| } | |
| */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment