ICM: Week 2

This week’s assignment required the three following parts:

  • One element controlled by the mouse.
  • One element that changes over time, independently of the mouse.
  • One element that is different every time you run the sketch.

The most difficult part of this was the random function when using a bezier.  I wanted to create waves that were randomly placed but kept ending up with exaggerated waves when I made the cooridinates random within the bezier function.  I finally determined that the best way was to use translate and create those parameters as random with the limits of the “ocean.”

In addition, I was having difficulty creating clouds that would load at different y-values. When I randomized the y-coordinates, the cloud animated up and down as seen below:

Cloud-Y-Varying

After messing around with the placement of the line “cloud1.y = random(0, 250),” I found that if I placed it in setup then it would only change when the page was refreshed.  This reinstated the idea that the setup function is only loading once while the draw function is constantly reloading.

Cloud-Height_Varying

 

In the end, I made a monochromatic seascape that can be seen below:

Leave a Reply

Your email address will not be published. Required fields are marked *