Composition studies gets out its “writing isn’t just for English majors” soapbox quite often; this is largely a positive thing. Likewise, one of my favorite soapboxes is labeled “computers aren’t only for nerdy white guys.” Processing, a language developed specifically with visual artists in mind, therefore greatly appeals to me. And its developers Casey Reas and Ben Fry, keep worming their way further into my affections the more I read, because they say things like this:
“A common misconception holds that computer programming is applicable only to technical fields. While there is a strong connection between programming and technology, it’s not the only realm in which computers can make for interesting collaborators. Programming can be approached with an emphasis on language, making computers potentially interesting to a far broader audience” (Processing : A Programming Handbook for Visual Designers and Artists)
While Processing is geared toward a non-traditional audience, I wouldn’t really call it programming for dummies. It’s a Java-based language, and the Reas and Fry books about Processing I’ve read so far do a nice job of introducing a solid programming foundation without being overly arcane.
That said, I’ve been messing around with Processing in preparation for the creation of my information visualization. Reas and Fry advocate the modification of existing code to learn a language: find some code, change some lines, see what happens. Here is a string of sketches I made that embody that principle. I started with some code from the book referenced above, which I thought would look a lot cooler with the addition of color and movement.
I modified it to make it bigger, and to continually add patterns as the mouse moved. As you can see below, I had to first simplify the sketch to figure out what was going on and if my method for randomizing color would work.
(Click on link to see a moveable version and the source code.)
As you can see if you click on my first attempt, the effect is mildly seizure inducing. Because Processing runs at 60 frames per second, and the draw circle function draws once a frame, we’re seeing that many different colors zoom past, even if the mouse hasn’t moved. In the next sketch, I fixed that behavior by checking to see if the mouse position has changed, only changing the color if the mouse position has changed.
The final sketch shows the same principle but with multiple randomized circles; I realized that this would have worked sooner without my having to first simplify if I had just removed the noLoop() function in setup.
These are just some simple sketches I’ve made to start. As I learn more, I’d like to learn how to do things like make the circles drawn fade over time, or appear over time for a “firework” effect.