Project 11: Deep Sea

For the project this week, I wanted to create a scene that depicts marine life, with fish seaweed and bubbles blown by the wish.

The objects in this scene are of three types:

  1. Stable – pebbles, seabed
  2. Movement – seaweed, which moves between constraints for the effect of swaying in water
  3. Motion – the fish and the bubbles.

I planned the scene in a sketch and then, using the starter code, tried to explore different ways of making the scene dynamic.

For the fish, I first, used the constructor, to make the shape of the fish and then used transparency to create an element of uniqueness in each new fish that is born on the canvas. This also enhances the effect of transparency scales and that eveything under water is bobbing and swaying.

For the motion of the seaweed, I used the random() function so that the height of the rectangle moves between two constraints, this giving the movement effect.

Please view the full code and visual preview here:

https://editor.p5js.org/ssahasra/full/R7Sh-om9z

Leave a Reply