This browser does not have a Java Plug-in.
Get the latest Java Plug-in here.

ecce cattus

// ecce cattus

// --------------------------------------------------

// a poem by derek timm-brock

// written in two thousand twelve

// --------------------------------------------------

// structure shamelessly stolen from the processing website

// a vector array of type PImage, with five possibilities

PImage[] imgs = new PImage[5];

// and a counter

int iters = 0;

void setup() {

size(768,960);

// filled catground

image(loadImage("eccecattusBase.png"),0,0);

// black background:

//background(0);

// load all possible cats

imgs[0] = loadImage("happycat-a.gif");

// imgs[0] is the original cheezburger cat.

// the rest are palette swaps.

imgs[1] = loadImage("happycat-b.gif");

imgs[2] = loadImage("happycat-c.gif");

imgs[3] = loadImage("happycat-d.gif");

imgs[4] = loadImage("happycat-e.gif");

}

void draw() {

// the cat

//image(imgs[0],random(width+50)-50,random(height)-50);

// all cats

image(imgs[int( random(imgs.length) )],random(width+50)-50,random(height)-50);

iters++;

print(iters+"\n");

}