Hi , I wonder if there is a way to create a grid with arrays, instead of for loops ?
For example
this simple Grid is done with for loops, but .... Is there a way to acrually create a Grid with arrays ?
- int cols = 10;
- int rows = 10;
- void setup () {
- size ( 600, 600);
- background ( 0);
- smooth ();
- }
- void draw () {
- for ( int i=1; i<cols; i++) {
- for ( int j=1; j<rows; j++) {
- fill ( 255);
- ellipse ( i*(width/cols), j*(height/rows), 30, 30);
- }
- }
- }
Thanx !
1