My Blog: projects, sketches, works in progress, thoughts, and inspiration.

After playing with binary cellular automata I thought I’d expand the script a little to accommodate more than two states of a pixel. Three loops are nested and each is iterated once for each state. If the index of each loop equals the three values above the current point the function returns the current state of a counter which is incremented in the innermost loop. In a binary system this is a little more complex than just testing each of the eight possible combinations, but is almost necessary when dealing with more states. I’ll post my code at the bottom of this post. But first, some pretty pictures.

processing cellular automata 4

processing cellular automata 3

processing cellular automata 2

Read On »

Read On (Post Continues) »

cellular automata evolutions

This afternoon I played around with 1d cellular automata. The program is creates an array of cells which corresponds to a row of pixels on the screen. Each new generation of the structure is represented by the next row of pixels and the value (black or white) of each pixel is based on the three directly above it. There are eight possibilities for the pattern of the three parent pixels and an array of eight values stores the results to each of these possibilities. Changing the rule-set and the values of the first generation creates vastly different images. The script I was using was very much based off of Dan Shiffman’s code.

cellular_automata-6333

Read On »

Read On (Post Continues) »

In my last post I explained how to control the brightness of multiple light emitting diodes connected to an Arduino with an interface scripted in Processing. The script which I created was great because it just took a series of values sent via USB and lit the LED’s appropriately. This is convenient because it is not specific to any input which might be needed to control the lights. The script to send a value serially along with an indicator character can be added to any Processing script. Naturally one of the first things I had to do with it was create an audio visualizer. With the Arduino programmed as it was all I had to do was use a sound library to break an audio input into frequency bands and send the values down.

arduino led audio visualizer

The circuit is pretty straight forward. Six LED’s are connected through resistors to the six pins which support PWM (3, 6, 5, 9, 10, 11) and to a ground pin. I have everything crammed onto a tiny breadboard on my proto-sheild cause it’s cute and self contained. That’s just my style. PWM stands for Pulse Width Modulation and is the a way to control the brightness of LED’s as well as some other components. It is a digital output and produces the effect by switching on and off very quickly. The result can be visualized as a square wave. When you send a higher value to a PWM pin it will spend more time on than off. This blinking is faster than we can see so the LED appears to be changing brightness according to the amount of time it spends in the on position.

pulse width modulation graph

Read On »

Read On (Post Continues) »

As I started working with my shiny new Arduino board I quickly learned how to build basic circuits and program the micro controller to respond to various stimuli, but what really interested me in the technology was the ability to send information between the board and a computer. I’ve done a fair amount of programming in Processing and was excited to bring some of my work off screen. There is a nice script on the Arduino site on sending data from the board to a computer to control elements within a processing sketch. Unfortunately, the reverse is not as well documented.

I needed a script to send multiple variables from Processing to an Arduino to control a few components. After a bit of research, and more trial and error, I put together a script which controls the brightness of three LED’s through a virtual interface on a monitor. Here are my scripts and the circuit I came up with. It seems simple enough to me but if anyone has suggestions I’d love to hear them.

physical LED pixel on arduio board controlled with processing

Here three color LED’s are connected to pins 9, 10, and 11 which can use Pulse Width Modulation (PWM) to control the brightness of each LED. They are connected to their respective pins through appropriate resistors and also connected to a grounded row in the bread board. In the image I am using the prototyping shield from Adafruit which makes it easy to build small circuits.

Read On »

Read On (Post Continues) »

Ligetisplit Ensemble Poster by Anthony Mattox

I created this set of posters for a performance by the Ligetisplit Ensemble. The images are created with Processing. I had to finagle things a little to get high resolution rendering of my processing sketch. I set the screen dimensions to the pixel dimensions I needed, scaled up my inputs to interact with the whole screen, and had to enter expose or save the image to see what it looked like. It actually worked better than I expected.

Post Page »

stem cell map

Most of the time I have been dedicating to working with Processing has recently been taken up by a larger project. It’s been very exciting for me, but less conducive to blogging both because it’s a larger project, and because I’ve been doing a lot of learning for the project. The piece is an interactive map for an upcoming exhibit for the Maryland Science Center and will be on a large touchscreen. It’s a great project for me as I love data visualization and science.

The application is scripted in Action Script 3. I was originally thinking of using Processing, but I wasn’t happy with how it was handling some things i needed it to do. So far I’m very happy with the choice. Flash is quite a tough beast to work with but I’m impressed with how quickly it parses the sizeable xml file with all the data and also how smoothly it renders all the graphics. I’ve also had to do quite a bit of learning about xml. With a bit of work I have the flash file reading xml directly exported from a spreadsheet editor, making it very easy to be updated.

I’ll write more when the project is finished. I still have to do some work building the interface and making the interaction a little more fluid. The applet will also be available online as well as in the exhibit. For now here are a few images of other visualization methods I’ve been playing with.

stem cell map 3

Read On »

Read On (Post Continues) »

line wave

Here’s another rendering of my line wave script iterated quite a few times. In this rendering the image is blurred before each new set of lines and also inverted to create complimentary colors. There are two desktop wallpapers one of the pictured rendering and a similar one in light blue. Click the thumbnail on the left to download a zip file containing fullscreen and widescreen versions of the wallpaper. They might be a little busy for some, but I like them. What do you think?

Post Page »

arduino led display

My processing work in my blog as slowed to a trickle recently. This is due to a couple of large projects which I can’t wait to reveal. One is a fun web project and the other a flash application. I’ve also been playing with my fancy new toy here and am beginning to make some progress. Along with the Arduino board I’m also using a prototyping shield from Adafruit. It creates a nice little workspace with a breadboard and some extra power sources and grounds. It also contains two led’s, one of which I wired to digital pin 0 on the underside of the board. This just keeps the light on (as long as I’m not using the pin for something else) when the board has power, and makes it blink when data is being transmitted. The shield covers up the power and transmission led’s on the Arduino itself.

In the photo above I have an led display I took out of something else and, for the sake of learning, programmed. Turning the potentiometer controls the display. Nothing thrilling, but it’s good practice. I’ve also been trying to understand serial communication so I can build devices which send and receive complex data.

Anyway, there’s a quick update, and here is my Arduino code in case it might be useful to someone. It’s not put together very well. In particular there should be a 2d array containing all the numerals and their corresponding led’s. But nonetheless.

Read On »

Read On (Post Continues) »

tubes 14139

Another little experiment with my particle system. Each particle is rendered very large with a slightly darker stroke than fill, and each frame is drawn over the previous one. This along with the color shifts creates some nice pseudo three dimensional effects. The effect is especially interesting when particles overlap as they move.

Read On »

Read On (Post Continues) »