**CONCEPT:**

For this assignment, my inspiration mostly came from Bill Kolomyjec’s art piece ‘Random Squares’.

**‘Random Squares’ Bill**

However, I wanted to add a bit of a twist and make it more chaotic or trippy in some sort of way. I’ve gotten the idea of the changing shapes depending on the area of the canvas from class and interpreted it into my design, which thankfully pulled the piece together. In addition, the crazy random colours definitely added to the effect of it being trippy at least I hope so. Moreover, it still felt a bit bland, and after watching Casey Reas’s video, I knew I needed to add something to make the piece seem more alive or organic, as he says. In doing so, I discovered a growing and shrinking factor, which, after some trial and error, I realized it was just a variable that I needed to create and then just adjust the shape size accordingly, and it turned out not so hard after all. This would probably be what I’m most proud of in the whole code.

**Code that I’m most proud of:**

/ Variable for size change let sizeChange = 0; // Variable for the shapes (growing or shrinking) let growing = true; function setup() { createCanvas(400, 400); frameRate(5); } function draw() { background("black"); // sizeChange variable to create growing/shrinking effect if (growing) { sizeChange += 1; // If the size gets too large, start shrinking if (sizeChange > 20) { growing = false; } } else { sizeChange -= 1; // If the size gets too small, start growing again if (sizeChange < 0) { growing = true; } }

**Reflection/Improvment:**

Next time, I would love to have the shapes rotate, which is something I tried doing but unfortunately failed, I did watch videos on youtube but i still didn’t understand it so i decided to scratch that until i fully understand how it works. So hopefully next time!

My design:

My code:

// Variable for size change let sizeChange = 0; // Variable for the shapes (growing or shrinking) let growing = true; function setup() { createCanvas(400, 400); frameRate(5); } function draw() { background("black"); // sizeChange variable to create growing/shrinking effect if (growing) { sizeChange += 1; // If the size gets too large, start shrinking if (sizeChange > 20) { growing = false; } } else { sizeChange -= 1; // If the size gets too small, start growing again if (sizeChange < 0) { growing = true; } } for (let x = 0; x <= width; x += 40) { for (let y = 0; y <= height; y += 40) { // Outer stroke for the shapes strokeWeight(3); stroke("black"); // Right half of the canvas - enlarging and shrinking squares if (mouseX > width / 2) { for (let size = 30 + sizeChange; size > 0; size -= 10) { fill(random(255), random(255), random(255), 150); // nested squares rect(x + (30 - size) / 2, y + (30 - size) / 2, size, size); } } else { // Left half of the canvas - enlarging and shrinking circles for (let size = 30 + sizeChange; size > 0; size -= 10) { fill(random(255), random(255), random(255), 150); // nested circles ellipse(x + 20, y + 20, size, size); } } } } }