Day 162 / Processing: Playing with Random

So last night I decided to play around with Processing some more.  After I finished arranging the song from yesterday’s post I read a couple more chapters from Learning Processing and finally turned to the computer to make something.

 

I made another variation on a code.  This time I took the example for Random() from the Processing website and added my own spin to it.  I added mouse and keyboard functionality.  I added the draw() function to make it a continuos sketch.   Then I just went to town on the Random() function.  I added it wherever I could think of it.  Eventually, I tweaked it into a place I thought was visually pleasing.

 

Experiment by clicking and dragging around in the box below.  Press “a” to randomly place horizontal rectangles and “s”  for vertical ones.  Press “z” to clear and begin again.  Feel free to download the source code here.

 

I hope you enjoy!

 

Content and site protected by Cloudsafe365