NOC – Week 1: sketch – Yunyu Zhang(Samantha)

I decided to use function draw() to create automatically updated colorful bubbles using p5. 

  1. I first used the random() function to create bubbles that appear in random positions on the screen with random colors.
  2. I also want to make the bubbles appear randomly in different sizes within a certain range.
  3. I found that the bubbles would be circles or ellipses randomly. But I want them to be circles in different sizes. So I used “let” to assign x with a certain range of numbers and put x in ellipse().
  4. I also want the bubbles to be a little bit transparent. I looked up in p5 and learned about alpha that controls the opacity of colors.
  5. I adjusted the size of the bubbles to make them smaller like little dots and used “windowWidth” and “WindowHeight”so that the effect looks better.