icm: random() and mousePressed() sketches

prompt: Create a sketch that includes all of these:

  • 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.

periwinkle block in thunderstorm

see updated notes after the code block below

i didn’t use the bar2 object this time, but will keep working with this set of code. in my dream world, a bunch of shapes start at the top and move to the bottom at different speeds. the shapes don’t have to stay in their column forever, but they don’t bounce back up when they hit the bottom of the canvas. maybe i can assign a random() x-coordinate to accomplish that? and random speeds within a range? the flashing background is intense and ridiculous and i’m keeping it for now!

updated notes to “periwinkle block in a thunderstorm” (long-hand since i spilled coffee on my laptop and was letting it dry until right now):

existing code
existing code
ideas for getting blocks to drop from top of canvas to bottom
ideas for getting blocks to drop from top of canvas to bottom

ideas for getting blocks to drop from top of canvas to bottom

stupid rosh hashannah program

 

 

Leave a Reply