Skip to content

Instantly share code, notes, and snippets.

@clstl
Created July 31, 2019 22:25
Show Gist options
  • Save clstl/46bd3e624afb80021f49ddeaca512dcc to your computer and use it in GitHub Desktop.
Save clstl/46bd3e624afb80021f49ddeaca512dcc to your computer and use it in GitHub Desktop.
GVErdO
var arr;
const grid_width = 10;
const grid_height = 10;
const cell_size = 50;
const cell_gap = 10;
function setup() {
arr = _.range(grid_height);
arr = arr.map( i => _.range(grid_width))
}
function draw() {
for(var y = 0; y < grid_height; ++y){
for(var x = 0; x < grid_height; ++x){
ellipse(x*cell_size + cell_gap, y*cell_height, cell_size, cell_size);
}
}
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.9.0/p5.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.min.js"></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment