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!
Comments
4 responses to “Day 162 / Processing: Playing with Random”
I just spent 15 minutes or so and made this. Love it. I also spent about 5 minutes typing around the keyboard looking for easter eggs that you might have thrown in. No luck. I was hoping you had thrown in a way to generate the vertical bars from the top and the horizontals from the left… Super awesome either way.
http://i30.photobucket.com/albums/c338/scene17/brollpic.jpg?t=1281999992
That is awesome Jared!
i need to try this out. thanks for the heads up.
[…] wanted to write up at least one Processing sketch that you could be able to play with (like on Days 162, 166, or 170) but most of my time was spent reviewing in the book. When you take any time away […]