# Need help: Animating grid with gradient rectangles

**URL:** <https://discourse.processing.org/t/need-help-animating-grid-with-gradient-rectangles/30376>\
**Category:** Coding Questions\
**Tags:** homework\
**Created:** [May 30, 2021, 6:37pm UTC](https://discourse.processing.org/t/need-help-animating-grid-with-gradient-rectangles/30376 "2021-05-30T18:37:56Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)\
**Post date:** [May 30, 2021, 9:30pm UTC](https://discourse.processing.org/t/need-help-animating-grid-with-gradient-rectangles/30376/2 "2021-05-30T21:30:13Z")

</div>

Hi,

This topic reminds me something 😉

Just for reference this is the previous thread :

> [@Need help: Grid with increasing number of columns + incremental greyscale gradient](https://discourse.processing.org/t/need-help-grid-with-increasing-number-of-columns-incremental-greyscale-gradient/29438):
>
> Hi I’m trying to do something like this in p5: I’m a total beginner, so I think this should be pretty basic stuff for most slight_smile So far I’ve got this snippet of code: function setup() { createCanvas(windowWidth, windowHeight); } function draw() { background(0); let amountX = windowWidth / 8; let amountY = windowHeight / 4; let spaceX = width / amountX; let spaceY = height / amountY; for (let y = 0; y \< amountY; …

---

_[View the full topic](https://discourse.processing.org/t/need-help-animating-grid-with-gradient-rectangles/30376)._
