Processing

Processing is a programming language well-suited to expressing ideas visually. From their home page: Processing is a programming language, development environment, and online community. Since 2001, Processing has promoted software literacy within the visual arts and visual literacy within technology.

There are several things that excite me about Processing:

  • It's mature, and there are a wealth of books and an active community.
  • You can deploy your sketch to the web, where it is translated into javascript to run in a browser.
  • Although it is Java, the Processing IDE hides much of the clutter you might expect. Everything is in one class, and it feels more like you are writing in Javascript.
  • Khan Academy uses the Processing API in their programming courses, making a nice seque for computer science instructors.

Below is a non-interactive example I wrote that is related to the Sieve of Erathosthenes. This shows prime numbers on a 630x210 pixel grid. Primes are white, composites are black. The pixel for the number 1 is in the top left. Proceeding left to right, top to bottom puts 13230 in the bottom right pixel. Why are there vertical bands of composites? Here is the source.


Below is an interactive script I wrote. Just move the mouse around in the rectangle. It has a 1960s era cartoon feel to me. I didn't have anything in mind when I started except a dot following the mouse pointer. Then I started changing it. I think getting students to riff on their programs is a good practice. After creating this, I discovered the Processing website has a similar example. Here is the source.

Comments are closed.