Assignment 2

This is assignment is based on using loops to design art and it was more of automating the designs rather than doing repetitive things again and again.

While I had completed this assignment with another design, I got another idea after seeing a filter on Instagram and I wanted to merge these. However, I kept them separately for the time being The idea was around optical illusion as well.

It required heart shapes, so I took the heart shape function code from here.
To figure out the pattern and visualize what I wanted, I created a non-iterative model:

After some time of playing around with the code, I figured out how to loop and draw the hearts. However, now what was challenging was to have different colors. I used if-else conditions to alternate the colors using the odd-even method. The next challenge was to make sure the colors changed and for that, I used a random function.

✨ Final Look ✨:

—first design—
I browsed the web for inspiration, and with the first search result, I came across this P5js code with a few lines halfway through the screen.

The reference/idea:

It is a pretty simple use of lines. That gave me the inspiration to create a moving illusion pattern like this:

Optical illusion lines background. EPS 10 vector illustration

I started playing around with the code, changing colors, the orientation of the lines and it turned out like this, pretty different than what I expected.

Final Look:

I basically used loops, to draw lines in different orientations and spacing, used if-else conditions to change their colors. I also added a circle that moves with the cursor using mouseX and mouseY functions that changes its color on every click (used mousePressed function).

Leave a Reply