int squareSize = 40; void setup() { size(400, 400); background(255); strokeWeight(3); myDrawing(); } void myDrawing() { int centerX = 100; int centerY = 180; println("I am here"); fill(200, 100, 100); drawRect(centerX, centerY); centerX = 250; centerY = 300; fill(100, 200, 100); drawRect(centerX, centerY); centerX = 320; centerY = 60; fill(100, 100, 200); drawRect(centerX, centerY); drawRect(240,60); drawRect(random(width),random(height)); } void drawRect(float localX, float localY) { rect(localX-squareSize/2.0, localY-squareSize/2.0, squareSize, squareSize); println("localX " + localX + " lY " + localY); point(localX, localY); }