Quantcast
Channel: Ben Turner's Blog » ICM
Viewing all articles
Browse latest Browse all 9

8-Bit DNA

$
0
0

My ITP classmate Matthew Epler did his intro to computational media midterm on turning poetry into RGB colors, after playing with the concept of digital characters as ASCII values (see the ASCII Table).

“This project is the beginning of what I suspect will be an ongoing investigation of the relationship between language and code. In “Color of Language,” poems are translated into color via Processing, and then passed through a series of iterations involving one simple mathematical equation.”

This made me think about our example sketches where we could break down GIF images into pixels and then display each pixel differently (turn the pixels into ellipses, or search/sort them by brightness).

As I’ve been playing with the look of karyograms and DNA in other projects, I wanted to visually display 8-bit Nintendo characters as their representative digital DNA.  This brief Processing sketch reads in every pixel of the .gif image and outputs it all on one line instead of as an image with width and height, to give it a unique linear signature. Here is the result:

It would be pretty hard to guess the characters just from this representation, but each one definitely has its own digital signature.

The characters:

 = Link (Legend of Zelda)

 = Samus Aran (Metroid)

 = Mario (Super Mario Bros.)

 = Kid Icarus

 = Scrooge McDuck (Duck Tales)

noStroke();
background(255);
size(1400, 500);

PImage thisImg;

int numImgs = 5;
thisImg = loadImage("link.gif"); // filler

for (int i=0; i < numImgs; i++) { 
  switch (i) {
  case 0:
    thisImg = loadImage("link.gif");
    break;
  case 1:
    thisImg = loadImage("samus.gif");
    break;
  case 2:
    thisImg = loadImage("mario.gif");
    break;
  case 3:
    thisImg = loadImage("kidicarus.gif");
    break;
  case 4:
    thisImg = loadImage("scrooge.gif");
    break;
  }

  // displays 1 pixel x 20 pixel DNA lines for each Nintendo character

  color[] imgPixels = thisImg.pixels;
  int z = 0;
  for (int x = 0; x < thisImg.width; x++) {
    for (int y = 0; y < thisImg.height; y++) {
      color c = imgPixels[x + y * thisImg.width];
      fill(c);
      rect(z*1, 25*i, 1, 20);
      z++;
    }
  }
}

Viewing all articles
Browse latest Browse all 9

Trending Articles