Armin's Forays into Processing

Recently, I have started spending some of my evenings playing around with Processing, just because it's AWESOME! I've just started learning it, so there's not too much here at present. After loading this page, the applets are initially hidden. Click where it says to unhide them.

Note: Java has to be enabled to see the applets. The applets might not run on all computers. It depends very much on the JAVA version installed. (It works on all my Macs, but I needed to update JAVA on one of the PCs here to make it work.)

Sick Sine Wave

My very first interactive applet created in Processing. The speed and spatial frequency of this sinusoidal grating can be influenced by moving the mouse over the animation. X controls speed, Y controls the number of periods shown. I also made a version (based on Tim Igoe's code) that listens to serial input from an Arduino attached to my computer to contol the speed of the motion. I find it very exciting to be able to control what's happening on my computer screen by turning the knob of a potentiometer attached to my Arduino...

Another Sine Wave, this time object oriented and pixel-array based

My second attempt at creating a moving sine wave. This time, I created a sine wave class, which during initialization creates an array holding a sine wave. After each iteration of the draw function, this array is moved left or right (with the end of the array wrapping to the beginning, or vice versa), depending on the mouse X position (or serial input from an Arduino). The numbers in the array are then used to update the pixel color on the screen. Pressing keys from 1 to 0 results in changing the number of periods the sine wave contains.

Beyond sine waves: Perlin noise, images, and, yes, sinusoids

This code was written so I can control the scroll speed of a variety of patterns with serial commands coming in from an Arduino microcontroller attached to a computer's USB board. Instead of input from an Arduino, this online demo takes information from the X position of the mouse pointer when it's hovering on the image. Mouse on the left means the matrix is shifted towards the left, mouse on the right makes the image move to the right. You might have to click on the image at first to make it run.

Keys that can be pressed while cursor is over the applet::

S … sinusoidal grating
number keys 1 to 0 … change spatial frequency of sinusoid from 1 to 10 periods per image width
n … spatial noise (Perlin noise)
x … re-initialize the noise to get a different pattern
i … image (sample image of leaves)