# Reconfigure - the canvas

**URL:** <https://discourse.processing.org/t/reconfigure-the-canvas/28541>\
**Category:** Coding Questions\
**Tags:** homework\
**Created:** [March 15, 2021, 4:45am UTC](https://discourse.processing.org/t/reconfigure-the-canvas/28541 "2021-03-15T04:45:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Apollo](https://avatars.discourse-cdn.com/v4/letter/a/41988e/32.png) [@Apollo](https://discourse.processing.org/u/Apollo)\
**Post date:** [March 15, 2021, 4:45am UTC](https://discourse.processing.org/t/reconfigure-the-canvas/28541/1 "2021-03-15T04:45:48Z")

</div>

Hi!

I hope you could help me here.

I got this code.

```auto
void setup() {
  size(500, 500);
  noStroke();
}

void draw() {
  background(0);
  fill(0,200,0);
  int t = 0;
  float z = map(millis(), 0, 20000, 0, 400);
  for ( int i = 0; i < 20; i++) {
    for ( int j=0; j<20; j++) {
      if ( t < z ) {
        rect(25*j, 25*i, 25, 25);
      }
      t++;
    }
  }
}

```

It “paints” 500x500 canvas with a 25px brush in 20 seconds.

I can’t figure how to morph it si i can effectively use the command `frameRate(25)` instead of `milli()` (which i think makes the program run in 25 frames). Also I can’t seem to change the green to the value (123,17,19) and the black default background to white.

Thanks

---

<div class="post-metadata">

**Author:** ![ReyzArtz](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/reyzartz/32/11750_2.png) [@ReyzArtz](https://discourse.processing.org/u/ReyzArtz)\
**Post date:** [March 15, 2021, 5:02am UTC](https://discourse.processing.org/t/reconfigure-the-canvas/28541/2 "2021-03-15T05:02:33Z")

</div>

Hey Apollo I think u r a beginner so I would recommend going to the processing [reference](https://processing.org/reference/) if u have any more doubts regarding any other functions

```auto
void setup() {
  size(500, 500);
  noStroke();
  frameRate(25)
}

void draw() {
  background(255);
  fill(123,17,19);
  int t = 0;
  float z = map(millis(), 0, 20000, 0, 400);
  for ( int i = 0; i < 20; i++) {
    for ( int j=0; j<20; j++) {
      if ( t < z ) {
        rect(25*j, 25*i, 25, 25);
      }
      t++;
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![TfGuy44](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tfguy44/32/41_2.png) [@TfGuy44](https://discourse.processing.org/u/TfGuy44)\
**Post date:** [March 15, 2021, 8:40am UTC](https://discourse.processing.org/t/reconfigure-the-canvas/28541/3 "2021-03-15T08:40:08Z")

</div>

Hello. That’s my code.  
I wrote that code for you as an example in this thread: [Painting a canvas](https://discourse.processing.org/t/painting-a-canvas/28273)

You could have modified it yourself, if you understood it.  
You could have changed the colors easily, if you understood it.  
You wouldn’t have added a call to `frameRate()` again, if you understood it.

But you clearly do not understand it.

You apparently haven’t even TRIED to understand it.

You have brought great shame on yourself, and your family, and your clan, and your town.  
Shame. Shame. Shame.  
Try doing your own homework from now on.  
You’re lucky you’re not getting banned.

---

<div class="post-metadata">

**Author:** ![micuat](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/micuat/32/19407_2.png) [@micuat](https://discourse.processing.org/u/micuat)\
**Post date:** [March 15, 2021, 11:34am UTC](https://discourse.processing.org/t/reconfigure-the-canvas/28541/4 "2021-03-15T11:34:14Z")

</div>

hi @apollo, as written above it’s not cool that you repost the code without reference until you get a solution 😞 as the guideline suggests, you first need to try what you can, and then you can ask for questions.

@TfGuy44 sorry for what happened. You don’t have to be nice in this situation, but since this is a public forum, please don’t blame like that. I guess we should simply suggest to read the guideline.
