Last active
August 28, 2022 15:56
-
-
Save n1ckfg/b18922b75644df405f314b66d3598b8f 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
| // https://openprocessing.org/sketch/20534/# | |
| int dim = 50; | |
| int interval = int(dim * 0.4); | |
| void setup() { | |
| size (500, 500); | |
| println(dim + ", " + interval); | |
| noStroke(); | |
| } | |
| void draw() { | |
| for (int h = 0; h < width; h += dim) { | |
| for (int v = 0; v < height; v += dim) { | |
| if ((h + v) % interval == 0) { | |
| fill(150, 0, 0); | |
| } else { | |
| fill(0); | |
| } | |
| rect (h, v, dim, dim); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment