int canvasWidth = 400; // Width of the canvas int canvasHeight = 400; // Height of the canvas int sunX = 100; // X-coordinate of the sun int sunY = 100; // Y-coordinate of the sun int sunSize = 80; // Size of the sun int grassHeight = 100; // Height of the grass int houseX = 200; // X-coordinate of the house int houseY = 200; // Y-coordinate of the house int houseWidth = 150; // Width of the house int houseHeight = 150; // Height of the house int roofHeight = 100; // Height of the roof int doorWidth = 40; // Width of the door int doorHeight = 100; // Height of the door int doorX = houseX + houseWidth / 2 - 20; // X-coordinate of the door int doorY = houseY + houseHeight - doorHeight; // Y-coordinate of the door (adjusted) // setup function void settings() { size(canvasWidth, canvasHeight); // Set the canvas size } // setup function void setup() { // empty setup function as everything is already initialized } // draw function void draw() { background(220); // Set the background color // Sun fill(255, 255, 0); // Yellow color ellipse(sunX, sunY, sunSize, sunSize); // Draw the sun // Grass fill(0, 255, 0); // Green color rect(0, canvasHeight - grassHeight, canvasWidth, grassHeight); // Draw the grass // House fill(255); // White color rect(houseX, houseY, houseWidth, houseHeight); // Draw the main body of the house // Roof fill(255, 0, 0); // Red color triangle(houseX - roofHeight / 2, houseY, houseX + houseWidth / 2, houseY - roofHeight, houseX + houseWidth + roofHeight / 2, houseY); // Draw the roof // Door fill(150, 75, 0); // Brown color rect(doorX, doorY, doorWidth, doorHeight); // Draw the door }