21
Sep 09

Paper Pixels

IMG_0050Who the hell came up with Pin The Tail on the Donkey? And furthermore, why on earth are people still playing this asinine game? The wisdom of taking a bunch of kids, spinning them around until they’re dizzy, then sending them careening around the room blindfolded with the instructions “stick this thumbtack into something” is questionable at best. It’s one of those games like the 3-legged race where the amusement is not so much for the participant as it is the spectators who hope to laugh at some minor tragedy. Both games are based on the premise of performing under constraints – not being able to see, not being able to move freely, etc.

Constraints show up in creative projects often. The choice of medium for an art project will impose constraints, and those constraints force you to think creatively about how to deal with them. Success can come from turning the constraints into an advantage, like the staples sculptures here. Or it can be less about the actual results and more about the Sisyphus-like effort involved in the creation.

I’ve written about making pictures from colored card stock in the past, which imposes some fairly specific constraints. It’s essentially like a variation on a monochrome computer display – you can make any spot either the color of the paper or, by cutting a piece out, transparent. I spent some time recently adapting these techniques for use with my Craft Robo computer controlled paper cutter.

Play To Your Strengths

For this project, I wanted to reproduce photographs using two colors of paper. The top layer of paper would be dark and the bottom layer would be light. The technique I planned to use was to divide up the paper into a grid of many small squares. Then, depending on the brightness of the photograph at any give spot I would cut some portion of the small square out. If I needed a bright spot, I would cut a large square out showing mostly the rear light-colored paper. If I needed a darker spot the square I cut would be smaller so less light would come through, and for the darkest spots I wouldn’t cut anything at all out of the dark paper.

IMG_0046This technique gives the ability to reproduce various shades of brightness, but at the cost of reduced detail. Knowing this, I decided to start with a photograph of a simple object without much detail. If someone tells you to make music with one hand tied behind your back, better to choose singing rather than playing the guitar. So I took a picture of a white ceramic espresso cup. This also had the benefit that there was no color, and thus it would translate well to a monochromatic reproduction.

I then wrote a program that applied a grid to the image and based on the average brightness in each grid cell produced an appropriately sized white square in the cell. Through experimentation I decided to use an 11×11 pixel cell size, which translates into each cell being about 0.15 inch square on the paper.

I had to play with the contrast and brightness a bit to get a good result, but ultimately I ended up with the following. The original image is on the left and the monochrome processed version is on the right:

paper_pixels

 

 

From Bits to Atoms

Now I needed to turn the monochrome bitmap into vectors that the Craft Robo cutter can understand. It was a simple matter of importing the bitmap into Corel Draw and then using the Trace Outline command to generate a vector art file:

Vector Espresso

The Craft Robo continues to impress. It took a while to cut out the 835 squares – about 10 minutes or so. But the results were stellar. Each square had nice sharp corners and even the smallest squares, which were just over 1mm wide (about 4/100ths of an inch) cut cleanly. Not all of them cut completely out, so there was a bit of picking pieces out with my tweezers. But after that was done the picture looked pretty good. I trimmed the picture (cut from darker colored paper) and the back layer of bright colored paper and assembled them in a frame.

IMG_0056 IMG_0059

 

One More Thing

I had another frame on hand, so I cut a second copy from a different color of paper. The final pictures have an abstract pop-art look to them, so it actually looks cool to have two of them in different colors hanging on the wall.

 

IMG_0869


08
Sep 09

Facebook “Wall”

led matrix This is still a work in progress, but I took a couple of the LED matrix panels mentioned in a previous entry and combined them with a small OLED display. They’re driven by software on a PC that pulls updates from Twitter and Facebook and shows them on the display.

Eventually I’ll build a few of these into some nice enclosures and hang them on the wall to make a literal Facebook wall.

 


08
Sep 09

1,000 Points of Light

IMG_0036

