Filling up the canvas with some paint


I hope you could help me here.

The code should create a 500x500 canvas and fills it in with a solid color (try maroon) using a 25px brush in 20 seconds. The brush goes from left to right for a layer/level/row, then starts again on the next layer/level/row.

My Professor gave this layout as a guide:

I hope you could help me. Thank you!


the idea is that you try it first.

Show your attempt and your code, the path for the solution you came up with and then asked details about where you are stuck

Same for your other question

This is how far I got from answering this. If you’d notice, there isn’t much I know. And I think what I put in are still incorrect.

float x = 0;
float y = 0;

void setup(){

void draw (){
if(x<...) // I'm stuck here
x=...25; // I don't know what I'm gonna put here


void display(