Hi, so far this project I’m stuck on trying to set up my data and how to put the numbers on the plane. My goal is to understand what function I need to put in to make the data from my google sheets become points on the window
Table myData; //create an instance of the Table class
int rowCount; //reserve a variable that will be used to track the number of rows of data in the external spreadsheet
//========================================================
void setup() {
size(600, 600);
drawSetup();
}
void draw() { } //setup an empty draw function - This will loop ongoing at the current frame rate as we wait for user intput
void drawSetup() {
myData = new Table(“Hopwood_VD_IGN_Games.tsv”); //5 gallon bucket
rowCount = myData.getRowCount();
println("rowCount = " + rowCount);
background(#FFFFCD);
strokeWeight(5); //the outline weight for the shapes
rectMode(CORNER); //default mode for shape placement // also can use center, and corners mode
//noStroke(); //turn on if you want to have no outlines
//========================================================
//========================================================
//Specify the number of shapes to draw
int numOfShapes = rowCount; //the number of shapes to draw
//For loop that contains the function call to the drawShape function
for (int i = 1 ; i < numOfShapes -1; i++) { //i represents the iteration in the loop, which ties directly to the index for the array, and also represents the shape number
int xPosition = myData.getInt(i, 0);
int yPosition = myData.getInt(i, 1);
int shapeWidth = myData.getInt(i, 2);
int shapeHeight = myData.getInt(i, 3);
String shapeColor = myData.getString(i, 4);
//String shapeType = myData.getString(i, 5);
//String shapeOutline = myData.getString(i, 6);
//Draw a shape dynamically using the array information for all shape information
drawShape(xPosition, yPosition, shapeWidth, shapeHeight, shapeColor); //function call and send parameters
}
}
//=================================================================================================================================
//=================================================================================================================================
//=================================================================================================================================
void drawShape(int xPOS, int yPOS, int shapeWidth, int shapeHeight, String shapeColor) {
println("xPOS data = " + xPOS);
//println("shapeType data = " + shapeType);
//Convert the datatypes from String to their proper type to be used by the draw functions
int newXPOS = int(xPOS);
int newYPOS = int(yPOS);
int newShapeWidth = int(shapeWidth);
int newShapeHeight = int(shapeHeight);
println(“** about to enter into draw shapes logic”);