When I finally get around to writing my self-help book, it will be entitled Everything I Needed To Know About Life, I Learned From The Apple ][. It was my first computer and to really get the most out of it you needed to understand how it worked at the lowest levels. It was the period of my life when I had no money and nearly infinite time, so spending weeks reverse-engineering games and copy protection schemes to understand how they worked was the norm. I learned persistence, dealing with constraints and a work ethic from those experiences. Like any formative experience, it left an indelible impression on me. If I’m ever called-upon to testify in a court of law, I’d like to be sworn in with one hand on The Red Book.

One of the valuable lessons I learned was that hardware designers behave according to a rigorous set of strictures passed down from the Marquis de Sade as a way of torturing software developers. I know just enough about hardware to recognize the brilliance of Steve Wozniak’s Apple ][ design. But the savings of a few logic gates led to one of the most bizarre frame buffers I’ve ever encountered – the Apple ][ hi-res bitmap display.

First off, it’s a 1-bit per pixel display that can display 6 colors (or even 7 colors because there’s a half-pixel shifted version of white – I’m not making this up!). I’m not going to explain how that works, but only mention it because when I was 12 I thought it was completely normal and that’s just how computer graphics worked. It was the raster graphics version of being raised by wolves. Each byte contains 7 pixels of data in the lower 7 bits, but they are in reverse order. So the leftmost pixel is the least-significant bit. Thus, as you march across the screen you end up going right in bytes, but left in bits which then translates into right in pixels. I think this is where Michael Jackson got the inspiration for the Moonwalk. And that 8th bit is special and relates to the colors, so converting a bitmap to Apple ][ native format requires insane feats of bit-shifting, bit reversing and dividing by 7. It’s bizarre and completely nonsensical, and 30 years later I can still do it in my head without even thinking. Woz, if you’re reading this, I want those neurons back.

The cherry on top is that once you’ve zig-zagged your way across an entire scanline your reward is that you need to do some tests and math to calculate the address of the next scanline because (ahem) the scanlines are interleaved.

Now Let’s Complicate Things

I encountered something that is actually a little bit more bizarre recently. There’s a company called Sure Electronics that sells very inexpensive LED matrix panels. They sell a nice 24×16 panel for $10 that includes a driver you can control with a simple serial protocol. That’s a hell of a deal and was just what I needed for some wall displays I was building. Interestingly they use a Moonwalk-style memory layout as well, but theirs jumps every 4 bits instead of 7 and it’s rotated 90 degrees. Yes, the pixels are laid out in column-order rather than row order.

But at a price of under $0.03 per LED I’ll happily fix it in software. They have 2 panel sizes: a 32×8 panel that is good for displaying a single line of text and then a 24×16 panel that isn’t really good for anything but is cool.

32x8 LED Panel32×8 LED Panel available in red, green or yellow

 

IMG_0037 

24×16 LED Panel

I stuck 2 of the 32×8 panels and one of the 24×16 panels in a custom laser-cut acrylic enclosure to use as a status display for work. It’s driven by a Modern Device RBBB Arduino microcontroller board and connects up to a PC through a FTDI USB-to-Serial cable. This allows the board to be bus-powered and have a convenient serial-connection to the PC which allows live update of data to the display.

IMG_0019 IMG_0020

The Right Abstractions

Having a live connection to the PC also meant I could deal with the insanity of the frame buffer on the PC and just feed ready-made bitmaps to the display panel over the serial link. This keeps the complexity on the PC where we have rich debugging tools and the microcontroller code is dirt simple. It just reads bitmaps from the serial link and blasts them directly to the LED panel.

Here’s a video of a test pattern animation running on the display:

LED Wall Display

The display title at the top was cut from white acrylic on a laser cutter. Here’s a brief video of the laser cutter doing it’s thing. If you look closely you can see small flames jumping up off the acrylic as it’s being cut.

 

This project was a test of the LED panels and how fast I could drive them in preparation for a more ambitious project to build a wall display to show Facebook updates. For that one I’ll want to add a separate color display to show profile pictures.