I have just started with processing and need a little help here.
I am trying to source some data and apply it to a 2d array image,
I am sure that this example file is along the right lines for what I need,
I just need to be able to input a specific array rather than random, either from .txt or .xls, and then to save the image,
I know this is very basic, just getting started, thanks for any help
// Example: 2D Array size(200,200); int cols = width; int rows = height; // Declare 2D array int[][] myArray = new int[cols][rows]; // Initialize 2D array values for (int i = 0; i < cols; i++) { for (int j = 0; j < rows; j++) { myArray[i][j] = int(random(255)); } } // Draw points for (int i = 0; i < cols; i++) { for (int j = 0; j < rows; j++) { stroke(myArray[i][j]); point(i,j); } }
1