Assignment 2: loops

Concept

I have decided to continue the ideation I have worked on in the first work – as such, the colour palette and the style of visual elements remain the same, but the story has developed.

The picture is almost surreal – the frame is filled with identical eyes staring at the viewer, but as soon as the user presses the mouse some eyes close and some start looking to the side. This motion captures the moment of secret surveillance – as soon as someone looses the focus, someone else becomes a spy. The spying eyes are careful – when sight of the others comes back, everything seems normal. The change of eye colour also indicates the differences between two.

Highlight of the code I am proud of

Using the mouseIsPressed() condition seemed a bit confusing to me at first, since I had to define what happens when the mouse is not pressed (therefore the original image) in the end, but I have managed to figure out the order.

//pupils when eyes are closed
  noStroke()
  for (let x=0; x<=width; x+=200) {
    for (y=0; y<= height; y+=50) {
      if (mouseIsPressed){
        fill('#FFBB00');
        circle (x+90,y,25)
      }
      // pupils when eyes are open
      else{
        fill('#2D96BC')
        circle (x+100,y,25) 
      }
      fill('#2D96BC')
      circle (x, y, 25)
       }

Sketch

Reflection

Although the idea of the story behind the image was represented correctly, I believe that the “spying” process can be developed further in a more detailed way. For instance, different eyes can look into different directions, and the order of closing eyes can be randomised. More user interaction can be implemented – for example, the movement of the eye can be controlled only when the mouse presses on it.

Leave a Reply