Skip to content

Instantly share code, notes, and snippets.

@borkDoy
Last active May 27, 2019 21:02
Show Gist options
  • Save borkDoy/96ee24ed0f06d7b6ee06bf369e4e28e1 to your computer and use it in GitHub Desktop.
Save borkDoy/96ee24ed0f06d7b6ee06bf369e4e28e1 to your computer and use it in GitHub Desktop.
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