Last active
May 27, 2019 21:02
-
-
Save borkDoy/96ee24ed0f06d7b6ee06bf369e4e28e1 to your computer and use it in GitHub Desktop.
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
function setup() { | |
createCanvas( windowWidth, windowHeight ) | |
colorMode( HSB ) | |
noLoop() | |
noStroke() | |
} | |
function draw() { | |
background( 20, 20, 20) | |
// Setup a grid so i can figure out the uppper and lower bounds | |
// of where the points should go | |
var columns = 5 | |
var rows = 5 | |
var columnWidth = windowWidth / columns | |
var columnHeight = windowHeight / rows | |
fill( 30, 30, 30) | |
stroke( 90, 90, 90 ) | |
rect( 0, 0, columnWidth, columnHeight ) | |
// Create a row | |
for ( i = 0; i < rows; i++ ){ | |
// Create a column | |
for ( j = 0; j < columns; j++ ){ | |
rect( j * columnWidth, i * columnHeight, columnWidth, columnHeight ) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment