Loops + Conditionals

Hunter Maul
1 min readFeb 20, 2021

Tim’s Original Work

https://www.instagram.com/p/CK-deO8Dub5/

My Reproduction

Original Reproduction

For this piece it was fairly obvious that Tim used a for loop in order to draw concentric squares. To create the delayed rotation effect, I simply used the rotate() function within my for loop in order to rotate each square independently based off of the frameCount.

First Modification

For my first modification to Tim’s work, I used a nested for loop in order to draw a grid of the rotating squares. This is something that I noticed that Tim does quite frequently in his art, so I figured I’d try it.

Second Modification

For my second modification I used two separate nested for loops in order to offset the grid. I also created a growth variable that is controlled by a boolean that is being fed into my squarebaby() function. This variable is multiplied by the iterator within the for loop that draws the squares in order to change the size of all of the squares that the loop is drawing. I also changed the color scheme and relative opacity of the background in order to make is look a little cooler.

--

--