Arrays Talking to Arrays

Owen Miller
1 min readApr 23, 2021

For this assignment I wanted to implement a few rules. The rules are

  • Circles (bubbles)
  • Wiggle
  • Infection

The bubbles spawn at random across the screen. The number is adjustable but for this sketch I decided 50 would work properly. The background is gone so the bubbles wiggle at random and produce trails. They spawn in black, but turn white when they touch another bubble, infecting each other.

My idea for this sketch was to have one “infected bubble” that would spread its color to the other bubbles slowly. This would take effect much slower than the logic I have right now, where every bubble turns white within 10 seconds or so.

Another idea was to have two bubbles of different colors, each infecting the black bubbles with their color. Once all are infected, one would have more “infected” bubbles than the other and would essentially “win.” The simulation could be ran multiple times for different outcomes

--

--