Skip to content

Instantly share code, notes, and snippets.

@borkDoy
Last active May 27, 2019 21:02
Show Gist options
  • Save borkDoy/f5cd7cd3347a5113505dff40809c5142 to your computer and use it in GitHub Desktop.
Save borkDoy/f5cd7cd3347a5113505dff40809c5142 to your computer and use it in GitHub Desktop.
for ( i = 0; i < rows + 1; i++ ){
var columnData = []
// Create a column
for ( j = 0; j < columns + 1 ; j++ ){
rect( j * columnWidth, i * columnHeight, columnWidth, columnHeight )
//create my point
var pointPositionX = random( j * columnWidth - columnWidth, j * columnWidth )
var pointPositionY = random( i * columnHeight - columnHeight, i * columnHeight )
columnData.push( [pointPositionX, pointPositionY] )
console.log( columnData )
//circle( pointPositionX, pointPositionY, 10 )
}
allCoordinates.push( columnData )
console.log( allCoordinates )
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment